@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
@@ -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 };
@@ -0,0 +1,48 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { SafeResourceUrl } from '@angular/platform-browser';
4
+
5
+ /**
6
+ * Shows a demo page of the demo application in an iframe, as tall as the demo's content: the demo
7
+ * page reports its height with `postMessage`, and only messages from this iframe's window and
8
+ * origin are accepted. The iframe is created in the browser after the first render (the server
9
+ * renders a placeholder with a link to the demo page) and loads lazily. Until the demo reports its
10
+ * size, a placeholder tells that it is loading; a demo page that loads without reporting it within
11
+ * 10 seconds is reported as failed, with the link.
12
+ */
13
+ declare class NgDocDemoFrameComponent {
14
+ /** The URL of the demo page, relative to the document or absolute on its origin. */
15
+ readonly src: _angular_core.InputSignal<string>;
16
+ /** The accessible title of the iframe. */
17
+ readonly frameTitle: _angular_core.InputSignal<string>;
18
+ /** Whether the iframe fills its container instead of taking the demo's height (fullscreen). */
19
+ readonly fill: _angular_core.InputSignal<boolean>;
20
+ /** The height the demo reported, in pixels. */
21
+ readonly height: _angular_core.WritableSignal<number | undefined>;
22
+ /** `loading` until the demo reports its size, then `ready`; `failed` when it never does. */
23
+ readonly state: Signal<'loading' | 'ready' | 'failed'>;
24
+ /** Whether the iframe exists: only in the browser, after the first render. */
25
+ protected readonly created: _angular_core.WritableSignal<boolean>;
26
+ /** The demo page's URL for the iframe. */
27
+ protected readonly frameSrc: Signal<SafeResourceUrl>;
28
+ private readonly sanitizer;
29
+ private readonly frame;
30
+ private readonly failed;
31
+ private timer?;
32
+ constructor();
33
+ /**
34
+ * Waits for the demo's size once its page has loaded.
35
+ * @internal
36
+ */
37
+ protected onLoad(): void;
38
+ /**
39
+ * Takes the height a demo page reports, from this iframe only.
40
+ * @param event - A message to the window.
41
+ * @internal
42
+ */
43
+ protected onMessage(event: MessageEvent): void;
44
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoFrameComponent, never>;
45
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocDemoFrameComponent, "ng-doc-demo-frame", never, { "src": { "alias": "src"; "required": true; "isSignal": true; }; "frameTitle": { "alias": "frameTitle"; "required": true; "isSignal": true; }; "fill": { "alias": "fill"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
46
+ }
47
+
48
+ export { NgDocDemoFrameComponent };
@@ -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,87 @@
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
+ * When the Vite engine built demo pages for the page (`NgDocRootPage.demoRoute`), the toolbar
15
+ * opens the demo's page in a new tab, and an isolated demo (the `isolated` option, or
16
+ * `isolatedDemos`) is shown in an iframe of its page: the preview widths are then the width of the
17
+ * iframe's viewport, so media queries inside the demo respond to them. Otherwise the demo renders
18
+ * in the page, and the preview widths set the width of its container only.
19
+ */
20
+ declare class NgDocDemoComponent {
7
21
  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>;
22
+ private readonly document;
23
+ private readonly platformLocation;
24
+ private readonly appBaseHref;
25
+ /** Name of the demo component in the page's `demos`. */
26
+ readonly componentName: _angular_core.InputSignal<string | undefined>;
27
+ /** Options of the `demo` action. */
28
+ readonly options: _angular_core.InputSignal<NgDocDemoActionOptions>;
29
+ /** The demo component. */
30
+ readonly demo: Signal<Type<unknown> | undefined>;
31
+ /**
32
+ * The URL of the demo's page, when the page has demo pages and the demo exists: the generated
33
+ * demo route and the demo's name under the base href, with the `inputs` option as a query
34
+ * parameter.
35
+ */
36
+ readonly demoUrl: Signal<string | undefined>;
37
+ /** Whether the demo is shown in an iframe of its page. */
38
+ readonly isolated: Signal<boolean>;
39
+ /** The accessible title of the demo's iframe. */
40
+ protected readonly frameTitle: Signal<string>;
41
+ /** Whether the stage is fullscreen. */
42
+ protected readonly fullscreen: Signal<boolean>;
43
+ private readonly stage;
44
+ /** Source files of the demo, filtered by the `tabs` option. */
45
+ readonly assets: Signal<NgDocDemoAsset[]>;
46
+ /**
47
+ * The open view: `preview`, or the title of a source file. It starts on the preview, or on the
48
+ * default source file when the `expanded` option is set.
49
+ */
50
+ readonly view: _angular_core.WritableSignal<string>;
51
+ /** The width the demo is previewed at. */
52
+ readonly previewWidth: _angular_core.WritableSignal<NgDocDemoPreviewWidth>;
53
+ protected readonly previewWidths: readonly {
54
+ readonly width: NgDocDemoPreviewWidth;
55
+ readonly label: string;
56
+ readonly readout: string;
57
+ }[];
58
+ /** Readout of the preview width. */
59
+ protected readonly widthReadout: Signal<string>;
60
+ /** The views in tab order: the preview, then the source files. */
61
+ protected readonly views: Signal<string[]>;
62
+ /** Prefix of the ids that tie the view tabs to their panels. */
63
+ protected readonly idPrefix: string;
64
+ /** Reads the code of the open source file (or the default one) when copy is pressed. */
65
+ protected readonly copyText: () => string;
66
+ private readonly viewTabs;
67
+ /**
68
+ * The source file that opens first: the snippet marked `opened`, then `defaultTab`, then the
69
+ * first file (the order the demo has always used).
70
+ */
71
+ private readonly defaultAsset;
72
+ /**
73
+ * Opens a view.
74
+ * @param view - `preview` or the title of a source file.
75
+ */
76
+ openView(view: string): void;
77
+ /**
78
+ * Moves between the view tabs with the keyboard.
79
+ * @param event - The key press on a view tab.
80
+ */
81
+ protected onViewKeydown(event: KeyboardEvent): void;
82
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoComponent, never>;
83
+ 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
84
  }
21
85
 
22
86
  export { NgDocDemoComponent };
87
+ 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 };