@ng-doc/app 22.0.0-beta.2 → 22.1.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.
Files changed (215) hide show
  1. package/README.md +20 -29
  2. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs +363 -0
  3. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs.map +1 -0
  4. package/fesm2022/ng-doc-app-classes-content-controller.mjs +299 -0
  5. package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -0
  6. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +51 -35
  7. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  8. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  9. package/fesm2022/ng-doc-app-classes-search-engine.mjs.map +1 -1
  10. package/fesm2022/ng-doc-app-classes.mjs +2 -0
  11. package/fesm2022/ng-doc-app-classes.mjs.map +1 -1
  12. package/fesm2022/ng-doc-app-components-api-list.mjs +173 -69
  13. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  14. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +13 -10
  15. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/ng-doc-app-components-code.mjs +152 -25
  17. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  18. package/fesm2022/ng-doc-app-components-command-palette.mjs +498 -0
  19. package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -0
  20. package/fesm2022/ng-doc-app-components-copy-button.mjs +38 -21
  21. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
  22. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +36 -29
  23. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  24. package/fesm2022/ng-doc-app-components-demo-frame.mjs +96 -0
  25. package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -0
  26. package/fesm2022/ng-doc-app-components-demo-pane.mjs +39 -36
  27. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  28. package/fesm2022/ng-doc-app-components-demo.mjs +175 -44
  29. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  30. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
  31. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  32. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
  33. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
  34. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
  35. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  36. package/fesm2022/ng-doc-app-components-image-viewer.mjs +183 -89
  37. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  38. package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
  39. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  40. package/fesm2022/ng-doc-app-components-link.mjs +12 -9
  41. package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
  42. package/fesm2022/ng-doc-app-components-members.mjs +30 -0
  43. package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
  44. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +61 -20
  45. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
  46. package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
  47. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  48. package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
  49. package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
  50. package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
  51. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  52. package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
  53. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  54. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
  55. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  56. package/fesm2022/ng-doc-app-components-page.mjs +168 -24
  57. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  58. package/fesm2022/ng-doc-app-components-playground.mjs +477 -286
  59. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  60. package/fesm2022/ng-doc-app-components-root.mjs +48 -31
  61. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  62. package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
  63. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-search.mjs +64 -33
  65. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-sidebar.mjs +86 -61
  67. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  68. package/fesm2022/ng-doc-app-components-tabs.mjs +35 -11
  69. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  70. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
  71. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  72. package/fesm2022/ng-doc-app-components-toc.mjs +267 -90
  73. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  74. package/fesm2022/ng-doc-app-components.mjs +4 -1
  75. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  76. package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
  77. package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
  78. package/fesm2022/ng-doc-app-demo-app.mjs +176 -0
  79. package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -0
  80. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +11 -5
  81. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  82. package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
  83. package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
  84. package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
  85. package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
  86. package/fesm2022/ng-doc-app-directives.mjs +1 -0
  87. package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
  88. package/fesm2022/ng-doc-app-helpers.mjs +307 -2
  89. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  90. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
  91. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
  92. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
  93. package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
  94. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
  95. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
  96. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
  97. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
  98. package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
  99. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  100. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
  101. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
  102. package/fesm2022/ng-doc-app-processors-processors.mjs +42 -10
  103. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  104. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
  105. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  106. package/fesm2022/ng-doc-app-providers-title.mjs +129 -0
  107. package/fesm2022/ng-doc-app-providers-title.mjs.map +1 -0
  108. package/fesm2022/ng-doc-app-providers.mjs +1 -0
  109. package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
  110. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
  111. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
  112. package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
  113. package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
  114. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
  115. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
  116. package/fesm2022/ng-doc-app-services-highlighter.mjs +90 -17
  117. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  118. package/fesm2022/ng-doc-app-services-route-preloader.mjs +384 -0
  119. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
  120. package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
  121. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
  122. package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
  123. package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
  124. package/fesm2022/ng-doc-app-services-store.mjs +8 -8
  125. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  126. package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
  127. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  128. package/fesm2022/ng-doc-app-services.mjs +143 -0
  129. package/fesm2022/ng-doc-app-services.mjs.map +1 -1
  130. package/fesm2022/ng-doc-app-tokens.mjs +7 -28
  131. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  132. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
  133. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
  134. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
  135. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  136. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
  137. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  138. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +59 -18
  139. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  140. package/package.json +82 -28
  141. package/styles/global.css +1128 -201
  142. package/styles/main.css +1128 -201
  143. package/styles/themes/dark.css +88 -56
  144. package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
  145. package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
  146. package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
  147. package/types/ng-doc-app-classes-root-page.d.ts +14 -1
  148. package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
  149. package/types/ng-doc-app-classes.d.ts +2 -0
  150. package/types/ng-doc-app-components-api-list.d.ts +69 -20
  151. package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
  152. package/types/ng-doc-app-components-code.d.ts +46 -12
  153. package/types/ng-doc-app-components-command-palette.d.ts +147 -0
  154. package/types/ng-doc-app-components-copy-button.d.ts +18 -6
  155. package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
  156. package/types/ng-doc-app-components-demo-frame.d.ts +48 -0
  157. package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
  158. package/types/ng-doc-app-components-demo.d.ts +80 -15
  159. package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
  160. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
  161. package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
  162. package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
  163. package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
  164. package/types/ng-doc-app-components-link.d.ts +6 -2
  165. package/types/ng-doc-app-components-members.d.ts +13 -0
  166. package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
  167. package/types/ng-doc-app-components-navbar.d.ts +25 -15
  168. package/types/ng-doc-app-components-page-header.d.ts +28 -4
  169. package/types/ng-doc-app-components-page-link.d.ts +34 -15
  170. package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
  171. package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
  172. package/types/ng-doc-app-components-page.d.ts +57 -6
  173. package/types/ng-doc-app-components-playground.d.ts +167 -78
  174. package/types/ng-doc-app-components-root.d.ts +28 -7
  175. package/types/ng-doc-app-components-search-result.d.ts +14 -6
  176. package/types/ng-doc-app-components-search.d.ts +19 -7
  177. package/types/ng-doc-app-components-tabs.d.ts +24 -5
  178. package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
  179. package/types/ng-doc-app-components-toc.d.ts +76 -29
  180. package/types/ng-doc-app-components.d.ts +4 -1
  181. package/types/ng-doc-app-demo-app.d.ts +89 -0
  182. package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
  183. package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
  184. package/types/ng-doc-app-directives-route-active.d.ts +21 -7
  185. package/types/ng-doc-app-directives.d.ts +1 -0
  186. package/types/ng-doc-app-helpers.d.ts +142 -3
  187. package/types/ng-doc-app-interfaces.d.ts +62 -31
  188. package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
  189. package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
  190. package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
  191. package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
  192. package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
  193. package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
  194. package/types/ng-doc-app-processors-processors.d.ts +10 -1
  195. package/types/ng-doc-app-providers-ng-doc-app.d.ts +18 -1
  196. package/types/ng-doc-app-providers-title.d.ts +59 -0
  197. package/types/ng-doc-app-providers.d.ts +1 -0
  198. package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
  199. package/types/ng-doc-app-services-content-state.d.ts +40 -0
  200. package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
  201. package/types/ng-doc-app-services-highlighter.d.ts +47 -5
  202. package/types/ng-doc-app-services-route-preloader.d.ts +121 -0
  203. package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
  204. package/types/ng-doc-app-services-sidebar.d.ts +24 -4
  205. package/types/ng-doc-app-services-store.d.ts +24 -1
  206. package/types/ng-doc-app-services-theme.d.ts +19 -3
  207. package/types/ng-doc-app-services.d.ts +77 -0
  208. package/types/ng-doc-app-tokens.d.ts +10 -30
  209. package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
  210. package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
  211. package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
  212. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +35 -6
  213. package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
  214. package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
  215. package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
