@ng-doc/app 22.0.0-beta.2 → 22.0.0
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/README.md +20 -29
- package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs +363 -0
- package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs.map +1 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs +299 -0
- package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -0
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +51 -35
- package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes-search-engine.mjs.map +1 -1
- package/fesm2022/ng-doc-app-classes.mjs +2 -0
- package/fesm2022/ng-doc-app-classes.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-api-list.mjs +173 -69
- package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs +13 -10
- package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-code.mjs +152 -25
- package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-command-palette.mjs +498 -0
- package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-copy-button.mjs +38 -21
- package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs +36 -29
- package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo-pane.mjs +39 -36
- package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-demo.mjs +129 -44
- package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
- package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
- package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
- package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-image-viewer.mjs +183 -89
- package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
- package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-link.mjs +12 -9
- package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-members.mjs +30 -0
- package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +61 -20
- package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
- package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
- package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
- package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
- package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
- package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-page.mjs +168 -24
- package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-playground.mjs +392 -263
- package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-root.mjs +48 -31
- package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
- package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-search.mjs +64 -33
- package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-sidebar.mjs +86 -61
- package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-tabs.mjs +18 -12
- package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
- package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components-toc.mjs +267 -90
- package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
- package/fesm2022/ng-doc-app-components.mjs +3 -1
- package/fesm2022/ng-doc-app-components.mjs.map +1 -1
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
- package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +11 -5
- package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
- package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
- package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
- package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
- package/fesm2022/ng-doc-app-directives.mjs +1 -0
- package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
- package/fesm2022/ng-doc-app-helpers.mjs +285 -1
- package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
- package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
- package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
- package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
- package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
- package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
- package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs +12 -1
- package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
- package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
- package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
- package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
- package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-highlighter.mjs +83 -14
- package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-route-preloader.mjs +360 -0
- package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
- package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
- package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
- package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-store.mjs +8 -8
- package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
- package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
- package/fesm2022/ng-doc-app-services.mjs +143 -0
- package/fesm2022/ng-doc-app-services.mjs.map +1 -1
- package/fesm2022/ng-doc-app-tokens.mjs +7 -28
- package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
- package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
- package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
- package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +22 -16
- package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
- package/package.json +69 -28
- package/styles/global.css +1125 -201
- package/styles/main.css +1125 -201
- package/styles/themes/dark.css +78 -56
- package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
- package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
- package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
- package/types/ng-doc-app-classes-root-page.d.ts +6 -1
- package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
- package/types/ng-doc-app-classes.d.ts +2 -0
- package/types/ng-doc-app-components-api-list.d.ts +69 -20
- package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
- package/types/ng-doc-app-components-code.d.ts +46 -12
- package/types/ng-doc-app-components-command-palette.d.ts +147 -0
- package/types/ng-doc-app-components-copy-button.d.ts +18 -6
- package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
- package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
- package/types/ng-doc-app-components-demo.d.ts +62 -15
- package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
- package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
- package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
- package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
- package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
- package/types/ng-doc-app-components-link.d.ts +6 -2
- package/types/ng-doc-app-components-members.d.ts +13 -0
- package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
- package/types/ng-doc-app-components-navbar.d.ts +25 -15
- package/types/ng-doc-app-components-page-header.d.ts +28 -4
- package/types/ng-doc-app-components-page-link.d.ts +34 -15
- package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
- package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
- package/types/ng-doc-app-components-page.d.ts +57 -6
- package/types/ng-doc-app-components-playground.d.ts +146 -78
- package/types/ng-doc-app-components-root.d.ts +28 -7
- package/types/ng-doc-app-components-search-result.d.ts +14 -6
- package/types/ng-doc-app-components-search.d.ts +19 -7
- package/types/ng-doc-app-components-tabs.d.ts +13 -4
- package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
- package/types/ng-doc-app-components-toc.d.ts +76 -29
- package/types/ng-doc-app-components.d.ts +3 -1
- package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
- package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
- package/types/ng-doc-app-directives-route-active.d.ts +21 -7
- package/types/ng-doc-app-directives.d.ts +1 -0
- package/types/ng-doc-app-helpers.d.ts +124 -3
- package/types/ng-doc-app-interfaces.d.ts +48 -28
- package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
- package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
- package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
- package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
- package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
- package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
- package/types/ng-doc-app-processors-processors.d.ts +5 -1
- package/types/ng-doc-app-providers-ng-doc-app.d.ts +17 -0
- package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
- package/types/ng-doc-app-services-content-state.d.ts +40 -0
- package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
- package/types/ng-doc-app-services-highlighter.d.ts +40 -5
- package/types/ng-doc-app-services-route-preloader.d.ts +109 -0
- package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
- package/types/ng-doc-app-services-sidebar.d.ts +24 -4
- package/types/ng-doc-app-services-store.d.ts +24 -1
- package/types/ng-doc-app-services-theme.d.ts +19 -3
- package/types/ng-doc-app-services.d.ts +77 -0
- package/types/ng-doc-app-tokens.d.ts +10 -30
- package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
- package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
- package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
- package/types/ng-doc-app-type-controls-type-alias-control.d.ts +13 -6
- package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
- package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
- package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { NgDocSidebarService } from '@ng-doc/app/services';
|
|
2
|
-
import { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';
|
|
3
1
|
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';
|
|
3
|
+
import { NgDocSidebarService } from '@ng-doc/app/services/sidebar';
|
|
4
|
+
import { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Directive uses for providing custom navbar, you should mark element with this directive
|
|
@@ -36,25 +37,45 @@ declare class NgDocCustomSidebarDirective {
|
|
|
36
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocCustomSidebarDirective, never>;
|
|
37
38
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocCustomSidebarDirective, "[ngDocCustomSidebar]", never, {}, {}, never, never, true, never>;
|
|
38
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* Root layout of the NgDoc application: the navbar, the sidebar, the page and the footer.
|
|
42
|
+
*
|
|
43
|
+
* Its first focusable element is a "Skip to content" link, shown only while it has focus, that
|
|
44
|
+
* moves keyboard focus past the navbar and the sidebar to the page.
|
|
45
|
+
*
|
|
46
|
+
* While a page shows one of its fullscreen routes (`NgDocFullscreenRouteService`), only the page
|
|
47
|
+
* is shown: the navbar, the sidebar, the footer and the skip link are hidden.
|
|
48
|
+
*/
|
|
39
49
|
declare class NgDocRootComponent {
|
|
40
50
|
/**
|
|
41
51
|
* If `true` then the sidebar will be shown
|
|
42
52
|
* You can use it for example for landing page to hide sidebar
|
|
43
53
|
*/
|
|
44
|
-
sidebar: boolean
|
|
54
|
+
readonly sidebar: i0.InputSignalWithTransform<boolean, unknown>;
|
|
45
55
|
/**
|
|
46
56
|
* Content for footer
|
|
47
57
|
*/
|
|
48
|
-
footerContent: NgDocContent
|
|
58
|
+
readonly footerContent: i0.InputSignal<NgDocContent>;
|
|
49
59
|
/**
|
|
50
60
|
* If `true` then page will be shown without width limit.
|
|
51
61
|
* You can use it for example for landing page
|
|
52
62
|
*/
|
|
53
|
-
noWidthLimit: boolean
|
|
54
|
-
sidenav?: NgDocSidenavComponent;
|
|
63
|
+
readonly noWidthLimit: i0.InputSignalWithTransform<boolean, unknown>;
|
|
55
64
|
protected readonly sidebarService: NgDocSidebarService;
|
|
65
|
+
protected readonly fullscreenRoute: NgDocFullscreenRouteService;
|
|
66
|
+
private readonly document;
|
|
67
|
+
private readonly sidenavQuery;
|
|
68
|
+
/**
|
|
69
|
+
* The sidenav that holds the sidebar and the page.
|
|
70
|
+
*/
|
|
71
|
+
get sidenav(): NgDocSidenavComponent | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Moves keyboard focus to the page content, as the skip link does.
|
|
74
|
+
* @param event - The click on the skip link; its navigation to a fragment is cancelled.
|
|
75
|
+
*/
|
|
76
|
+
skipToContent(event?: Event): void;
|
|
56
77
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocRootComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocRootComponent, "ng-doc-root", never, { "sidebar": { "alias": "sidebar"; "required": false; }; "footerContent": { "alias": "footerContent"; "required": false; }; "noWidthLimit": { "alias": "noWidthLimit"; "required": false; }; }, {}, never, ["ng-doc-navbar", "[ngDocCustomNavbar]", "ng-doc-sidebar", "[ngDocCustomSidebar]", "*"], true, never>;
|
|
78
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocRootComponent, "ng-doc-root", never, { "sidebar": { "alias": "sidebar"; "required": false; "isSignal": true; }; "footerContent": { "alias": "footerContent"; "required": false; "isSignal": true; }; "noWidthLimit": { "alias": "noWidthLimit"; "required": false; "isSignal": true; }; }, {}, never, ["ng-doc-navbar", "[ngDocCustomNavbar]", "ng-doc-sidebar", "[ngDocCustomSidebar]", "*"], true, never>;
|
|
58
79
|
}
|
|
59
80
|
|
|
60
81
|
export { NgDocCustomNavbarDirective, NgDocCustomSidebarDirective, NgDocRootComponent };
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
3
|
import { NgDocPageInfo } from '@ng-doc/core/interfaces';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A list of pages grouped by their type (guides and API).
|
|
7
|
+
*/
|
|
8
|
+
declare class NgDocSearchResultComponent {
|
|
9
|
+
/** The pages to list. */
|
|
10
|
+
readonly result: i0.InputSignal<NgDocPageInfo[] | null>;
|
|
11
|
+
/** The pages grouped by their type. */
|
|
12
|
+
readonly groupedResult: Signal<Record<string, NgDocPageInfo[]>>;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the heading of a group.
|
|
15
|
+
* @param type - The page type of the group.
|
|
16
|
+
*/
|
|
9
17
|
typeToLabel(type: string): string;
|
|
10
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocSearchResultComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchResultComponent, "ng-doc-search-result", never, { "result": { "alias": "result"; "required": false; }; }, {}, never, never, true, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchResultComponent, "ng-doc-search-result", never, { "result": { "alias": "result"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
12
20
|
}
|
|
13
21
|
|
|
14
22
|
export { NgDocSearchResultComponent };
|
|
@@ -1,16 +1,28 @@
|
|
|
1
|
-
import { NgDocSearchEngine } from '@ng-doc/app/classes';
|
|
2
|
-
import { NgDocSearchResult } from '@ng-doc/app/interfaces';
|
|
3
|
-
import { StatedObservable, NgDocDialogService } from '@ng-doc/ui-kit';
|
|
4
|
-
import { BehaviorSubject } from 'rxjs';
|
|
5
1
|
import * as i0 from '@angular/core';
|
|
2
|
+
import { NgDocSearchEngine } from '@ng-doc/app/classes';
|
|
3
|
+
import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
|
|
4
|
+
import { NgDocDialogService } from '@ng-doc/ui-kit';
|
|
6
5
|
|
|
6
|
+
/**
|
|
7
|
+
* The search button of the navbar. It opens the search palette on click, with Command+K
|
|
8
|
+
* (Control+K) and, while single-key shortcuts are on, with the slash key. Wide screens show a
|
|
9
|
+
* search field with the key hint; narrow screens show an icon button.
|
|
10
|
+
*/
|
|
7
11
|
declare class NgDocSearchComponent {
|
|
8
|
-
protected readonly query: BehaviorSubject<string>;
|
|
9
|
-
protected readonly searchResults: StatedObservable<NgDocSearchResult[]>;
|
|
10
12
|
protected readonly dialog: NgDocDialogService;
|
|
11
13
|
protected readonly searchEngine: NgDocSearchEngine | null;
|
|
14
|
+
protected readonly shortcuts: NgDocShortcutsService;
|
|
15
|
+
/** The chord that opens the search, as the reader's platform labels it. */
|
|
16
|
+
protected readonly chord: i0.WritableSignal<string>;
|
|
17
|
+
private readonly document;
|
|
18
|
+
private readonly browser;
|
|
19
|
+
private dialogRef?;
|
|
12
20
|
constructor();
|
|
13
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Opens the search palette. Focus returns to the element that had it when the palette closes.
|
|
23
|
+
* @param query - The text the search field starts with.
|
|
24
|
+
*/
|
|
25
|
+
open(query?: string): void;
|
|
14
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocSearchComponent, never>;
|
|
15
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchComponent, "ng-doc-search", never, {}, {}, never, never, true, never>;
|
|
16
28
|
}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
|
-
import { NgDocTab } from '@ng-doc/app/interfaces';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import { NgDocTab } from '@ng-doc/app/interfaces';
|
|
3
4
|
|
|
5
|
+
/** Grouped code blocks of a page, shown as tabs. */
|
|
4
6
|
declare class NgDocTabsComponent {
|
|
5
|
-
tabs
|
|
6
|
-
|
|
7
|
+
/** The tabs; their content is moved into the open panel. */
|
|
8
|
+
readonly tabs: i0.InputSignal<NgDocTab[]>;
|
|
9
|
+
/** Index of the tab that opens first: the one marked active, or the first. */
|
|
10
|
+
protected readonly activeIndex: Signal<number>;
|
|
11
|
+
/**
|
|
12
|
+
* Moves a tab's content into its panel.
|
|
13
|
+
* @param element - Content of the tab.
|
|
14
|
+
* @param parent - The panel element.
|
|
15
|
+
*/
|
|
7
16
|
appendElement(element: Element, parent: Element): void;
|
|
8
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocTabsComponent, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTabsComponent, "ng-doc-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTabsComponent, "ng-doc-tabs", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
19
|
}
|
|
11
20
|
|
|
12
21
|
export { NgDocTabsComponent };
|
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
import { NgDocThemeService } from '@ng-doc/app/services/theme';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
import { NgDocThemeService } from '@ng-doc/app/services/theme';
|
|
3
4
|
|
|
4
5
|
interface ToggleTheme {
|
|
5
6
|
name: string;
|
|
6
7
|
theme: string | null;
|
|
7
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Button that switches the theme in turn: Auto (follows the system), Light and Dark.
|
|
11
|
+
*
|
|
12
|
+
* It shows the current theme and follows theme changes made elsewhere through the theme service.
|
|
13
|
+
*/
|
|
8
14
|
declare class NgDocThemeToggleComponent {
|
|
9
|
-
protected readonly themes: ToggleTheme[];
|
|
10
|
-
protected readonly documentElement: HTMLElement;
|
|
11
15
|
protected readonly themeService: NgDocThemeService;
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The current theme. A custom theme id counts as Auto, because the toggle does not offer it.
|
|
18
|
+
*/
|
|
19
|
+
protected readonly currentTheme: Signal<ToggleTheme>;
|
|
20
|
+
/**
|
|
21
|
+
* The theme the next press switches to.
|
|
22
|
+
*/
|
|
23
|
+
protected readonly nextTheme: Signal<ToggleTheme>;
|
|
24
|
+
/**
|
|
25
|
+
* Switches to the next theme.
|
|
26
|
+
*/
|
|
14
27
|
toggleTheme(): void;
|
|
15
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocThemeToggleComponent, never>;
|
|
16
29
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgDocThemeToggleComponent, "ng-doc-theme-toggle", never, {}, {}, never, never, true, never>;
|
|
@@ -1,38 +1,85 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import { Router } from '@angular/router';
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal, ElementRef } from '@angular/core';
|
|
4
3
|
import { NgDocPageToc, NgDocTocItem } from '@ng-doc/app/interfaces';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The "On this page" rail: the headings of the page, the section the reader is in, the reading
|
|
7
|
+
* progress, and the Back to top, Copy link and Edit this page actions.
|
|
8
|
+
*
|
|
9
|
+
* The active section follows scrolling: it is the last heading above a line a little below the
|
|
10
|
+
* navbar, or the last heading once the page is scrolled to the end. A heading the reader picked
|
|
11
|
+
* (an entry clicked, or a link to its fragment) stays active until the reader scrolls again, so a
|
|
12
|
+
* section near the end of the page, which cannot scroll to the top, is still marked. A soft marker
|
|
13
|
+
* glides to the active entry. Tracking pauses while the rail is hidden.
|
|
14
|
+
*
|
|
15
|
+
* While the rail exists, the L shortcut runs its Copy link action, so the rail confirms the copy.
|
|
16
|
+
*/
|
|
17
|
+
declare class NgDocTocComponent implements NgDocPageToc {
|
|
18
|
+
/** The headings of the page. */
|
|
19
|
+
readonly tableOfContent: _angular_core.InputSignal<NgDocTocItem[]>;
|
|
20
|
+
/** URL where the reader can edit the page source. Without it, the rail has no Edit action. */
|
|
21
|
+
readonly editSourceFileUrl: _angular_core.InputSignal<string | undefined>;
|
|
22
|
+
/** The symbol details of an API page, shown above the headings. */
|
|
23
|
+
readonly details: _angular_core.InputSignal<Element | undefined>;
|
|
24
|
+
/** Index of the heading of the section the reader is in. */
|
|
25
|
+
protected readonly activeIndex: _angular_core.WritableSignal<number>;
|
|
26
|
+
/** The heading of the section the reader is in. */
|
|
27
|
+
readonly activeItem: Signal<NgDocTocItem | undefined>;
|
|
28
|
+
/** How much of the page has been scrolled, in percent. */
|
|
29
|
+
protected readonly progress: _angular_core.WritableSignal<number>;
|
|
30
|
+
/** Whether the link was just copied. */
|
|
31
|
+
protected readonly copied: _angular_core.WritableSignal<boolean>;
|
|
21
32
|
protected readonly document: Document;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
33
|
+
private readonly window;
|
|
34
|
+
private readonly location;
|
|
35
|
+
private readonly locationStrategy;
|
|
36
|
+
private readonly clipboard;
|
|
37
|
+
private readonly ngZone;
|
|
38
|
+
private readonly rail;
|
|
39
|
+
private readonly list;
|
|
40
|
+
private readonly detailsHost;
|
|
41
|
+
private readonly marker;
|
|
42
|
+
private readonly elements;
|
|
43
|
+
private readonly router;
|
|
44
|
+
private copiedTimer?;
|
|
45
|
+
private pinned;
|
|
27
46
|
constructor();
|
|
28
|
-
ngOnInit(): void;
|
|
29
47
|
/**
|
|
30
|
-
*
|
|
31
|
-
|
|
48
|
+
* Scrolls the page back to its top.
|
|
49
|
+
*/
|
|
50
|
+
scrollToTop(): void;
|
|
51
|
+
/**
|
|
52
|
+
* Copies the link to the page, without its query and fragment.
|
|
32
53
|
*/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
54
|
+
copyLink(): void;
|
|
55
|
+
/**
|
|
56
|
+
* Marks a heading as the active section until the reader scrolls again.
|
|
57
|
+
* @param index - Index of the heading in the table of contents.
|
|
58
|
+
*/
|
|
59
|
+
pin(index: number): void;
|
|
60
|
+
private pinFragment;
|
|
61
|
+
private track;
|
|
62
|
+
private keepInView;
|
|
63
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocTocComponent, never>;
|
|
64
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocTocComponent, "ng-doc-toc", never, { "tableOfContent": { "alias": "tableOfContent"; "required": false; "isSignal": true; }; "editSourceFileUrl": { "alias": "editSourceFileUrl"; "required": false; "isSignal": true; }; "details": { "alias": "details"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* One entry of the table of contents: a link to a heading of the page.
|
|
69
|
+
*/
|
|
70
|
+
declare class NgDocTocElementComponent {
|
|
71
|
+
/** Path of the page that holds the heading. */
|
|
72
|
+
readonly path: _angular_core.InputSignal<string>;
|
|
73
|
+
/** Id of the heading, used as the link's fragment. */
|
|
74
|
+
readonly hash: _angular_core.InputSignal<string>;
|
|
75
|
+
/** Whether the heading is the section the reader is in. */
|
|
76
|
+
readonly selected: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
77
|
+
/** Depth of the heading in the table of contents, from 1. */
|
|
78
|
+
readonly level: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
79
|
+
/** The list item element. */
|
|
80
|
+
readonly elementRef: ElementRef<HTMLElement>;
|
|
81
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocTocElementComponent, never>;
|
|
82
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocTocElementComponent, "li[ng-doc-toc-element]", never, { "path": { "alias": "path"; "required": false; "isSignal": true; }; "hash": { "alias": "hash"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "level": { "alias": "level"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
36
83
|
}
|
|
37
84
|
|
|
38
85
|
export { NgDocTocComponent, NgDocTocElementComponent };
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
export * from '@ng-doc/app/components/api-list';
|
|
2
2
|
export * from '@ng-doc/app/components/breadcrumb';
|
|
3
3
|
export * from '@ng-doc/app/components/code';
|
|
4
|
+
export * from '@ng-doc/app/components/command-palette';
|
|
4
5
|
export * from '@ng-doc/app/components/copy-button';
|
|
5
6
|
export * from '@ng-doc/app/components/demo';
|
|
6
7
|
export * from '@ng-doc/app/components/demo-displayer';
|
|
7
8
|
export * from '@ng-doc/app/components/demo-pane';
|
|
8
9
|
export * from '@ng-doc/app/components/fullscreen-button';
|
|
10
|
+
export * from '@ng-doc/app/components/fullscreen-toggle';
|
|
9
11
|
export * from '@ng-doc/app/components/heading-anchor';
|
|
10
12
|
export * from '@ng-doc/app/components/image-viewer';
|
|
11
13
|
export * from '@ng-doc/app/components/kind-icon';
|
|
12
14
|
export * from '@ng-doc/app/components/link';
|
|
15
|
+
export * from '@ng-doc/app/components/members';
|
|
13
16
|
export * from '@ng-doc/app/components/mermaid-viewer';
|
|
14
17
|
export * from '@ng-doc/app/components/navbar';
|
|
15
18
|
export * from '@ng-doc/app/components/page';
|
|
@@ -20,7 +23,6 @@ export * from '@ng-doc/app/components/page-wrapper';
|
|
|
20
23
|
export * from '@ng-doc/app/components/playground';
|
|
21
24
|
export * from '@ng-doc/app/components/root';
|
|
22
25
|
export * from '@ng-doc/app/components/search';
|
|
23
|
-
export * from '@ng-doc/app/components/search-dialog';
|
|
24
26
|
export * from '@ng-doc/app/components/search-result';
|
|
25
27
|
export * from '@ng-doc/app/components/sidebar';
|
|
26
28
|
export * from '@ng-doc/app/components/tabs';
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Signal } from '@angular/core';
|
|
3
|
-
import {
|
|
3
|
+
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
4
4
|
import { NgDocHighlighterService } from '@ng-doc/app/services';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Renders the given Angular HTML code, highlighted by `NgDocHighlighterService`, into its host
|
|
8
|
+
* element.
|
|
9
|
+
*/
|
|
6
10
|
declare class NgDocCodeHighlighterDirective {
|
|
7
|
-
code
|
|
8
|
-
|
|
11
|
+
/** The code to highlight. */
|
|
12
|
+
readonly code: i0.InputSignal<string>;
|
|
9
13
|
protected readonly element: any;
|
|
10
14
|
protected readonly highlighter: NgDocHighlighterService;
|
|
11
15
|
protected readonly sanitizer: DomSanitizer;
|
|
12
|
-
|
|
16
|
+
protected readonly highlightedCode: Signal<SafeHtml>;
|
|
13
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocCodeHighlighterDirective, never>;
|
|
14
18
|
static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocCodeHighlighterDirective, "[ngDocHighlighter]", never, { "code": { "alias": "ngDocHighlighter"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
15
19
|
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Adds the member tabs, the name filter and the expandable method rows to the members table of
|
|
6
|
+
* an API page. The page renders every member, so the table reads well without it (on the server
|
|
7
|
+
* and before hydration); the directive only hides rows.
|
|
8
|
+
*
|
|
9
|
+
* It reads this markup inside its host: tab buttons with a data-ng-doc-members-tab attribute
|
|
10
|
+
* ("all", "inherited" or a group name, each with an optional .ng-doc-members-count), a text input
|
|
11
|
+
* with a data-ng-doc-members-filter attribute, group rows (.ng-doc-members-group with data-group)
|
|
12
|
+
* and member rows (.ng-doc-member with data-group, data-name and, for inherited members,
|
|
13
|
+
* data-inherited). A .ng-doc-member-expand button in a member row shows and hides the detail row
|
|
14
|
+
* its aria-controls names, and an optional .ng-doc-members-empty element shows when no member
|
|
15
|
+
* matches. F focuses the filter while single-key shortcuts are on.
|
|
16
|
+
*
|
|
17
|
+
* In the browser it inserts an `ng-doc-selection` as the first child of the row of tabs, the
|
|
18
|
+
* highlight that slides to the selected tab as in the code-block tabs. Until it is placed, the
|
|
19
|
+
* selected tab draws its own background, so the server-rendered page looks the same.
|
|
20
|
+
*/
|
|
21
|
+
declare class NgDocMembersFilterDirective {
|
|
22
|
+
private readonly host;
|
|
23
|
+
private readonly selectionInjector;
|
|
24
|
+
private readonly selection;
|
|
25
|
+
private readonly selectedTab;
|
|
26
|
+
private readonly filterQuery;
|
|
27
|
+
private ready;
|
|
28
|
+
/** The selected tab: "all", "inherited" or a group name. */
|
|
29
|
+
readonly tab: Signal<string>;
|
|
30
|
+
/** The text the member names are filtered by. */
|
|
31
|
+
readonly query: Signal<string>;
|
|
32
|
+
constructor();
|
|
33
|
+
/**
|
|
34
|
+
* Shows the members of a tab.
|
|
35
|
+
* @param tab - "all", "inherited" or a group name.
|
|
36
|
+
*/
|
|
37
|
+
select(tab: string): void;
|
|
38
|
+
/**
|
|
39
|
+
* Shows the members whose name contains the text.
|
|
40
|
+
* @param query - The text; case is ignored.
|
|
41
|
+
*/
|
|
42
|
+
filter(query: string): void;
|
|
43
|
+
protected onClick(event: MouseEvent): void;
|
|
44
|
+
protected onInput(event: Event): void;
|
|
45
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
46
|
+
/**
|
|
47
|
+
* Inserts the highlight of the selected tab into the row of tabs. It is the same component as in
|
|
48
|
+
* the code-block tabs, so it measures, follows resizes and animates the same way; the row is its
|
|
49
|
+
* offset parent, so it scrolls with the tabs.
|
|
50
|
+
*/
|
|
51
|
+
private createHighlight;
|
|
52
|
+
private tabs;
|
|
53
|
+
private members;
|
|
54
|
+
private countTabs;
|
|
55
|
+
private apply;
|
|
56
|
+
private fade;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgDocMembersFilterDirective, never>;
|
|
58
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocMembersFilterDirective, "[ngDocMembersFilter]", never, {}, {}, never, never, true, never>;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export { NgDocMembersFilterDirective };
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
1
2
|
import { IsActiveMatchOptions } from '@angular/router';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Adds classes to its host element while the router URL matches a link.
|
|
6
|
+
*
|
|
7
|
+
* ```html
|
|
8
|
+
* <a [ngDocRouteActive]="'/docs/getting-started'" activeClass="active">Getting started</a>
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
4
11
|
declare class NgDocRouteActiveDirective {
|
|
5
|
-
link
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
/** The link to match against the router URL. */
|
|
13
|
+
readonly link: _angular_core.InputSignal<string>;
|
|
14
|
+
/** Class or classes to add while the link is active. */
|
|
15
|
+
readonly activeClass: _angular_core.InputSignal<string | string[]>;
|
|
16
|
+
/** How the link is matched against the router URL. */
|
|
17
|
+
readonly matchOptions: _angular_core.InputSignal<IsActiveMatchOptions>;
|
|
18
|
+
private readonly router;
|
|
19
|
+
private readonly active;
|
|
20
|
+
/** Whether the link is active. */
|
|
21
|
+
readonly isActive: _angular_core.Signal<boolean>;
|
|
22
|
+
protected readonly classes: _angular_core.Signal<string[]>;
|
|
23
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocRouteActiveDirective, never>;
|
|
24
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgDocRouteActiveDirective, "[ngDocRouteActive]", never, { "link": { "alias": "ngDocRouteActive"; "required": false; "isSignal": true; }; "activeClass": { "alias": "activeClass"; "required": false; "isSignal": true; }; "matchOptions": { "alias": "matchOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
25
|
}
|
|
12
26
|
|
|
13
27
|
export { NgDocRouteActiveDirective };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { ViewContainerRef, Type } from '@angular/core';
|
|
1
|
+
import { InjectionToken, ApplicationRef, ViewContainerRef, Type } from '@angular/core';
|
|
2
|
+
import { Route } from '@angular/router';
|
|
3
|
+
import { NgDocContentSource, NgDocContentModule, NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';
|
|
2
4
|
import { NgDocTocItem } from '@ng-doc/app/interfaces';
|
|
3
|
-
import {
|
|
5
|
+
import { LocationStrategy } from '@angular/common';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
@@ -8,6 +10,69 @@ import { NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';
|
|
|
8
10
|
*/
|
|
9
11
|
declare function asBoolean(value: unknown): boolean;
|
|
10
12
|
|
|
13
|
+
/**
|
|
14
|
+
* How long the router waits for the content of a page before it shows the page anyway, in
|
|
15
|
+
* milliseconds. A stalled load must not freeze navigation: after this, the page opens and its
|
|
16
|
+
* content renders when it arrives, as without the wait.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
declare const ɵNG_DOC_CONTENT_WAIT: InjectionToken<number>;
|
|
20
|
+
/**
|
|
21
|
+
* Loads a content source once and keeps its payload, so a page that renders it later shows it in
|
|
22
|
+
* its first render. A failed load is forgotten, so the next request tries again.
|
|
23
|
+
* @param source - The content source.
|
|
24
|
+
* @returns The loaded payload.
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
declare function ɵpreloadNgDocContent(source: NgDocContentSource): Promise<NgDocContentModule>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns the payload of a source that `ɵpreloadNgDocContent` has loaded, without waiting.
|
|
30
|
+
* @param source - The content source.
|
|
31
|
+
* @returns The payload, or `undefined` when the source has not finished loading.
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
declare function ɵpeekNgDocContent(source: NgDocContentSource): NgDocContentModule | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Returns the load of a source that `ɵpreloadNgDocContent` started and that has not finished,
|
|
37
|
+
* so a page that opens before it finishes waits for the same load instead of starting another.
|
|
38
|
+
* @param source - The content source.
|
|
39
|
+
* @returns The pending load, or `undefined`.
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
declare function ɵpendingNgDocContent(source: NgDocContentSource): Promise<NgDocContentModule> | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Drops the preloaded payload of a source, for a source that reports a new revision.
|
|
45
|
+
* @param source - The content source.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
declare function ɵforgetNgDocContent(source: NgDocContentSource): void;
|
|
49
|
+
/**
|
|
50
|
+
* Makes the router wait for the content of a generated page before it shows the page. Without
|
|
51
|
+
* it, the router removes the previous page as soon as the page's code has loaded, and an empty
|
|
52
|
+
* page shows until its content arrives.
|
|
53
|
+
*
|
|
54
|
+
* The resolver loads the content of every route of the navigation that has some, all at once,
|
|
55
|
+
* because the router runs the resolvers of nested routes one after another. A load that fails
|
|
56
|
+
* still lets the navigation finish: the page shows the error. A load that takes longer than
|
|
57
|
+
* `ɵNG_DOC_CONTENT_WAIT` lets it finish too: the page then renders its content when it arrives.
|
|
58
|
+
* @param route - The route of the page.
|
|
59
|
+
* @param source - The content source of the route's component.
|
|
60
|
+
* @returns A copy of the route with the resolver added.
|
|
61
|
+
* @internal
|
|
62
|
+
*/
|
|
63
|
+
declare function ɵwithNgDocContent(route: Route, source: NgDocContentSource): Route;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the content sources that `ɵwithNgDocContent` attached to a route.
|
|
66
|
+
* @param route - The route, as declared or as the router copied it.
|
|
67
|
+
* @returns The content sources of the route.
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
declare function ɵngDocRouteContentSources(route: Route | null | undefined): NgDocContentSource[];
|
|
71
|
+
|
|
72
|
+
type NgDocBootstrap<TArguments extends unknown[], TApplication extends ApplicationRef = ApplicationRef> = (...arguments_: TArguments) => Promise<TApplication>;
|
|
73
|
+
/** Waits for content loading and processing before returning an SSR application. */
|
|
74
|
+
declare function withNgDocContentReady<TArguments extends unknown[], TApplication extends ApplicationRef = ApplicationRef>(bootstrap: NgDocBootstrap<TArguments, TApplication>): NgDocBootstrap<TArguments, TApplication>;
|
|
75
|
+
|
|
11
76
|
/**
|
|
12
77
|
*
|
|
13
78
|
* @param viewContainer
|
|
@@ -29,6 +94,36 @@ declare function formatHtml(html: string): Promise<string>;
|
|
|
29
94
|
*/
|
|
30
95
|
declare function generateToc(container: HTMLElement): NgDocTocItem[];
|
|
31
96
|
|
|
97
|
+
/**
|
|
98
|
+
* The host attribute with which a component tells that its content loads asynchronously. The
|
|
99
|
+
* server renders it, so only such hosts are copied: a page with inline content costs nothing.
|
|
100
|
+
* @internal
|
|
101
|
+
*/
|
|
102
|
+
declare const ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE = "data-ng-doc-async-content";
|
|
103
|
+
/**
|
|
104
|
+
* Copies the server-rendered content of the NgDoc hosts that skip hydration and load their
|
|
105
|
+
* content asynchronously.
|
|
106
|
+
*
|
|
107
|
+
* Angular empties such a host when it creates its component in the browser, and the page would
|
|
108
|
+
* stay blank until the content arrives, so the component shows this copy until its own content
|
|
109
|
+
* renders (`ɵrestoreNgDocHydrationSnapshot`). Call it in the browser before the application
|
|
110
|
+
* renders.
|
|
111
|
+
* @param document - The document that holds the server-rendered application.
|
|
112
|
+
* @internal
|
|
113
|
+
*/
|
|
114
|
+
declare function ɵcaptureNgDocHydrationSnapshots(document: Document): void;
|
|
115
|
+
/**
|
|
116
|
+
* Shows the server-rendered copy of a host's content, taken by
|
|
117
|
+
* `ɵcaptureNgDocHydrationSnapshots`, in place of the host's own content until the returned
|
|
118
|
+
* function is called. Each copy is shown once; without one, nothing changes. The copy is inert
|
|
119
|
+
* and the host is busy while it is shown.
|
|
120
|
+
* @param host - The host element of the component.
|
|
121
|
+
* @returns A function that removes the copy and shows the host's own content; later calls do
|
|
122
|
+
* nothing.
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
declare function ɵrestoreNgDocHydrationSnapshot(host: Element): () => void;
|
|
126
|
+
|
|
32
127
|
/**
|
|
33
128
|
* Check if the OS theme is dark
|
|
34
129
|
*/
|
|
@@ -46,4 +141,30 @@ declare function isExternalLink(url: string): boolean;
|
|
|
46
141
|
*/
|
|
47
142
|
declare function isPlaygroundProperty(obj: Record<string, any>): obj is NgDocPlaygroundProperty;
|
|
48
143
|
|
|
49
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Returns the current route as an absolute URL in path form: the route's path, query and fragment
|
|
146
|
+
* on the document's origin.
|
|
147
|
+
*
|
|
148
|
+
* With `PathLocationStrategy`, the default, it is the document's own URL. With
|
|
149
|
+
* `HashLocationStrategy` the route lives in the document's fragment (`/#/docs/page#section`), so
|
|
150
|
+
* `location.hash` and links resolved against `location.href` see the wrong part of the URL. This
|
|
151
|
+
* URL carries the route's own fragment, and relative links resolve against the route.
|
|
152
|
+
* @param locationStrategy - The location strategy of the application.
|
|
153
|
+
* @param documentUrl - The URL of the document, `location.href`.
|
|
154
|
+
* @returns The URL of the route.
|
|
155
|
+
* @internal
|
|
156
|
+
*/
|
|
157
|
+
declare function ɵngDocRouteUrl(locationStrategy: LocationStrategy, documentUrl: string): URL;
|
|
158
|
+
/**
|
|
159
|
+
* Returns the absolute URL of the current page, without its query, as the reader shares it: the
|
|
160
|
+
* route in the form the location strategy shows it (`/docs/page` or `/#/docs/page`).
|
|
161
|
+
* @param locationStrategy - The location strategy of the application.
|
|
162
|
+
* @param location - The location of the document.
|
|
163
|
+
* @param fragment - The fragment to link to, without `#`.
|
|
164
|
+
* @returns The URL of the page.
|
|
165
|
+
* @internal
|
|
166
|
+
*/
|
|
167
|
+
declare function ɵngDocPageUrl(locationStrategy: LocationStrategy, location: Pick<Location, 'href' | 'origin' | 'pathname'>, fragment?: string): string;
|
|
168
|
+
|
|
169
|
+
export { asBoolean, createComponent, formatHtml, generateToc, isDarkOsTheme, isExternalLink, isPlaygroundProperty, withNgDocContentReady, ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE, ɵNG_DOC_CONTENT_WAIT, ɵcaptureNgDocHydrationSnapshots, ɵforgetNgDocContent, ɵngDocPageUrl, ɵngDocRouteContentSources, ɵngDocRouteUrl, ɵpeekNgDocContent, ɵpendingNgDocContent, ɵpreloadNgDocContent, ɵrestoreNgDocHydrationSnapshot, ɵwithNgDocContent };
|
|
170
|
+
export type { NgDocBootstrap };
|