@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.
Files changed (203) 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-pane.mjs +39 -36
  25. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  26. package/fesm2022/ng-doc-app-components-demo.mjs +129 -44
  27. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  28. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
  29. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  30. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
  31. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
  32. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
  33. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  34. package/fesm2022/ng-doc-app-components-image-viewer.mjs +183 -89
  35. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  36. package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
  37. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  38. package/fesm2022/ng-doc-app-components-link.mjs +12 -9
  39. package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
  40. package/fesm2022/ng-doc-app-components-members.mjs +30 -0
  41. package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
  42. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +61 -20
  43. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
  44. package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
  45. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  46. package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
  47. package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
  48. package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
  49. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  50. package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
  51. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  52. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
  53. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  54. package/fesm2022/ng-doc-app-components-page.mjs +168 -24
  55. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  56. package/fesm2022/ng-doc-app-components-playground.mjs +392 -263
  57. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  58. package/fesm2022/ng-doc-app-components-root.mjs +48 -31
  59. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  60. package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
  61. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  62. package/fesm2022/ng-doc-app-components-search.mjs +64 -33
  63. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-sidebar.mjs +86 -61
  65. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-tabs.mjs +18 -12
  67. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  68. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
  69. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  70. package/fesm2022/ng-doc-app-components-toc.mjs +267 -90
  71. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  72. package/fesm2022/ng-doc-app-components.mjs +3 -1
  73. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  74. package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
  75. package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
  76. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +11 -5
  77. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  78. package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
  79. package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
  80. package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
  81. package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
  82. package/fesm2022/ng-doc-app-directives.mjs +1 -0
  83. package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
  84. package/fesm2022/ng-doc-app-helpers.mjs +285 -1
  85. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  86. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
  87. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
  88. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
  89. package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
  90. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
  91. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
  92. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
  93. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
  94. package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
  95. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  96. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
  97. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
  98. package/fesm2022/ng-doc-app-processors-processors.mjs +12 -1
  99. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  100. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
  101. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  102. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
  103. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
  104. package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
  105. package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
  106. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
  107. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
  108. package/fesm2022/ng-doc-app-services-highlighter.mjs +83 -14
  109. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  110. package/fesm2022/ng-doc-app-services-route-preloader.mjs +360 -0
  111. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
  112. package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
  113. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
  114. package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
  115. package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
  116. package/fesm2022/ng-doc-app-services-store.mjs +8 -8
  117. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  118. package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
  119. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  120. package/fesm2022/ng-doc-app-services.mjs +143 -0
  121. package/fesm2022/ng-doc-app-services.mjs.map +1 -1
  122. package/fesm2022/ng-doc-app-tokens.mjs +7 -28
  123. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  124. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
  125. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
  126. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
  127. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  128. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
  129. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  130. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +22 -16
  131. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  132. package/package.json +69 -28
  133. package/styles/global.css +1125 -201
  134. package/styles/main.css +1125 -201
  135. package/styles/themes/dark.css +78 -56
  136. package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
  137. package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
  138. package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
  139. package/types/ng-doc-app-classes-root-page.d.ts +6 -1
  140. package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
  141. package/types/ng-doc-app-classes.d.ts +2 -0
  142. package/types/ng-doc-app-components-api-list.d.ts +69 -20
  143. package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
  144. package/types/ng-doc-app-components-code.d.ts +46 -12
  145. package/types/ng-doc-app-components-command-palette.d.ts +147 -0
  146. package/types/ng-doc-app-components-copy-button.d.ts +18 -6
  147. package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
  148. package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
  149. package/types/ng-doc-app-components-demo.d.ts +62 -15
  150. package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
  151. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
  152. package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
  153. package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
  154. package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
  155. package/types/ng-doc-app-components-link.d.ts +6 -2
  156. package/types/ng-doc-app-components-members.d.ts +13 -0
  157. package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
  158. package/types/ng-doc-app-components-navbar.d.ts +25 -15
  159. package/types/ng-doc-app-components-page-header.d.ts +28 -4
  160. package/types/ng-doc-app-components-page-link.d.ts +34 -15
  161. package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
  162. package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
  163. package/types/ng-doc-app-components-page.d.ts +57 -6
  164. package/types/ng-doc-app-components-playground.d.ts +146 -78
  165. package/types/ng-doc-app-components-root.d.ts +28 -7
  166. package/types/ng-doc-app-components-search-result.d.ts +14 -6
  167. package/types/ng-doc-app-components-search.d.ts +19 -7
  168. package/types/ng-doc-app-components-tabs.d.ts +13 -4
  169. package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
  170. package/types/ng-doc-app-components-toc.d.ts +76 -29
  171. package/types/ng-doc-app-components.d.ts +3 -1
  172. package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
  173. package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
  174. package/types/ng-doc-app-directives-route-active.d.ts +21 -7
  175. package/types/ng-doc-app-directives.d.ts +1 -0
  176. package/types/ng-doc-app-helpers.d.ts +124 -3
  177. package/types/ng-doc-app-interfaces.d.ts +48 -28
  178. package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
  179. package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
  180. package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
  181. package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
  182. package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
  183. package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
  184. package/types/ng-doc-app-processors-processors.d.ts +5 -1
  185. package/types/ng-doc-app-providers-ng-doc-app.d.ts +17 -0
  186. package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
  187. package/types/ng-doc-app-services-content-state.d.ts +40 -0
  188. package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
  189. package/types/ng-doc-app-services-highlighter.d.ts +40 -5
  190. package/types/ng-doc-app-services-route-preloader.d.ts +109 -0
  191. package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
  192. package/types/ng-doc-app-services-sidebar.d.ts +24 -4
  193. package/types/ng-doc-app-services-store.d.ts +24 -1
  194. package/types/ng-doc-app-services-theme.d.ts +19 -3
  195. package/types/ng-doc-app-services.d.ts +77 -0
  196. package/types/ng-doc-app-tokens.d.ts +10 -30
  197. package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
  198. package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
  199. package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
  200. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +13 -6
  201. package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
  202. package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
  203. package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
