@ng-doc/app 22.0.0-beta.2 → 22.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +20 -29
  2. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs +363 -0
  3. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs.map +1 -0
  4. package/fesm2022/ng-doc-app-classes-content-controller.mjs +299 -0
  5. package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -0
  6. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +51 -35
  7. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  8. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  9. package/fesm2022/ng-doc-app-classes-search-engine.mjs.map +1 -1
  10. package/fesm2022/ng-doc-app-classes.mjs +2 -0
  11. package/fesm2022/ng-doc-app-classes.mjs.map +1 -1
  12. package/fesm2022/ng-doc-app-components-api-list.mjs +173 -69
  13. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  14. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +13 -10
  15. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/ng-doc-app-components-code.mjs +152 -25
  17. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  18. package/fesm2022/ng-doc-app-components-command-palette.mjs +498 -0
  19. package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -0
  20. package/fesm2022/ng-doc-app-components-copy-button.mjs +38 -21
  21. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
  22. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +36 -29
  23. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  24. package/fesm2022/ng-doc-app-components-demo-frame.mjs +96 -0
  25. package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -0
  26. package/fesm2022/ng-doc-app-components-demo-pane.mjs +39 -36
  27. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  28. package/fesm2022/ng-doc-app-components-demo.mjs +175 -44
  29. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  30. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
  31. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  32. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
  33. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
  34. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
  35. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  36. package/fesm2022/ng-doc-app-components-image-viewer.mjs +183 -89
  37. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  38. package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
  39. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  40. package/fesm2022/ng-doc-app-components-link.mjs +12 -9
  41. package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
  42. package/fesm2022/ng-doc-app-components-members.mjs +30 -0
  43. package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
  44. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +61 -20
  45. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
  46. package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
  47. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  48. package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
  49. package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
  50. package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
  51. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  52. package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
  53. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  54. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
  55. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  56. package/fesm2022/ng-doc-app-components-page.mjs +168 -24
  57. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  58. package/fesm2022/ng-doc-app-components-playground.mjs +477 -286
  59. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  60. package/fesm2022/ng-doc-app-components-root.mjs +48 -31
  61. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  62. package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
  63. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-search.mjs +64 -33
  65. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-sidebar.mjs +86 -61
  67. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  68. package/fesm2022/ng-doc-app-components-tabs.mjs +35 -11
  69. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  70. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
  71. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  72. package/fesm2022/ng-doc-app-components-toc.mjs +267 -90
  73. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  74. package/fesm2022/ng-doc-app-components.mjs +4 -1
  75. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  76. package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
  77. package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
  78. package/fesm2022/ng-doc-app-demo-app.mjs +176 -0
  79. package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -0
  80. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +11 -5
  81. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  82. package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
  83. package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
  84. package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
  85. package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
  86. package/fesm2022/ng-doc-app-directives.mjs +1 -0
  87. package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
  88. package/fesm2022/ng-doc-app-helpers.mjs +307 -2
  89. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  90. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
  91. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
  92. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
  93. package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
  94. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
  95. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
  96. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
  97. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
  98. package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
  99. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  100. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
  101. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
  102. package/fesm2022/ng-doc-app-processors-processors.mjs +42 -10
  103. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  104. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
  105. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  106. package/fesm2022/ng-doc-app-providers-title.mjs +129 -0
  107. package/fesm2022/ng-doc-app-providers-title.mjs.map +1 -0
  108. package/fesm2022/ng-doc-app-providers.mjs +1 -0
  109. package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
  110. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
  111. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
  112. package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
  113. package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
  114. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
  115. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
  116. package/fesm2022/ng-doc-app-services-highlighter.mjs +90 -17
  117. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  118. package/fesm2022/ng-doc-app-services-route-preloader.mjs +384 -0
  119. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
  120. package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
  121. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
  122. package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
  123. package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
  124. package/fesm2022/ng-doc-app-services-store.mjs +8 -8
  125. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  126. package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
  127. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  128. package/fesm2022/ng-doc-app-services.mjs +143 -0
  129. package/fesm2022/ng-doc-app-services.mjs.map +1 -1
  130. package/fesm2022/ng-doc-app-tokens.mjs +7 -28
  131. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  132. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
  133. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
  134. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
  135. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  136. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
  137. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  138. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +59 -18
  139. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  140. package/package.json +82 -28
  141. package/styles/global.css +1128 -201
  142. package/styles/main.css +1128 -201
  143. package/styles/themes/dark.css +88 -56
  144. package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
  145. package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
  146. package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
  147. package/types/ng-doc-app-classes-root-page.d.ts +14 -1
  148. package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
  149. package/types/ng-doc-app-classes.d.ts +2 -0
  150. package/types/ng-doc-app-components-api-list.d.ts +69 -20
  151. package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
  152. package/types/ng-doc-app-components-code.d.ts +46 -12
  153. package/types/ng-doc-app-components-command-palette.d.ts +147 -0
  154. package/types/ng-doc-app-components-copy-button.d.ts +18 -6
  155. package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
  156. package/types/ng-doc-app-components-demo-frame.d.ts +48 -0
  157. package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
  158. package/types/ng-doc-app-components-demo.d.ts +80 -15
  159. package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
  160. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
  161. package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
  162. package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
  163. package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
  164. package/types/ng-doc-app-components-link.d.ts +6 -2
  165. package/types/ng-doc-app-components-members.d.ts +13 -0
  166. package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
  167. package/types/ng-doc-app-components-navbar.d.ts +25 -15
  168. package/types/ng-doc-app-components-page-header.d.ts +28 -4
  169. package/types/ng-doc-app-components-page-link.d.ts +34 -15
  170. package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
  171. package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
  172. package/types/ng-doc-app-components-page.d.ts +57 -6
  173. package/types/ng-doc-app-components-playground.d.ts +167 -78
  174. package/types/ng-doc-app-components-root.d.ts +28 -7
  175. package/types/ng-doc-app-components-search-result.d.ts +14 -6
  176. package/types/ng-doc-app-components-search.d.ts +19 -7
  177. package/types/ng-doc-app-components-tabs.d.ts +24 -5
  178. package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
  179. package/types/ng-doc-app-components-toc.d.ts +76 -29
  180. package/types/ng-doc-app-components.d.ts +4 -1
  181. package/types/ng-doc-app-demo-app.d.ts +89 -0
  182. package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
  183. package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
  184. package/types/ng-doc-app-directives-route-active.d.ts +21 -7
  185. package/types/ng-doc-app-directives.d.ts +1 -0
  186. package/types/ng-doc-app-helpers.d.ts +142 -3
  187. package/types/ng-doc-app-interfaces.d.ts +62 -31
  188. package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
  189. package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
  190. package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
  191. package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
  192. package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
  193. package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
  194. package/types/ng-doc-app-processors-processors.d.ts +10 -1
  195. package/types/ng-doc-app-providers-ng-doc-app.d.ts +18 -1
  196. package/types/ng-doc-app-providers-title.d.ts +59 -0
  197. package/types/ng-doc-app-providers.d.ts +1 -0
  198. package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
  199. package/types/ng-doc-app-services-content-state.d.ts +40 -0
  200. package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
  201. package/types/ng-doc-app-services-highlighter.d.ts +47 -5
  202. package/types/ng-doc-app-services-route-preloader.d.ts +121 -0
  203. package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
  204. package/types/ng-doc-app-services-sidebar.d.ts +24 -4
  205. package/types/ng-doc-app-services-store.d.ts +24 -1
  206. package/types/ng-doc-app-services-theme.d.ts +19 -3
  207. package/types/ng-doc-app-services.d.ts +77 -0
  208. package/types/ng-doc-app-tokens.d.ts +10 -30
  209. package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
  210. package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
  211. package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
  212. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +35 -6
  213. package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
  214. package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
  215. package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