@@ -1,38 +1,85 @@
1
- import * as i0 from '@angular/core';
2
- import { ElementRef, OnInit, QueryList, WritableSignal, NgZone, ChangeDetectorRef, Renderer2, DestroyRef } from '@angular/core';
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
- declare class NgDocTocElementComponent {
7
- path: string;
8
- hash: string;
9
- selected: boolean;
10
- level: number;
11
- readonly elementRef: ElementRef<HTMLElement>;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocTocElementComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTocElementComponent, "li[ng-doc-toc-element]", never, { "path": { "alias": "path"; "required": false; }; "hash": { "alias": "hash"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "level": { "alias": "level"; "required": false; }; }, {}, never, ["*"], true, never>;
14
- }
15
-
16
- declare class NgDocTocComponent implements NgDocPageToc, OnInit {
17
- tableOfContent: NgDocTocItem[];
18
- selection?: ElementRef<HTMLElement>;
19
- elements: QueryList<NgDocTocElementComponent>;
20
- activeItem: WritableSignal<NgDocTocItem | undefined>;
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
- protected readonly ngZone: NgZone;
23
- protected readonly changeDetectorRef: ChangeDetectorRef;
24
- protected readonly renderer: Renderer2;
25
- protected readonly router: Router;
26
- protected readonly destroyRef: DestroyRef;
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
- * Selects the item in the table of content.
31
- * @param item - Item to select.
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
- protected select(item: NgDocTocItem): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocTocComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTocComponent, "ng-doc-toc", never, { "tableOfContent": { "alias": "tableOfContent"; "required": false; }; }, {}, never, never, true, never>;
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,19 @@
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';
8
+ export * from '@ng-doc/app/components/demo-frame';
7
9
  export * from '@ng-doc/app/components/demo-pane';
8
10
  export * from '@ng-doc/app/components/fullscreen-button';
11
+ export * from '@ng-doc/app/components/fullscreen-toggle';
9
12
  export * from '@ng-doc/app/components/heading-anchor';
10
13
  export * from '@ng-doc/app/components/image-viewer';
11
14
  export * from '@ng-doc/app/components/kind-icon';
12
15
  export * from '@ng-doc/app/components/link';
16
+ export * from '@ng-doc/app/components/members';
13
17
  export * from '@ng-doc/app/components/mermaid-viewer';
14
18
  export * from '@ng-doc/app/components/navbar';
15
19
  export * from '@ng-doc/app/components/page';
@@ -20,7 +24,6 @@ export * from '@ng-doc/app/components/page-wrapper';
20
24
  export * from '@ng-doc/app/components/playground';
21
25
  export * from '@ng-doc/app/components/root';
22
26
  export * from '@ng-doc/app/components/search';
23
- export * from '@ng-doc/app/components/search-dialog';
24
27
  export * from '@ng-doc/app/components/search-result';
25
28
  export * from '@ng-doc/app/components/sidebar';
26
29
  export * from '@ng-doc/app/components/tabs';
@@ -0,0 +1,89 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Provider, EnvironmentProviders, ApplicationConfig, Type } from '@angular/core';
3
+ import { Routes } from '@angular/router';
4
+ import { NgDocDemoProvidersImport } from '@ng-doc/core/interfaces';
5
+
6
+ /**
7
+ * The root of the demo application, which shows one demo per page with only Angular and that
8
+ * demo loaded. In an iframe it reports the height of its content to the page that embeds it (a
9
+ * `ResizeObserver` on its border box), and it follows the theme the reader picks on the
10
+ * documentation site, which stores it in `localStorage`.
11
+ */
12
+ declare class NgDocDemoAppComponent {
13
+ constructor();
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgDocDemoAppComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocDemoAppComponent, "ng-doc-demo-app", never, {}, {}, never, never, true, never>;
16
+ }
17
+
18
+ /**
19
+ * How the demo application starts.
20
+ * @internal
21
+ */
22
+ interface ɵNgDocDemoApplicationOptions {
23
+ /** Change detection with zone.js, when the application's polyfills load it. */
24
+ readonly zone?: boolean;
25
+ /**
26
+ * Hydration of the server-rendered page: always on the server, which then writes the hydration
27
+ * data, and in the browser only for a page the server rendered (a page without it, such as the
28
+ * page of a demo that failed to prerender or the development server's, has nothing to hydrate).
29
+ */
30
+ readonly hydration?: boolean;
31
+ /** Providers added after the others, for example server rendering. */
32
+ readonly providers?: Array<Provider | EnvironmentProviders>;
33
+ }
34
+ /**
35
+ * The configuration of the demo application: change detection, the router with the demo pages
36
+ * (and a page for unknown demos), hydration, and the providers of `demoProviders`. The generated entries of
37
+ * the demo application bootstrap `NgDocDemoAppComponent` with it, in the browser and on the server.
38
+ * @param routes - The generated demo routes.
39
+ * @param demoProviders - The generated import of the `demoProviders` module, if any.
40
+ * @param options - How the application starts.
41
+ * @internal
42
+ */
43
+ declare function ɵngDocDemoApplicationConfig(routes: Routes, demoProviders: NgDocDemoProvidersImport | undefined, options?: ɵNgDocDemoApplicationOptions): Promise<ApplicationConfig>;
44
+
45
+ /**
46
+ * Shows the demo of a demo page: the component in the route's `ngDocDemo` data, with the inputs
47
+ * of the `inputs` query parameter (the JSON of the `inputs` option of the `demo` action).
48
+ *
49
+ * The demo application hydrates its server-rendered page, but not the demo: a demo is the user's
50
+ * component and need not be hydration-safe, and the server renders it without the inputs of the
51
+ * query, which only the browser has. So the host skips hydration, as documentation pages do for
52
+ * their content, and the browser renders the demo again.
53
+ */
54
+ declare class NgDocDemoHostComponent {
55
+ private readonly route;
56
+ /** The demo component, or undefined on the page of a demo that does not exist. */
57
+ protected readonly demo: Type<unknown> | undefined;
58
+ /** The inputs of the demo. */
59
+ protected readonly inputs: Record<string, unknown>;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgDocDemoHostComponent, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocDemoHostComponent, "ng-doc-demo-host", never, {}, {}, never, never, true, never>;
62
+ }
63
+
64
+ /**
65
+ * The `source` of every message the demo application sends to the page that embeds it.
66
+ * @internal
67
+ */
68
+ declare const ɵNG_DOC_DEMO_MESSAGE_SOURCE = "ng-doc-demo";
69
+ /**
70
+ * The message an isolated demo sends to the page that shows it in an iframe whenever the height
71
+ * of its content changes, so that the iframe takes that height.
72
+ * @internal
73
+ */
74
+ interface ɵNgDocDemoSizeMessage {
75
+ readonly source: typeof ɵNG_DOC_DEMO_MESSAGE_SOURCE;
76
+ readonly version: 1;
77
+ readonly type: 'size';
78
+ /** The height of the demo's content, in CSS pixels, rounded up. */
79
+ readonly height: number;
80
+ }
81
+ /**
82
+ * Whether a message is a size message of the demo application.
83
+ * @param value - The data of a `message` event.
84
+ * @internal
85
+ */
86
+ declare function ɵisNgDocDemoSizeMessage(value: unknown): value is ɵNgDocDemoSizeMessage;
87
+
88
+ export { NgDocDemoAppComponent, NgDocDemoHostComponent, ɵNG_DOC_DEMO_MESSAGE_SOURCE, ɵisNgDocDemoSizeMessage, ɵngDocDemoApplicationConfig };
89
+ export type { ɵNgDocDemoApplicationOptions, ɵNgDocDemoSizeMessage };
@@ -1,15 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Signal } from '@angular/core';
3
- import { SafeHtml, DomSanitizer } from '@angular/platform-browser';
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: i0.InputSignal<string>;
8
- protected readonly highlightedCode: Signal<SafeHtml>;
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
- constructor();
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: string;
6
- activeClass: string | string[];
7
- matchOptions: IsActiveMatchOptions;
8
- constructor();
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocRouteActiveDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocRouteActiveDirective, "[ngDocRouteActive]", never, { "link": { "alias": "ngDocRouteActive"; "required": false; }; "activeClass": { "alias": "activeClass"; "required": false; }; "matchOptions": { "alias": "matchOptions"; "required": false; }; }, {}, never, never, true, never>;
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,2 +1,3 @@
1
1
  export * from '@ng-doc/app/directives/code-highlighter';
