@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 +1 @@
1
- {"version":3,"file":"ng-doc-app-processors-processors.mjs","sources":["../../../../libs/app/processors/processors/blockquote.processor.ts","../../../../libs/app/processors/processors/code.processor.ts","../../../../libs/app/processors/processors/demo.processor.ts","../../../../libs/app/processors/processors/demo-pane.processor.ts","../../../../libs/app/processors/processors/heading-anchor.processor.ts","../../../../libs/app/processors/processors/icon.processor.ts","../../../../libs/app/processors/processors/image.processor.ts","../../../../libs/app/processors/processors/mermaid.processor.ts","../../../../libs/app/processors/processors/playground.processor.ts","../../../../libs/app/processors/processors/tabs.processor.ts","../../../../libs/app/processors/processors/ng-doc-app-processors-processors.ts"],"sourcesContent":["import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocBlockquoteComponent, NgDocBlockquoteType } from '@ng-doc/ui-kit';\n\nexport const blockquoteProcessor: NgDocPageProcessor<NgDocBlockquoteComponent> = {\n component: NgDocBlockquoteComponent,\n selector: 'ng-doc-blockquote',\n extractOptions: (element: Element) => ({\n content: [Array.from(element.childNodes)],\n inputs: {\n type: (element.getAttribute('type') as NgDocBlockquoteType) || 'default',\n icon: element.getAttribute('icon') ?? undefined,\n },\n }),\n};\n","import { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const codeProcessor: NgDocPageProcessor<NgDocCodeComponent> = {\n component: NgDocCodeComponent,\n selector: 'pre code',\n nodeToReplace: (element: Element) => element.closest('pre') ?? element,\n extractOptions: (element: Element) => ({\n inputs: {\n name: element.parentElement?.getAttribute('name') || undefined,\n icon: element.parentElement?.getAttribute('icon') || undefined,\n },\n content: [[element.closest('pre') ?? element]],\n }),\n};\n","import { NgDocDemoComponent } from '@ng-doc/app/components/demo';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoProcessor: NgDocPageProcessor<NgDocDemoComponent> = {\n component: NgDocDemoComponent,\n selector: 'ng-doc-demo',\n extractOptions: (element: Element) => ({\n inputs: {\n componentName: element.getAttribute('componentName') || undefined,\n options: JSON.parse(element.querySelector('#options')?.textContent ?? '{}'),\n },\n }),\n};\n","import { NgDocDemoPaneComponent } from '@ng-doc/app/components/demo-pane';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoPaneProcessor: NgDocPageProcessor<NgDocDemoPaneComponent> = {\n\tcomponent: NgDocDemoPaneComponent,\n\tselector: 'ng-doc-demo-pane',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocHeadingAnchorComponent } from '@ng-doc/app/components/heading-anchor';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const headingAnchorProcessor: NgDocPageProcessor<NgDocHeadingAnchorComponent> = {\n component: NgDocHeadingAnchorComponent,\n selector: 'ng-doc-heading-anchor',\n extractOptions: (element: Element) => ({\n inputs: {\n classes: element.getAttribute('class')?.split(' ') || [],\n anchor: element.getAttribute('anchor') || '',\n },\n }),\n};\n","import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocIconComponent, NgDocIconSize } from '@ng-doc/ui-kit';\n\nexport const iconProcessor: NgDocPageProcessor<NgDocIconComponent> = {\n\tcomponent: NgDocIconComponent,\n\tselector: 'ng-doc-icon',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\ticon: element.getAttribute('icon') ?? '',\n\t\t\tsize: (Number(element.getAttribute('size')) as NgDocIconSize) || 16,\n\t\t},\n\t}),\n};\n","import { Injector, Renderer2 } from '@angular/core';\nimport { NgDocImageViewerComponent } from '@ng-doc/app/components/image-viewer';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const imageProcessor: NgDocPageProcessor<NgDocImageViewerComponent> = {\n component: NgDocImageViewerComponent,\n selector: 'img:not([zoom=\"false\"])',\n nodeToReplace: (element: Element, injector: Injector) => {\n const renderer: Renderer2 = injector.get(Renderer2);\n const anchor: Element = renderer.createElement('div');\n\n return element.parentNode?.insertBefore(anchor, element) ?? element;\n },\n extractOptions: (element: Element) => ({\n inputs: {\n src: element.getAttribute('src') ?? '',\n alt: element.getAttribute('alt') ?? '',\n },\n content: [[element]],\n }),\n};\n","import { NgDocMermaidViewerComponent } from '@ng-doc/app/components/mermaid-viewer';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const mermaidProcessor: NgDocPageProcessor<NgDocMermaidViewerComponent> = {\n component: NgDocMermaidViewerComponent,\n selector: 'pre.mermaid',\n extractOptions: (element: Element) => ({\n inputs: {\n graph: element.textContent ?? '',\n },\n }),\n};\n","import { NgDocPlaygroundComponent } from '@ng-doc/app/components/playground';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\n\nexport const playgroundProcessor: NgDocPageProcessor<NgDocPlaygroundComponent> = {\n component: NgDocPlaygroundComponent,\n selector: 'ng-doc-playground',\n extractOptions: (element: Element) => ({\n inputs: {\n id: element.getAttribute('id') || undefined,\n properties:\n JSON.parse(element.querySelector('#data')?.textContent?.replace(/\\n/g, '\\\\n') ?? '') ||\n undefined,\n pipeName: element.querySelector('#pipeName')?.textContent || undefined,\n selectors: (element.querySelector('#selectors')?.textContent || '')\n .split(',')\n .map((selector: string) => selector.trim())\n .filter(isPresent),\n options: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n },\n }),\n};\n","import { Injector, Renderer2 } from '@angular/core';\nimport { NgDocTabsComponent } from '@ng-doc/app/components/tabs';\nimport { NgDocPageProcessor, NgDocTab } from '@ng-doc/app/interfaces';\n\nexport const tabsProcessor: NgDocPageProcessor<NgDocTabsComponent> = {\n\tcomponent: NgDocTabsComponent,\n\tselector: 'ng-doc-tab',\n\tnodeToReplace: (element: Element, injector: Injector) => {\n\t\tconst renderer: Renderer2 = injector.get(Renderer2);\n\t\tconst anchor: Element = renderer.createElement('div');\n\n\t\treturn element.parentNode?.insertBefore(anchor, element) ?? element;\n\t},\n\textractOptions: (element: Element, root: Element) => {\n\t\tconst group: string | null = element.getAttribute('group') ?? '';\n\t\tconst tabs: Element[] = Array.from(root.querySelectorAll(`ng-doc-tab[group=\"${group}\"]`));\n\t\tconst mappedTabs: NgDocTab[] = tabs.map((tab: Element) => ({\n\t\t\ttitle: tab.getAttribute('name') ?? '',\n\t\t\tcontent: tab,\n\t\t\ticon: tab.getAttribute('icon') || undefined,\n\t\t\tactive: tab.hasAttribute('active'),\n\t\t}));\n\n\t\ttabs.forEach((tab: Element) => tab.remove());\n\n\t\treturn {\n\t\t\tinputs: {\n\t\t\t\ttabs: mappedTabs,\n\t\t\t},\n\t\t};\n\t},\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAGO,MAAM,mBAAmB,GAAiD;AAC/E,IAAA,SAAS,EAAE,wBAAwB;AACnC,IAAA,QAAQ,EAAE,mBAAmB;AAC7B,IAAA,cAAc,EAAE,CAAC,OAAgB,MAAM;QACrC,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACzC,QAAA,MAA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ACP,gBAAA,IAAI,EAAE,UAAU;AAChB,aAAA;SACD;IACF,CAAC;;;AC9BF;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-processors-processors.mjs","sources":["../../../../libs/app/processors/processors/blockquote.processor.ts","../../../../libs/app/processors/processors/code.processor.ts","../../../../libs/app/processors/processors/demo.processor.ts","../../../../libs/app/processors/processors/demo-pane.processor.ts","../../../../libs/app/processors/processors/heading-anchor.processor.ts","../../../../libs/app/processors/processors/icon.processor.ts","../../../../libs/app/processors/processors/image.processor.ts","../../../../libs/app/processors/processors/members.processor.ts","../../../../libs/app/processors/processors/mermaid.processor.ts","../../../../libs/app/processors/processors/playground.processor.ts","../../../../libs/app/processors/processors/tabs.processor.ts","../../../../libs/app/processors/processors/ng-doc-app-processors-processors.ts"],"sourcesContent":["import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocBlockquoteComponent, NgDocBlockquoteType } from '@ng-doc/ui-kit';\n\nexport const blockquoteProcessor: NgDocPageProcessor<NgDocBlockquoteComponent> = {\n component: NgDocBlockquoteComponent,\n selector: 'ng-doc-blockquote',\n extractOptions: (element: Element) => ({\n content: [Array.from(element.childNodes)],\n inputs: {\n type: (element.getAttribute('type') as NgDocBlockquoteType) || 'default',\n icon: element.getAttribute('icon') ?? undefined,\n label: element.getAttribute('label') ?? undefined,\n },\n }),\n};\n","import { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const codeProcessor: NgDocPageProcessor<NgDocCodeComponent> = {\n component: NgDocCodeComponent,\n selector: 'pre code',\n nodeToReplace: (element: Element) => element.closest('pre') ?? element,\n extractOptions: (element: Element) => ({\n inputs: {\n name: element.parentElement?.getAttribute('name') || undefined,\n icon: element.parentElement?.getAttribute('icon') || undefined,\n },\n content: [[element.closest('pre') ?? element]],\n }),\n};\n","import { NgDocDemoComponent } from '@ng-doc/app/components/demo';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoProcessor: NgDocPageProcessor<NgDocDemoComponent> = {\n component: NgDocDemoComponent,\n selector: 'ng-doc-demo',\n extractOptions: (element: Element) => ({\n inputs: {\n componentName: element.getAttribute('componentName') || undefined,\n options: JSON.parse(element.querySelector('#options')?.textContent ?? '{}'),\n },\n }),\n};\n","import { NgDocDemoPaneComponent } from '@ng-doc/app/components/demo-pane';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const demoPaneProcessor: NgDocPageProcessor<NgDocDemoPaneComponent> = {\n\tcomponent: NgDocDemoPaneComponent,\n\tselector: 'ng-doc-demo-pane',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\tcomponentName: element.getAttribute('componentName') || undefined,\n\t\t\toptions: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n\t\t},\n\t}),\n};\n","import { NgDocHeadingAnchorComponent } from '@ng-doc/app/components/heading-anchor';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const headingAnchorProcessor: NgDocPageProcessor<NgDocHeadingAnchorComponent> = {\n component: NgDocHeadingAnchorComponent,\n selector: 'ng-doc-heading-anchor',\n extractOptions: (element: Element) => ({\n inputs: {\n classes: element.getAttribute('class')?.split(' ') || [],\n anchor: element.getAttribute('anchor') || '',\n },\n }),\n};\n","import { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { NgDocIconComponent, NgDocIconSize } from '@ng-doc/ui-kit';\n\nexport const iconProcessor: NgDocPageProcessor<NgDocIconComponent> = {\n\tcomponent: NgDocIconComponent,\n\tselector: 'ng-doc-icon',\n\textractOptions: (element: Element) => ({\n\t\tinputs: {\n\t\t\ticon: element.getAttribute('icon') ?? '',\n\t\t\tsize: (Number(element.getAttribute('size')) as NgDocIconSize) || 16,\n\t\t},\n\t}),\n};\n","import { Injector, Renderer2 } from '@angular/core';\nimport { NgDocImageViewerComponent } from '@ng-doc/app/components/image-viewer';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const imageProcessor: NgDocPageProcessor<NgDocImageViewerComponent> = {\n component: NgDocImageViewerComponent,\n selector: 'img:not([zoom=\"false\"])',\n nodeToReplace: (element: Element, injector: Injector) => {\n const renderer: Renderer2 = injector.get(Renderer2);\n const anchor: Element = renderer.createElement('div');\n\n return element.parentNode?.insertBefore(anchor, element) ?? element;\n },\n extractOptions: (element: Element) => ({\n inputs: {\n src: element.getAttribute('src') ?? '',\n alt: element.getAttribute('alt') ?? '',\n },\n content: [[element]],\n }),\n};\n","import { NgDocMembersComponent } from '@ng-doc/app/components/members';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\n/** Adds the member filter to the members table of an API page (`<ng-doc-members>`). */\nexport const membersProcessor: NgDocPageProcessor<NgDocMembersComponent> = {\n component: NgDocMembersComponent,\n selector: 'ng-doc-members',\n extractOptions: (element: Element) => ({\n content: [Array.from(element.childNodes)],\n }),\n};\n","import { NgDocMermaidViewerComponent } from '@ng-doc/app/components/mermaid-viewer';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\n\nexport const mermaidProcessor: NgDocPageProcessor<NgDocMermaidViewerComponent> = {\n component: NgDocMermaidViewerComponent,\n selector: 'pre.mermaid',\n extractOptions: (element: Element) => ({\n inputs: {\n graph: element.textContent ?? '',\n },\n }),\n};\n","import { NgDocPlaygroundComponent } from '@ng-doc/app/components/playground';\nimport { NgDocPageProcessor } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\n\nexport const playgroundProcessor: NgDocPageProcessor<NgDocPlaygroundComponent> = {\n component: NgDocPlaygroundComponent,\n selector: 'ng-doc-playground',\n extractOptions: (element: Element) => ({\n inputs: {\n id: element.getAttribute('id') || undefined,\n properties:\n JSON.parse(element.querySelector('#data')?.textContent?.replace(/\\n/g, '\\\\n') ?? '') ||\n undefined,\n pipeName: element.querySelector('#pipeName')?.textContent || undefined,\n selectors: (element.querySelector('#selectors')?.textContent || '')\n .split(',')\n .map((selector: string) => selector.trim())\n .filter(isPresent),\n options: JSON.parse(element.querySelector('#options')?.textContent ?? '') || {},\n },\n }),\n};\n","import { Injector, Renderer2 } from '@angular/core';\nimport { NgDocTabsComponent } from '@ng-doc/app/components/tabs';\nimport { NgDocPageProcessor, NgDocTab } from '@ng-doc/app/interfaces';\n\n/**\n * Turns the `<ng-doc-tab group=\"…\" name=\"…\">` elements of a page into tabs: every tab of a group\n * becomes one `NgDocTabsComponent`, where the first tab of the group was. Code groups are made of\n * them, and Markdown can wrap any content in them.\n */\nexport const tabsProcessor: NgDocPageProcessor<NgDocTabsComponent> = {\n component: NgDocTabsComponent,\n selector: 'ng-doc-tab',\n nodeToReplace: (element: Element, injector: Injector) => {\n const renderer: Renderer2 = injector.get(Renderer2);\n const anchor: Element = renderer.createElement('div');\n\n return element.parentNode?.insertBefore(anchor, element) ?? element;\n },\n extractOptions: (element: Element, root: Element) => {\n const group: string = element.getAttribute('group') ?? '';\n const tabs: Element[] = Array.from(root.querySelectorAll('ng-doc-tab')).filter(\n (tab: Element) => (tab.getAttribute('group') ?? '') === group,\n );\n\n if (!tabs.includes(element)) {\n tabs.unshift(element);\n }\n\n // The tabs stay on the page until the component first renders (`NgDocTabsComponent`), so\n // the processors after this one, the page's own included, still reach their content. The\n // page processor skips elements that have left the page, so the other tabs of the group are\n // swapped for copies that hold their content: otherwise each would get tabs of its own.\n const contents: Element[] = tabs.map((tab: Element) => {\n if (tab === element || !tab.parentNode) {\n return tab;\n }\n\n const copy: Element = tab.cloneNode(false) as Element;\n\n while (tab.firstChild) {\n copy.appendChild(tab.firstChild);\n }\n tab.parentNode.replaceChild(copy, tab);\n\n return copy;\n });\n\n return {\n inputs: {\n tabs: tabs.map((tab: Element, index: number) => ({\n title: tab.getAttribute('name') ?? '',\n content: contents[index],\n icon: tab.getAttribute('icon') || undefined,\n active: tab.hasAttribute('active'),\n })) satisfies NgDocTab[],\n },\n };\n },\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from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"}
@@ -1,6 +1,10 @@
1
- import { ViewportScroller } from '@angular/common';
2
- import { provideAppInitializer, inject } from '@angular/core';
1
+ import { isPlatformBrowser, ViewportScroller } from '@angular/common';
2
+ import { provideAppInitializer, inject, PLATFORM_ID, DOCUMENT } from '@angular/core';
3
+ import { ɵcaptureNgDocHydrationSnapshots as _captureNgDocHydrationSnapshots } from '@ng-doc/app/helpers';
4
+ import { NgDocContentScrollIntent } from '@ng-doc/app/services/content-scroll-intent';
3
5
  import { NgDocHighlighterService } from '@ng-doc/app/services/highlighter';
6
+ import { NG_DOC_SHORTCUTS, NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';
7
+ import { NG_DOC_CONTENT_ANCHOR_SCROLLING, NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION } from '@ng-doc/app/tokens';
4
8
  import { provideNgDocUiKitConfig } from '@ng-doc/ui-kit';
5
9
 
6
10
  /**
@@ -9,6 +13,31 @@ import { provideNgDocUiKitConfig } from '@ng-doc/ui-kit';
9
13
  */
10
14
  function provideNgDocApp(config) {
11
15
  return [
16
+ { provide: NG_DOC_CONTENT_ANCHOR_SCROLLING, useValue: config?.contentAnchorScrolling ?? false },
17
+ {
18
+ provide: NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION,
19
+ useValue: config?.contentScrollPositionRestoration ?? 'disabled',
20
+ },
21
+ ...(config?.contentAnchorScrolling || config?.contentScrollPositionRestoration === 'enabled'
22
+ ? [
23
+ provideAppInitializer(() => {
24
+ inject(NgDocContentScrollIntent).start();
25
+ }),
26
+ ]
27
+ : []),
28
+ /* --- Hydration --- */
29
+ // Before the application renders: the pages and headers that skip hydration show their
30
+ // server-rendered content until their own is rendered, instead of a blank page.
31
+ provideAppInitializer(() => {
32
+ if (isPlatformBrowser(inject(PLATFORM_ID)))
33
+ _captureNgDocHydrationSnapshots(inject(DOCUMENT));
34
+ }),
35
+ /* --- Keyboard shortcuts --- */
36
+ { provide: NG_DOC_SHORTCUTS, useValue: config?.shortcuts ?? true },
37
+ // Created at start-up so the built-in shortcuts work on every page.
38
+ provideAppInitializer(() => {
39
+ inject(NgDocShortcutsService);
40
+ }),
12
41
  /* --- Viewport Scroller --- */
13
42
  provideAppInitializer(() => {
14
43
  inject(ViewportScroller).setOffset([0, 120]);
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { ViewportScroller } from '@angular/common';\nimport { EnvironmentProviders, inject, provideAppInitializer, Provider } from '@angular/core';\nimport { NgDocHighlighterConfig, NgDocHighlighterService } from '@ng-doc/app/services/highlighter';\nimport { NgDocUiConfig, provideNgDocUiKitConfig } from '@ng-doc/ui-kit';\n\n/**\n * NgDoc application config.\n */\nexport interface NgDocApplicationConfig {\n /**\n * UI Kit configuration.\n */\n uiKit?: NgDocUiConfig;\n /**\n * Shiki theme.\n */\n shiki?: NgDocHighlighterConfig;\n}\n\n/**\n * Provides the NgDoc application configuration.\n * @param config - The optional application configuration.\n */\nexport function provideNgDocApp(\n config?: NgDocApplicationConfig,\n): Array<EnvironmentProviders | Provider> {\n return [\n /* --- Viewport Scroller --- */\n provideAppInitializer(() => {\n inject(ViewportScroller).setOffset([0, 120]);\n }),\n\n /* --- Shiki --- */\n provideAppInitializer(async () => {\n await inject(NgDocHighlighterService).initialize(config?.shiki);\n }),\n\n /* --- UiKit --- */\n ...provideNgDocUiKitConfig(config?.uiKit),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAmBA;;;AAGG;AACG,SAAU,eAAe,CAC7B,MAA+B,EAAA;IAE/B,OAAO;;QAEL,qBAAqB,CAAC,MAAK;AACzB,YAAA,MAAM,CAAC,gBAAgB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9C,QAAA,CAAC,CAAC;;QAGF,qBAAqB,CAAC,YAAW;YAC/B,MAAM,MAAM,CAAC,uBAAuB,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,KAAK,CAAC;AACjE,QAAA,CAAC,CAAC;;AAGF,QAAA,GAAG,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC;KAC1C;AACH;;ACxCA;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-providers-ng-doc-app.mjs","sources":["../../../../libs/app/providers/ng-doc-app/provide-ng-doc-app.ts","../../../../libs/app/providers/ng-doc-app/ng-doc-app-providers-ng-doc-app.ts"],"sourcesContent":["import { isPlatformBrowser, ViewportScroller } from '@angular/common';\nimport {\n DOCUMENT,\n EnvironmentProviders,\n inject,\n PLATFORM_ID,\n provideAppInitializer,\n Provider,\n} from '@angular/core';\nimport { ɵcaptureNgDocHydrationSnapshots } from '@ng-doc/app/helpers';\nimport { NgDocContentScrollIntent } from '@ng-doc/app/services/content-scroll-intent';\nimport type { NgDocHighlighterConfig } from '@ng-doc/app/services/highlighter';\nimport { NgDocHighlighterService } from '@ng-doc/app/services/highlighter';\nimport { NG_DOC_SHORTCUTS, NgDocShortcutsService } from '@ng-doc/app/services/shortcuts';\nimport type { NgDocContentScrollPositionRestoration } from '@ng-doc/app/tokens';\nimport {\n NG_DOC_CONTENT_ANCHOR_SCROLLING,\n NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION,\n} from '@ng-doc/app/tokens';\nimport type { NgDocUiConfig } from '@ng-doc/ui-kit';\nimport { provideNgDocUiKitConfig } from '@ng-doc/ui-kit';\n\n/**\n * NgDoc application config.\n */\nexport interface NgDocApplicationConfig {\n /**\n * Replays a router anchor scroll once asynchronous NgDoc content has been processed.\n * Enable this beside Angular router anchor scrolling.\n */\n contentAnchorScrolling?: boolean;\n /**\n * Replays a saved router position after asynchronous NgDoc content is processed.\n * Select the same intent as Angular router scroll position restoration.\n */\n contentScrollPositionRestoration?: NgDocContentScrollPositionRestoration;\n /**\n * UI Kit configuration.\n */\n uiKit?: NgDocUiConfig;\n /**\n * Extra Shiki themes and languages for the code that the browser highlights.\n */\n shiki?: NgDocHighlighterConfig;\n /**\n * Whether single-key shortcuts (slash, the square brackets, F, L and T) are on for readers who\n * have not turned them on or off themselves. Readers can always change it with the switch in\n * the search palette. Command+K (Control+K) opens the search either way. Defaults to true.\n */\n shortcuts?: boolean;\n}\n\n/**\n * Provides the NgDoc application configuration.\n * @param config - The optional application configuration.\n */\nexport function provideNgDocApp(\n config?: NgDocApplicationConfig,\n): Array<EnvironmentProviders | Provider> {\n return [\n { provide: NG_DOC_CONTENT_ANCHOR_SCROLLING, useValue: config?.contentAnchorScrolling ?? false },\n {\n provide: NG_DOC_CONTENT_SCROLL_POSITION_RESTORATION,\n useValue: config?.contentScrollPositionRestoration ?? 'disabled',\n },\n ...(config?.contentAnchorScrolling || config?.contentScrollPositionRestoration === 'enabled'\n ? [\n provideAppInitializer(() => {\n inject(NgDocContentScrollIntent).start();\n }),\n ]\n : []),\n\n /* --- Hydration --- */\n // Before the application renders: the pages and headers that skip hydration show their\n // server-rendered content until their own is rendered, instead of a blank page.\n provideAppInitializer(() => {\n if (isPlatformBrowser(inject(PLATFORM_ID))) ɵcaptureNgDocHydrationSnapshots(inject(DOCUMENT));\n }),\n\n /* --- Keyboard shortcuts --- */\n { provide: NG_DOC_SHORTCUTS, useValue: config?.shortcuts ?? true },\n // Created at start-up so the built-in shortcuts work on every page.\n provideAppInitializer(() => {\n inject(NgDocShortcutsService);\n }),\n\n /* --- Viewport Scroller --- */\n provideAppInitializer(() => {\n inject(ViewportScroller).setOffset([0, 120]);\n }),\n\n /* --- Shiki --- */\n provideAppInitializer(async () => {\n await inject(NgDocHighlighterService).initialize(config?.shiki);\n }),\n\n /* --- UiKit --- */\n ...provideNgDocUiKitConfig(config?.uiKit),\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ɵcaptureNgDocHydrationSnapshots"],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129 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, EnvironmentInjector, runInInjectionContext, Injectable, makeEnvironmentProviders } from '@angular/core';
3
+ import { Title } from '@angular/platform-browser';
4
+ import { TitleStrategy } from '@angular/router';
5
+
6
+ /** Route data key that names what a generated route's title belongs to. */
7
+ const TITLE_KIND_DATA = 'ngDocTitle';
8
+ /** Route data key of a page route that names the page type (`guide` or `api`). */
9
+ const PAGE_TYPE_DATA = 'ngDocPageType';
10
+ /** The function that `provideNgDocTitle` was given. */
11
+ const NG_DOC_TITLE_FN = new InjectionToken('NG_DOC_TITLE_FN');
12
+ /**
13
+ * Title strategy that builds the document title with the function given to `provideNgDocTitle`,
14
+ * from the categories, page, tab and API declaration of the current route. It stays internal:
15
+ * `provideNgDocTitle` is the public way to set it.
16
+ */
17
+ class NgDocTitleStrategy extends TitleStrategy {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.title = inject(Title);
21
+ this.injector = inject(EnvironmentInjector);
22
+ this.titleFn = inject(NG_DOC_TITLE_FN);
23
+ }
24
+ /**
25
+ * Sets the document title for the router state.
26
+ * @param snapshot - The router state after a navigation.
27
+ */
28
+ updateTitle(snapshot) {
29
+ const title = runInInjectionContext(this.injector, () => this.titleFn(this.buildContext(snapshot)));
30
+ if (title !== undefined) {
31
+ this.title.setTitle(title);
32
+ }
33
+ }
34
+ /**
35
+ * Collects the titles of the router state by what they belong to.
36
+ * @param snapshot - The router state after a navigation.
37
+ */
38
+ buildContext(snapshot) {
39
+ const categories = [];
40
+ let page;
41
+ let tab;
42
+ let ownTitle;
43
+ let isApi = false;
44
+ for (let route = snapshot.root; route; route = route.firstChild) {
45
+ const config = route.routeConfig;
46
+ if (config?.data?.[PAGE_TYPE_DATA] === 'api') {
47
+ isApi = true;
48
+ }
49
+ // Only a route's own title counts: routes without one inherit the title of their parent,
50
+ // which would repeat it.
51
+ if (config?.title === undefined) {
52
+ continue;
53
+ }
54
+ const title = this.getResolvedTitleForRoute(route);
55
+ if (typeof title !== 'string') {
56
+ continue;
57
+ }
58
+ switch (config.data?.[TITLE_KIND_DATA]) {
59
+ case 'category':
60
+ categories.push(title);
61
+ break;
62
+ case 'page':
63
+ page = title;
64
+ break;
65
+ case 'tab':
66
+ // A page with one tab shows no tabs, and the tab's title is the page's.
67
+ if ((route.parent?.routeConfig?.children?.length ?? 0) > 1) {
68
+ tab = title;
69
+ }
70
+ break;
71
+ default:
72
+ // A title below the page comes from the page's own `route`, and wins over the
73
+ // generated one. Titles above the documentation belong to the application.
74
+ if (page !== undefined) {
75
+ ownTitle = title;
76
+ }
77
+ }
78
+ }
79
+ // The first tab of a page usually has no title of its own and shows the page's.
80
+ if (tab === page) {
81
+ tab = undefined;
82
+ }
83
+ page = ownTitle ?? page;
84
+ return {
85
+ title: this.buildTitle(snapshot),
86
+ categories,
87
+ page: isApi ? undefined : page,
88
+ tab,
89
+ api: isApi ? page : undefined,
90
+ snapshot,
91
+ };
92
+ }
93
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTitleStrategy, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
94
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTitleStrategy }); }
95
+ }
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocTitleStrategy, decorators: [{
97
+ type: Injectable
98
+ }] });
99
+ /**
100
+ * Builds the browser tab title of every navigation with a function that receives the categories,
101
+ * the page, the tab and the API declaration of the route, so titles like
102
+ * "Installation · Getting started | NgDoc" need no parsing of route titles.
103
+ *
104
+ * Without it, Angular sets the title of the deepest route: the page's (or its tab's) title.
105
+ * @param titleFn - Builds the title; `undefined` keeps the current title.
106
+ * @example
107
+ * ```ts
108
+ * provideNgDocTitle(({ categories, page, tab, api, title }) => {
109
+ * const name = api ?? page;
110
+ *
111
+ * return name
112
+ * ? [tab, name, ...[...categories].reverse()].filter(Boolean).join(' · ') + ' | My library'
113
+ * : (title ?? 'My library');
114
+ * });
115
+ * ```
116
+ */
117
+ function provideNgDocTitle(titleFn) {
118
+ return makeEnvironmentProviders([
119
+ { provide: NG_DOC_TITLE_FN, useValue: titleFn },
120
+ { provide: TitleStrategy, useClass: NgDocTitleStrategy },
121
+ ]);
122
+ }
123
+
124
+ /**
125
+ * Generated bundle index. Do not edit.
126
+ */
127
+
128
+ export { provideNgDocTitle };
129
+ //# sourceMappingURL=ng-doc-app-providers-title.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-doc-app-providers-title.mjs","sources":["../../../../libs/app/providers/title/provide-ng-doc-title.ts","../../../../libs/app/providers/title/ng-doc-app-providers-title.ts"],"sourcesContent":["import {\n EnvironmentInjector,\n EnvironmentProviders,\n inject,\n Injectable,\n InjectionToken,\n makeEnvironmentProviders,\n runInInjectionContext,\n} from '@angular/core';\nimport { Title } from '@angular/platform-browser';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy } from '@angular/router';\n\n/**\n * What the title of a route belongs to. NgDoc writes it as `ngDocTitle` into the `data` of the\n * routes it generates.\n */\ntype NgDocTitleKind = 'category' | 'page' | 'tab';\n\n/** Route data key that names what a generated route's title belongs to. */\nconst TITLE_KIND_DATA: string = 'ngDocTitle';\n\n/** Route data key of a page route that names the page type (`guide` or `api`). */\nconst PAGE_TYPE_DATA: string = 'ngDocPageType';\n\n/**\n * The parts of the current route that `provideNgDocTitle` passes to its function.\n *\n * Outside the documentation (a landing page, for example), `categories` is empty and `page`,\n * `tab` and `api` are not set.\n */\nexport interface NgDocTitleContext {\n /**\n * The title Angular sets by default: the title of the deepest route that has one. It is not set\n * when no route of the navigation has a title.\n */\n readonly title: string | undefined;\n /** Titles of the categories that contain the page, the outermost category first. */\n readonly categories: readonly string[];\n /**\n * Title of the guide or the API list. A title in the page's own route replaces it. Not set on\n * an API page, which sets `api` instead.\n */\n readonly page: string | undefined;\n /**\n * Title of the active tab, when the page has more than one tab. Not set on a tab titled like\n * the page, usually its first one.\n */\n readonly tab: string | undefined;\n /** Name of the API declaration, on an API page. */\n readonly api: string | undefined;\n /** The router state the title is for. */\n readonly snapshot: RouterStateSnapshot;\n}\n\n/**\n * Builds the browser tab title from the parts of the current route. It runs in an injection\n * context, so it can call `inject()`. When it returns `undefined`, the title stays as it is.\n */\nexport type NgDocTitleFn = (context: NgDocTitleContext) => string | undefined;\n\n/** The function that `provideNgDocTitle` was given. */\nconst NG_DOC_TITLE_FN = new InjectionToken<NgDocTitleFn>('NG_DOC_TITLE_FN');\n\n/**\n * Title strategy that builds the document title with the function given to `provideNgDocTitle`,\n * from the categories, page, tab and API declaration of the current route. It stays internal:\n * `provideNgDocTitle` is the public way to set it.\n */\n@Injectable()\nclass NgDocTitleStrategy extends TitleStrategy {\n private readonly title = inject(Title);\n private readonly injector = inject(EnvironmentInjector);\n private readonly titleFn = inject(NG_DOC_TITLE_FN);\n\n /**\n * Sets the document title for the router state.\n * @param snapshot - The router state after a navigation.\n */\n override updateTitle(snapshot: RouterStateSnapshot): void {\n const title = runInInjectionContext(this.injector, () =>\n this.titleFn(this.buildContext(snapshot)),\n );\n\n if (title !== undefined) {\n this.title.setTitle(title);\n }\n }\n\n /**\n * Collects the titles of the router state by what they belong to.\n * @param snapshot - The router state after a navigation.\n */\n buildContext(snapshot: RouterStateSnapshot): NgDocTitleContext {\n const categories: string[] = [];\n let page: string | undefined;\n let tab: string | undefined;\n let ownTitle: string | undefined;\n let isApi = false;\n\n for (\n let route: ActivatedRouteSnapshot | null = snapshot.root;\n route;\n route = route.firstChild\n ) {\n const config = route.routeConfig;\n\n if (config?.data?.[PAGE_TYPE_DATA] === 'api') {\n isApi = true;\n }\n\n // Only a route's own title counts: routes without one inherit the title of their parent,\n // which would repeat it.\n if (config?.title === undefined) {\n continue;\n }\n\n const title = this.getResolvedTitleForRoute(route);\n\n if (typeof title !== 'string') {\n continue;\n }\n\n switch (config.data?.[TITLE_KIND_DATA] as NgDocTitleKind | undefined) {\n case 'category':\n categories.push(title);\n break;\n case 'page':\n page = title;\n break;\n case 'tab':\n // A page with one tab shows no tabs, and the tab's title is the page's.\n if ((route.parent?.routeConfig?.children?.length ?? 0) > 1) {\n tab = title;\n }\n break;\n default:\n // A title below the page comes from the page's own `route`, and wins over the\n // generated one. Titles above the documentation belong to the application.\n if (page !== undefined) {\n ownTitle = title;\n }\n }\n }\n\n // The first tab of a page usually has no title of its own and shows the page's.\n if (tab === page) {\n tab = undefined;\n }\n\n page = ownTitle ?? page;\n\n return {\n title: this.buildTitle(snapshot),\n categories,\n page: isApi ? undefined : page,\n tab,\n api: isApi ? page : undefined,\n snapshot,\n };\n }\n}\n\n/**\n * Builds the browser tab title of every navigation with a function that receives the categories,\n * the page, the tab and the API declaration of the route, so titles like\n * \"Installation · Getting started | NgDoc\" need no parsing of route titles.\n *\n * Without it, Angular sets the title of the deepest route: the page's (or its tab's) title.\n * @param titleFn - Builds the title; `undefined` keeps the current title.\n * @example\n * ```ts\n * provideNgDocTitle(({ categories, page, tab, api, title }) => {\n * const name = api ?? page;\n *\n * return name\n * ? [tab, name, ...[...categories].reverse()].filter(Boolean).join(' · ') + ' | My library'\n * : (title ?? 'My library');\n * });\n * ```\n */\nexport function provideNgDocTitle(titleFn: NgDocTitleFn): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: NG_DOC_TITLE_FN, useValue: titleFn },\n { provide: TitleStrategy, useClass: NgDocTitleStrategy },\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAkBA;AACA,MAAM,eAAe,GAAW,YAAY;AAE5C;AACA,MAAM,cAAc,GAAW,eAAe;AAsC9C;AACA,MAAM,eAAe,GAAG,IAAI,cAAc,CAAe,iBAAiB,CAAC;AAE3E;;;;AAIG;AACH,MACM,kBAAmB,SAAQ,aAAa,CAAA;AAD9C,IAAA,WAAA,G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app/providers/ng-doc-app';
3
3
  export * from '@ng-doc/app/providers/page-skeleton';
4
4
  export * from '@ng-doc/app/providers/playground-demo';
5
5
  export * from '@ng-doc/app/providers/search-engine';
6
+ export * from '@ng-doc/app/providers/title';
6
7
  export * from '@ng-doc/app/providers/type-control';
7
8
 
8
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-providers.mjs","sources":["../../../../libs/app/providers/ng-doc-app-providers.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;AAEG"}
1
+ {"version":3,"file":"ng-doc-app-providers.mjs","sources":["../../../../libs/app/providers/ng-doc-app-providers.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAAA;;AAEG"}
@@ -0,0 +1,122 @@
1
+ import { isPlatformBrowser } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, PLATFORM_ID, signal, DestroyRef, Service } from '@angular/core';
4
+ import { Router, NavigationStart, NavigationEnd, Scroll, NavigationCancel, NavigationError, NavigationSkipped } from '@angular/router';
5
+
6
+ /** Captures the public initial-navigation facts that are unavailable after component activation. */
7
+ class NgDocContentScrollIntent {
8
+ constructor() {
9
+ this.browser = isPlatformBrowser(inject(PLATFORM_ID));
10
+ this.router = inject(Router);
11
+ this.listeners = new Set();
12
+ this.started = false;
13
+ this.successful = false;
14
+ this.intentState = signal(undefined, /* @ts-ignore */
15
+ ...(ngDevMode ? [{ debugName: "intentState" }] : /* istanbul ignore next */ []));
16
+ /**
17
+ * The pending initial intent as a signal, the same value `subscribe()` listeners receive.
18
+ */
19
+ this.currentIntent = this.intentState.asReadonly();
20
+ inject(DestroyRef).onDestroy(() => this.destroy());
21
+ }
22
+ /** Starts following router events. Does nothing on the server or when already started. */
23
+ start() {
24
+ if (this.started || !this.browser)
25
+ return;
26
+ this.started = true;
27
+ this.subscription = this.router.events.subscribe((event) => {
28
+ if (event instanceof NavigationStart)
29
+ this.navigationStarted(event);
30
+ else if (event instanceof NavigationEnd)
31
+ this.navigationEnded(event);
32
+ else if (event instanceof Scroll)
33
+ this.scrolled(event);
34
+ else if (event instanceof NavigationCancel ||
35
+ event instanceof NavigationError ||
36
+ event instanceof NavigationSkipped) {
37
+ if (this.candidate && event.id >= this.candidate.navigationId)
38
+ this.candidate = undefined;
39
+ if (this.intent && event.id >= this.intent.navigationId)
40
+ this.publish(undefined);
41
+ }
42
+ });
43
+ }
44
+ /**
45
+ * Calls the listener with every change of the intent, and at once with the pending one.
46
+ * @param listener - Receives the intent, or `undefined` once it is consumed or cancelled.
47
+ * @returns A function that removes the listener.
48
+ */
49
+ subscribe(listener) {
50
+ this.listeners.add(listener);
51
+ if (this.intent)
52
+ listener(this.intent);
53
+ return () => this.listeners.delete(listener);
54
+ }
55
+ /**
56
+ * Consumes the current fallback after its page has either replayed or explicitly yielded it.
57
+ * @param navigationId - The navigation of the intent to consume.
58
+ */
59
+ settle(navigationId) {
60
+ if (this.intent?.navigationId === navigationId)
61
+ this.publish(undefined);
62
+ }
63
+ navigationStarted(event) {
64
+ this.publish(undefined);
65
+ const navigation = this.router.currentNavigation();
66
+ this.candidate = {
67
+ navigationId: event.id,
68
+ eligible: !this.successful &&
69
+ event.navigationTrigger === 'imperative' &&
70
+ event.restoredState == null &&
71
+ navigation?.id === event.id &&
72
+ navigation.previousNavigation === null &&
73
+ navigation.extras.scroll !== 'manual',
74
+ };
75
+ }
76
+ navigationEnded(event) {
77
+ const candidate = this.candidate;
78
+ this.candidate = undefined;
79
+ this.successful = true;
80
+ if (!candidate?.eligible || candidate.navigationId !== event.id)
81
+ return;
82
+ const anchor = this.router.parseUrl(event.urlAfterRedirects).fragment;
83
+ if (anchor) {
84
+ this.publish({ anchor, navigationId: event.id, url: event.urlAfterRedirects });
85
+ }
86
+ }
87
+ scrolled(event) {
88
+ if (this.intent && event.routerEvent.id >= this.intent.navigationId)
89
+ this.publish(undefined);
90
+ if (this.candidate && event.routerEvent.id >= this.candidate.navigationId) {
91
+ this.candidate = undefined;
92
+ }
93
+ }
94
+ publish(intent) {
95
+ if (this.intent === intent)
96
+ return;
97
+ this.intent = intent;
98
+ this.intentState.set(intent);
99
+ for (const listener of [...this.listeners])
100
+ listener(intent);
101
+ }
102
+ destroy() {
103
+ this.subscription?.unsubscribe();
104
+ this.subscription = undefined;
105
+ this.candidate = undefined;
106
+ this.intent = undefined;
107
+ this.intentState.set(undefined);
108
+ this.listeners.clear();
109
+ }
110
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentScrollIntent, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
111
+ static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentScrollIntent }); }
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentScrollIntent, decorators: [{
114
+ type: Service
115
+ }], ctorParameters: () => [] });
116
+
117
+ /**
118
+ * Generated bundle index. Do not edit.
119
+ */
120
+
121
+ export { NgDocContentScrollIntent };
122
+ //# sourceMappingURL=ng-doc-app-services-content-scroll-intent.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-doc-app-services-content-scroll-intent.mjs","sources":["../../../../libs/app/services/content-scroll-intent/content-scroll-intent.service.ts","../../../../libs/app/services/content-scroll-intent/ng-doc-app-services-content-scroll-intent.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { DestroyRef, inject, PLATFORM_ID, Service, Signal, signal } from '@angular/core';\nimport {\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n NavigationStart,\n Router,\n Scroll,\n} from '@angular/router';\nimport { Subscription } from 'rxjs';\n\n/** The fragment of the application's first navigation, kept until a page replays or drops it. */\nexport interface NgDocInitialContentScrollIntent {\n /** The decoded fragment of the navigation. */\n readonly anchor: string;\n /** Id of the navigation that produced the fragment. */\n readonly navigationId: number;\n /** The URL after redirects. */\n readonly url: string;\n}\n\n/** Captures the public initial-navigation facts that are unavailable after component activation. */\n@Service()\nexport class NgDocContentScrollIntent {\n private readonly browser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly router = inject(Router);\n private candidate?: { eligible: boolean; navigationId: number };\n private intent?: NgDocInitialContentScrollIntent;\n private readonly listeners = new Set<\n (intent: NgDocInitialContentScrollIntent | undefined) => void\n >();\n private started = false;\n private successful = false;\n private subscription?: Subscription;\n private readonly intentState = signal<NgDocInitialContentScrollIntent | undefined>(undefined);\n\n /**\n * The pending initial intent as a signal, the same value `subscribe()` listeners receive.\n */\n readonly currentIntent: Signal<NgDocInitialContentScrollIntent | undefined> =\n this.intentState.asReadonly();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.destroy());\n }\n\n /** Starts following router events. Does nothing on the server or when already started. */\n start(): void {\n if (this.started || !this.browser) return;\n this.started = true;\n this.subscription = this.router.events.subscribe((event) => {\n if (event instanceof NavigationStart) this.navigationStarted(event);\n else if (event instanceof NavigationEnd) this.navigationEnded(event);\n else if (event instanceof Scroll) this.scrolled(event);\n else if (\n event instanceof NavigationCancel ||\n event instanceof NavigationError ||\n event instanceof NavigationSkipped\n ) {\n if (this.candidate && event.id >= this.candidate.navigationId) this.candidate = undefined;\n if (this.intent && event.id >= this.intent.navigationId) this.publish(undefined);\n }\n });\n }\n\n /**\n * Calls the listener with every change of the intent, and at once with the pending one.\n * @param listener - Receives the intent, or `undefined` once it is consumed or cancelled.\n * @returns A function that removes the listener.\n */\n subscribe(listener: (intent: NgDocInitialContentScrollIntent | undefined) => void): () => void {\n this.listeners.add(listener);\n if (this.intent) listener(this.intent);\n return () => this.listeners.delete(listener);\n }\n\n /**\n * Consumes the current fallback after its page has either replayed or explicitly yielded it.\n * @param navigationId - The navigation of the intent to consume.\n */\n settle(navigationId: number): void {\n if (this.intent?.navigationId === navigationId) this.publish(undefined);\n }\n\n private navigationStarted(event: NavigationStart): void {\n this.publish(undefined);\n const navigation = this.router.currentNavigation();\n this.candidate = {\n navigationId: event.id,\n eligible:\n !this.successful &&\n event.navigationTrigger === 'imperative' &&\n event.restoredState == null &&\n navigation?.id === event.id &&\n navigation.previousNavigation === null &&\n navigation.extras.scroll !== 'manual',\n };\n }\n\n private navigationEnded(event: NavigationEnd): void {\n const candidate = this.candidate;\n this.candidate = undefined;\n this.successful = true;\n if (!candidate?.eligible || candidate.navigationId !== event.id) return;\n const anchor = this.router.parseUrl(event.urlAfterRedirects).fragment;\n if (anchor) {\n this.publish({ anchor, navigationId: event.id, url: event.urlAfterRedirects });\n }\n }\n\n private scrolled(event: Scroll): void {\n if (this.intent && event.routerEvent.id >= this.intent.navigationId) this.publish(undefined);\n if (this.candidate && event.routerEvent.id >= this.candidate.navigationId) {\n this.candidate = undefined;\n }\n }\n\n private publish(intent: NgDocInitialContentScrollIntent | undefined): void {\n if (this.intent === intent) return;\n this.intent = intent;\n this.intentState.set(intent);\n for (const listener of [...this.listeners]) listener(intent);\n }\n\n private destroy(): void {\n this.subscription?.unsubscribe();\n this.subscription = undefined;\n this.candidate = undefined;\n this.intent = undefined;\n this.intentState.set(undefined);\n this.listeners.clear();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAuBA;MAEa,wBAAwB,CAAA;AAmBnC,IAAA,WAAA,GAAA;QAlBiB,IAAA,CAAA,OAAO,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAChD,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AAGvB,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,GAAG,EAEjC;QACK,IAAA,CAAA,OAAO,GAAG,KAAK;QACf,IAAA,CAAA,UAAU,GAAG,KAAK;QAET,IAAA,CAAA,WAAW,GAAG,MAAM,CA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A,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC;;;ACxBD;;AAEG;;;;"}
@@ -0,0 +1,57 @@
1
+ import * as i0 from '@angular/core';
2
+ import { signal, Service } from '@angular/core';
3
+
4
+ /** Request-local content failures observed by the SSR readiness boundary. */
5
+ class NgDocContentState {
6
+ constructor() {
7
+ this.failures = new Map();
8
+ this.failureState = signal(undefined, /* @ts-ignore */
9
+ ...(ngDevMode ? [{ debugName: "failureState" }] : /* istanbul ignore next */ []));
10
+ /**
11
+ * The failure `currentFailure()` returns, as a signal. It changes with every
12
+ * `report()` and `clear()` call.
13
+ */
14
+ this.failure = this.failureState.asReadonly();
15
+ }
16
+ /**
17
+ * Records the failure of one content owner, replacing its previous failure.
18
+ * @param owner - The object that owns the content source.
19
+ * @param failure - The failure.
20
+ */
21
+ report(owner, failure) {
22
+ this.failures.set(owner, failure);
23
+ this.failureState.set(this.currentFailure());
24
+ }
25
+ /**
26
+ * Forgets the failure of one content owner.
27
+ * @param owner - The object that owns the content source.
28
+ */
29
+ clear(owner) {
30
+ if (!this.failures.delete(owner))
31
+ return;
32
+ this.failureState.set(this.currentFailure());
33
+ }
34
+ /** Returns the oldest failure that is still recorded, if any. */
35
+ currentFailure() {
36
+ return this.failures.values().next().value;
37
+ }
38
+ /** Throws the error of `currentFailure()`, if there is one. */
39
+ throwIfFailed() {
40
+ const failure = this.currentFailure();
41
+ if (failure) {
42
+ throw failure.error;
43
+ }
44
+ }
45
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentState, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
46
+ static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentState }); }
47
+ }
48
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocContentState, decorators: [{
49
+ type: Service
50
+ }] });
51
+
52
+ /**
53
+ * Generated bundle index. Do not edit.
54
+ */
55
+
56
+ export { NgDocContentState };
57
+ //# sourceMappingURL=ng-doc-app-services-content-state.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-doc-app-services-content-state.mjs","sources":["../../../../libs/app/services/content-state/content-state.service.ts","../../../../libs/app/services/content-state/ng-doc-app-services-content-state.ts"],"sourcesContent":["import { Service, Signal, signal } from '@angular/core';\n\n/** A content source that failed to load or to render. */\nexport interface NgDocContentFailure {\n /** Id of the content source that failed. */\n readonly contentId: string;\n /** The error it failed with. */\n readonly error: unknown;\n}\n\n/** Request-local content failures observed by the SSR readiness boundary. */\n@Service()\nexport class NgDocContentState {\n private readonly failures = new Map<object, NgDocContentFailure>();\n private readonly failureState = signal<NgDocContentFailure | undefined>(undefined);\n\n /**\n * The failure `currentFailure()` returns, as a signal. It changes with every\n * `report()` and `clear()` call.\n */\n readonly failure: Signal<NgDocContentFailure | undefined> = this.failureState.asReadonly();\n\n /**\n * Records the failure of one content owner, replacing its previous failure.\n * @param owner - The object that owns the content source.\n * @param failure - The failure.\n */\n report(owner: object, failure: NgDocContentFailure): void {\n this.failures.set(owner, failure);\n this.failureState.set(this.currentFailure());\n }\n\n /**\n * Forgets the failure of one content owner.\n * @param owner - The object that owns the content source.\n */\n clear(owner: object): void {\n if (!this.failures.delete(owner)) return;\n this.failureState.set(this.currentFailure());\n }\n\n /** Returns the oldest failure that is still recorded, if any. */\n currentFailure(): NgDocContentFailure | undefined {\n return this.failures.values().next().value;\n }\n\n /** Throws the error of `currentFailure()`, if there is one. */\n throwIfFailed(): void {\n const failure = this.currentFailure();\n if (failure) {\n throw failure.error;\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAUA;MAEa,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,GAAG,EAA+B;QACjD,IAAA,CAAA,YAAY,GAAG,MAAM,CAAkC,SAAS;yFAAC;AAElF;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAA4C,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE;AAiC3F,IAAA;AA/BC;;;;AAIG;IACH,MAAM,CAAC,KAAa,EAAE,OAA4B,EAAA;QAChD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC;QACjC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9C;AAEA;;;AAGG;AACH,IAAA,KAAK,CAAC,KAAa,EAAA;QACjB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE;QAClC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAC9C;;IAGA,cAAc,GAAA;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK;IAC5C;;IAGA,aAAa,GAAA;AACX,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,EAAE;QACrC,IAAI,OAAO,EAAE;YACX,MAAM,OAAO,CAAC,KAAK;QACrB;IACF;8GAxCW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA,CAAA;+GAAjB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;ACXD;;AAEG;;;;"}
@@ -0,0 +1,74 @@
1
+ import { isPlatformBrowser } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { signal, computed, inject, PLATFORM_ID, DOCUMENT, Service } from '@angular/core';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { Router, NavigationEnd, NavigationCancel, NavigationError, NavigationSkipped } from '@angular/router';
6
+ import { filter, take } from 'rxjs/operators';
7
+
8
+ /** The host attribute with which `ng-doc-root` tells that a fullscreen route is shown. */
9
+ const ROOT_ATTRIBUTE = 'data-ng-doc-fullscreen-route';
10
+ /**
11
+ * Tells whether a page shows one of its fullscreen routes: a child route of the page (see
12
+ * `route.children` of `NgDocPage`), which `ng-doc-page` shows on its own, on the canvas of demos,
13
+ * instead of the page. Pages with `disableFullscreenRoutes` never report one.
14
+ *
15
+ * While one is shown, `ng-doc-root` hides the navbar, the sidebar and the footer, and
16
+ * `ng-doc-page-wrapper` hides the breadcrumbs, the page header, the page links and the table of
17
+ * contents, so the route opens as a standalone page without changes to the application's template.
18
+ */
19
+ class NgDocFullscreenRouteService {
20
+ constructor() {
21
+ this.pages = signal(new Set(), /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "pages" }] : /* istanbul ignore next */ []));
23
+ /**
24
+ * Whether the server rendered a fullscreen route, until the first navigation in the browser
25
+ * settles. `ng-doc-root` renders before its page does, and it must render the server's markup
26
+ * (and hide the same chrome) until the page tells again.
27
+ */
28
+ this.serverRendered = signal(false, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "serverRendered" }] : /* istanbul ignore next */ []));
30
+ /** Whether a page shows one of its fullscreen routes. */
31
+ this.active = computed(() => this.serverRendered() || this.pages().size > 0, /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []));
33
+ if (!isPlatformBrowser(inject(PLATFORM_ID)))
34
+ return;
35
+ this.serverRendered.set(!!inject(DOCUMENT).querySelector(`ng-doc-root[${ROOT_ATTRIBUTE}="true"]`));
36
+ inject(Router)
37
+ .events.pipe(filter((event) => event instanceof NavigationEnd ||
38
+ event instanceof NavigationCancel ||
39
+ event instanceof NavigationError ||
40
+ event instanceof NavigationSkipped), take(1), takeUntilDestroyed())
41
+ .subscribe(() => this.serverRendered.set(false));
42
+ }
43
+ /**
44
+ * Records whether a page shows one of its fullscreen routes.
45
+ * @param page - The page.
46
+ * @param shown - Whether the page shows a fullscreen route.
47
+ * @internal
48
+ */
49
+ set(page, shown) {
50
+ const pages = this.pages();
51
+ if (pages.has(page) === shown)
52
+ return;
53
+ const next = new Set(pages);
54
+ if (shown) {
55
+ next.add(page);
56
+ }
57
+ else {
58
+ next.delete(page);
59
+ }
60
+ this.pages.set(next);
61
+ }
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenRouteService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
63
+ static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenRouteService }); }
64
+ }
65
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenRouteService, decorators: [{
66
+ type: Service
67
+ }], ctorParameters: () => [] });
68
+
69
+ /**
70
+ * Generated bundle index. Do not edit.
71
+ */
72
+
73
+ export { NgDocFullscreenRouteService };
74
+ //# sourceMappingURL=ng-doc-app-services-fullscreen-route.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-doc-app-services-fullscreen-route.mjs","sources":["../../../../libs/app/services/fullscreen-route/fullscreen-route.service.ts","../../../../libs/app/services/fullscreen-route/ng-doc-app-services-fullscreen-route.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { computed, DOCUMENT, inject, PLATFORM_ID, Service, Signal, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n Event,\n NavigationCancel,\n NavigationEnd,\n NavigationError,\n NavigationSkipped,\n Router,\n} from '@angular/router';\nimport { filter, take } from 'rxjs/operators';\n\n/** The host attribute with which `ng-doc-root` tells that a fullscreen route is shown. */\nconst ROOT_ATTRIBUTE = 'data-ng-doc-fullscreen-route';\n\n/**\n * Tells whether a page shows one of its fullscreen routes: a child route of the page (see\n * `route.children` of `NgDocPage`), which `ng-doc-page` shows on its own, on the canvas of demos,\n * instead of the page. Pages with `disableFullscreenRoutes` never report one.\n *\n * While one is shown, `ng-doc-root` hides the navbar, the sidebar and the footer, and\n * `ng-doc-page-wrapper` hides the breadcrumbs, the page header, the page links and the table of\n * contents, so the route opens as a standalone page without changes to the application's template.\n */\n@Service()\nexport class NgDocFullscreenRouteService {\n private readonly pages = signal<ReadonlySet<object>>(new Set());\n /**\n * Whether the server rendered a fullscreen route, until the first navigation in the browser\n * settles. `ng-doc-root` renders before its page does, and it must render the server's markup\n * (and hide the same chrome) until the page tells again.\n */\n private readonly serverRendered = signal<boolean>(false);\n\n /** Whether a page shows one of its fullscreen routes. */\n readonly active: Signal<boolean> = computed(() => this.serverRendered() || this.pages().size > 0);\n\n constructor() {\n if (!isPlatformBrowser(inject(PLATFORM_ID))) return;\n\n this.serverRendered.set(\n !!inject(DOCUMENT).querySelector(`ng-doc-root[${ROOT_ATTRIBUTE}=\"true\"]`),\n );\n inject(Router)\n .events.pipe(\n filter(\n (event: Event) =>\n event instanceof NavigationEnd ||\n event instanceof NavigationCancel ||\n event instanceof NavigationError ||\n event instanceof NavigationSkipped,\n ),\n take(1),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.serverRendered.set(false));\n }\n\n /**\n * Records whether a page shows one of its fullscreen routes.\n * @param page - The page.\n * @param shown - Whether the page shows a fullscreen route.\n * @internal\n */\n set(page: object, shown: boolean): void {\n const pages: ReadonlySet<object> = this.pages();\n\n if (pages.has(page) === shown) return;\n\n const next = new Set(pages);\n\n if (shown) {\n next.add(page);\n } else {\n next.delete(page);\n }\n this.pages.set(next);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAaA;AACA,MAAM,cAAc,GAAG,8BAA8B;AAErD;;;;;;;;AAQG;MAEU,2BAA2B,CAAA;AAYtC,IAAA,WAAA,GAAA;AAXiB,QAAA,IAAA,CAAA,KAA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