@@ -1,34 +1,45 @@
1
- import * as i0 from '@angular/core';
2
- import { OnInit, Type, ViewContainerRef, ChangeDetectorRef, OnChanges, AfterViewInit, SimpleChanges, OnDestroy, Injector, DestroyRef, EventEmitter } from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnInit, Signal, ViewContainerRef, InputSignal, ChangeDetectorRef, AfterViewInit, WritableSignal, OnChanges, OnDestroy, Injector, DestroyRef, SimpleChanges } from '@angular/core';
3
3
  import { NgDocPlaygroundConfig, NgDocPlaygroundProperties, NgDocPlaygroundOptions, NgDocPlaygroundProperty, NgDocPlaygroundContent } from '@ng-doc/core/interfaces';
4
4
  import { Constructor } from '@ng-doc/core/types';
5
5
  import { Observable } from 'rxjs';
6
6
  import { FormGroup, FormControl } from '@angular/forms';
7
- import { BreakpointObserver } from '@angular/cdk/layout';
8
7
  import { NgDocProvidedTypeControl, NgDocTypeControlProviderOptions } from '@ng-doc/app/interfaces';
9
8
 
10
9
  /**
11
- * Base class for playgrounds components.
10
+ * Base class of the playground classes the builder generates, one per playground and selector.
11
+ * A generated class renders the playground template with the target's inputs bound to
12
+ * `properties()`, and queries the target with `viewChild()`.
12
13
  */
