@ng-doc/app 22.0.0 → 22.2.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 (173) hide show
  1. package/LICENSE +21 -0
  2. package/fesm2022/ng-doc-app-classes-content-controller.mjs +22 -4
  3. package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -1
  4. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +36 -12
  5. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  6. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  7. package/fesm2022/ng-doc-app-components-api-list.mjs +7 -5
  8. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  9. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +5 -3
  10. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/ng-doc-app-components-code.mjs +6 -4
  12. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  13. package/fesm2022/ng-doc-app-components-command-palette.mjs +35 -27
  14. package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -1
  15. package/fesm2022/ng-doc-app-components-copy-button.mjs +6 -4
  16. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
  17. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +19 -4
  18. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  19. package/fesm2022/ng-doc-app-components-demo-frame.mjs +279 -0
  20. package/fesm2022/ng-doc-app-components-demo-frame.mjs.map +1 -0
  21. package/fesm2022/ng-doc-app-components-demo-pane.mjs +2 -2
  22. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  23. package/fesm2022/ng-doc-app-components-demo.mjs +97 -14
  24. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  25. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +5 -3
  26. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  27. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +4 -2
  28. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -1
  29. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +5 -3
  30. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  31. package/fesm2022/ng-doc-app-components-image-viewer.mjs +5 -3
  32. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  33. package/fesm2022/ng-doc-app-components-navbar.mjs +4 -2
  34. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  35. package/fesm2022/ng-doc-app-components-page-navigation.mjs +5 -3
  36. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  37. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +2 -2
  38. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  39. package/fesm2022/ng-doc-app-components-page.mjs +83 -16
  40. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  41. package/fesm2022/ng-doc-app-components-playground.mjs +838 -141
  42. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  43. package/fesm2022/ng-doc-app-components-root.mjs +51 -4
  44. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  45. package/fesm2022/ng-doc-app-components-search-result.mjs +8 -6
  46. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  47. package/fesm2022/ng-doc-app-components-search.mjs +7 -5
  48. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  49. package/fesm2022/ng-doc-app-components-sidebar.mjs +4 -3
  50. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  51. package/fesm2022/ng-doc-app-components-tabs.mjs +21 -3
  52. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  53. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +7 -5
  54. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  55. package/fesm2022/ng-doc-app-components-toc.mjs +4 -2
  56. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  57. package/fesm2022/ng-doc-app-components.mjs +1 -0
  58. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  59. package/fesm2022/ng-doc-app-constants.mjs +11 -1
  60. package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
  61. package/fesm2022/ng-doc-app-demo-app.mjs +779 -0
  62. package/fesm2022/ng-doc-app-demo-app.mjs.map +1 -0
  63. package/fesm2022/ng-doc-app-helpers.mjs +147 -7
  64. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  65. package/fesm2022/ng-doc-app-processors-processors.mjs +30 -9
  66. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  67. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +29 -18
  68. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  69. package/fesm2022/ng-doc-app-providers-texts.mjs +53 -0
  70. package/fesm2022/ng-doc-app-providers-texts.mjs.map +1 -0
  71. package/fesm2022/ng-doc-app-providers-title.mjs +129 -0
  72. package/fesm2022/ng-doc-app-providers-title.mjs.map +1 -0
  73. package/fesm2022/ng-doc-app-providers.mjs +2 -0
  74. package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
  75. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +27 -2
  76. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -1
  77. package/fesm2022/ng-doc-app-services-highlighter.mjs +23 -16
  78. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  79. package/fesm2022/ng-doc-app-services-route-preloader.mjs +34 -10
  80. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -1
  81. package/fesm2022/ng-doc-app-services-shortcuts.mjs +38 -4
  82. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -1
  83. package/fesm2022/ng-doc-app-texts-ar.mjs +238 -0
  84. package/fesm2022/ng-doc-app-texts-ar.mjs.map +1 -0
  85. package/fesm2022/ng-doc-app-texts-de.mjs +205 -0
  86. package/fesm2022/ng-doc-app-texts-de.mjs.map +1 -0
  87. package/fesm2022/ng-doc-app-texts-es.mjs +205 -0
  88. package/fesm2022/ng-doc-app-texts-es.mjs.map +1 -0
  89. package/fesm2022/ng-doc-app-texts-fr.mjs +205 -0
  90. package/fesm2022/ng-doc-app-texts-fr.mjs.map +1 -0
  91. package/fesm2022/ng-doc-app-texts-hi.mjs +219 -0
  92. package/fesm2022/ng-doc-app-texts-hi.mjs.map +1 -0
  93. package/fesm2022/ng-doc-app-texts-ja.mjs +205 -0
  94. package/fesm2022/ng-doc-app-texts-ja.mjs.map +1 -0
  95. package/fesm2022/ng-doc-app-texts-ko.mjs +205 -0
  96. package/fesm2022/ng-doc-app-texts-ko.mjs.map +1 -0
  97. package/fesm2022/ng-doc-app-texts-pt-br.mjs +205 -0
  98. package/fesm2022/ng-doc-app-texts-pt-br.mjs.map +1 -0
  99. package/fesm2022/ng-doc-app-texts-ru.mjs +231 -0
  100. package/fesm2022/ng-doc-app-texts-ru.mjs.map +1 -0
  101. package/fesm2022/ng-doc-app-texts-uk.mjs +231 -0
  102. package/fesm2022/ng-doc-app-texts-uk.mjs.map +1 -0
  103. package/fesm2022/ng-doc-app-texts-zh.mjs +205 -0
  104. package/fesm2022/ng-doc-app-texts-zh.mjs.map +1 -0
  105. package/fesm2022/ng-doc-app-tokens.mjs +214 -1
  106. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  107. package/fesm2022/ng-doc-app-type-controls-json-control.mjs +90 -0
  108. package/fesm2022/ng-doc-app-type-controls-json-control.mjs.map +1 -0
  109. package/fesm2022/ng-doc-app-type-controls-list-control.mjs +792 -0
  110. package/fesm2022/ng-doc-app-type-controls-list-control.mjs.map +1 -0
  111. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +45 -8
  112. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  113. package/fesm2022/ng-doc-app-type-controls.mjs +2 -0
  114. package/fesm2022/ng-doc-app-type-controls.mjs.map +1 -1
  115. package/package.json +73 -4
  116. package/styles/global.css +4 -0
  117. package/styles/main.css +4 -0
  118. package/styles/themes/dark.css +10 -0
  119. package/types/ng-doc-app-classes-default-search-engine.d.ts +11 -0
  120. package/types/ng-doc-app-classes-root-page.d.ts +13 -0
  121. package/types/ng-doc-app-components-api-list.d.ts +3 -1
  122. package/types/ng-doc-app-components-breadcrumb.d.ts +2 -1
  123. package/types/ng-doc-app-components-code.d.ts +2 -0
  124. package/types/ng-doc-app-components-command-palette.d.ts +3 -1
  125. package/types/ng-doc-app-components-copy-button.d.ts +3 -1
  126. package/types/ng-doc-app-components-demo-displayer.d.ts +13 -1
  127. package/types/ng-doc-app-components-demo-frame.d.ts +107 -0
  128. package/types/ng-doc-app-components-demo.d.ts +47 -10
  129. package/types/ng-doc-app-components-fullscreen-button.d.ts +2 -0
  130. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +2 -0
  131. package/types/ng-doc-app-components-heading-anchor.d.ts +2 -0
  132. package/types/ng-doc-app-components-image-viewer.d.ts +2 -0
  133. package/types/ng-doc-app-components-navbar.d.ts +2 -0
  134. package/types/ng-doc-app-components-page-navigation.d.ts +2 -1
  135. package/types/ng-doc-app-components-page.d.ts +10 -1
  136. package/types/ng-doc-app-components-playground.d.ts +260 -42
  137. package/types/ng-doc-app-components-root.d.ts +18 -0
  138. package/types/ng-doc-app-components-search-result.d.ts +2 -0
  139. package/types/ng-doc-app-components-search.d.ts +2 -0
  140. package/types/ng-doc-app-components-sidebar.d.ts +2 -1
  141. package/types/ng-doc-app-components-tabs.d.ts +13 -3
  142. package/types/ng-doc-app-components-theme-toggle.d.ts +4 -1
  143. package/types/ng-doc-app-components-toc.d.ts +2 -1
  144. package/types/ng-doc-app-components.d.ts +1 -0
  145. package/types/ng-doc-app-constants.d.ts +11 -1
  146. package/types/ng-doc-app-demo-app.d.ts +297 -0
  147. package/types/ng-doc-app-helpers.d.ts +75 -4
  148. package/types/ng-doc-app-interfaces.d.ts +635 -6
  149. package/types/ng-doc-app-processors-processors.d.ts +5 -0
  150. package/types/ng-doc-app-providers-ng-doc-app.d.ts +7 -1
  151. package/types/ng-doc-app-providers-texts.d.ts +28 -0
  152. package/types/ng-doc-app-providers-title.d.ts +59 -0
  153. package/types/ng-doc-app-providers.d.ts +2 -0
  154. package/types/ng-doc-app-services-content-scroll-intent.d.ts +11 -1
  155. package/types/ng-doc-app-services-highlighter.d.ts +15 -6
  156. package/types/ng-doc-app-services-route-preloader.d.ts +13 -1
  157. package/types/ng-doc-app-services-shortcuts.d.ts +16 -0
  158. package/types/ng-doc-app-texts-ar.d.ts +13 -0
  159. package/types/ng-doc-app-texts-de.d.ts +12 -0
  160. package/types/ng-doc-app-texts-es.d.ts +12 -0
  161. package/types/ng-doc-app-texts-fr.d.ts +12 -0
  162. package/types/ng-doc-app-texts-hi.d.ts +12 -0
  163. package/types/ng-doc-app-texts-ja.d.ts +12 -0
  164. package/types/ng-doc-app-texts-ko.d.ts +12 -0
  165. package/types/ng-doc-app-texts-pt-br.d.ts +12 -0
  166. package/types/ng-doc-app-texts-ru.d.ts +12 -0
  167. package/types/ng-doc-app-texts-uk.d.ts +12 -0
  168. package/types/ng-doc-app-texts-zh.d.ts +12 -0
  169. package/types/ng-doc-app-tokens.d.ts +21 -2
  170. package/types/ng-doc-app-type-controls-json-control.d.ts +38 -0
  171. package/types/ng-doc-app-type-controls-list-control.d.ts +313 -0
  172. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +28 -5
  173. package/types/ng-doc-app-type-controls.d.ts +2 -0
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { AfterViewInit, Signal } from '@angular/core';
3
+ import { NgDocContentTexts } from '@ng-doc/app/interfaces';
3
4
 