@@ -0,0 +1,147 @@
1
+ import * as _angular_forms_signals from '@angular/forms/signals';
2
+ import * as _angular_core from '@angular/core';
3
+ import { Signal } from '@angular/core';
4
+ import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
5
+
6
+ /**
7
+ * Data of the search palette dialog.
8
+ */
9
+ interface NgDocCommandPaletteData {
10
+ /**
11
+ * The text the search field starts with.
12
+ */
13
+ query?: string;
14
+ }
15
+ /**
16
+ * The scope the search palette shows results for.
17
+ */
18
+ type NgDocCommandPaletteScope = 'all' | 'guides' | 'api' | 'actions';
19
+ type RowType = 'api' | 'guide' | 'action';
20
+ interface Segment {
21
+ text: string;
22
+ match: boolean;
23
+ }
24
+ interface Row {
25
+ id: string;
26
+ type: RowType;
27
+ label: Segment[];
28
+ title: string;
29
+ meta: string;
30
+ icon: 'symbol' | 'page' | 'section' | 'action';
31
+ kind?: string;
32
+ scope?: string;
33
+ url?: string;
34
+ text?: string;
35
+ signature?: string;
36
+ keys?: string[];
37
+ action?: Action;
38
+ /** Whether the row is a declaration whose name starts with the query. */
39
+ pinned?: boolean;
40
+ }
41
+ interface Section {
42
+ key: string;
43
+ type: RowType;
44
+ title: string;
45
+ rows: Row[];
46
+ }
47
+ interface Action {
48
+ name: () => string;
49
+ keywords: string;
50
+ keys: string[];
51
+ keepOpen?: boolean;
52
+ run: () => void;
53
+ }
54
+ /**
55
+ * The search palette: a search field with scopes (all, guides, API and actions), a list of
56
+ * results grouped by type (guides first, then the API), a preview of the selected result and the
57
+ * switch for single-key shortcuts. The navbar search opens it with Command+K (Control+K) or the
58
+ * slash key.
59
+ */
60
+ declare class NgDocCommandPaletteComponent {
61
+ protected readonly scopes: readonly {
62
+ id: NgDocCommandPaletteScope;
63
+ label: string;
64
+ }[];
65
+ protected readonly shortcuts: NgDocShortcutsService;
66
+ private readonly data;
67
+ private readonly overlayRef;
68
+ private readonly router;
69
+ private readonly searchEngine;
70
+ private readonly apiLists;
71
+ protected readonly model: _angular_core.WritableSignal<{
72
+ query: string;
73
+ }>;
74
+ protected readonly searchForm: _angular_forms_signals.FieldTree<{
75
+ query: string;
76
+ }, string | number, "writable">;
77
+ protected readonly scope: _angular_core.WritableSignal<NgDocCommandPaletteScope>;
78
+ protected readonly query: Signal<string>;
79
+ private readonly input;
80
+ private readonly list;
81
+ private readonly results;
82
+ private readonly hits;
83
+ private readonly symbols;
84
+ private readonly symbolsByRoute;
85
+ private readonly actions;
86
+ protected readonly sections: Signal<Section[]>;
87
+ protected readonly rows: Signal<Row[]>;
88
+ private readonly moved;
89
+ protected readonly active: _angular_core.WritableSignal<number>;
90
+ protected readonly selected: Signal<Row>;
91
+ protected readonly searching: Signal<boolean>;
92
+ protected readonly failed: Signal<boolean>;
93
+ protected readonly emptyMessage: Signal<string>;
94
+ /** What the status region announces: the scope, a running search, no results or a failure. */
95
+ protected readonly status: Signal<string>;
96
+ private readonly keyboardMove;
97
+ private readonly host;
98
+ constructor();
99
+ /**
100
+ * Handles the keys of the search field: the arrow keys move the selection and Enter opens the
101
+ * selected result. Keys that compose text in an input method editor are left alone.
102
+ * @param event - The keyboard event of the search field.
103
+ */
104
+ protected onKeydown(event: KeyboardEvent): void;
105
+ /**
106
+ * Handles the keys of the scope tabs: the arrow keys, Home and End select and focus a scope.
107
+ * @param event - The keyboard event of a scope tab.
108
+ */
109
+ protected onScopeKeydown(event: KeyboardEvent): void;
110
+ /**
111
+ * Keeps Tab inside the palette: from its last tab stop focus wraps to the search field, and
112
+ * Shift+Tab from the search field goes to the last tab stop.
113
+ * @param event - A keyboard event inside the palette.
114
+ */
115
+ protected onTrapKeydown(event: KeyboardEvent): void;
116
+ /**
117
+ * Selects a scope by click and returns the focus to the search field.
118
+ * @param scope - The scope to select.
119
+ */
120
+ protected selectScope(scope: NgDocCommandPaletteScope): void;
121
+ /**
122
+ * Selects the result under the pointer, without scrolling the list.
123
+ * @param index - The index of the result.
124
+ */
125
+ protected hover(index: number): void;
126
+ /**
127
+ * Opens the given result: navigates to a page or runs an action.
128
+ * @param row - The result to open.
129
+ */
130
+ protected activate(row: Row | undefined): void;
131
+ private move;
132
+ private close;
133
+ private apiRows;
134
+ private guideRows;
135
+ private actionRows;
136
+ /**
137
+ * The hit of a symbol's page that previews it: the record with the declaration's summary (the
138
+ * new engine puts it on one record of the page), or else any record outside a section.
139
+ * @param route - The route of the symbol's page.
140
+ */
141
+ private hitsFor;
142
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocCommandPaletteComponent, never>;
143
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocCommandPaletteComponent, "ng-doc-command-palette", never, {}, {}, never, never, true, never>;
144
+ }
145
+
146
+ export { NgDocCommandPaletteComponent };
147
+ export type { NgDocCommandPaletteData, NgDocCommandPaletteScope };
@@ -1,15 +1,27 @@
1
+ import * as _angular_core from '@angular/core';
1
2
  import { Clipboard } from '@angular/cdk/clipboard';