13
14
  declare abstract class NgDocBasePlayground implements Pick<NgDocPlaygroundConfig, 'data'>, OnInit {
14
- private playgroundInstance?;
15
15
  static readonly selector: string;
16
- abstract readonly playground?: Type<any>;
17
- abstract readonly viewContainerRef?: ViewContainerRef;
16
+ /** The class the playground shows: a component, a directive or a pipe. */
17
+ abstract readonly target: Constructor<unknown>;
18
+ /** The instance of the target in the playground template; a pipe has none. */
19
+ abstract readonly playground: Signal<unknown>;
20
+ /** The view container of the target in the playground template; a pipe has none. */
21
+ abstract readonly viewContainerRef: Signal<ViewContainerRef | undefined>;
22
+ /** The `data` of the playground configuration. */
18
23
  abstract readonly configData: Record<string, unknown>;
19
- properties: Record<string, any>;
20
- actionData: Record<string, unknown>;
21
- content: any;
24
+ /** Values of the target's inputs, by property name. */
25
+ readonly properties: InputSignal<Record<string, any>>;
26
+ /** The `data` given to the playground action; it extends the configuration's `data`. */
27
+ readonly actionData: InputSignal<Record<string, unknown>>;
28
+ /** Whether each content slot is shown, by slot name. */
29
+ readonly content: InputSignal<Record<string, any>>;
30
+ /** The default values of the target's inputs, read before the template binds them. */
22
31
  defaultValues: Record<string, unknown>;
23
- private reattached;
24
- private playgroundContainer;
25
- protected changeDetectorRef: ChangeDetectorRef;
26
- protected constructor(playgroundInstance?: Constructor<unknown> | undefined);
32
+ private readonly reattached;
33
+ private readonly playgroundContainer;
34
+ protected readonly changeDetectorRef: ChangeDetectorRef;
35
+ constructor();
36
+ /** Emits once, after the view is attached again and checks the template's bindings. */
27
37
  get onReattached(): Observable<void>;
28
- ngOnInit(): void;
38
+ /** The playground `data`: the configuration's data extended by the action's data. */
29
39
  get data(): any;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocBasePlayground, never>;
31
- static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocBasePlayground, never, never, { "properties": { "alias": "properties"; "required": false; }; "actionData": { "alias": "actionData"; "required": false; }; "content": { "alias": "content"; "required": false; }; }, {}, never, never, true, never>;
40
+ ngOnInit(): void;
41
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocBasePlayground, never>;
42
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgDocBasePlayground, never, never, { "properties": { "alias": "properties"; "required": false; "isSignal": true; }; "actionData": { "alias": "actionData"; "required": false; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
32
43
  }
33
44
 
34
45
  interface NgDocPlaygroundForm {
@@ -36,46 +47,77 @@ interface NgDocPlaygroundForm {
36
47
  content: FormGroup<Record<string, FormControl<boolean>>>;
37
48
  }
38
49
 
39
- declare class NgDocPlaygroundComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties> implements OnChanges, AfterViewInit {
50
+ /**
51
+ * A playground: an inspector with a control per input and content slot of its target, and a demo
52
+ * per selector (or the pipe) rendered with the chosen values.
53
+ */
54
+ declare class NgDocPlaygroundComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties> implements AfterViewInit {
40
55
  private readonly rootPage;
41
56
  private readonly formBuilder;
42
- id: string;
43
- pipeName: string;
44
- selectors: string[];
45
- properties?: T;
46
- options: NgDocPlaygroundOptions;
47
- recreateDemo: boolean;
48
- formGroup: FormGroup<NgDocPlaygroundForm>;
49
- defaultValues?: Record<string, unknown>;
50
- configuration: NgDocPlaygroundConfig;
57
+ /** The name of the playground in the page configuration. */
58
+ readonly id: InputSignal<string>;
59
+ /** The name of the pipe, when the target is a pipe. */
60
+ readonly pipeName: InputSignal<string>;
61
+ /** The selectors of the target to render a demo for. */
62
+ readonly selectors: InputSignal<string[]>;
63
+ /** The inputs of the target. */
64
+ readonly properties: InputSignal<T | undefined>;
65
+ /** Options of the playground action; they extend the playground configuration. */
66
+ readonly options: InputSignal<NgDocPlaygroundOptions>;
67
+ /** The values of the inputs and content slots. */
68
+ readonly formGroup: WritableSignal<FormGroup<NgDocPlaygroundForm> | undefined>;
69
+ /** The default values of the target's inputs, reported by the first demo. */
70
+ readonly defaultValues: WritableSignal<Record<string, unknown> | undefined>;
71
+ /** The playground configuration of the page, extended by the options. */
72
+ readonly configuration: Signal<NgDocPlaygroundConfig>;
73
+ /**
74
+ * Whether the demo is created again each time a value changes. It starts from the `recreate`
75
+ * option; the reader can change it unless the option is `'always'`.
76
+ */
77
+ readonly recreateDemo: WritableSignal<boolean>;
78
+ /** Whether the Recreate setting is fixed on, and hidden, by the `'always'` option. */
79
+ readonly recreateLocked: Signal<boolean>;
51
80
  private defaultProperties;
52
81
  private defaultContent;
53
- constructor();
54
- ngOnChanges({ options }: SimpleChanges): void;
55
82
  ngAfterViewInit(): void;
56
83
  protected isDefaultState(): boolean;
57
84
  private getPropertiesFormValues;
58
85
  private getContentFormValues;
86
+ /** Sets every input and content slot back to its default value. */
59
87
  resetForm(): void;
60
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundComponent<any>, never>;
61
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundComponent<any>, "ng-doc-playground", never, { "id": { "alias": "id"; "required": true; }; "pipeName": { "alias": "pipeName"; "required": false; }; "selectors": { "alias": "selectors"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
88
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocPlaygroundComponent<any>, never>;
89
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocPlaygroundComponent<any>, "ng-doc-playground", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "pipeName": { "alias": "pipeName"; "required": false; "isSignal": true; }; "selectors": { "alias": "selectors"; "required": false; "isSignal": true; }; "properties": { "alias": "properties"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
62
90
  }
63
91
 
92
+ /**
93
+ * One demo of a playground: it creates the generated playground class of its selector (or pipe),
94
+ * passes it the form's values and shows the code of the current state.
95
+ */
64
96
  declare class NgDocPlaygroundDemoComponent<T extends NgDocPlaygroundProperties = NgDocPlaygroundProperties> implements OnChanges, OnDestroy {
65
- id: string;
66
- pipeName: string;
67
- selector: string;
68
- configuration?: NgDocPlaygroundConfig;
69
- properties?: T;
70
- recreateDemo: boolean;
71
- form: FormGroup<NgDocPlaygroundForm>;
72
- expanded: boolean;
73
- demoOutlet?: ViewContainerRef;
97
+ /** The name of the playground in the page configuration. */
98
+ readonly id: InputSignal<string>;
99
+ /** The name of the pipe, when the target is a pipe. */
100
+ readonly pipeName: InputSignal<string>;
101
+ /** The selector of the target this demo renders. */
102
+ readonly selector: InputSignal<string>;
103
+ /** The playground configuration, extended by the action's options. */
104
+ readonly configuration: InputSignal<NgDocPlaygroundConfig | undefined>;
105
+ /** The inputs of the target. */
106
+ readonly properties: InputSignal<T | undefined>;
107
+ /** Whether the demo is created again each time a value changes. */
108
+ readonly recreateDemo: InputSignal<boolean>;
109
+ /** The values of the inputs and content slots. */
110
+ readonly form: InputSignal<FormGroup<NgDocPlaygroundForm> | undefined>;
111
+ /** Whether the code of the demo is shown. */
112
+ readonly expanded: InputSignal<boolean>;
113
+ /** Where the playground class is created. */
114
+ readonly demoOutlet: Signal<ViewContainerRef | undefined>;
115
+ /** The generated playground class of this demo's selector or pipe. */
74
116
  playgroundDemo?: typeof NgDocBasePlayground;
75
- protected code: string;
117
+ protected readonly code: _angular_core.WritableSignal<string>;
76
118
  protected readonly injector: Injector;
77
- protected readonly changeDetectorRef: ChangeDetectorRef;
78
119
  protected readonly destroyRef: DestroyRef;
120
+ private readonly pendingTasks;
79
121
  private demoRef?;
80
122
  private readonly unsubscribe$;
81
123
  ngOnChanges({ form, id }: SimpleChanges): Promise<void>;
@@ -86,8 +128,8 @@ declare class NgDocPlaygroundDemoComponent<T extends NgDocPlaygroundProperties =
86
128
  private getActiveInputs;
87
129
  private getPipeActiveInputs;
88
130
  ngOnDestroy(): void;
89
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundDemoComponent<any>, never>;
90
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundDemoComponent<any>, "ng-doc-playground-demo", never, { "id": { "alias": "id"; "required": false; }; "pipeName": { "alias": "pipeName"; "required": false; }; "selector": { "alias": "selector"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, {}, never, never, true, never>;
131
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocPlaygroundDemoComponent<any>, never>;
132
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocPlaygroundDemoComponent<any>, "ng-doc-playground-demo", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "pipeName": { "alias": "pipeName"; "required": false; "isSignal": true; }; "selector": { "alias": "selector"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "properties": { "alias": "properties"; "required": false; "isSignal": true; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
91
133
  }
92
134
 
93
135
  interface NgDocPlaygroundPropertyControl {
@@ -96,47 +138,94 @@ interface NgDocPlaygroundPropertyControl {
96
138
  typeControl: NgDocProvidedTypeControl;
97
139
  }
98
140
 
99
- declare class NgDocPlaygroundPropertiesComponent<P extends NgDocPlaygroundProperties, C extends Record<string, NgDocPlaygroundContent>> implements OnChanges {
100
- protected readonly breakpointObserver: BreakpointObserver;
101
- private injector;
102
- form: FormGroup<NgDocPlaygroundForm>;
103
- properties?: P;
104
- ignoreInputs?: string[];
105
- dynamicContent?: C;
106
- defaultValues?: Record<string, unknown>;
107
- hideSidePanel: boolean;
108
- recreateDemo: boolean;
109
- showResetButton: boolean;
110
- recreateDemoChange: EventEmitter<boolean>;
111
- resetForm: EventEmitter<void>;
112
- readonly breakpoints: string[];
113
- readonly observer: Observable<boolean>;
114
- protected propertyControls: NgDocPlaygroundPropertyControl[];
115
- protected contentTypeControl?: NgDocProvidedTypeControl;
116
- constructor();
117
- ngOnChanges({ properties }: SimpleChanges): void;
141
+ /**
142
+ * The playground inspector: the demos, and beside them (below them in a container narrower than
143
+ * 640px) the Recreate setting and a control per input and content slot.
144
+ */
145
+ declare class NgDocPlaygroundPropertiesComponent<P extends NgDocPlaygroundProperties, C extends Record<string, NgDocPlaygroundContent>> {
146
+ private readonly injector;
147
+ /** The form of the playground. */
148
+ readonly form: _angular_core.InputSignal<FormGroup<NgDocPlaygroundForm>>;
149
+ /** The inputs of the playground's target. */
150
+ readonly properties: _angular_core.InputSignal<P | undefined>;
151
+ /** Inputs that get no control. */
152
+ readonly ignoreInputs: _angular_core.InputSignal<string[] | undefined>;
153
+ /** Content slots of the playground. */
154
+ readonly dynamicContent: _angular_core.InputSignal<C | undefined>;
155
+ /** Default values of the inputs; the inspector renders once they are known. */
156
+ readonly defaultValues: _angular_core.InputSignal<Record<string, unknown> | undefined>;
157
+ /** Whether the inspector is hidden, leaving the demos only. */
158
+ readonly hideSidePanel: _angular_core.InputSignal<boolean>;
159
+ /** Where the inspector goes: right of the demos, or below them at full width. */
160
+ readonly inspectorPosition: _angular_core.InputSignal<"right" | "bottom">;
161
+ /** Whether the demo is recreated each time an input changes. */
162
+ readonly recreateDemo: _angular_core.ModelSignal<boolean>;
163
+ /** Whether the Recreate setting is fixed by the playground's options and hidden. */
164
+ readonly recreateLocked: _angular_core.InputSignal<boolean>;
165
+ /** Whether the Reset button is shown. */
166
+ readonly showResetButton: _angular_core.InputSignal<boolean>;
167
+ /** Emits when the reader resets the form. */
168
+ readonly resetForm: _angular_core.OutputEmitterRef<void>;
169
+ /** The control of each input, in display order. */
170
+ protected readonly propertyControls: Signal<NgDocPlaygroundPropertyControl[]>;
171
+ /**
172
+ * The controls in sections: the inputs without a group first, then a section per group, in the
173
+ * order of the group's first input.
174
+ */
175
+ protected readonly propertySections: Signal<NgDocPlaygroundPropertySection[]>;
176
+ /** The control of content slots. */
177
+ protected readonly contentTypeControl?: NgDocProvidedTypeControl;
178
+ /**
179
+ * The form control of an input or a content slot.
180
+ * @param controlType - `properties` or `content`.
181
+ * @param key - Name of the input or slot.
182
+ */
118
183
  getFormControl(controlType: keyof NgDocPlaygroundForm, key: string): FormControl;
119
184
  private getTypeControl;
120
185
  private getControlForType;
121
186
  private getControlForTypeAlias;
122
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, never>;
123
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, "ng-doc-playground-properties", never, { "form": { "alias": "form"; "required": false; }; "properties": { "alias": "properties"; "required": false; }; "ignoreInputs": { "alias": "ignoreInputs"; "required": false; }; "dynamicContent": { "alias": "dynamicContent"; "required": false; }; "defaultValues": { "alias": "defaultValues"; "required": false; }; "hideSidePanel": { "alias": "hideSidePanel"; "required": false; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; }; "showResetButton": { "alias": "showResetButton"; "required": false; }; }, { "recreateDemoChange": "recreateDemoChange"; "resetForm": "resetForm"; }, never, ["*"], true, never>;
187
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, never>;
188
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocPlaygroundPropertiesComponent<any, any>, "ng-doc-playground-properties", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; "properties": { "alias": "properties"; "required": false; "isSignal": true; }; "ignoreInputs": { "alias": "ignoreInputs"; "required": false; "isSignal": true; }; "dynamicContent": { "alias": "dynamicContent"; "required": false; "isSignal": true; }; "defaultValues": { "alias": "defaultValues"; "required": false; "isSignal": true; }; "hideSidePanel": { "alias": "hideSidePanel"; "required": false; "isSignal": true; }; "inspectorPosition": { "alias": "inspectorPosition"; "required": false; "isSignal": true; }; "recreateDemo": { "alias": "recreateDemo"; "required": false; "isSignal": true; }; "recreateLocked": { "alias": "recreateLocked"; "required": false; "isSignal": true; }; "showResetButton": { "alias": "showResetButton"; "required": false; "isSignal": true; }; }, { "recreateDemo": "recreateDemoChange"; "resetForm": "resetForm"; }, never, ["*"], true, never>;
189
+ }
190
+ /** A titled list of controls in the inspector. */
191
+ interface NgDocPlaygroundPropertySection {
192
+ title: string;
193
+ controls: NgDocPlaygroundPropertyControl[];
124
194
  }
125
195
 
126
- declare class NgDocPlaygroundPropertyComponent implements OnChanges {
127
- name: string;
128
- property?: NgDocPlaygroundProperty | NgDocPlaygroundContent;
129
- typeControl?: NgDocProvidedTypeControl;
130
- control?: FormControl;
131
- defaultValue?: unknown;
132
- propertyOutlet?: ViewContainerRef;
133
- protected option?: NgDocTypeControlProviderOptions;
196
+ /**
197
+ * One row of the playground inspector: the input's name with its type chip, and the type
198
+ * control that edits it, bound to the input's form control.
199
+ */
200
+ declare class NgDocPlaygroundPropertyComponent {
201
+ /** Name of the input. */
202
+ readonly name: _angular_core.InputSignal<string>;
203
+ /** The input, or the content slot. */
204
+ readonly property: _angular_core.InputSignal<NgDocPlaygroundProperty | NgDocPlaygroundContent | undefined>;
205
+ /** The type control that edits the input. */
206
+ readonly typeControl: _angular_core.InputSignal<NgDocProvidedTypeControl | undefined>;
207
+ /** Form control of the input. */
208
+ readonly control: _angular_core.InputSignal<FormControl<any> | undefined>;
209
+ /** Default value of the input. */
210
+ readonly defaultValue: _angular_core.InputSignal<unknown>;
211
+ /** Whether a type control is rendered. */
212
+ readonly hasPropertyControl: _angular_core.WritableSignal<boolean>;
213
+ /** Description of the input, shown in the tooltip of its name. */
214
+ protected readonly tooltipContent: Signal<string>;
215
+ /** Options of the type control provider. */
216
+ protected readonly option: Signal<NgDocTypeControlProviderOptions | undefined>;
217
+ /** The value type shown as a chip under the name, or an empty string. */
218
+ protected readonly typeChip: Signal<string>;
219
+ /** Whether the row is a `<label>` around the control, unless its provider opts out. */
220
+ protected readonly labelWrapper: Signal<boolean>;
221
+ /** ID of the caption that names the control of a row without the `<label>`. */
222
+ protected readonly captionId: string;
223
+ private readonly propertyOutlet;
134
224
  private propertyTypeControl?;
135
- ngOnChanges({ property, control, typeControl, defaultValue }: SimpleChanges): void;
136
- get hasPropertyControl(): boolean;
137
- get tooltipContent(): string;
138
- static ɵfac: i0.ɵɵFactoryDeclaration<NgDocPlaygroundPropertyComponent, never>;
139
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocPlaygroundPropertyComponent, "ng-doc-playground-property", never, { "name": { "alias": "name"; "required": false; }; "property": { "alias": "property"; "required": false; }; "typeControl": { "alias": "typeControl"; "required": false; }; "control": { "alias": "control"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; }, {}, never, never, true, never>;
225
+ constructor();
226
+ private createControl;
227
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocPlaygroundPropertyComponent, never>;
228
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocPlaygroundPropertyComponent, "ng-doc-playground-property", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "property": { "alias": "property"; "required": false; "isSignal": true; }; "typeControl": { "alias": "typeControl"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
140
229
  }
141
230
 
142
231
  export { NgDocBasePlayground, NgDocPlaygroundComponent, NgDocPlaygroundDemoComponent, NgDocPlaygroundPropertiesComponent, NgDocPlaygroundPropertyComponent };
@@ -1,6 +1,7 @@
1
- import { NgDocSidebarService } from '@ng-doc/app/services';
2
- import { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';
3
1
  import * as i0 from '@angular/core';
2
+ import { NgDocFullscreenRouteService } from '@ng-doc/app/services/fullscreen-route';
3
+ import { NgDocSidebarService } from '@ng-doc/app/services/sidebar';
4
+ import { NgDocContent, NgDocSidenavComponent } from '@ng-doc/ui-kit';
4
5
 
5
6
  /**
6
7
  * Directive uses for providing custom navbar, you should mark element with this directive
@@ -36,25 +37,45 @@ declare class NgDocCustomSidebarDirective {
36
37
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocCustomSidebarDirective, never>;
37
38
  static ɵdir: i0.ɵɵDirectiveDeclaration<NgDocCustomSidebarDirective, "[ngDocCustomSidebar]", never, {}, {}, never, never, true, never>;
38
39
  }
40
+ /**
41
+ * Root layout of the NgDoc application: the navbar, the sidebar, the page and the footer.
42
+ *
43
+ * Its first focusable element is a "Skip to content" link, shown only while it has focus, that
44
+ * moves keyboard focus past the navbar and the sidebar to the page.
45
+ *
46
+ * While a page shows one of its fullscreen routes (`NgDocFullscreenRouteService`), only the page
47
+ * is shown: the navbar, the sidebar, the footer and the skip link are hidden.
48
+ */
39
49
  declare class NgDocRootComponent {
40
50
  /**
41
51
  * If `true` then the sidebar will be shown
42
52
  * You can use it for example for landing page to hide sidebar
43
53
  */
44
- sidebar: boolean;
54
+ readonly sidebar: i0.InputSignalWithTransform<boolean, unknown>;
45
55
  /**
46
56
  * Content for footer
47
57
  */
48
- footerContent: NgDocContent;
58
+ readonly footerContent: i0.InputSignal<NgDocContent>;
49
59
  /**
50
60
  * If `true` then page will be shown without width limit.
51
61
  * You can use it for example for landing page
52
62
  */
53
- noWidthLimit: boolean;
54
- sidenav?: NgDocSidenavComponent;
63
+ readonly noWidthLimit: i0.InputSignalWithTransform<boolean, unknown>;
55
64
  protected readonly sidebarService: NgDocSidebarService;
65
+ protected readonly fullscreenRoute: NgDocFullscreenRouteService;
66
+ private readonly document;
67
+ private readonly sidenavQuery;
68
+ /**
69
+ * The sidenav that holds the sidebar and the page.
70
+ */
71
+ get sidenav(): NgDocSidenavComponent | undefined;
72
+ /**
73
+ * Moves keyboard focus to the page content, as the skip link does.
74
+ * @param event - The click on the skip link; its navigation to a fragment is cancelled.
75
+ */
76
+ skipToContent(event?: Event): void;
56
77
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocRootComponent, never>;
57
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocRootComponent, "ng-doc-root", never, { "sidebar": { "alias": "sidebar"; "required": false; }; "footerContent": { "alias": "footerContent"; "required": false; }; "noWidthLimit": { "alias": "noWidthLimit"; "required": false; }; }, {}, never, ["ng-doc-navbar", "[ngDocCustomNavbar]", "ng-doc-sidebar", "[ngDocCustomSidebar]", "*"], true, never>;
78
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocRootComponent, "ng-doc-root", never, { "sidebar": { "alias": "sidebar"; "required": false; "isSignal": true; }; "footerContent": { "alias": "footerContent"; "required": false; "isSignal": true; }; "noWidthLimit": { "alias": "noWidthLimit"; "required": false; "isSignal": true; }; }, {}, never, ["ng-doc-navbar", "[ngDocCustomNavbar]", "ng-doc-sidebar", "[ngDocCustomSidebar]", "*"], true, never>;
58
79
  }
59
80
 
60
81
  export { NgDocCustomNavbarDirective, NgDocCustomSidebarDirective, NgDocRootComponent };
@@ -1,14 +1,22 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnChanges, SimpleChanges } from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
3
  import { NgDocPageInfo } from '@ng-doc/core/interfaces';
4
4
 
5
- declare class NgDocSearchResultComponent implements OnChanges {
6
- result: NgDocPageInfo[] | null;
7
- groupedResult: Record<string, NgDocPageInfo[]>;
8
- ngOnChanges({ result }: SimpleChanges): void;
5
+ /**
6
+ * A list of pages grouped by their type (guides and API).
7
+ */
8
+ declare class NgDocSearchResultComponent {
9
+ /** The pages to list. */
10
+ readonly result: i0.InputSignal<NgDocPageInfo[] | null>;
11
+ /** The pages grouped by their type. */
12
+ readonly groupedResult: Signal<Record<string, NgDocPageInfo[]>>;
13
+ /**
14
+ * Returns the heading of a group.
15
+ * @param type - The page type of the group.
16
+ */
9
17
  typeToLabel(type: string): string;
10
18
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocSearchResultComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchResultComponent, "ng-doc-search-result", never, { "result": { "alias": "result"; "required": false; }; }, {}, never, never, true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchResultComponent, "ng-doc-search-result", never, { "result": { "alias": "result"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
12
20
  }
13
21
 
14
22
  export { NgDocSearchResultComponent };
@@ -1,16 +1,28 @@
1
- import { NgDocSearchEngine } from '@ng-doc/app/classes';
2
- import { NgDocSearchResult } from '@ng-doc/app/interfaces';
3
- import { StatedObservable, NgDocDialogService } from '@ng-doc/ui-kit';
4
- import { BehaviorSubject } from 'rxjs';
5
1
  import * as i0 from '@angular/core';
2
+ import { NgDocSearchEngine } from '@ng-doc/app/classes';
3
+ import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
4
+ import { NgDocDialogService } from '@ng-doc/ui-kit';
6
5
 
6
+ /**
7
+ * The search button of the navbar. It opens the search palette on click, with Command+K
8
+ * (Control+K) and, while single-key shortcuts are on, with the slash key. Wide screens show a
9
+ * search field with the key hint; narrow screens show an icon button.
10
+ */
7
11
  declare class NgDocSearchComponent {
8
- protected readonly query: BehaviorSubject<string>;
9
- protected readonly searchResults: StatedObservable<NgDocSearchResult[]>;
10
12
  protected readonly dialog: NgDocDialogService;
11
13
  protected readonly searchEngine: NgDocSearchEngine | null;
14
+ protected readonly shortcuts: NgDocShortcutsService;
15
+ /** The chord that opens the search, as the reader's platform labels it. */
16
+ protected readonly chord: i0.WritableSignal<string>;
17
+ private readonly document;
18
+ private readonly browser;
19
+ private dialogRef?;
12
20
  constructor();
13
- open(): void;
21
+ /**
22
+ * Opens the search palette. Focus returns to the element that had it when the palette closes.
23
+ * @param query - The text the search field starts with.
24
+ */
25
+ open(query?: string): void;
14
26
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocSearchComponent, never>;
15
27
  static ɵcmp: i0.ɵɵComponentDeclaration<NgDocSearchComponent, "ng-doc-search", never, {}, {}, never, never, true, never>;
16
28
  }
@@ -1,12 +1,31 @@
1
- import { NgDocTab } from '@ng-doc/app/interfaces';
2
1
  import * as i0 from '@angular/core';
2
+ import { OnInit, Signal } from '@angular/core';
3
+ import { NgDocTab } from '@ng-doc/app/interfaces';
3
4
 
4
- declare class NgDocTabsComponent {
5
- tabs: NgDocTab[];
6
- getActiveIndex(tabs: NgDocTab[]): number;
5
+ /**
6
+ * Tabs of a page: grouped code blocks, or any content that Markdown wraps in
7
+ * `<ng-doc-tab group="…" name="…">` elements.
8
+ */
9
+ declare class NgDocTabsComponent implements OnInit {
10
+ /** The tabs; their content is moved into the open panel. */
11
+ readonly tabs: i0.InputSignal<NgDocTab[]>;
12
+ /** Index of the tab that opens first: the one marked active, or the first. */
13
+ protected readonly activeIndex: Signal<number>;
14
+ /**
15
+ * Whether the tabs hold page content rather than a code group. A code group has one code block
16
+ * per tab and is drawn as one framed code surface; content tabs are only a tab bar over their
17
+ * content, so a framed demo or code block inside them doesn't sit in a second frame.
18
+ */
19
+ protected readonly contentTabs: Signal<boolean>;
20
+ ngOnInit(): void;
21
+ /**
22
+ * Moves a tab's content into its panel.
23
+ * @param element - Content of the tab.
24
+ * @param parent - The panel element.
25
+ */
7
26
  appendElement(element: Element, parent: Element): void;
8
27
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocTabsComponent, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTabsComponent, "ng-doc-tabs", never, { "tabs": { "alias": "tabs"; "required": false; }; }, {}, never, never, true, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgDocTabsComponent, "ng-doc-tabs", never, { "tabs": { "alias": "tabs"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
10
29
  }
11
30
 
12
31
  export { NgDocTabsComponent };
@@ -1,16 +1,29 @@
1
- import { NgDocThemeService } from '@ng-doc/app/services/theme';
2
1
  import * as i0 from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { NgDocThemeService } from '@ng-doc/app/services/theme';
3
4
 
4
5
  interface ToggleTheme {
5
6
  name: string;
6
7
  theme: string | null;
7
8
  }
9
+ /**
10
+ * Button that switches the theme in turn: Auto (follows the system), Light and Dark.
11
+ *
12
+ * It shows the current theme and follows theme changes made elsewhere through the theme service.
13
+ */
8
14
  declare class NgDocThemeToggleComponent {
9
- protected readonly themes: ToggleTheme[];
10
- protected readonly documentElement: HTMLElement;
11
15
  protected readonly themeService: NgDocThemeService;
12
- get currentTheme(): ToggleTheme;
13
- get nextTheme(): ToggleTheme;
16
+ /**
17
+ * The current theme. A custom theme id counts as Auto, because the toggle does not offer it.
18
+ */
19
+ protected readonly currentTheme: Signal<ToggleTheme>;
20
+ /**
21
+ * The theme the next press switches to.
22
+ */
23
+ protected readonly nextTheme: Signal<ToggleTheme>;
24
+ /**
25
+ * Switches to the next theme.
26
+ */
14
27
  toggleTheme(): void;
15
28
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocThemeToggleComponent, never>;
16
29
  static ɵcmp: i0.ɵɵComponentDeclaration<NgDocThemeToggleComponent, "ng-doc-theme-toggle", never, {}, {}, never, never, true, never>;