2
+ export * from '@ng-doc/app/directives/members-filter';
2
3
  export * from '@ng-doc/app/directives/route-active';
@@ -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, NgDocPlaygroundOption } from '@ng-doc/core/interfaces';
2
4
  import { NgDocTocItem } from '@ng-doc/app/interfaces';
3
- import { NgDocPlaygroundProperty } from '@ng-doc/core/interfaces';
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,48 @@ declare function isExternalLink(url: string): boolean;
46
141
  */
47
142
  declare function isPlaygroundProperty(obj: Record<string, any>): obj is NgDocPlaygroundProperty;
48
143
 
49
- export { asBoolean, createComponent, formatHtml, generateToc, isDarkOsTheme, isExternalLink, isPlaygroundProperty };
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
+ /** An option of a playground property, resolved to the value it sets and the text it shows. */
170
+ interface NgDocResolvedPlaygroundOption {
171
+ /** The text shown for the option. */
172
+ label: string;
173
+ /** The value the option sets. */
174
+ value: unknown;
175
+ }
176
+ /**
177
+ * Resolves an option of a playground property. A named option (an enum member) carries its
178
+ * value; a plain value from the playground's `controls` is the value itself; any other option is
179
+ * the source text of a union member, such as `'small'`, and is evaluated; it throws when that
180
+ * text can't be evaluated.
181
+ * @param option - The option.
182
+ * @param isManual - Whether the options come from the playground's `controls`.
183
+ * @returns The value of the option and the text that shows it.
184
+ */
185
+ declare function resolvePlaygroundOption(option: string | NgDocPlaygroundOption, isManual?: boolean): NgDocResolvedPlaygroundOption;
186
+
187
+ export { asBoolean, createComponent, formatHtml, generateToc, isDarkOsTheme, isExternalLink, isPlaygroundProperty, resolvePlaygroundOption, withNgDocContentReady, ɵNG_DOC_ASYNC_CONTENT_ATTRIBUTE, ɵNG_DOC_CONTENT_WAIT, ɵcaptureNgDocHydrationSnapshots, ɵforgetNgDocContent, ɵngDocPageUrl, ɵngDocRouteContentSources, ɵngDocRouteUrl, ɵpeekNgDocContent, ɵpendingNgDocContent, ɵpreloadNgDocContent, ɵrestoreNgDocHydrationSnapshot, ɵwithNgDocContent };
188
+ export type { NgDocBootstrap, NgDocResolvedPlaygroundOption };