2
3
  import { NgDocTooltipDirective } from '@ng-doc/ui-kit';
3
- import * as i0 from '@angular/core';
4
4
 
5
+ /** The text a copy button copies, or a function that reads it when the button is pressed. */
6
+ type NgDocCopyButtonText = string | (() => string);
7
+ /**
8
+ * An icon button that copies a text to the clipboard and confirms it in a tooltip. Project the
9
+ * icon into it.
10
+ */
5
11
  declare class NgDocCopyButtonComponent {
6
- text: string;
7
- tooltip: NgDocTooltipDirective;
8
- protected tooltipText: string;
12
+ /** The text to copy, or a function that returns it when the button is pressed. */
13
+ readonly text: _angular_core.InputSignal<NgDocCopyButtonText>;
14
+ /** Accessible name of the button, also shown in its tooltip. */
15
+ readonly label: _angular_core.InputSignal<string>;
16
+ /** The tooltip of the button. */
17
+ readonly tooltip: _angular_core.Signal<NgDocTooltipDirective>;
18
+ protected readonly tooltipText: _angular_core.WritableSignal<string>;
9
19
  protected readonly clipboard: Clipboard;
20
+ /** Copies the text and shows the confirmation. */
10
21
  copy(): void;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocCopyButtonComponent, never>;
12
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocCopyButtonComponent, "ng-doc-copy-button", never, { "text": { "alias": "text"; "required": true; }; }, {}, never, ["*"], true, never>;
22
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocCopyButtonComponent, never>;
23
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocCopyButtonComponent, "ng-doc-copy-button", never, { "text": { "alias": "text"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
13
24
  }
14
25
 
15
26
  export { NgDocCopyButtonComponent };
27
+ export type { NgDocCopyButtonText };
@@ -1,16 +1,29 @@
1
+ import * as _angular_core from '@angular/core';
1
2
  import { NgDocContent } from '@ng-doc/ui-kit';
2
- import * as i0 from '@angular/core';
3
3
 
4
+ /**
5
+ * A demo on the dot-grid stage with a copy button and a toggle that reveals its code below it
6
+ * (the rows of a playground use it).
7
+ */
4
8
  declare class NgDocDemoDisplayerComponent {
5
- codeContent: NgDocContent;
6
- code: string;
7
- language: string;
8
- container: boolean;
9
- border: boolean;
10
- expanded: boolean;
11
- protected get expandTooltipText(): string;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocDemoDisplayerComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocDemoDisplayerComponent, "ng-doc-demo-displayer", never, { "codeContent": { "alias": "codeContent"; "required": false; }; "code": { "alias": "code"; "required": false; }; "language": { "alias": "language"; "required": false; }; "container": { "alias": "container"; "required": false; }; "border": { "alias": "border"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, {}, never, ["*", "*"], true, never>;
9
+ /** Content shown when the code is revealed; when empty, the highlighted `code` is shown. */
10
+ readonly codeContent: _angular_core.InputSignal<NgDocContent>;
11
+ /** Code of the demo, copied by the copy button and shown when there is no `codeContent`. */
12
+ readonly code: _angular_core.InputSignal<string>;
13
+ /** Language of `code`. */
14
+ readonly language: _angular_core.InputSignal<string>;
15
+ /** Whether the demo is shown in the stage with its controls; otherwise it is shown as is. */
16
+ readonly container: _angular_core.InputSignal<boolean>;
17
+ /** Whether the displayer draws its border. */
18
+ readonly border: _angular_core.InputSignal<boolean>;
19
+ /** Whether the code is revealed. */
20
+ readonly expanded: _angular_core.ModelSignal<boolean>;
21
+ /** Id of the region that holds the code, for the toggle's `aria-controls`. */
22
+ protected readonly codeId: string;
23
+ /** Reveals or hides the code. */
24
+ toggle(): void;
25
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoDisplayerComponent, never>;
26
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocDemoDisplayerComponent, "ng-doc-demo-displayer", never, { "codeContent": { "alias": "codeContent"; "required": false; "isSignal": true; }; "code": { "alias": "code"; "required": false; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "container": { "alias": "container"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["*", "*"], true, never>;
14
27
  }
15
28
 
16
29
  export { NgDocDemoDisplayerComponent };
@@ -1,21 +1,25 @@
1
- import * as i0 from '@angular/core';
2
- import { OnInit, Type } from '@angular/core';
1
+ import * as _ng_doc_core from '@ng-doc/core';
2
+ import * as _angular_core from '@angular/core';
3
+ import { Signal, Type } from '@angular/core';
3
4
  import { NgDocDemoAsset } from '@ng-doc/app/interfaces';
4
- import { NgDocDemoPaneActionOptions } from '@ng-doc/core/interfaces';
5
5
 
6
- declare class NgDocDemoPaneComponent implements OnInit {
6
+ /**
7
+ * Renders a demo of the page in front of its source files, which the reader reveals by dragging
8
+ * the pane's resizer. The demo sits on the dot-grid canvas of demos, with a control that shows it
9
+ * fullscreen with the browser Fullscreen API where the browser supports it.
10
+ */
11
+ declare class NgDocDemoPaneComponent {
7
12
  private readonly rootPage;
8
- componentName?: string;
9
- options: NgDocDemoPaneActionOptions;
10
- demo?: Type<unknown>;
11
- assets: NgDocDemoAsset[];
12
- constructor();
13
- protected get classes(): string | string[];
14
- ngOnInit(): void;
15
- private getDemo;
16
- private getAssets;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocDemoPaneComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocDemoPaneComponent, "ng-doc-demo-pane", never, { "componentName": { "alias": "componentName"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
13
+ /** Name of the demo component in the page's `demos`. */
14
+ readonly componentName: _angular_core.InputSignal<string | undefined>;
15
+ /** Options of the `demoPane` action. */
16
+ readonly options: _angular_core.InputSignal<_ng_doc_core.NgDocBaseDemoOptions>;
17
+ /** The demo component. */
18
+ readonly demo: Signal<Type<unknown> | undefined>;
19
+ /** Source files of the demo, filtered by the `tabs` option. */
20
+ readonly assets: Signal<NgDocDemoAsset[]>;
21
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoPaneComponent, never>;
22
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocDemoPaneComponent, "ng-doc-demo-pane", never, { "componentName": { "alias": "componentName"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
19
23
  }
20
24
 
21
25
  export { NgDocDemoPaneComponent };
@@ -1,22 +1,69 @@
1
- import * as i0 from '@angular/core';
2
- import { OnInit, Type } from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal, Type } from '@angular/core';
3
3
  import { NgDocDemoAsset } from '@ng-doc/app/interfaces';
4
4
  import { NgDocDemoActionOptions } from '@ng-doc/core/interfaces';
5
5
 
6
- declare class NgDocDemoComponent implements OnInit {
6
+ /** Widths the demo can be previewed at. */
7
+ type NgDocDemoPreviewWidth = 'full' | '480' | '280';
8
+ /**
9
+ * Renders a demo of the page in a panel: a toolbar with Preview and source tabs, the preview
10
+ * width, copy and fullscreen controls, over the demo on a dot-grid stage. The fullscreen control
11
+ * shows the stage fullscreen with the browser Fullscreen API; it is hidden where the browser does
12
+ * not support it.
13
+ *
14
+ * The preview widths set the width of the demo's container; they do not emulate a device, so
15
+ * media queries inside the demo do not respond to them.
16
+ */
17
+ declare class NgDocDemoComponent {
7
18
  private readonly rootPage;
8
- componentName?: string;
9
- options: NgDocDemoActionOptions;
10
- demo?: Type<unknown>;
11
- assets: NgDocDemoAsset[];
12
- constructor();
13
- protected get classes(): string | string[];
14
- ngOnInit(): void;
15
- getOpenedAssetId(assets: NgDocDemoAsset[]): string | undefined;
16
- private getDemo;
17
- private getAssets;
18
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocDemoComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocDemoComponent, "ng-doc-demo", never, { "componentName": { "alias": "componentName"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
19
+ private readonly document;
20
+ /** Name of the demo component in the page's `demos`. */
21
+ readonly componentName: _angular_core.InputSignal<string | undefined>;
22
+ /** Options of the `demo` action. */
23
+ readonly options: _angular_core.InputSignal<NgDocDemoActionOptions>;
24
+ /** The demo component. */
25
+ readonly demo: Signal<Type<unknown> | undefined>;
26
+ /** Source files of the demo, filtered by the `tabs` option. */
27
+ readonly assets: Signal<NgDocDemoAsset[]>;
28
+ /**
29
+ * The open view: `preview`, or the title of a source file. It starts on the preview, or on the
30
+ * default source file when the `expanded` option is set.
31
+ */
32
+ readonly view: _angular_core.WritableSignal<string>;
33
+ /** The width the demo is previewed at. */
34
+ readonly previewWidth: _angular_core.WritableSignal<NgDocDemoPreviewWidth>;
35
+ protected readonly previewWidths: readonly {
36
+ readonly width: NgDocDemoPreviewWidth;
37
+ readonly label: string;
38
+ readonly readout: string;
39
+ }[];
40
+ /** Readout of the preview width. */
41
+ protected readonly widthReadout: Signal<string>;
42
+ /** The views in tab order: the preview, then the source files. */
43
+ protected readonly views: Signal<string[]>;
44
+ /** Prefix of the ids that tie the view tabs to their panels. */
45
+ protected readonly idPrefix: string;
46
+ /** Reads the code of the open source file (or the default one) when copy is pressed. */
47
+ protected readonly copyText: () => string;
48
+ private readonly viewTabs;
49
+ /**
50
+ * The source file that opens first: the snippet marked `opened`, then `defaultTab`, then the
51
+ * first file (the order the demo has always used).
52
+ */
53
+ private readonly defaultAsset;
54
+ /**
55
+ * Opens a view.
56
+ * @param view - `preview` or the title of a source file.
57
+ */
58
+ openView(view: string): void;
59
+ /**
60
+ * Moves between the view tabs with the keyboard.
61
+ * @param event - The key press on a view tab.
62
+ */
63
+ protected onViewKeydown(event: KeyboardEvent): void;
64
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoComponent, never>;
65
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocDemoComponent, "ng-doc-demo", never, { "componentName": { "alias": "componentName"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
66
  }
21
67
 
22
68
  export { NgDocDemoComponent };
69
+ export type { NgDocDemoPreviewWidth };
@@ -1,9 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
2
 
3
+ /** A link that opens a demo's fullscreen route in a new tab. */
3
4
  declare class NgDocFullscreenButtonComponent {
4
- route: string;
5
+ /** Route of the fullscreen demo. */
6
+ readonly route: i0.InputSignal<string>;
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocFullscreenButtonComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocFullscreenButtonComponent, "ng-doc-fullscreen-button", never, { "route": { "alias": "route"; "required": true; }; }, {}, never, never, true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocFullscreenButtonComponent, "ng-doc-fullscreen-button", never, { "route": { "alias": "route"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
9
  }
8
10
 
9
11
  export { NgDocFullscreenButtonComponent };
@@ -0,0 +1,24 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { NgDocFullscreenDirective } from '@ng-doc/ui-kit';
4
+
5
+ /**
6
+ * An icon button that shows an element fullscreen with the browser Fullscreen API, or leaves
7
+ * fullscreen. Its icon, label and tooltip follow the fullscreen state, and it is hidden where the
8
+ * browser does not support fullscreen and on the server.
9
+ * @example
10
+ * ```html
11
+ * <div ngDocFullscreen #stage="ngDocFullscreen">…</div>
12
+ * <ng-doc-fullscreen-toggle [target]="stage" />
13
+ * ```
14
+ */
15
+ declare class NgDocFullscreenToggleComponent {
16
+ /** The element to show fullscreen. */
17
+ readonly target: i0.InputSignal<NgDocFullscreenDirective>;
18
+ /** Accessible name and tooltip of the button, which follow the fullscreen state. */
19
+ protected readonly label: Signal<string>;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgDocFullscreenToggleComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocFullscreenToggleComponent, "ng-doc-fullscreen-toggle", never, { "target": { "alias": "target"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
22
+ }
23
+
24
+ export { NgDocFullscreenToggleComponent };
@@ -1,12 +1,31 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit } from '@angular/core';
2
3
 
3
- declare class NgDocHeadingAnchorComponent {
4
- anchor: string;
5
- classes: string[];
4
+ /**
5
+ * Button next to a heading that copies the link to the heading.
6
+ */
7
+ declare class NgDocHeadingAnchorComponent implements OnInit {
8
+ /** Id of the heading. */
9
+ readonly anchor: _angular_core.InputSignal<string>;
10
+ /** Classes of the host element. */
11
+ readonly classes: _angular_core.InputSignal<string[]>;
6
12
  protected readonly location: Location;
7
- protected get href(): string;
8
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocHeadingAnchorComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocHeadingAnchorComponent, "ng-doc-heading-anchor", never, { "anchor": { "alias": "anchor"; "required": true; }; "classes": { "alias": "classes"; "required": false; }; }, {}, never, never, true, never>;
13
+ private readonly locationStrategy;
14
+ private readonly host;
15
+ private readonly renderer;
16
+ protected readonly href: () => string;
17
+ /**
18
+ * Names the heading after its own text: the anchor sits inside the heading, so the button's
19
+ * label would otherwise end the heading's accessible name ("Installation Copy link to
20
+ * section"). The heading's other content moves into a span that the heading is labelled by, so
21
+ * the name follows that content and leaves out whatever it hides from assistive technology.
22
+ * The processors insert the anchor before its first change detection, on the server as in the
23
+ * browser, so the heading is its parent here.
24
+ * @internal
25
+ */
26
+ ngOnInit(): void;
27
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocHeadingAnchorComponent, never>;
28
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocHeadingAnchorComponent, "ng-doc-heading-anchor", never, { "anchor": { "alias": "anchor"; "required": true; "isSignal": true; }; "classes": { "alias": "classes"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
29
  }
11
30
 
12
31
  export { NgDocHeadingAnchorComponent };
@@ -1,18 +1,82 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { TemplateRef, ChangeDetectorRef } from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
3
  import { NgDocOverlayService } from '@ng-doc/ui-kit';
4
4
  import { NgDocOverlayRef } from '@ng-doc/ui-kit/classes';
5
5
 
6
+ /** The size of the opened image, in CSS pixels. */
7
+ interface ZoomSize {
8
+ width: number;
9
+ height: number;
10
+ }
11
+ /**
12
+ * Wraps an image of the page: clicking it, or pressing Enter or Space on it, opens the image at
13
+ * its natural size, scaled down to fit the window.
14
+ *
15
+ * An image inside a link keeps the link's behaviour, and an image with an empty `alt` is
16
+ * decorative: neither becomes a button.
17
+ */
6
18
  declare class NgDocImageViewerComponent {
7
- src: _angular_core.InputSignal<string>;
8
- alt: _angular_core.InputSignal<string>;
9
- protected readonly image: _angular_core.Signal<TemplateRef<any> | undefined>;
19
+ /** Source of the image. */
20
+ readonly src: _angular_core.InputSignal<string>;
21
+ /** Alternative text of the image. */
22
+ readonly alt: _angular_core.InputSignal<string>;
23
+ protected readonly image: _angular_core.Signal<TemplateRef<any>>;
10
24
  protected readonly overlay: NgDocOverlayService;
11
- protected readonly element: any;
12
- protected readonly changeDetectorRef: ChangeDetectorRef;
25
+ protected readonly element: HTMLElement;
26
+ protected readonly window: Window | null;
27
+ /** Whether the scaled image is open. */
28
+ protected readonly opened: _angular_core.WritableSignal<boolean>;
29
+ /** The size of the opened image. */
30
+ protected readonly size: _angular_core.WritableSignal<ZoomSize>;
13
31
  protected overlayRef?: NgDocOverlayRef;
32
+ private attempt;
33
+ private destroyed;
34
+ constructor();
35
+ /**
36
+ * Opens the image at its natural size, scaled down to fit the window, unless the image is not
37
+ * interactive. The image grows from its place on the page.
38
+ */
14
39
  clickEvent(): void;
15
- protected enterContainer(element: HTMLElement): void;
40
+ /**
41
+ * Whether the image opens: it has a text alternative and is not inside a link. The page
42
+ * processor moves the host into place before change detection, so the check reads the DOM
43
+ * where the image ends up.
44
+ */
45
+ protected isInteractive(): boolean;
46
+ /**
47
+ * Opens the image on Space without scrolling the page.
48
+ * @param event - The key press.
49
+ */
50
+ protected onSpace(event: Event): void;
51
+ private open;
52
+ /**
53
+ * Waits until the image is decoded, so its natural size is known. Escape cancels the open
54
+ * meanwhile, as it closes the opened image. A failed decode (a broken or not yet available
55
+ * image) leaves the sizes that are known.
56
+ * @param thumbnail - The image on the page.
57
+ */
58
+ private decode;
59
+ /**
60
+ * The size to scale: the natural size of the image, or the size of the thumbnail for an image
61
+ * without one (an SVG without dimensions), which may then grow to fill the window.
62
+ * @param thumbnail - The image on the page.
63
+ */
64
+ private sourceSize;
65
+ /**
66
+ * The size the image opens at: its natural size, scaled down to fit the viewport with a margin
67
+ * and never scaled up. An image without a natural size fills the available space with the
68
+ * proportions of its thumbnail.
69
+ * @param source - The size to scale.
70
+ */
71
+ private fit;
72
+ /**
73
+ * The keyframe that puts the opened image over its thumbnail. The overlay centres the image in
74
+ * the viewport; the frame scales it uniformly to fit the thumbnail's box and centres it there,
75
+ * so an image whose proportions differ from its box's is not distorted.
76
+ * @param thumbnail - The image on the page.
77
+ * @param size - The size of the opened image.
78
+ */
79
+ private thumbnailFrame;
16
80
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocImageViewerComponent, never>;
17
81
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocImageViewerComponent, "ng-doc-image-viewer", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "alt": { "alias": "alt"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
18
82
  }
@@ -1,11 +1,32 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
2
3
 
4
+ /**
5
+ * Words the kind chips show for declaration kinds whose name is not already a readable word.
6
+ * Other kinds (and value types) are shown as they are.
7
+ */
8
+ declare const NG_DOC_KIND_LABELS: Readonly<Record<string, string>>;
9
+ /**
10
+ * The label a kind chip shows for a kind.
11
+ * @param kind - Declaration kind (for example `Class` or `TypeAlias`) or value type (`string`).
12
+ * @returns The word to show, for example "Type alias".
13
+ */
14
+ declare function ngDocKindLabel(kind: string): string;
15
+ /**
16
+ * A word chip for a declaration kind (`Class`, `Component`, `Type alias`, ...) or a value type
17
+ * (`string`, `boolean`, ...), coloured by the kind.
18
+ */
3
19
  declare class NgDocKindIconComponent {
4
- kind: string;
5
- type: 'declaration' | 'type';
6
- size: 'small' | 'medium';
7
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocKindIconComponent, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocKindIconComponent, "ng-doc-kind-icon", never, { "kind": { "alias": "kind"; "required": false; }; "type": { "alias": "type"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, {}, never, never, true, never>;
20
+ /** Declaration kind or value type. */
21
+ readonly kind: _angular_core.InputSignal<string>;
22
+ /** Whether `kind` is a declaration kind or a value type; it selects the colours. */
23
+ readonly type: _angular_core.InputSignal<"declaration" | "type">;
24
+ /** `small` is the compact chip; `medium` the regular one. */
25
+ readonly size: _angular_core.InputSignal<"small" | "medium">;
26
+ /** The word the chip shows. */
27
+ protected readonly label: Signal<string>;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocKindIconComponent, never>;
29
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocKindIconComponent, "ng-doc-kind-icon", never, { "kind": { "alias": "kind"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
9
30
  }
10
31
 
11
- export { NgDocKindIconComponent };
32
+ export { NG_DOC_KIND_LABELS, NgDocKindIconComponent, ngDocKindLabel };
@@ -1,9 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
2
 
3
+ /**
4
+ * Router link to a path of the application.
5
+ */
3
6
  declare class NgDocLinkComponent {
4
- path: string;
7
+ /** The path to link to. */
8
+ readonly path: i0.InputSignal<string>;
5
9
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocLinkComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocLinkComponent, "ng-doc-link", never, { "path": { "alias": "path"; "required": false; }; }, {}, never, ["*"], true, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocLinkComponent, "ng-doc-link", never, { "path": { "alias": "path"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
7
11
  }
8
12
 
9
13
  export { NgDocLinkComponent };
@@ -0,0 +1,13 @@
1
+ import * as i0 from '@angular/core';
2
+ import * as i1 from '@ng-doc/app/directives/members-filter';
3
+
4
+ /**
5
+ * The members table of an API page in the symbol view. The builder renders its tabs, filter and
6
+ * rows as the component's content, and the component adds the member filter to them.
7
+ */
8
+ declare class NgDocMembersComponent {
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgDocMembersComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocMembersComponent, "ng-doc-members", never, {}, {}, never, ["*"], true, [{ directive: typeof i1.NgDocMembersFilterDirective; inputs: {}; outputs: {}; }]>;
11
+ }
12
+
13
+ export { NgDocMembersComponent };
@@ -1,18 +1,33 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { OnInit, ChangeDetectorRef } from '@angular/core';
3
2
  import { Mermaid } from 'mermaid';
4
3
 
5
- declare class NgDocMermaidViewerComponent implements OnInit {
6
- graph: _angular_core.InputSignal<string>;
4
+ /**
5
+ * Renders a Mermaid graph in a zoomable, pannable viewer. The graph is rendered in the browser
6
+ * only, again when it changes and when the theme changes.
7
+ *
8
+ * In the dark theme (or `auto` with a dark OS theme) the graph uses Mermaid's dark theme, unless
9
+ * the graph or `provideMermaid` chooses a theme of its own.
10
+ */
11
+ declare class NgDocMermaidViewerComponent {
12
+ /** Source of the Mermaid graph. */
13
+ readonly graph: _angular_core.InputSignal<string>;
7
14
  protected readonly html: _angular_core.WritableSignal<string>;
8
15
  protected readonly pending: _angular_core.WritableSignal<boolean>;
9
16
  protected readonly error: _angular_core.WritableSignal<Error | null>;
10
17
  protected readonly mermaid: Mermaid;
11
- protected readonly changeDetectorRef: ChangeDetectorRef;
12
- protected readonly platform: Object;
13
18
  protected readonly id: string;
19
+ private renderId;
20
+ private readonly document;
21
+ private readonly themeService;
14
22
  constructor();
15
- ngOnInit(): Promise<void>;
23
+ /**
24
+ * Adds Mermaid's dark theme to the graph when the page is dark. A graph with front matter or an
25
+ * init directive, and a theme set in `provideMermaid`, are left as they are.
26
+ * @param graph - The graph source.
27
+ * @returns The graph to render.
28
+ */
29
+ private themed;
30
+ private render;
16
31
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocMermaidViewerComponent, never>;
17
32
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocMermaidViewerComponent, "ng-doc-mermaid-viewer", never, { "graph": { "alias": "graph"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
18
33
  }