4
5
  /**
5
6
  * Renders a code block: a header with the file name, the language and the highlighted lines
@@ -9,6 +10,7 @@ import { AfterViewInit, Signal } from '@angular/core';
9
10
  * `code-line-numbers` theme variable to `none` hides them.
10
11
  */
11
12
  declare class NgDocCodeComponent implements AfterViewInit {
13
+ protected readonly texts: NgDocContentTexts;
12
14
  private readonly elementRef;
13
15
  /** Highlighted HTML of the code. When empty, the projected content is shown instead. */
14
16
  readonly html: _angular_core.InputSignal<string>;
@@ -1,6 +1,7 @@
1
1
  import * as _angular_forms_signals from '@angular/forms/signals';
2
2
  import * as _angular_core from '@angular/core';
3
3
  import { Signal } from '@angular/core';
4
+ import { NgDocSearchPaletteTexts } from '@ng-doc/app/interfaces';
4
5
  import { NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
5
6
 
6
7
  /**
@@ -58,7 +59,8 @@ interface Action {
58
59
  * slash key.
59
60
  */
60
61
  declare class NgDocCommandPaletteComponent {
61
- protected readonly scopes: readonly {
62
+ protected readonly texts: NgDocSearchPaletteTexts;
63
+ protected readonly scopes: {
62
64
  id: NgDocCommandPaletteScope;
63
65
  label: string;
64
66
  }[];
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { Clipboard } from '@angular/cdk/clipboard';
3
+ import { NgDocCopyTexts } from '@ng-doc/app/interfaces';
3
4
  import { NgDocTooltipDirective } from '@ng-doc/ui-kit';
4
5
 
5
6
  /** The text a copy button copies, or a function that reads it when the button is pressed. */
@@ -9,9 +10,10 @@ type NgDocCopyButtonText = string | (() => string);
9
10
  * icon into it.
10
11
  */
11
12
  declare class NgDocCopyButtonComponent {
13
+ protected readonly texts: NgDocCopyTexts;
12
14
  /** The text to copy, or a function that returns it when the button is pressed. */
13
15
  readonly text: _angular_core.InputSignal<NgDocCopyButtonText>;
14
- /** Accessible name of the button, also shown in its tooltip. */
16
+ /** Accessible name of the button, also shown in its tooltip. Defaults to the `copy.copy` text. */
15
17
  readonly label: _angular_core.InputSignal<string>;
16
18
  /** The tooltip of the button. */
17
19
  readonly tooltip: _angular_core.Signal<NgDocTooltipDirective>;
@@ -1,4 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { NgDocDemoTexts, NgDocCopyTexts } from '@ng-doc/app/interfaces';
2
3
  import { NgDocContent } from '@ng-doc/ui-kit';
3
4
 
4
5
  /**
@@ -6,6 +7,8 @@ import { NgDocContent } from '@ng-doc/ui-kit';
6
7
  * (the rows of a playground use it).
7
8
  */
8
9
  declare class NgDocDemoDisplayerComponent {
10
+ protected readonly texts: NgDocDemoTexts;
11
+ protected readonly copyTexts: NgDocCopyTexts;
9
12
  /** Content shown when the code is revealed; when empty, the highlighted `code` is shown. */
10
13
  readonly codeContent: _angular_core.InputSignal<NgDocContent>;
11
14
  /** Code of the demo, copied by the copy button and shown when there is no `codeContent`. */
@@ -14,16 +17,25 @@ declare class NgDocDemoDisplayerComponent {
14
17
  readonly language: _angular_core.InputSignal<string>;
15
18
  /** Whether the demo is shown in the stage with its controls; otherwise it is shown as is. */
16
19
  readonly container: _angular_core.InputSignal<boolean>;
20
+ /**
21
+ * The background of the canvas, such as the background of an isolated demo that shows a theme
22
+ * of its own.
23
+ */
24
+ readonly canvasBackground: _angular_core.InputSignal<string | undefined>;
25
+ /** The color of the dots of the canvas, such as the dots of a demo's own theme. */
26
+ readonly canvasDots: _angular_core.InputSignal<string | undefined>;
17
27
  /** Whether the displayer draws its border. */
18
28
  readonly border: _angular_core.InputSignal<boolean>;
19
29
  /** Whether the code is revealed. */
20
30
  readonly expanded: _angular_core.ModelSignal<boolean>;
31
+ /** A page that shows the demo alone, which the toolbar opens in a new tab. */
32
+ readonly newTabUrl: _angular_core.InputSignal<string | undefined>;
21
33
  /** Id of the region that holds the code, for the toggle's `aria-controls`. */
22
34
  protected readonly codeId: string;
23
35
  /** Reveals or hides the code. */
24
36
  toggle(): void;
25
37
  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>;
38
+ 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; }; "canvasBackground": { "alias": "canvasBackground"; "required": false; "isSignal": true; }; "canvasDots": { "alias": "canvasDots"; "required": false; "isSignal": true; }; "border": { "alias": "border"; "required": false; "isSignal": true; }; "expanded": { "alias": "expanded"; "required": false; "isSignal": true; }; "newTabUrl": { "alias": "newTabUrl"; "required": false; "isSignal": true; }; }, { "expanded": "expandedChange"; }, never, ["[ngDocDemoControl]", "*", "*"], true, never>;
27
39
  }
28
40
 
29
41
  export { NgDocDemoDisplayerComponent };
@@ -0,0 +1,107 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { Signal } from '@angular/core';
3
+ import { SafeResourceUrl } from '@angular/platform-browser';
4
+ import { ɵNgDocPlaygroundFrameMessage as _NgDocPlaygroundFrameMessage } from '@ng-doc/app/demo-app';
5
+ import { NgDocDemoTexts } from '@ng-doc/app/interfaces';
6
+
7
+ /**
8
+ * Shows a demo page of the demo application in an iframe, as tall as the demo's content: the demo
9
+ * page reports its height with `postMessage`, and only messages from this iframe's window and
10
+ * origin are accepted. The iframe is created in the browser after the first render (the server
11
+ * renders a placeholder with a link to the demo page) and loads lazily. Until the demo reports its
12
+ * size, a placeholder tells that it is loading; a demo page that loads without reporting it within
13
+ * 10 seconds is reported as failed, with the link.
14
+ */
15
+ declare class NgDocDemoFrameComponent {
16
+ protected readonly texts: NgDocDemoTexts;
17
+ /** The URL of the demo page, relative to the document or absolute on its origin. */
18
+ readonly src: _angular_core.InputSignal<string>;
19
+ /** The accessible title of the iframe. */
20
+ readonly frameTitle: _angular_core.InputSignal<string>;
21
+ /** Whether the iframe fills its container instead of taking the demo's height (fullscreen). */
22
+ readonly fill: _angular_core.InputSignal<boolean>;
23
+ /**
24
+ * The URL fragment of the demo page, without `#`: the state of an isolated playground, and the
25
+ * theme the page shows (`~theme=dark`). The iframe loads with the fragment it has when the
26
+ * iframe is created; a later fragment replaces the page's location (`location.replace`), which
27
+ * reloads nothing and adds no history entry.
28
+ */
29
+ readonly fragment: _angular_core.InputSignal<string | undefined>;
30
+ /** Whether the page is the page of an isolated playground, which reports the target. */
31
+ readonly playground: _angular_core.InputSignal<boolean>;
32
+ /** The messages of an isolated playground's page, from this iframe only. */
33
+ readonly playgroundMessage: _angular_core.OutputEmitterRef<_NgDocPlaygroundFrameMessage>;
34
+ /**
35
+ * The page of an isolated playground (`playground`) loaded but sent no message of the playground
36
+ * within 10 seconds, such as a page the build didn't make.
37
+ */
38
+ readonly playgroundSilent: _angular_core.OutputEmitterRef<void>;
39
+ /** The height the demo reported, in pixels. */
40
+ readonly height: _angular_core.WritableSignal<number | undefined>;
41
+ /**
42
+ * The background color the demo's page reported, so that the canvas around the iframe can take
43
+ * it when the demo shows a theme of its own.
44
+ */
45
+ readonly background: _angular_core.WritableSignal<string | undefined>;
46
+ /** The color of the dots of the demo canvas in the demo's theme, which its page reported. */
47
+ readonly dots: _angular_core.WritableSignal<string | undefined>;
48
+ /**
49
+ * The color scheme of the demo's page, which the iframe takes: the page is transparent, and a
50
+ * browser paints an opaque backdrop behind an iframe whose color scheme differs from its page's.
51
+ */
52
+ readonly scheme: _angular_core.WritableSignal<string | undefined>;
53
+ /** `loading` until the demo reports its size, then `ready`; `failed` when it never does. */
54
+ readonly state: Signal<'loading' | 'ready' | 'failed'>;
55
+ /** Whether the iframe exists: only in the browser, after the first render. */
56
+ protected readonly created: _angular_core.WritableSignal<boolean>;
57
+ /** The demo page's URL for the iframe, with the fragment the iframe was created with. */
58
+ protected readonly frameSrc: Signal<SafeResourceUrl>;
59
+ private readonly sanitizer;
60
+ private readonly frame;
61
+ private readonly failed;
62
+ private readonly loaded;
63
+ private initialFragment?;
64
+ private shownFragment?;
65
+ private timer?;
66
+ private silenceTimer?;
67
+ private answered;
68
+ constructor();
69
+ /**
70
+ * Waits for the demo's size once its page has loaded.
71
+ * @internal
72
+ */
73
+ protected onLoad(): void;
74
+ /**
75
+ * Takes the height a demo page reports, from this iframe only.
76
+ * @param event - A message to the window.
77
+ * @internal
78
+ */
79
+ protected onMessage(event: MessageEvent): void;
80
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoFrameComponent, never>;
81
+ 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; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "playground": { "alias": "playground"; "required": false; "isSignal": true; }; }, { "playgroundMessage": "playgroundMessage"; "playgroundSilent": "playgroundSilent"; }, never, never, true, never>;
82
+ }
83
+
84
+ /**
85
+ * The button beside an isolated demo that switches the theme of its iframe in turn: the page's
86
+ * theme, Light and Dark. A `theme` option that is none of them, such as `auto` or the id of a
87
+ * custom theme, is offered after the page's theme.
88
+ */
89
+ declare class NgDocDemoThemeButtonComponent {
90
+ protected readonly texts: NgDocDemoTexts;
91
+ private readonly themeTexts;
92
+ /** The theme of the iframe, or `undefined` while it follows the page. */
93
+ readonly theme: _angular_core.ModelSignal<string | undefined>;
94
+ /** The `theme` option of the demo, which the button offers too. */
95
+ readonly configured: _angular_core.InputSignal<string | undefined>;
96
+ /** The theme the next press switches to. */
97
+ protected readonly next: Signal<string | undefined>;
98
+ /**
99
+ * The name of a theme in the texts.
100
+ * @param theme - A theme, or `undefined` for the page's.
101
+ */
102
+ protected name(theme: string | undefined): string;
103
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocDemoThemeButtonComponent, never>;
104
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocDemoThemeButtonComponent, "ng-doc-demo-theme-button", never, { "theme": { "alias": "theme"; "required": false; "isSignal": true; }; "configured": { "alias": "configured"; "required": false; "isSignal": true; }; }, { "theme": "themeChange"; }, never, never, true, never>;
105
+ }
106
+
107
+ export { NgDocDemoFrameComponent, NgDocDemoThemeButtonComponent };
@@ -1,6 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { Signal, Type } from '@angular/core';
3
- import { NgDocDemoAsset } from '@ng-doc/app/interfaces';
2
+ import { Signal, Type, WritableSignal } from '@angular/core';
3
+ import { NgDocDemoTexts, NgDocCopyTexts, NgDocDemoAsset } from '@ng-doc/app/interfaces';
4
4
  import { NgDocDemoActionOptions } from '@ng-doc/core/interfaces';
5
5
 
6
6
  /** Widths the demo can be previewed at. */
@@ -11,31 +11,68 @@ type NgDocDemoPreviewWidth = 'full' | '480' | '280';
11
11
  * shows the stage fullscreen with the browser Fullscreen API; it is hidden where the browser does
12
12
  * not support it.
13
13
  *
14
- * The preview widths set the width of the demo's container; they do not emulate a device, so
15
- * media queries inside the demo do not respond to them.
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.
16
19
  */
17
20
  declare class NgDocDemoComponent {
21
+ protected readonly texts: NgDocDemoTexts;
22
+ protected readonly copyTexts: NgDocCopyTexts;
18
23
  private readonly rootPage;
19
24
  private readonly document;
25
+ private readonly platformLocation;
26
+ private readonly appBaseHref;
20
27
  /** Name of the demo component in the page's `demos`. */
21
28
  readonly componentName: _angular_core.InputSignal<string | undefined>;
22
29
  /** Options of the `demo` action. */
23
30
  readonly options: _angular_core.InputSignal<NgDocDemoActionOptions>;
24
31
  /** The demo component. */
25
32
  readonly demo: Signal<Type<unknown> | undefined>;
33
+ /**
34
+ * The URL of the demo's page, when the page has demo pages and the demo exists: the generated
35
+ * demo route and the demo's name under the base href, with the `inputs` option as a query
36
+ * parameter.
37
+ */
38
+ readonly demoUrl: Signal<string | undefined>;
39
+ /** Whether the demo is shown in an iframe of its page. */
40
+ readonly isolated: Signal<boolean>;
41
+ /**
42
+ * The theme of the demo's iframe: the `theme` option, until the reader picks another with the
43
+ * theme button; `undefined` follows the page.
44
+ */
45
+ readonly frameTheme: WritableSignal<string | undefined>;
46
+ /**
47
+ * The background of the stage while the demo shows a theme of its own: the background its page
48
+ * reported, so the whole stage reads in the demo's theme rather than only the iframe.
49
+ */
50
+ protected readonly stageBackground: Signal<string | undefined>;
51
+ /** The dots of the stage while the demo shows a theme of its own, in that theme's color. */
52
+ protected readonly stageDots: Signal<string | undefined>;
53
+ /** The URL fragment of the demo's iframe, which carries its theme. */
54
+ protected readonly frameFragment: Signal<string | undefined>;
55
+ /** The demo's page as the toolbar opens it in a new tab: in the theme of its iframe. */
56
+ protected readonly newTabUrl: Signal<string | undefined>;
57
+ /** The accessible title of the demo's iframe. */
58
+ protected readonly frameTitle: Signal<string>;
59
+ /** Whether the stage is fullscreen. */
60
+ protected readonly fullscreen: Signal<boolean>;
61
+ private readonly stage;
62
+ private readonly frame;
26
63
  /** Source files of the demo, filtered by the `tabs` option. */
27
64
  readonly assets: Signal<NgDocDemoAsset[]>;
28
65
  /**
29
66
  * The open view: `preview`, or the title of a source file. It starts on the preview, or on the
30
67
  * default source file when the `expanded` option is set.
31
68
  */
32
- readonly view: _angular_core.WritableSignal<string>;
69
+ readonly view: WritableSignal<string>;
33
70
  /** The width the demo is previewed at. */
34
- readonly previewWidth: _angular_core.WritableSignal<NgDocDemoPreviewWidth>;
35
- protected readonly previewWidths: readonly {
36
- readonly width: NgDocDemoPreviewWidth;
37
- readonly label: string;
38
- readonly readout: string;
71
+ readonly previewWidth: WritableSignal<NgDocDemoPreviewWidth>;
72
+ protected readonly previewWidths: {
73
+ width: NgDocDemoPreviewWidth;
74
+ label: string;
75
+ readout: string;
39
76
  }[];
40
77
  /** Readout of the preview width. */
41
78
  protected readonly widthReadout: Signal<string>;
@@ -1,7 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
+ import { NgDocDemoTexts } from '@ng-doc/app/interfaces';
2
3
 
3
4
  /** A link that opens a demo's fullscreen route in a new tab. */
4
5
  declare class NgDocFullscreenButtonComponent {
6
+ protected readonly texts: NgDocDemoTexts;
5
7
  /** Route of the fullscreen demo. */
6
8
  readonly route: i0.InputSignal<string>;
7
9
  static ɵfac: i0.ɵɵFactoryDeclaration<NgDocFullscreenButtonComponent, never>;
@@ -1,5 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Signal } from '@angular/core';
3
+ import { NgDocDemoTexts } from '@ng-doc/app/interfaces';
3
4
  import { NgDocFullscreenDirective } from '@ng-doc/ui-kit';
4
5
 
5
6
  /**
@@ -13,6 +14,7 @@ import { NgDocFullscreenDirective } from '@ng-doc/ui-kit';
13
14
  * ```
14
15
  */
15
16
  declare class NgDocFullscreenToggleComponent {
17
+ protected readonly texts: NgDocDemoTexts;
16
18
  /** The element to show fullscreen. */
17
19
  readonly target: i0.InputSignal<NgDocFullscreenDirective>;
18
20
  /** Accessible name and tooltip of the button, which follow the fullscreen state. */
@@ -1,10 +1,12 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit } from '@angular/core';
3
+ import { NgDocCopyTexts } from '@ng-doc/app/interfaces';
3
4
 
4
5
  /**
5
6
  * Button next to a heading that copies the link to the heading.
6
7
  */
7
8
  declare class NgDocHeadingAnchorComponent implements OnInit {
9
+ protected readonly texts: NgDocCopyTexts;
8
10
  /** Id of the heading. */
9
11
  readonly anchor: _angular_core.InputSignal<string>;
10
12
  /** Classes of the host element. */
@@ -1,5 +1,6 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { TemplateRef } from '@angular/core';
3
+ import { NgDocContentTexts } from '@ng-doc/app/interfaces';
3
4
  import { NgDocOverlayService } from '@ng-doc/ui-kit';
4
5
  import { NgDocOverlayRef } from '@ng-doc/ui-kit/classes';
5
6
 
@@ -16,6 +17,7 @@ interface ZoomSize {
16
17
  * decorative: neither becomes a button.
17
18
  */
18
19
  declare class NgDocImageViewerComponent {
20
+ protected readonly texts: NgDocContentTexts;
19
21
  /** Source of the image. */
20
22
  readonly src: _angular_core.InputSignal<string>;
21
23
  /** Alternative text of the image. */
@@ -1,4 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { NgDocNavigationTexts } from '@ng-doc/app/interfaces';
2
3
  import { NgDocSidebarService } from '@ng-doc/app/services/sidebar';
3
4
 
4
5
  /**
@@ -18,6 +19,7 @@ import { NgDocSidebarService } from '@ng-doc/app/services/sidebar';
18
19
  * ```
19
20
  */
20
21
  declare class NgDocNavbarComponent {
22
+ protected readonly texts: NgDocNavigationTexts;
21
23
  protected readonly sidebarService: NgDocSidebarService;
22
24
  /**
23
25
  * Show search input
@@ -1,10 +1,11 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { NgDocPageNavigation, NgDocNavigation } from '@ng-doc/app/interfaces';
2
+ import { NgDocPageNavigation, NgDocNavigationTexts, NgDocNavigation } from '@ng-doc/app/interfaces';
3
3
 
4
4
  /**
5
5
  * Links to the previous and the next page, as two cards at the bottom of a guide.
6
6
  */
7
7
  declare class NgDocPageNavigationComponent implements NgDocPageNavigation {
8
+ protected readonly texts: NgDocNavigationTexts;
8
9
  /** The page before this one in the sidebar. */
9
10
  readonly prevPage: _angular_core.InputSignal<NgDocNavigation | undefined>;
10
11
  /** The page after this one in the sidebar. */
@@ -3,7 +3,7 @@ import { ElementRef, ChangeDetectorRef } from '@angular/core';
3
3
  import { NgDocContentController } from '@ng-doc/app/classes/content-controller';
4
4
  import { NgDocRootPage } from '@ng-doc/app/classes/root-page';
5
5
  import { NgDocPageWrapperComponent } from '@ng-doc/app/components/page-wrapper';
6
- import { NgDocPageSkeleton } from '@ng-doc/app/interfaces';
6
+ import { NgDocPageTexts, NgDocPageSkeleton } from '@ng-doc/app/interfaces';
7
7
 
8
8
  /**
9
9
  * A generated page: its rendered content, the page actions (copy link, edit and view the source),
@@ -15,6 +15,7 @@ import { NgDocPageSkeleton } from '@ng-doc/app/interfaces';
15
15
  * chrome.
16
16
  */
17
17
  declare class NgDocPageComponent {
18
+ protected readonly texts: NgDocPageTexts;
18
19
  /** The element that holds the rendered page content. */
19
20
  readonly pageContainer: _angular_core.Signal<ElementRef<any> | undefined>;
20
21
  protected rootPage: NgDocRootPage;
@@ -35,9 +36,16 @@ declare class NgDocPageComponent {
35
36
  private readonly ngZone;
36
37
  private readonly location;
37
38
  private readonly locationStrategy;
39
+ private readonly viewportScroller;
38
40
  private linkCopiedTimer?;
39
41
  /** Removes the server-rendered copy shown while asynchronous content loads. */
40
42
  private snapshot?;
43
+ /**
44
+ * The scroll position when a development content update of this page arrived, restored once
45
+ * its content has rendered: the new HTML replaces the old one, and the page may be shorter for
46
+ * a moment while its processors run.
47
+ */
48
+ private updateScroll?;
41
49
  constructor();
42
50
  /**
43
51
  * Shows one of the page's fullscreen routes instead of the page, or the page again. The outlet
@@ -62,6 +70,7 @@ declare class NgDocPageComponent {
62
70
  */
63
71
  copyLink(): void;
64
72
  private connectContent;
73
+ private restoreUpdateScroll;
65
74
  private releaseSnapshot;
66
75
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgDocPageComponent, never>;
67
76
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgDocPageComponent, "ng-doc-page", never, {}, {}, never, never, true, never>;