@ng-doc/app 17.6.15 → 18.0.0-beta.1

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 (353) hide show
  1. package/classes/default-search-engine/default-search-engine.d.ts +0 -1
  2. package/classes/default-search-engine/index.d.ts +0 -1
  3. package/classes/index.d.ts +0 -1
  4. package/classes/root-page/index.d.ts +0 -1
  5. package/classes/root-page/root-page.d.ts +4 -8
  6. package/classes/search-engine/index.d.ts +0 -1
  7. package/classes/search-engine/search-engine.d.ts +0 -1
  8. package/components/api-list/api-list.component.d.ts +13 -11
  9. package/components/breadcrumb/breadcrumb.component.d.ts +0 -1
  10. package/components/code/code.component.d.ts +2 -7
  11. package/components/copy-button/copy-button.component.d.ts +12 -0
  12. package/components/copy-button/index.d.ts +1 -0
  13. package/components/demo-displayer/demo-displayer.component.d.ts +0 -5
  14. package/components/heading-anchor/heading-anchor.component.d.ts +9 -0
  15. package/components/heading-anchor/index.d.ts +1 -0
  16. package/components/image-viewer/image-viewer.component.d.ts +16 -0
  17. package/components/image-viewer/index.d.ts +1 -0
  18. package/components/index.d.ts +7 -1
  19. package/components/kind-icon/kind-icon.component.d.ts +2 -1
  20. package/components/mermaid-viewer/index.d.ts +1 -0
  21. package/components/mermaid-viewer/mermaid-viewer.component.d.ts +17 -0
  22. package/components/navbar/navbar.component.d.ts +3 -16
  23. package/components/page/page.component.d.ts +6 -14
  24. package/components/page-header/index.d.ts +1 -0
  25. package/components/page-header/page-header.component.d.ts +6 -0
  26. package/components/page-wrapper/index.d.ts +1 -0
  27. package/components/page-wrapper/page-wrapper.component.d.ts +22 -0
  28. package/components/playground/base-playground.d.ts +1 -1
  29. package/components/playground/playground-demo/playground-demo.component.d.ts +5 -6
  30. package/components/root/root.component.d.ts +4 -13
  31. package/components/search/search.component.d.ts +11 -17
  32. package/components/search-dialog/index.d.ts +1 -0
  33. package/components/search-dialog/search-dialog.component.d.ts +24 -0
  34. package/components/sidebar/sidebar-category/sidebar-category.component.d.ts +9 -10
  35. package/components/sidebar/sidebar-item/sidebar-item.component.d.ts +7 -2
  36. package/components/sidebar/sidebar.component.d.ts +5 -3
  37. package/components/theme-toggle/theme-toggle.component.d.ts +4 -5
  38. package/constants/index.d.ts +0 -2
  39. package/constants/store-keys.d.ts +0 -1
  40. package/defaults/default-processors/default-processors.d.ts +0 -1
  41. package/defaults/default-processors/index.d.ts +0 -1
  42. package/defaults/default-skeleton/default-skeleton.d.ts +0 -1
  43. package/defaults/default-skeleton/index.d.ts +0 -1
  44. package/defaults/index.d.ts +0 -1
  45. package/directives/code-highlighter/code-highlighter.directive.d.ts +11 -11
  46. package/directives/code-highlighter/index.d.ts +0 -1
  47. package/directives/index.d.ts +0 -1
  48. package/directives/route-active/index.d.ts +0 -1
  49. package/directives/route-active/route-active.directive.d.ts +0 -1
  50. package/esm2022/classes/default-search-engine/default-search-engine.mjs +10 -4
  51. package/esm2022/classes/root-page/root-page.mjs +1 -1
  52. package/esm2022/components/api-list/api-list.component.mjs +46 -64
  53. package/esm2022/components/breadcrumb/breadcrumb.component.mjs +7 -9
  54. package/esm2022/components/code/code.component.mjs +16 -19
  55. package/esm2022/components/copy-button/copy-button.component.mjs +61 -0
  56. package/esm2022/components/copy-button/index.mjs +2 -0
  57. package/esm2022/components/copy-button/ng-doc-app-components-copy-button.mjs +5 -0
  58. package/esm2022/components/demo/demo.component.mjs +5 -5
  59. package/esm2022/components/demo-displayer/demo-displayer.component.mjs +9 -14
  60. package/esm2022/components/demo-pane/demo-pane.component.mjs +5 -5
  61. package/esm2022/components/fullscreen-button/fullscreen-button.component.mjs +3 -3
  62. package/esm2022/components/heading-anchor/heading-anchor.component.mjs +38 -0
  63. package/esm2022/components/heading-anchor/index.mjs +2 -0
  64. package/esm2022/components/heading-anchor/ng-doc-app-components-heading-anchor.mjs +5 -0
  65. package/esm2022/components/image-viewer/image-viewer.component.mjs +80 -0
  66. package/esm2022/components/image-viewer/index.mjs +2 -0
  67. package/esm2022/components/image-viewer/ng-doc-app-components-image-viewer.mjs +5 -0
  68. package/esm2022/components/index.mjs +8 -1
  69. package/esm2022/components/kind-icon/kind-icon.component.mjs +11 -5
  70. package/esm2022/components/link/link.component.mjs +3 -3
  71. package/esm2022/components/mermaid-viewer/index.mjs +2 -0
  72. package/esm2022/components/mermaid-viewer/mermaid-viewer.component.mjs +55 -0
  73. package/esm2022/components/mermaid-viewer/ng-doc-app-components-mermaid-viewer.mjs +5 -0
  74. package/esm2022/components/navbar/navbar.component.mjs +12 -32
  75. package/esm2022/components/page/page.component.mjs +20 -72
  76. package/esm2022/components/page-header/index.mjs +2 -0
  77. package/esm2022/components/page-header/ng-doc-app-components-page-header.mjs +5 -0
  78. package/esm2022/components/page-header/page-header.component.mjs +19 -0
  79. package/esm2022/components/page-link/page-link.component.mjs +5 -5
  80. package/esm2022/components/page-navigation/page-navigation.component.mjs +5 -5
  81. package/esm2022/components/page-wrapper/index.mjs +2 -0
  82. package/esm2022/components/page-wrapper/ng-doc-app-components-page-wrapper.mjs +5 -0
  83. package/esm2022/components/page-wrapper/page-wrapper.component.mjs +87 -0
  84. package/esm2022/components/playground/base-playground.mjs +8 -8
  85. package/esm2022/components/playground/playground-demo/playground-demo.component.mjs +22 -21
  86. package/esm2022/components/playground/playground-properties/playground-properties.component.mjs +8 -6
  87. package/esm2022/components/playground/playground-property/playground-property.component.mjs +4 -4
  88. package/esm2022/components/playground/playground.component.mjs +6 -6
  89. package/esm2022/components/root/root.component.mjs +20 -37
  90. package/esm2022/components/search/search.component.mjs +31 -49
  91. package/esm2022/components/search-dialog/index.mjs +2 -0
  92. package/esm2022/components/search-dialog/ng-doc-app-components-search-dialog.mjs +5 -0
  93. package/esm2022/components/search-dialog/search-dialog.component.mjs +74 -0
  94. package/esm2022/components/search-result/search-result.component.mjs +4 -4
  95. package/esm2022/components/sidebar/sidebar-category/sidebar-category.component.mjs +22 -27
  96. package/esm2022/components/sidebar/sidebar-item/sidebar-item.component.mjs +18 -10
  97. package/esm2022/components/sidebar/sidebar.component.mjs +14 -13
  98. package/esm2022/components/tabs/tabs.component.mjs +4 -4
  99. package/esm2022/components/theme-toggle/theme-toggle.component.mjs +18 -53
  100. package/esm2022/components/toc/toc-element/toc-element.component.mjs +5 -5
  101. package/esm2022/components/toc/toc.component.mjs +37 -35
  102. package/esm2022/constants/index.mjs +1 -2
  103. package/esm2022/defaults/default-processors/default-processors.mjs +7 -4
  104. package/esm2022/directives/code-highlighter/code-highlighter.directive.mjs +18 -36
  105. package/esm2022/directives/route-active/route-active.directive.mjs +3 -3
  106. package/esm2022/helpers/as-boolean.mjs +1 -1
  107. package/esm2022/helpers/create-component.mjs +1 -1
  108. package/esm2022/helpers/generate-toc.mjs +5 -5
  109. package/esm2022/interfaces/navigation.mjs +1 -1
  110. package/esm2022/interfaces/processor-options.mjs +1 -1
  111. package/esm2022/interfaces/toc-item.mjs +1 -1
  112. package/esm2022/interfaces/type-control.mjs +1 -1
  113. package/esm2022/pipes/decode-uri-component/decode-uri-component.pipe.mjs +4 -4
  114. package/esm2022/pipes/extract-value/extract-value.pipe.mjs +3 -3
  115. package/esm2022/pipes/filter-by-text/filter-by-text.pipe.mjs +3 -3
  116. package/esm2022/pipes/sanitize-html/sanitize-html.pipe.mjs +3 -3
  117. package/esm2022/processors/page-processor/index.mjs +2 -2
  118. package/esm2022/processors/page-processor/page-processor.component.mjs +74 -0
  119. package/esm2022/processors/processors/blockquote.processor.mjs +2 -1
  120. package/esm2022/processors/processors/code.processor.mjs +3 -5
  121. package/esm2022/processors/processors/demo.processor.mjs +2 -2
  122. package/esm2022/processors/processors/heading-anchor.processor.mjs +12 -0
  123. package/esm2022/processors/processors/image.processor.mjs +19 -0
  124. package/esm2022/processors/processors/index.mjs +6 -3
  125. package/esm2022/processors/processors/link/index.mjs +2 -0
  126. package/esm2022/processors/processors/link/link.processor.mjs +13 -0
  127. package/esm2022/processors/processors/link/ng-doc-app-processors-processors-link.mjs +5 -0
  128. package/esm2022/processors/processors/mermaid.processor.mjs +11 -0
  129. package/esm2022/processors/processors/playground.processor.mjs +2 -2
  130. package/esm2022/processors/processors/tooltip/index.mjs +2 -0
  131. package/esm2022/processors/processors/tooltip/ng-doc-app-processors-processors-tooltip.mjs +5 -0
  132. package/esm2022/processors/processors/tooltip/tooltip.processor.mjs +56 -0
  133. package/esm2022/providers/index.mjs +2 -1
  134. package/esm2022/providers/mermaid/index.mjs +2 -0
  135. package/esm2022/providers/mermaid/ng-doc-app-providers-mermaid.mjs +5 -0
  136. package/esm2022/providers/mermaid/provide-mermaid.mjs +16 -0
  137. package/esm2022/providers/ng-doc-app/provide-ng-doc-app.mjs +12 -35
  138. package/esm2022/providers/playground-demo/provide-playground-demo.mjs +1 -1
  139. package/esm2022/providers/search-engine/provide-search-engine.mjs +2 -2
  140. package/esm2022/providers/type-control/provide-type-control.mjs +1 -1
  141. package/esm2022/services/highlighter/highlighter.service.mjs +39 -0
  142. package/esm2022/services/highlighter/index.mjs +2 -0
  143. package/esm2022/services/highlighter/ng-doc-app-services-highlighter.mjs +5 -0
  144. package/esm2022/services/index.mjs +2 -2
  145. package/esm2022/services/sidebar/sidebar.service.mjs +35 -50
  146. package/esm2022/services/store/store.service.mjs +3 -3
  147. package/esm2022/services/theme/theme.service.mjs +28 -127
  148. package/esm2022/tokens/index.mjs +4 -2
  149. package/esm2022/tokens/mermaid.mjs +3 -0
  150. package/esm2022/tokens/page-processor.mjs +2 -2
  151. package/esm2022/tokens/route-prefix.mjs +3 -0
  152. package/esm2022/tokens/shiki-theme.mjs +3 -0
  153. package/esm2022/type-controls/boolean-control/boolean-control.component.mjs +3 -3
  154. package/esm2022/type-controls/number-control/number-control.component.mjs +5 -5
  155. package/esm2022/type-controls/string-control/string-control.component.mjs +5 -5
  156. package/esm2022/type-controls/type-alias-control/type-alias-control.component.mjs +5 -5
  157. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +10 -4
  158. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  159. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  160. package/fesm2022/ng-doc-app-components-api-list.mjs +47 -64
  161. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  162. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +6 -8
  163. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  164. package/fesm2022/ng-doc-app-components-code.mjs +16 -18
  165. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  166. package/fesm2022/ng-doc-app-components-copy-button.mjs +68 -0
  167. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -0
  168. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +8 -12
  169. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  170. package/fesm2022/ng-doc-app-components-demo-pane.mjs +4 -4
  171. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  172. package/fesm2022/ng-doc-app-components-demo.mjs +4 -4
  173. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  174. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +3 -3
  175. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +45 -0
  176. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -0
  177. package/fesm2022/ng-doc-app-components-image-viewer.mjs +87 -0
  178. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -0
  179. package/fesm2022/ng-doc-app-components-kind-icon.mjs +10 -4
  180. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  181. package/fesm2022/ng-doc-app-components-link.mjs +3 -3
  182. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +62 -0
  183. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -0
  184. package/fesm2022/ng-doc-app-components-navbar.mjs +12 -32
  185. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  186. package/fesm2022/ng-doc-app-components-page-header.mjs +26 -0
  187. package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -0
  188. package/fesm2022/ng-doc-app-components-page-link.mjs +4 -4
  189. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  190. package/fesm2022/ng-doc-app-components-page-navigation.mjs +4 -4
  191. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  192. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +94 -0
  193. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -0
  194. package/fesm2022/ng-doc-app-components-page.mjs +19 -71
  195. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  196. package/fesm2022/ng-doc-app-components-playground.mjs +43 -38
  197. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  198. package/fesm2022/ng-doc-app-components-root.mjs +18 -35
  199. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  200. package/fesm2022/ng-doc-app-components-search-dialog.mjs +81 -0
  201. package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +1 -0
  202. package/fesm2022/ng-doc-app-components-search-result.mjs +3 -3
  203. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  204. package/fesm2022/ng-doc-app-components-search.mjs +30 -48
  205. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  206. package/fesm2022/ng-doc-app-components-sidebar.mjs +49 -44
  207. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  208. package/fesm2022/ng-doc-app-components-tabs.mjs +3 -3
  209. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  210. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +17 -51
  211. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  212. package/fesm2022/ng-doc-app-components-toc.mjs +40 -38
  213. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  214. package/fesm2022/ng-doc-app-components.mjs +7 -0
  215. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  216. package/fesm2022/ng-doc-app-constants.mjs +1 -37
  217. package/fesm2022/ng-doc-app-constants.mjs.map +1 -1
  218. package/fesm2022/ng-doc-app-defaults-default-processors.mjs +6 -3
  219. package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
  220. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +17 -35
  221. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  222. package/fesm2022/ng-doc-app-directives-route-active.mjs +3 -3
  223. package/fesm2022/ng-doc-app-helpers.mjs +4 -4
  224. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  225. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +3 -3
  226. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
  227. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +3 -3
  228. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +3 -3
  229. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +3 -3
  230. package/fesm2022/ng-doc-app-processors-page-processor.mjs +20 -14
  231. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  232. package/fesm2022/ng-doc-app-processors-processors-link.mjs +20 -0
  233. package/fesm2022/ng-doc-app-processors-processors-link.mjs.map +1 -0
  234. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +63 -0
  235. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -0
  236. package/fesm2022/ng-doc-app-processors-processors.mjs +45 -70
  237. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  238. package/fesm2022/ng-doc-app-providers-mermaid.mjs +23 -0
  239. package/fesm2022/ng-doc-app-providers-mermaid.mjs.map +1 -0
  240. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +11 -34
  241. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  242. package/fesm2022/ng-doc-app-providers-playground-demo.mjs.map +1 -1
  243. package/fesm2022/ng-doc-app-providers-search-engine.mjs +1 -1
  244. package/fesm2022/ng-doc-app-providers-search-engine.mjs.map +1 -1
  245. package/fesm2022/ng-doc-app-providers-type-control.mjs.map +1 -1
  246. package/fesm2022/ng-doc-app-providers.mjs +1 -0
  247. package/fesm2022/ng-doc-app-providers.mjs.map +1 -1
  248. package/fesm2022/ng-doc-app-services-highlighter.mjs +46 -0
  249. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -0
  250. package/fesm2022/ng-doc-app-services-sidebar.mjs +35 -50
  251. package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
  252. package/fesm2022/ng-doc-app-services-store.mjs +3 -3
  253. package/fesm2022/ng-doc-app-services-theme.mjs +27 -126
  254. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  255. package/fesm2022/ng-doc-app-services.mjs +1 -1
  256. package/fesm2022/ng-doc-app-tokens.mjs +8 -4
  257. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  258. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +3 -3
  259. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +4 -4
  260. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  261. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +4 -4
  262. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  263. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +4 -4
  264. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  265. package/helpers/as-boolean.d.ts +0 -1
  266. package/helpers/create-component.d.ts +0 -1
  267. package/helpers/format-html.d.ts +0 -1
  268. package/helpers/generate-toc.d.ts +0 -1
  269. package/helpers/index.d.ts +0 -1
  270. package/helpers/is-dark-os-theme.d.ts +0 -1
  271. package/helpers/is-external-link.d.ts +0 -1
  272. package/helpers/is-playground-property.d.ts +0 -1
  273. package/index.d.ts +0 -1
  274. package/interfaces/context.d.ts +0 -1
  275. package/interfaces/demo-assets.d.ts +0 -1
  276. package/interfaces/index.d.ts +0 -1
  277. package/interfaces/navigation.d.ts +7 -2
  278. package/interfaces/page-processor.d.ts +0 -1
  279. package/interfaces/page-skeleton.d.ts +0 -1
  280. package/interfaces/processor-options.d.ts +4 -2
  281. package/interfaces/provided-type-control.d.ts +0 -1
  282. package/interfaces/search-result.d.ts +0 -1
  283. package/interfaces/tab.d.ts +0 -1
  284. package/interfaces/theme.d.ts +0 -1
  285. package/interfaces/toc-item.d.ts +0 -1
  286. package/interfaces/type-control-provider-options.d.ts +0 -1
  287. package/interfaces/type-control.d.ts +0 -1
  288. package/package.json +76 -10
  289. package/pipes/decode-uri-component/decode-uri-component.pipe.d.ts +0 -1
  290. package/pipes/decode-uri-component/index.d.ts +0 -1
  291. package/pipes/extract-value/extract-value.pipe.d.ts +0 -1
  292. package/pipes/extract-value/index.d.ts +0 -1
  293. package/pipes/filter-by-text/filter-by-text.pipe.d.ts +0 -1
  294. package/pipes/filter-by-text/index.d.ts +0 -1
  295. package/pipes/index.d.ts +0 -1
  296. package/pipes/sanitize-html/index.d.ts +0 -1
  297. package/pipes/sanitize-html/sanitize-html.pipe.d.ts +0 -1
  298. package/processors/index.d.ts +0 -1
  299. package/processors/page-processor/index.d.ts +1 -2
  300. package/processors/page-processor/{page-processor.directive.d.ts → page-processor.component.d.ts} +7 -7
  301. package/processors/processors/heading-anchor.processor.d.ts +3 -0
  302. package/processors/processors/image.processor.d.ts +3 -0
  303. package/processors/processors/index.d.ts +5 -2
  304. package/processors/processors/link/index.d.ts +1 -0
  305. package/processors/processors/mermaid.processor.d.ts +3 -0
  306. package/processors/processors/tooltip/index.d.ts +1 -0
  307. package/providers/index.d.ts +1 -1
  308. package/providers/mermaid/index.d.ts +1 -0
  309. package/providers/mermaid/provide-mermaid.d.ts +7 -0
  310. package/providers/ng-doc-app/index.d.ts +0 -1
  311. package/providers/ng-doc-app/provide-ng-doc-app.d.ts +5 -11
  312. package/providers/page-skeleton/index.d.ts +0 -1
  313. package/providers/page-skeleton/provide-page-skeleton.d.ts +0 -1
  314. package/providers/playground-demo/index.d.ts +0 -1
  315. package/providers/playground-demo/provide-playground-demo.d.ts +1 -2
  316. package/providers/search-engine/index.d.ts +0 -1
  317. package/providers/search-engine/provide-search-engine.d.ts +1 -2
  318. package/providers/type-control/index.d.ts +0 -1
  319. package/providers/type-control/provide-type-control.d.ts +1 -2
  320. package/services/highlighter/highlighter.service.d.ts +24 -0
  321. package/services/highlighter/index.d.ts +1 -0
  322. package/services/index.d.ts +1 -2
  323. package/services/sidebar/index.d.ts +0 -1
  324. package/services/sidebar/sidebar.service.d.ts +4 -11
  325. package/services/store/index.d.ts +0 -1
  326. package/services/store/store.service.d.ts +0 -1
  327. package/services/theme/index.d.ts +0 -1
  328. package/services/theme/theme.service.d.ts +9 -38
  329. package/styles/global.css +161 -132
  330. package/styles/main.css +150 -106
  331. package/styles/themes/dark.css +71 -0
  332. package/tokens/context.d.ts +0 -1
  333. package/tokens/index.d.ts +3 -2
  334. package/tokens/mermaid.d.ts +3 -0
  335. package/tokens/page-processor.d.ts +1 -2
  336. package/tokens/page-skeleton.d.ts +0 -1
  337. package/tokens/route-prefix.d.ts +2 -0
  338. package/tokens/shiki-theme.d.ts +6 -0
  339. package/tokens/theme.d.ts +0 -1
  340. package/tokens/type-control.d.ts +0 -1
  341. package/type-controls/index.d.ts +0 -1
  342. package/types/index.d.ts +0 -1
  343. package/types/typed-form.d.ts +0 -1
  344. package/assets/themes/ng-doc-night.css +0 -111
  345. package/constants/themes.d.ts +0 -34
  346. package/esm2022/constants/themes.mjs +0 -36
  347. package/esm2022/processors/page-processor/page-processor.directive.mjs +0 -68
  348. package/esm2022/processors/processors/link.processor.mjs +0 -13
  349. package/esm2022/processors/processors/tooltip.processor.mjs +0 -56
  350. package/esm2022/tokens/api-list.mjs +0 -3
  351. package/tokens/api-list.d.ts +0 -4
  352. /package/processors/processors/{link.processor.d.ts → link/link.processor.d.ts} +0 -0
  353. /package/processors/processors/{tooltip.processor.d.ts → tooltip/tooltip.processor.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tHostBinding,\n\tInput,\n\tOnInit,\n} from '@angular/core';\nimport { Event, NavigationEnd, Router } from '@angular/router';\nimport { NgDocRouteActiveDirective } from '@ng-doc/app/directives/route-active';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport {\n\tNgDocDotComponent,\n\tNgDocExpanderComponent,\n\tNgDocIconComponent,\n\tNgDocRotatorDirective,\n\tNgDocTextComponent,\n\tNgDocTextLeftDirective,\n} from '@ng-doc/ui-kit';\nimport { NgDocContent } from '@ng-doc/ui-kit/types';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\nimport { filter, startWith } from 'rxjs/operators';\n\n@Component({\n\tselector: 'ng-doc-sidebar-category',\n\ttemplateUrl: './sidebar-category.component.html',\n\tstyleUrls: ['./sidebar-category.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocRouteActiveDirective,\n\t\tNgIf,\n\t\tNgDocDotComponent,\n\t\tNgDocTextComponent,\n\t\tNgDocIconComponent,\n\t\tNgDocTextLeftDirective,\n\t\tNgDocRotatorDirective,\n\t\tNgDocExpanderComponent,\n\t\tPolymorpheusModule,\n\t],\n})\n@UntilDestroy()\nexport class NgDocSidebarCategoryComponent implements OnInit {\n\t@Input()\n\tcategory?: NgDocNavigation;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-is-root')\n\tisRoot: boolean = false;\n\n\t@Input()\n\tcontent: NgDocContent = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-expandable')\n\texpandable: boolean = true;\n\n\t@Input()\n\texpanded: boolean = true;\n\n\tconstructor(\n\t\tprivate readonly router: Router,\n\t\tprivate readonly changeDetectorRef: ChangeDetectorRef,\n\t) {}\n\n\tngOnInit(): void {\n\t\t/**\n\t\t * We need to update this component every time a navigation occurs to expand the category if its child node is currently rendered\n\t\t */\n\t\tthis.router.events\n\t\t\t.pipe(\n\t\t\t\tfilter((event: Event) => event instanceof NavigationEnd),\n\t\t\t\tstartWith(null),\n\t\t\t\tfilter(() => this.router.url.includes(this.category?.route ?? '', 0)),\n\t\t\t\tuntilDestroyed(this),\n\t\t\t)\n\t\t\t.subscribe(() => this.expand());\n\t}\n\n\ttoggle(): void {\n\t\tthis.expanded ? this.collapse() : this.expand();\n\t}\n\n\texpand(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = true;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tcollapse(): void {\n\t\tif (this.category?.expandable) {\n\t\t\tthis.expanded = false;\n\t\t\tthis.changeDetectorRef.markForCheck();\n\t\t}\n\t}\n}\n","<div class=\"ng-doc-sidebar-category-wrapper\">\n\t<div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n\t\t<div\n\t\t\tclass=\"ng-doc-sidebar-category\"\n\t\t\t[ngDocRouteActive]=\"category?.route ?? ''\"\n\t\t\tactiveClass=\"active\">\n\t\t\t<ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n\t\t\t<span ng-doc-text [color]=\"expandable ? 'normal' : 'muted'\">\n\t\t\t\t<ng-doc-icon\n\t\t\t\t\ticon=\"chevron-right\"\n\t\t\t\t\t*ngIf=\"category?.expandable\"\n\t\t\t\t\t[ngDocRotator]=\"expanded\"\n\t\t\t\t\tngDocTextLeft>\n\t\t\t\t</ng-doc-icon>\n\t\t\t\t{{ category?.title }}\n\t\t\t</span>\n\t\t</div>\n\t\t<!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n\t</div>\n\t<ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\">\n\t\t<ng-template #contentTemplate>\n\t\t\t<div class=\"ng-doc-sidebar-category-children\">\n\t\t\t\t<!--We wrap content via ng-template to save state of the child components -->\n\t\t\t\t<ng-content></ng-content>\n\t\t\t\t<ng-container *polymorpheusOutlet=\"content\"></ng-container>\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-expander>\n</div>\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NgDocDotComponent, NgDocTextComponent } from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-sidebar-item',\n\ttemplateUrl: './sidebar-item.component.html',\n\tstyleUrls: ['./sidebar-item.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent],\n})\nexport class NgDocSidebarItemComponent {\n\t@Input()\n\titem?: NgDocNavigation;\n}\n","<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item?.route ?? '']\" routerLinkActive=\"active\">\n\t<ng-doc-dot></ng-doc-dot>\n\t<span ng-doc-text [absoluteContent]=\"true\">\n\t\t{{ item?.title }}\n\t</span>\n</a>\n","import { NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { NgDocContext, NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n\tselector: 'ng-doc-sidebar',\n\ttemplateUrl: './sidebar.component.html',\n\tstyleUrls: ['./sidebar.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgFor,\n\t\tNgTemplateOutlet,\n\t\tNgIf,\n\t\tNgDocSidebarCategoryComponent,\n\t\tNgDocSidebarItemComponent,\n\t\tNgDocExecutePipe,\n\t\tNgDocBindPipe,\n\t],\n\thost: { ngSkipHydration: 'true' },\n})\nexport class NgDocSidebarComponent {\n\tconstructor(\n\t\t@Inject(NG_DOC_CONTEXT)\n\t\treadonly context: NgDocContext,\n\t) {}\n\n\tgetNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n\t\treturn nav ? nav.children ?? [] : this.context.navigation;\n\t}\n}\n","<div class=\"ng-doc-side-bar-wrapper\">\n\t<ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n\t\t<ng-container\n\t\t\t*ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n\t</ng-container>\n\n\t<ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n\t\t<ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n\t\t\t<ng-doc-sidebar-category\n\t\t\t\t*ngIf=\"!item.hidden\"\n\t\t\t\t[category]=\"item\"\n\t\t\t\t[expandable]=\"!!item?.expandable\"\n\t\t\t\t[expanded]=\"!!item?.expanded || !item?.expandable\"\n\t\t\t\t[isRoot]=\"!!root\"\n\t\t\t\t[content]=\"categoryContent\">\n\t\t\t\t<ng-template #categoryContent>\n\t\t\t\t\t<ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n\t\t\t\t\t\t<ng-container\n\t\t\t\t\t\t\t*ngTemplateOutlet=\"\n\t\t\t\t\t\t\t\tsidebarTemplate;\n\t\t\t\t\t\t\t\tcontext: { item: child, root: false }\n\t\t\t\t\t\t\t\"></ng-container>\n\t\t\t\t\t</ng-container>\n\t\t\t\t</ng-template>\n\t\t\t</ng-doc-sidebar-category>\n\t\t</ng-container>\n\n\t\t<ng-template #itemTemplate>\n\t\t\t<ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n\t\t</ng-template>\n\t</ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AA4CO,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B,CAAA;IAkBzC,WACkB,CAAA,MAAc,EACd,iBAAoC,EAAA;QADpC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;QACd,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAAmB;QAdtD,IAAM,CAAA,MAAA,GAAY,KAAK,CAAC;QAGxB,IAAO,CAAA,OAAA,GAAiB,EAAE,CAAC;QAI3B,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAG3B,IAAQ,CAAA,QAAA,GAAY,IAAI,CAAC;KAKrB;IAEJ,QAAQ,GAAA;AACP;;AAEG;QACH,IAAI,CAAC,MAAM,CAAC,MAAM;aAChB,IAAI,CACJ,MAAM,CAAC,CAAC,KAAY,KAAK,KAAK,YAAY,aAAa,CAAC,EACxD,SAAS,CAAC,IAAI,CAAC,EACf,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EACrE,cAAc,CAAC,IAAI,CAAC,CACpB;aACA,SAAS,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;KACjC;IAED,MAAM,GAAA;AACL,QAAA,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,GAA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;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-sidebar.mjs","sources":["../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.ts","../../../../libs/app/components/sidebar/sidebar-category/sidebar-category.component.html","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.ts","../../../../libs/app/components/sidebar/sidebar-item/sidebar-item.component.html","../../../../libs/app/components/sidebar/sidebar.component.ts","../../../../libs/app/components/sidebar/sidebar.component.html","../../../../libs/app/components/sidebar/ng-doc-app-components-sidebar.ts"],"sourcesContent":["import { Location, NgIf, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n HostBinding,\n inject,\n Input,\n} from '@angular/core';\nimport { NgDocRouteActiveDirective } from '@ng-doc/app/directives/route-active';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport {\n NgDocContent,\n NgDocDotComponent,\n NgDocExpanderComponent,\n NgDocIconComponent,\n NgDocRotatorDirective,\n NgDocTextComponent,\n NgDocTextLeftDirective,\n} from '@ng-doc/ui-kit';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport { PolymorpheusModule } from '@tinkoff/ng-polymorpheus';\n\n@Component({\n selector: 'ng-doc-sidebar-category',\n templateUrl: './sidebar-category.component.html',\n styleUrls: ['./sidebar-category.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgDocRouteActiveDirective,\n NgIf,\n NgDocDotComponent,\n NgDocTextComponent,\n NgDocIconComponent,\n NgDocTextLeftDirective,\n NgDocRotatorDirective,\n NgDocExpanderComponent,\n PolymorpheusModule,\n NgTemplateOutlet,\n ],\n})\n@UntilDestroy()\nexport class NgDocSidebarCategoryComponent {\n @Input({ required: true })\n category!: NgDocNavigation;\n\n @Input()\n @HostBinding('attr.data-ng-doc-is-root')\n isRoot: boolean = false;\n\n @Input()\n content: NgDocContent = '';\n\n @Input()\n @HostBinding('attr.data-ng-doc-expandable')\n expandable: boolean = true;\n\n @Input()\n expanded: boolean = true;\n\n protected readonly location = inject(Location);\n protected readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n constructor() {\n this.location.onUrlChange(() => {\n if (this.location.path().includes(this.category.route ?? '', 0)) {\n this.expand();\n }\n });\n }\n\n toggle(): void {\n this.expanded ? this.collapse() : this.expand();\n }\n\n expand(): void {\n if (this.category?.expandable) {\n this.expanded = true;\n this.changeDetectorRef.markForCheck();\n }\n }\n\n collapse(): void {\n if (this.category?.expandable) {\n this.expanded = false;\n this.changeDetectorRef.markForCheck();\n }\n }\n}\n","<div class=\"ng-doc-sidebar-category-wrapper\">\n <div class=\"ng-doc-sidebar-category-button\" (click)=\"toggle()\">\n <div class=\"ng-doc-sidebar-category\" [ngDocRouteActive]=\"category.route\" activeClass=\"active\">\n <ng-doc-dot *ngIf=\"!expandable\"></ng-doc-dot>\n <span ng-doc-text>\n <ng-doc-icon\n icon=\"chevron-right\"\n *ngIf=\"category.expandable\"\n [ngDocRotator]=\"expanded\"\n ngDocTextLeft>\n </ng-doc-icon>\n {{ category.title }}\n </span>\n </div>\n <!--\t\t<div ng-doc-text color=\"muted\" size=\"small\">Some description</div>-->\n </div>\n <ng-doc-expander [expanded]=\"expanded\" [content]=\"contentTemplate\" />\n <ng-template #contentTemplate>\n <div class=\"ng-doc-sidebar-category-children\">\n <!--We wrap content via ng-template to save state of the child components -->\n <ng-content></ng-content>\n <ng-container *polymorpheusOutlet=\"content as text\">{{ text }}</ng-container>\n </div>\n </ng-template>\n</div>\n","import { ChangeDetectionStrategy, Component, computed, input } from '@angular/core';\nimport { RouterLink, RouterLinkActive } from '@angular/router';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport {\n NgDocColor,\n NgDocDotComponent,\n NgDocTagComponent,\n NgDocTextComponent,\n} from '@ng-doc/ui-kit';\n\n@Component({\n selector: 'ng-doc-sidebar-item',\n templateUrl: './sidebar-item.component.html',\n styleUrls: ['./sidebar-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [RouterLinkActive, RouterLink, NgDocDotComponent, NgDocTextComponent, NgDocTagComponent],\n})\nexport class NgDocSidebarItemComponent {\n item = input.required<NgDocNavigation>();\n statuses = computed(() => {\n const statuses = this.item().metadata?.tags['status'] ?? [];\n\n return statuses.map((status) => {\n const [type, text] = status.split(/\\s+(.+)/);\n\n return { type: type.replace(/^:/, '') as NgDocColor, text };\n });\n });\n}\n","<a class=\"ng-doc-sidebar-link\" [routerLink]=\"[item().route]\" routerLinkActive=\"active\">\n <ng-doc-dot></ng-doc-dot>\n <span ng-doc-text [absoluteContent]=\"true\">\n {{ item().title }}\n @for (status of statuses(); track status) {\n <ng-doc-tag size=\"small\" [color]=\"status.type || 'success'\" mod=\"light\">{{\n status.text\n }}</ng-doc-tag>\n }\n </span>\n</a>\n","import { Location, NgFor, NgIf, NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { NgDocNavigation } from '@ng-doc/app/interfaces';\nimport { NG_DOC_CONTEXT } from '@ng-doc/app/tokens';\nimport { NgDocBindPipe, NgDocExecutePipe } from '@ng-doc/ui-kit';\n\nimport { NgDocSidebarCategoryComponent } from './sidebar-category/sidebar-category.component';\nimport { NgDocSidebarItemComponent } from './sidebar-item/sidebar-item.component';\n\n@Component({\n selector: 'ng-doc-sidebar',\n templateUrl: './sidebar.component.html',\n styleUrls: ['./sidebar.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgFor,\n NgTemplateOutlet,\n NgIf,\n NgDocSidebarCategoryComponent,\n NgDocSidebarItemComponent,\n NgDocExecutePipe,\n NgDocBindPipe,\n ],\n})\nexport class NgDocSidebarComponent {\n protected readonly location = inject(Location);\n protected readonly context = inject(NG_DOC_CONTEXT);\n\n getNavigation(nav?: NgDocNavigation): NgDocNavigation[] {\n return nav ? nav.children ?? [] : this.context.navigation;\n }\n\n matchRoute(route: string): boolean {\n return this.location.path().includes(route ?? '', 0);\n }\n}\n","<div class=\"ng-doc-side-bar-wrapper\">\n <ng-container *ngFor=\"let item of getNavigation | bind: this | execute\">\n <ng-container\n *ngTemplateOutlet=\"sidebarTemplate; context: { item: this.item, root: true }\"></ng-container>\n </ng-container>\n\n <ng-template let-item=\"item\" let-root=\"root\" #sidebarTemplate>\n <ng-container *ngIf=\"item.children?.length; else itemTemplate\">\n <ng-doc-sidebar-category\n *ngIf=\"!item.hidden\"\n [category]=\"item\"\n [expandable]=\"!!item?.expandable\"\n [expanded]=\"\n !!item?.expanded || !item?.expandable || (matchRoute | bind: this | execute: item.route)\n \"\n [isRoot]=\"!!root\"\n [content]=\"categoryContent\">\n </ng-doc-sidebar-category>\n <ng-template #categoryContent>\n <ng-container *ngFor=\"let child of getNavigation | bind: this | execute: item\">\n <ng-container\n *ngTemplateOutlet=\"\n sidebarTemplate;\n context: { item: child, root: false }\n \"></ng-container>\n </ng-container>\n </ng-template>\n </ng-container>\n\n <ng-template #itemTemplate>\n <ng-doc-sidebar-item [item]=\"item\" *ngIf=\"!item.hidden\"></ng-doc-sidebar-item>\n </ng-template>\n </ng-template>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA2CO,IAAM,6BAA6B,GAAnC,MAAM,6BAA6B,CAAA;AAqBxC,IAAA,WAAA,GAAA;QAfA,IAAM,CAAA,MAAA,GAAY,KAAK,CAAC;QAGxB,IAAO,CAAA,OAAA,GAAiB,EAAE,CAAC;QAI3B,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC;QAG3B,IAAQ,CAAA,QAAA,GAAY,IAAI,CAAC;AAEN,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAG/D,QAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,CA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"}
@@ -15,10 +15,10 @@ class NgDocTabsComponent {
15
15
  appendElement(element, parent) {
16
16
  parent.appendChild(element);
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NgDocTabsComponent, isStandalone: true, selector: "ng-doc-tabs", inputs: { tabs: "tabs" }, ngImport: i0, template: "<ng-doc-tab-group [openedTab]=\"getActiveIndex | execute: tabs\">\n\t<ng-doc-tab *ngFor=\"let tab of tabs; let i = index\" [label]=\"label\" [content]=\"content\" [id]=\"i\">\n\t\t<ng-template #label>\n\t\t\t<ng-doc-icon [customIcon]=\"tab.icon\" *ngIf=\"tab.icon\"></ng-doc-icon>\n\t\t\t{{ tab.title }}\n\t\t</ng-template>\n\t\t<ng-template #content>\n\t\t\t<div #element>\n\t\t\t\t{{ appendElement | execute: tab.content:element }}\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-tab>\n</ng-doc-tab-group>\n", styles: [":host{display:block;border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border);margin:var(--ng-doc-tabs-margin);overflow:hidden;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none;--ng-doc-tab-group-header-background: var(--ng-doc-base-2)}:host ng-doc-icon{margin-right:calc(var(--ng-doc-base-gutter) / 2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocTabGroupComponent, selector: "ng-doc-tab-group", inputs: ["openedTab"] }, { kind: "component", type: NgDocTabComponent, selector: "ng-doc-tab", inputs: ["label", "id", "content"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTabsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocTabsComponent, isStandalone: true, selector: "ng-doc-tabs", inputs: { tabs: "tabs" }, ngImport: i0, template: "<ng-doc-tab-group [openedTab]=\"getActiveIndex | execute: tabs\">\n\t<ng-doc-tab *ngFor=\"let tab of tabs; let i = index\" [label]=\"label\" [content]=\"content\" [id]=\"i\">\n\t\t<ng-template #label>\n\t\t\t<ng-doc-icon [customIcon]=\"tab.icon\" *ngIf=\"tab.icon\"></ng-doc-icon>\n\t\t\t{{ tab.title }}\n\t\t</ng-template>\n\t\t<ng-template #content>\n\t\t\t<div #element>\n\t\t\t\t{{ appendElement | execute: tab.content:element }}\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-tab>\n</ng-doc-tab-group>\n", styles: [":host{display:block;border-radius:var(--ng-doc-tabs-border-radius);border:var(--ng-doc-tabs-border);margin:var(--ng-doc-tabs-margin);overflow:hidden;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none;--ng-doc-tab-group-header-background: var(--ng-doc-base-2)}:host ng-doc-icon{margin-right:calc(var(--ng-doc-base-gutter) / 2)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocTabGroupComponent, selector: "ng-doc-tab-group", inputs: ["openedTab"] }, { kind: "component", type: NgDocTabComponent, selector: "ng-doc-tab, a[ng-doc-tab]", inputs: ["label", "id", "content"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTabsComponent, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTabsComponent, decorators: [{
22
22
  type: Component,
23
23
  args: [{ selector: 'ng-doc-tabs', standalone: true, imports: [
24
24
  CommonModule,
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-tabs.mjs","sources":["../../../../libs/app/components/tabs/tabs.component.ts","../../../../libs/app/components/tabs/tabs.component.html","../../../../libs/app/components/tabs/ng-doc-app-components-tabs.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgDocTab } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n\tNgDocBindPipe,\n\tNgDocExecutePipe,\n\tNgDocIconComponent,\n\tNgDocTabComponent,\n\tNgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-tabs',\n\tstandalone: true,\n\timports: [\n\t\tCommonModule,\n\t\tNgDocTabGroupComponent,\n\t\tNgDocTabComponent,\n\t\tNgDocSanitizeHtmlPipe,\n\t\tNgDocExecutePipe,\n\t\tNgDocBindPipe,\n\t\tNgDocIconComponent,\n\t],\n\ttemplateUrl: './tabs.component.html',\n\tstyleUrls: ['./tabs.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocTabsComponent {\n\t@Input()\n\ttabs: NgDocTab[] = [];\n\n\tgetActiveIndex(tabs: NgDocTab[]): number {\n\t\treturn Math.max(\n\t\t\ttabs.findIndex((tab: NgDocTab) => tab.active),\n\t\t\t0,\n\t\t);\n\t}\n\n\tappendElement(element: Element, parent: Element): void {\n\t\tparent.appendChild(element);\n\t}\n}\n","<ng-doc-tab-group [openedTab]=\"getActiveIndex | execute: tabs\">\n\t<ng-doc-tab *ngFor=\"let tab of tabs; let i = index\" [label]=\"label\" [content]=\"content\" [id]=\"i\">\n\t\t<ng-template #label>\n\t\t\t<ng-doc-icon [customIcon]=\"tab.icon\" *ngIf=\"tab.icon\"></ng-doc-icon>\n\t\t\t{{ tab.title }}\n\t\t</ng-template>\n\t\t<ng-template #content>\n\t\t\t<div #element>\n\t\t\t\t{{ appendElement | execute: tab.content:element }}\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-tab>\n</ng-doc-tab-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAhB/B,IAAA,WAAA,GAAA;QAkBC,IAAI,CAAA,IAAA,GAAe,EAAE,CAAC;AAYtB,KAAA;AAVA,IAAA,cAAc,CAAC,IAAgB,EAAA;QAC9B,OAAO,IAAI,CAAC,GAAG,CACd,IAAI,CAAC,SAAS,CAAC,CAAC,GAAa,KAAK,GAAG,CAAC,MAAM,CAAC,EAC7C,CAAC,CACD,CAAC;KACF;IAED,aAAa,CAAC,OAAgB,EAAE,MAAe,EAAA;AAC9C,QAAA,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAC5B;8GAbW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,M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Z,sBAAsB;wBACtB,iBAAiB;wBACjB,qBAAqB;wBACrB,gBAAgB;wBAChB,aAAa;wBACb,kBAAkB;qBAClB,EAGgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,6fAAA,EAAA,MAAA,EAAA,CAAA,yWAAA,CAAA,EAAA,CAAA;8BAI/C,IAAI,EAAA,CAAA;sBADH,KAAK;;;AE7BP;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-tabs.mjs","sources":["../../../../libs/app/components/tabs/tabs.component.ts","../../../../libs/app/components/tabs/tabs.component.html","../../../../libs/app/components/tabs/ng-doc-app-components-tabs.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { NgDocTab } from '@ng-doc/app/interfaces';\nimport { NgDocSanitizeHtmlPipe } from '@ng-doc/app/pipes';\nimport {\n\tNgDocBindPipe,\n\tNgDocExecutePipe,\n\tNgDocIconComponent,\n\tNgDocTabComponent,\n\tNgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n@Component({\n\tselector: 'ng-doc-tabs',\n\tstandalone: true,\n\timports: [\n\t\tCommonModule,\n\t\tNgDocTabGroupComponent,\n\t\tNgDocTabComponent,\n\t\tNgDocSanitizeHtmlPipe,\n\t\tNgDocExecutePipe,\n\t\tNgDocBindPipe,\n\t\tNgDocIconComponent,\n\t],\n\ttemplateUrl: './tabs.component.html',\n\tstyleUrls: ['./tabs.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NgDocTabsComponent {\n\t@Input()\n\ttabs: NgDocTab[] = [];\n\n\tgetActiveIndex(tabs: NgDocTab[]): number {\n\t\treturn Math.max(\n\t\t\ttabs.findIndex((tab: NgDocTab) => tab.active),\n\t\t\t0,\n\t\t);\n\t}\n\n\tappendElement(element: Element, parent: Element): void {\n\t\tparent.appendChild(element);\n\t}\n}\n","<ng-doc-tab-group [openedTab]=\"getActiveIndex | execute: tabs\">\n\t<ng-doc-tab *ngFor=\"let tab of tabs; let i = index\" [label]=\"label\" [content]=\"content\" [id]=\"i\">\n\t\t<ng-template #label>\n\t\t\t<ng-doc-icon [customIcon]=\"tab.icon\" *ngIf=\"tab.icon\"></ng-doc-icon>\n\t\t\t{{ tab.title }}\n\t\t</ng-template>\n\t\t<ng-template #content>\n\t\t\t<div #element>\n\t\t\t\t{{ appendElement | execute: tab.content:element }}\n\t\t\t</div>\n\t\t</ng-template>\n\t</ng-doc-tab>\n</ng-doc-tab-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MA4Ba,kBAAkB,CAAA;AAhB/B,IAAA,WAAA,GAAA;QAkBC,IAAI,CAAA,IAAA,GAAe,EAAE,CAAC;AAYtB,KAAA;AAVA,IAAA,cAAc,CAAC,IAAgB,EAAA;QAC9B,OAAO,IAAI,CAAC,GAAG,CACd,IAAI,CAAC,SAAS,CAAC,CAAC,GAAa,KAAK,GAAG,CAAC,MAAM,CAAC,EAC7C,CAAC,CACD,CAAC;KACF;IAED,aAAa,CAAC,OAAgB,EAAE,MAAe,EAAA;AAC9C,QAAA,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;KAC5B;8GAbW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAlB,kBAAkB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5B/B,6fAaA,EAAA,MAAA,EAAA,CAAA,yWAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDGE,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,C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;;;;"}
@@ -1,78 +1,44 @@
1
- import { trigger, transition, style, animate } from '@angular/animations';
2
- import { NgIf } from '@angular/common';
1
+ import { DOCUMENT, NgIf } from '@angular/common';
3
2
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy } from '@angular/core';
5
- import { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';
6
- import * as i1 from '@ng-doc/app/services';
3
+ import { inject, Component, ChangeDetectionStrategy } from '@angular/core';
4
+ import { NgDocThemeService } from '@ng-doc/app/services/theme';
7
5
  import { NgDocButtonIconComponent, NgDocTooltipDirective, NgDocIconComponent, NgDocSmoothResizeComponent } from '@ng-doc/ui-kit';
8
6
 
9
7
  class NgDocThemeToggleComponent {
10
- constructor(themeService) {
11
- this.themeService = themeService;
8
+ constructor() {
12
9
  this.themes = [
13
10
  { name: 'Auto', theme: 'auto' },
14
- { name: 'Light', theme: undefined },
15
- { name: 'Dark', theme: NG_DOC_NIGHT_THEME },
11
+ { name: 'Light', theme: null },
12
+ { name: 'Dark', theme: 'dark' },
16
13
  ];
14
+ this.documentElement = inject(DOCUMENT).documentElement;
15
+ this.themeService = inject(NgDocThemeService);
17
16
  }
18
17
  get currentTheme() {
19
- if (this.themeService.isAutoThemeEnabled) {
20
- return this.themes[0];
21
- }
22
- const theme = this.themeService.currentTheme;
18
+ const theme = this.documentElement.getAttribute('data-theme');
23
19
  return this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];
24
20
  }
25
21
  get nextTheme() {
26
- if (this.themeService.isAutoThemeEnabled) {
27
- return this.themes[1];
28
- }
29
- const index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);
22
+ const index = this.themes.findIndex(({ theme }) => theme === this.currentTheme.theme);
30
23
  return this.themes[(index + 1) % this.themes.length];
31
24
  }
32
25
  toggleTheme() {
33
26
  const { theme } = this.nextTheme;
34
- if (theme === 'auto') {
35
- this.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);
36
- }
37
- else {
38
- this.themeService.set(theme?.id);
39
- }
27
+ this.themeService.set(theme ?? undefined);
40
28
  }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocThemeToggleComponent, deps: [{ token: i1.NgDocThemeService }], target: i0.ɵɵFactoryTarget.Component }); }
42
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NgDocThemeToggleComponent, isStandalone: true, selector: "ng-doc-theme-toggle", ngImport: i0, template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocSmoothResizeComponent, selector: "ng-doc-smooth-resize", inputs: ["trigger", "animateOpacity"] }], animations: [
43
- trigger('switchIcon', [
44
- transition(':enter', [
45
- style({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),
46
- animate('225ms cubic-bezier(0.4,0.0,0.2,1)', style({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 })),
47
- ], { params: { from: '-100%' } }),
48
- transition(':leave', [
49
- style({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),
50
- animate('225ms cubic-bezier(0.4,0.0,0.2,1)', style({ transform: 'translateX({{to}})', position: 'absolute', opacity: 0 })),
51
- ], { params: { to: '-100%' } }),
52
- ]),
53
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocThemeToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.1", type: NgDocThemeToggleComponent, isStandalone: true, selector: "ng-doc-theme-toggle", ngImport: i0, template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n <ng-template #tooltipContent>\n <ng-doc-smooth-resize [trigger]=\"currentTheme.name\">\n \"{{ currentTheme.name }}\" theme\n </ng-doc-smooth-resize>\n </ng-template>\n\n @if (currentTheme === themes[0]) {\n <div class=\"letter\">A</div>\n } @else if (currentTheme === themes[1]) {\n <ng-doc-icon icon=\"sun\" size=\"24\"></ng-doc-icon>\n } @else {\n <ng-doc-icon icon=\"moon\" size=\"24\"></ng-doc-icon>\n }\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"], dependencies: [{ kind: "component", type: NgDocButtonIconComponent, selector: "button[ng-doc-button-icon], a[ng-doc-button-icon], button[ng-doc-button-icon-raised], a[ng-doc-button-icon-raised], button[ng-doc-button-icon-transparent], a[ng-doc-button-icon-transparent]", inputs: ["size", "rounded"] }, { kind: "directive", type: NgDocTooltipDirective, selector: "[ngDocTooltip]", inputs: ["ngDocTooltip", "delay", "displayOrigin", "pointerOrigin", "positions", "canOpen", "panelClass", "minHeight", "maxHeight", "height", "minWidth", "maxWidth", "width"], outputs: ["beforeOpen", "afterOpen", "beforeClose", "afterClose"], exportAs: ["ngDocTooltip"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocSmoothResizeComponent, selector: "ng-doc-smooth-resize", inputs: ["trigger", "animateOpacity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
54
31
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocThemeToggleComponent, decorators: [{
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocThemeToggleComponent, decorators: [{
56
33
  type: Component,
57
- args: [{ animations: [
58
- trigger('switchIcon', [
59
- transition(':enter', [
60
- style({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),
61
- animate('225ms cubic-bezier(0.4,0.0,0.2,1)', style({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 })),
62
- ], { params: { from: '-100%' } }),
63
- transition(':leave', [
64
- style({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),
65
- animate('225ms cubic-bezier(0.4,0.0,0.2,1)', style({ transform: 'translateX({{to}})', position: 'absolute', opacity: 0 })),
66
- ], { params: { to: '-100%' } }),
67
- ]),
68
- ], selector: 'ng-doc-theme-toggle', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
34
+ args: [{ selector: 'ng-doc-theme-toggle', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
69
35
  NgDocButtonIconComponent,
70
36
  NgDocTooltipDirective,
71
37
  NgIf,
72
38
  NgDocIconComponent,
73
39
  NgDocSmoothResizeComponent,
74
- ], template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"] }]
75
- }], ctorParameters: () => [{ type: i1.NgDocThemeService }] });
40
+ ], template: "<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n <ng-template #tooltipContent>\n <ng-doc-smooth-resize [trigger]=\"currentTheme.name\">\n \"{{ currentTheme.name }}\" theme\n </ng-doc-smooth-resize>\n </ng-template>\n\n @if (currentTheme === themes[0]) {\n <div class=\"letter\">A</div>\n } @else if (currentTheme === themes[1]) {\n <ng-doc-icon icon=\"sun\" size=\"24\"></ng-doc-icon>\n } @else {\n <ng-doc-icon icon=\"moon\" size=\"24\"></ng-doc-icon>\n }\n</button>\n", styles: [":host{display:inline-block;height:40px;width:40px}:host .letter{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);--ng-doc-font-size: 26px;--ng-doc-font-weight: 600}\n"] }]
41
+ }] });
76
42
 
77
43
  /**
78
44
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\nimport { NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { NG_DOC_NIGHT_THEME } from '@ng-doc/app/constants';\nimport { NgDocTheme } from '@ng-doc/app/interfaces';\nimport { NgDocThemeService } from '@ng-doc/app/services';\nimport {\n\tNgDocButtonIconComponent,\n\tNgDocIconComponent,\n\tNgDocSmoothResizeComponent,\n\tNgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\ninterface ToggleTheme {\n\tname: string;\n\ttheme: NgDocTheme | 'auto' | undefined;\n}\n\n@Component({\n\tanimations: [\n\t\ttrigger('switchIcon', [\n\t\t\ttransition(\n\t\t\t\t':enter',\n\t\t\t\t[\n\t\t\t\t\tstyle({ transform: 'translateX({{from}})', position: 'absolute', opacity: 0 }),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{ params: { from: '-100%' } },\n\t\t\t),\n\t\t\ttransition(\n\t\t\t\t':leave',\n\t\t\t\t[\n\t\t\t\t\tstyle({ transform: 'translateX(0%)', position: 'absolute', opacity: 1 }),\n\t\t\t\t\tanimate(\n\t\t\t\t\t\t'225ms cubic-bezier(0.4,0.0,0.2,1)',\n\t\t\t\t\t\tstyle({ transform: 'translateX({{to}})', position: 'absolute', opacity: 0 }),\n\t\t\t\t\t),\n\t\t\t\t],\n\t\t\t\t{ params: { to: '-100%' } },\n\t\t\t),\n\t\t]),\n\t],\n\tselector: 'ng-doc-theme-toggle',\n\ttemplateUrl: './theme-toggle.component.html',\n\tstyleUrls: ['./theme-toggle.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [\n\t\tNgDocButtonIconComponent,\n\t\tNgDocTooltipDirective,\n\t\tNgIf,\n\t\tNgDocIconComponent,\n\t\tNgDocSmoothResizeComponent,\n\t],\n})\nexport class NgDocThemeToggleComponent {\n\tprotected readonly themes: ToggleTheme[] = [\n\t\t{ name: 'Auto', theme: 'auto' },\n\t\t{ name: 'Light', theme: undefined },\n\t\t{ name: 'Dark', theme: NG_DOC_NIGHT_THEME },\n\t];\n\n\tconstructor(protected readonly themeService: NgDocThemeService) {}\n\n\tget currentTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[0];\n\t\t}\n\n\t\tconst theme = this.themeService.currentTheme;\n\n\t\treturn this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];\n\t}\n\n\tget nextTheme(): ToggleTheme {\n\t\tif (this.themeService.isAutoThemeEnabled) {\n\t\t\treturn this.themes[1];\n\t\t}\n\n\t\tconst index = this.themes.findIndex(({ theme }) => theme === this.themeService.currentTheme);\n\n\t\treturn this.themes[(index + 1) % this.themes.length];\n\t}\n\n\ttoggleTheme(): void {\n\t\tconst { theme } = this.nextTheme;\n\n\t\tif (theme === 'auto') {\n\t\t\tthis.themeService.enableAutoTheme(undefined, NG_DOC_NIGHT_THEME);\n\t\t} else {\n\t\t\tthis.themeService.set(theme?.id);\n\t\t}\n\t}\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n\t<ng-template #tooltipContent>\n\t\t<ng-doc-smooth-resize [trigger]=\"nextTheme.name\">\n\t\t\tSet \"{{ nextTheme.name }}\" theme\n\t\t</ng-doc-smooth-resize>\n\t</ng-template>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"sun\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[1]\"></ng-doc-icon>\n\t<ng-doc-icon\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\ticon=\"moon\"\n\t\t[size]=\"24\"\n\t\t*ngIf=\"nextTheme === themes[2]\"></ng-doc-icon>\n\t<div\n\t\tclass=\"letter\"\n\t\t[@switchIcon]=\"{ value: ':enter', params: { from: '-100%', to: '100%' } }\"\n\t\t*ngIf=\"nextTheme === themes[0]\">\n\t\tA\n\t</div>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n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
+ {"version":3,"file":"ng-doc-app-components-theme-toggle.mjs","sources":["../../../../libs/app/components/theme-toggle/theme-toggle.component.ts","../../../../libs/app/components/theme-toggle/theme-toggle.component.html","../../../../libs/app/components/theme-toggle/ng-doc-app-components-theme-toggle.ts"],"sourcesContent":["import { DOCUMENT, NgIf } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { NgDocThemeService } from '@ng-doc/app/services/theme';\nimport {\n NgDocButtonIconComponent,\n NgDocIconComponent,\n NgDocSmoothResizeComponent,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\ninterface ToggleTheme {\n name: string;\n theme: string | null;\n}\n\n@Component({\n selector: 'ng-doc-theme-toggle',\n templateUrl: './theme-toggle.component.html',\n styleUrls: ['./theme-toggle.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [\n NgDocButtonIconComponent,\n NgDocTooltipDirective,\n NgIf,\n NgDocIconComponent,\n NgDocSmoothResizeComponent,\n ],\n})\nexport class NgDocThemeToggleComponent {\n protected readonly themes: ToggleTheme[] = [\n { name: 'Auto', theme: 'auto' },\n { name: 'Light', theme: null },\n { name: 'Dark', theme: 'dark' },\n ];\n protected readonly documentElement = inject(DOCUMENT).documentElement;\n protected readonly themeService = inject(NgDocThemeService);\n\n get currentTheme(): ToggleTheme {\n const theme = this.documentElement.getAttribute('data-theme');\n\n return this.themes.find(({ theme: t }) => t === theme) ?? this.themes[0];\n }\n\n get nextTheme(): ToggleTheme {\n const index = this.themes.findIndex(({ theme }) => theme === this.currentTheme.theme);\n\n return this.themes[(index + 1) % this.themes.length];\n }\n\n toggleTheme(): void {\n const { theme } = this.nextTheme;\n\n this.themeService.set(theme ?? undefined);\n }\n}\n","<button ng-doc-button-icon size=\"large\" (click)=\"toggleTheme()\" [ngDocTooltip]=\"tooltipContent\">\n <ng-template #tooltipContent>\n <ng-doc-smooth-resize [trigger]=\"currentTheme.name\">\n \"{{ currentTheme.name }}\" theme\n </ng-doc-smooth-resize>\n </ng-template>\n\n @if (currentTheme === themes[0]) {\n <div class=\"letter\">A</div>\n } @else if (currentTheme === themes[1]) {\n <ng-doc-icon icon=\"sun\" size=\"24\"></ng-doc-icon>\n } @else {\n <ng-doc-icon icon=\"moon\" size=\"24\"></ng-doc-icon>\n }\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA6Ba,yBAAyB,CAAA;AAdtC,IAAA,WAAA,GAAA;AAeqB,QAAA,IAAA,CAAA,MAAM,GAAkB;AACzC,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;AAC/B,YAAA,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9B,YAAA,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;SAChC,CAAC;AACiB,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,eAAe,CAAC;AACnD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAmB7D,KAAA;AAjBC,IAAA,IAAI,YAAY,GAAA;QACd,MAAM,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAE9D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,KAAK,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;KAC1E;AAED,IAAA,IAAI,SAAS,GAAA;QACX,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,KAAK,KAAK,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAEtF,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAA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AAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;2FAGjB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAdrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,mBAGd,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EACP,OAAA,EAAA;wBACP,wBAAwB;wBACxB,qBAAqB;wBACrB,IAAI;wBACJ,kBAAkB;wBAClB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,yiBAAA,EAAA,MAAA,EAAA,CAAA,+TAAA,CAAA,EAAA,CAAA;;;AE3BH;;AAEG;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import { DOCUMENT, NgFor } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { inject, ElementRef, Component, ChangeDetectionStrategy, Input, HostBinding, QueryList, signal, NgZone, ChangeDetectorRef, Renderer2, afterNextRender, AfterRenderPhase, ViewChild, ViewChildren } from '@angular/core';
4
+ import { inject, ElementRef, Component, ChangeDetectionStrategy, Input, HostBinding, QueryList, signal, NgZone, ChangeDetectorRef, Renderer2, afterNextRender, ViewChild, ViewChildren } from '@angular/core';
5
5
  import { RouterLink, Router, Scroll } from '@angular/router';
6
6
  import { isPresent } from '@ng-doc/core/helpers/is-present';
7
- import { ngDocZoneOptimize, NgDocMediaQueryDirective } from '@ng-doc/ui-kit';
7
+ import { ngDocZoneOptimize } from '@ng-doc/ui-kit';
8
8
  import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
9
9
  import { fromEvent, merge } from 'rxjs';
10
10
  import { filter, map, startWith, debounceTime, distinctUntilChanged } from 'rxjs/operators';
@@ -18,12 +18,12 @@ class NgDocTocElementComponent {
18
18
  this.level = 1;
19
19
  this.elementRef = inject(ElementRef);
20
20
  }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTocElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NgDocTocElementComponent, isStandalone: true, selector: "li[ng-doc-toc-element]", inputs: { path: "path", hash: "hash", selected: "selected", level: "level" }, host: { properties: { "attr.data-ng-doc-selected": "this.selected", "attr.data-ng-doc-level": "this.level" } }, ngImport: i0, template: "<a\n\t[routerLink]=\"[]\"\n\t[fragment]=\"hash | decodeUriComponent\"\n\t[style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: NgDocDecodeUriComponentPipe, name: "decodeUriComponent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTocElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.1", type: NgDocTocElementComponent, isStandalone: true, selector: "li[ng-doc-toc-element]", inputs: { path: "path", hash: "hash", selected: "selected", level: "level" }, host: { properties: { "attr.data-ng-doc-selected": "this.selected", "attr.data-ng-doc-level": "this.level" } }, ngImport: i0, template: "<a\n [routerLink]=\"[]\"\n [fragment]=\"hash | decodeUriComponent\"\n [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n <ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: NgDocDecodeUriComponentPipe, name: "decodeUriComponent" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23
23
  }
24
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTocElementComponent, decorators: [{
24
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTocElementComponent, decorators: [{
25
25
  type: Component,
26
- args: [{ selector: 'li[ng-doc-toc-element]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [RouterLink, NgDocDecodeUriComponentPipe], template: "<a\n\t[routerLink]=\"[]\"\n\t[fragment]=\"hash | decodeUriComponent\"\n\t[style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"] }]
26
+ args: [{ selector: 'li[ng-doc-toc-element]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [RouterLink, NgDocDecodeUriComponentPipe], template: "<a\n [routerLink]=\"[]\"\n [fragment]=\"hash | decodeUriComponent\"\n [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n <ng-content></ng-content>\n</a>\n", styles: [":host{display:flex;margin:0;color:var(--ng-doc-text)}:host[data-ng-doc-level=\"1\"] a{padding-left:var(--ng-doc-base-gutter)}:host[data-ng-doc-selected=true]{color:var(--ng-doc-primary)}:host:hover{cursor:pointer;color:var(--ng-doc-primary)}:host a{font-family:var(--ng-doc-font-family);font-variant:no-contextual;color:var(--ng-doc-text);line-height:var(--ng-doc-line-height);font-size:var(--ng-doc-font-size);font-weight:var(--ng-doc-font-weight);padding:calc(var(--ng-doc-base-gutter) / 2);color:inherit;width:100%;text-decoration:none;word-break:break-word;--ng-doc-font-size: 14px}\n"] }]
27
27
  }], propDecorators: { path: [{
28
28
  type: Input
29
29
  }], hash: [{
@@ -50,35 +50,37 @@ let NgDocTocComponent = class NgDocTocComponent {
50
50
  this.changeDetectorRef = inject(ChangeDetectorRef);
51
51
  this.renderer = inject(Renderer2);
52
52
  this.router = inject(Router);
53
- afterNextRender(() => {
54
- const scrollSelection = fromEvent(this.document, 'scroll').pipe(filter(() => !!this.tableOfContent.length), map((event) => event.target.scrollingElement), startWith(this.document.scrollingElement), map((target) => {
55
- const percentage = (target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);
56
- const selectionLine = target.scrollTop + (target.offsetHeight * percentage) / 100;
57
- if (!this.tableOfContent.length) {
58
- return null;
59
- }
60
- return this.tableOfContent.reduce((pTarget, cTarget) => {
61
- const pTop = pTarget.element.getBoundingClientRect().top + target.scrollTop;
62
- const cTop = cTarget.element.getBoundingClientRect().top + target.scrollTop;
63
- return Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)
64
- ? cTarget
65
- : pTarget;
66
- });
67
- }), filter(isPresent));
68
- const routerSelection = this.router.events.pipe(map((event) => {
69
- if (event instanceof Scroll) {
70
- const item = this.tableOfContent.find((item) => item.path.includes(event.routerEvent.url));
71
- if (item) {
72
- return item;
53
+ afterNextRender({
54
+ write: () => {
55
+ const scrollSelection = fromEvent(this.document, 'scroll').pipe(filter(() => !!this.tableOfContent.length), map((event) => event.target.scrollingElement), startWith(this.document.scrollingElement), map((target) => {
56
+ const percentage = (target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);
57
+ const selectionLine = target.scrollTop + (target.offsetHeight * percentage) / 100;
58
+ if (!this.tableOfContent.length) {
59
+ return null;
60
+ }
61
+ return this.tableOfContent.reduce((pTarget, cTarget) => {
62
+ const pTop = pTarget.element.getBoundingClientRect().top + target.scrollTop;
63
+ const cTop = cTarget.element.getBoundingClientRect().top + target.scrollTop;
64
+ return Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)
65
+ ? cTarget
66
+ : pTarget;
67
+ });
68
+ }), filter(isPresent));
69
+ const routerSelection = this.router.events.pipe(map((event) => {
70
+ if (event instanceof Scroll) {
71
+ const item = this.tableOfContent.find((item) => item.path.includes(event.routerEvent.url));
72
+ if (item) {
73
+ return item;
74
+ }
73
75
  }
74
- }
75
- return null;
76
- }), filter(isPresent), debounceTime(20));
77
- const elementsChanges = this.elements.changes.pipe(map(() => this.activeItem()), filter(isPresent));
78
- merge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)
79
- .pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))
80
- .subscribe(this.select.bind(this));
81
- }, { phase: AfterRenderPhase.Write });
76
+ return null;
77
+ }), filter(isPresent), debounceTime(20));
78
+ const elementsChanges = this.elements.changes.pipe(map(() => this.activeItem()), filter(isPresent));
79
+ merge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)
80
+ .pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))
81
+ .subscribe(this.select.bind(this));
82
+ },
83
+ });
82
84
  }
83
85
  ngOnInit() {
84
86
  this.activeItem.set(this.tableOfContent[0]);
@@ -99,16 +101,16 @@ let NgDocTocComponent = class NgDocTocComponent {
99
101
  }
100
102
  this.activeItem.set(item);
101
103
  }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTocComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
103
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: NgDocTocComponent, isStandalone: true, selector: "ng-doc-toc", inputs: { tableOfContent: "tableOfContent" }, viewQueries: [{ propertyName: "selection", first: true, predicate: ["selection"], descendants: true, read: ElementRef }, { propertyName: "elements", predicate: NgDocTocElementComponent, descendants: true }], ngImport: i0, template: "<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t\t<li\n\t\t\t\t\tng-doc-toc-element\n\t\t\t\t\t[path]=\"item.path\"\n\t\t\t\t\t[hash]=\"item.hash\"\n\t\t\t\t\t[level]=\"item.level\"\n\t\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t\t{{ item.title }}\n\t\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:calc(var(--ng-doc-base-gutter) / 2);border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"], dependencies: [{ kind: "component", type: NgDocTocElementComponent, selector: "li[ng-doc-toc-element]", inputs: ["path", "hash", "selected", "level"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTocComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
105
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.1", type: NgDocTocComponent, isStandalone: true, selector: "ng-doc-toc", inputs: { tableOfContent: "tableOfContent" }, viewQueries: [{ propertyName: "selection", first: true, predicate: ["selection"], descendants: true, read: ElementRef }, { propertyName: "elements", predicate: NgDocTocElementComponent, descendants: true }], ngImport: i0, template: "<div class=\"ng-doc-toc-wrapper\">\n <div class=\"ng-doc-toc-container\">\n <div class=\"ng-doc-toc-selection\" #selection></div>\n <ul class=\"ng-doc-toc\">\n @for (item of tableOfContent; track item) {\n <li\n ng-doc-toc-element\n [path]=\"item.path\"\n [hash]=\"item.hash\"\n [level]=\"item.level\"\n [selected]=\"item === activeItem()\">\n {{ item.title }}\n </li>\n }\n </ul>\n </div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;top:calc(var(--ng-doc-navbar-height) + var(--ng-doc-toc-top-padding));overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:3px;border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"], dependencies: [{ kind: "component", type: NgDocTocElementComponent, selector: "li[ng-doc-toc-element]", inputs: ["path", "hash", "selected", "level"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
104
106
  };
105
107
  NgDocTocComponent = __decorate([
106
108
  UntilDestroy(),
107
109
  __metadata("design:paramtypes", [])
108
110
  ], NgDocTocComponent);
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NgDocTocComponent, decorators: [{
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.1", ngImport: i0, type: NgDocTocComponent, decorators: [{
110
112
  type: Component,
111
- args: [{ selector: 'ng-doc-toc', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective], template: "<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t\t<li\n\t\t\t\t\tng-doc-toc-element\n\t\t\t\t\t[path]=\"item.path\"\n\t\t\t\t\t[hash]=\"item.hash\"\n\t\t\t\t\t[level]=\"item.level\"\n\t\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t\t{{ item.title }}\n\t\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:calc(var(--ng-doc-base-gutter) / 2);border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"] }]
113
+ args: [{ selector: 'ng-doc-toc', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgFor, NgDocTocElementComponent], template: "<div class=\"ng-doc-toc-wrapper\">\n <div class=\"ng-doc-toc-container\">\n <div class=\"ng-doc-toc-selection\" #selection></div>\n <ul class=\"ng-doc-toc\">\n @for (item of tableOfContent; track item) {\n <li\n ng-doc-toc-element\n [path]=\"item.path\"\n [hash]=\"item.hash\"\n [level]=\"item.level\"\n [selected]=\"item === activeItem()\">\n {{ item.title }}\n </li>\n }\n </ul>\n </div>\n</div>\n", styles: [":host .ng-doc-toc-wrapper{position:relative;width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-container{position:fixed;top:calc(var(--ng-doc-navbar-height) + var(--ng-doc-toc-top-padding));overflow-y:auto;height:calc(100% - var(--ng-doc-navbar-height) - var(--ng-doc-base-gutter) * 5);width:var(--ng-doc-toc-width)}:host .ng-doc-toc-wrapper .ng-doc-toc-selection{position:absolute;transform:translate(-50%);width:3px;border-radius:calc(var(--ng-doc-base-gutter) / 2);background-color:var(--ng-doc-primary);left:calc(var(--ng-doc-toc-margin) + 1px);transition:var(--ng-doc-transition)}:host .ng-doc-toc-wrapper .ng-doc-toc{list-style:none;margin:0 0 0 var(--ng-doc-toc-margin);border-left:1px solid var(--ng-doc-base-3);padding:0 0 0 var(--ng-doc-base-gutter)}@media (max-width: 1200px){:host .ng-doc-toc-wrapper{display:none}}\n"] }]
112
114
  }], ctorParameters: () => [], propDecorators: { tableOfContent: [{
113
115
  type: Input
114
116
  }], selection: [{
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-toc.mjs","sources":["../../../../libs/app/components/toc/toc-element/toc-element.component.ts","../../../../libs/app/components/toc/toc-element/toc-element.component.html","../../../../libs/app/components/toc/toc.component.ts","../../../../libs/app/components/toc/toc.component.html","../../../../libs/app/components/toc/ng-doc-app-components-toc.ts"],"sourcesContent":["import {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tHostBinding,\n\tinject,\n\tInput,\n} from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocDecodeUriComponentPipe } from '@ng-doc/app/pipes/decode-uri-component';\n\n@Component({\n\tselector: 'li[ng-doc-toc-element]',\n\ttemplateUrl: './toc-element.component.html',\n\tstyleUrls: ['./toc-element.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [RouterLink, NgDocDecodeUriComponentPipe],\n})\nexport class NgDocTocElementComponent {\n\t@Input()\n\tpath: string = '';\n\n\t@Input()\n\thash: string = '';\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-selected')\n\tselected: boolean = false;\n\n\t@Input()\n\t@HostBinding('attr.data-ng-doc-level')\n\tlevel: number = 1;\n\n\treadonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n}\n","<a\n\t[routerLink]=\"[]\"\n\t[fragment]=\"hash | decodeUriComponent\"\n\t[style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n\t<ng-content></ng-content>\n</a>\n","import { DOCUMENT, NgFor } from '@angular/common';\nimport {\n\tafterNextRender,\n\tAfterRenderPhase,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\tInput,\n\tNgZone,\n\tOnInit,\n\tQueryList,\n\tRenderer2,\n\tsignal,\n\tViewChild,\n\tViewChildren,\n\tWritableSignal,\n} from '@angular/core';\nimport { Event as REvent, Router, Scroll } from '@angular/router';\nimport { NgDocPageToc, NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { NgDocMediaQueryDirective, ngDocZoneOptimize } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, merge, Observable } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { NgDocTocElementComponent } from './toc-element/toc-element.component';\n\n@Component({\n\tselector: 'ng-doc-toc',\n\ttemplateUrl: './toc.component.html',\n\tstyleUrls: ['./toc.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: true,\n\timports: [NgFor, NgDocTocElementComponent, NgDocMediaQueryDirective],\n})\n@UntilDestroy()\nexport class NgDocTocComponent implements NgDocPageToc, OnInit {\n\t@Input()\n\ttableOfContent: NgDocTocItem[] = [];\n\n\t@ViewChild('selection', { read: ElementRef })\n\tselection?: ElementRef<HTMLElement>;\n\n\t@ViewChildren(NgDocTocElementComponent)\n\telements: QueryList<NgDocTocElementComponent> = new QueryList<NgDocTocElementComponent>();\n\n\tactiveItem: WritableSignal<NgDocTocItem | undefined> = signal(undefined);\n\n\tprotected readonly document: Document = inject(DOCUMENT);\n\tprotected readonly ngZone: NgZone = inject(NgZone);\n\tprotected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\tprotected readonly renderer: Renderer2 = inject(Renderer2);\n\tprotected readonly router: Router = inject(Router);\n\n\tconstructor() {\n\t\tafterNextRender(\n\t\t\t() => {\n\t\t\t\tconst scrollSelection: Observable<NgDocTocItem> = fromEvent(this.document, 'scroll').pipe(\n\t\t\t\t\tfilter(() => !!this.tableOfContent.length),\n\t\t\t\t\tmap((event: Event) => (event.target as Document).scrollingElement as HTMLElement),\n\t\t\t\t\tstartWith(this.document.scrollingElement as HTMLElement),\n\t\t\t\t\tmap((target: HTMLElement) => {\n\t\t\t\t\t\tconst percentage: number =\n\t\t\t\t\t\t\t(target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);\n\t\t\t\t\t\tconst selectionLine: number =\n\t\t\t\t\t\t\ttarget.scrollTop + (target.offsetHeight * percentage) / 100;\n\n\t\t\t\t\t\tif (!this.tableOfContent.length) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn this.tableOfContent.reduce((pTarget: NgDocTocItem, cTarget: NgDocTocItem) => {\n\t\t\t\t\t\t\tconst pTop: number = pTarget.element.getBoundingClientRect().top + target.scrollTop;\n\t\t\t\t\t\t\tconst cTop: number = cTarget.element.getBoundingClientRect().top + target.scrollTop;\n\n\t\t\t\t\t\t\treturn Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)\n\t\t\t\t\t\t\t\t? cTarget\n\t\t\t\t\t\t\t\t: pTarget;\n\t\t\t\t\t\t});\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tconst routerSelection: Observable<NgDocTocItem> = this.router.events.pipe(\n\t\t\t\t\tmap((event: REvent) => {\n\t\t\t\t\t\tif (event instanceof Scroll) {\n\t\t\t\t\t\t\tconst item: NgDocTocItem | undefined = this.tableOfContent.find(\n\t\t\t\t\t\t\t\t(item: NgDocTocItem) => item.path.includes(event.routerEvent.url),\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\tif (item) {\n\t\t\t\t\t\t\t\treturn item;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t\tdebounceTime(20),\n\t\t\t\t);\n\n\t\t\t\tconst elementsChanges = this.elements.changes.pipe(\n\t\t\t\t\tmap(() => this.activeItem()),\n\t\t\t\t\tfilter(isPresent),\n\t\t\t\t);\n\n\t\t\t\tmerge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)\n\t\t\t\t\t.pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))\n\t\t\t\t\t.subscribe(this.select.bind(this));\n\t\t\t},\n\t\t\t{ phase: AfterRenderPhase.Write },\n\t\t);\n\t}\n\n\tngOnInit(): void {\n\t\tthis.activeItem.set(this.tableOfContent[0]);\n\t}\n\n\t/**\n\t * Selects the item in the table of content.\n\t * @param item - Item to select.\n\t */\n\tprotected select(item: NgDocTocItem): void {\n\t\tconst index: number = this.tableOfContent.indexOf(item);\n\n\t\tif (this.selection) {\n\t\t\tconst element: HTMLElement | undefined =\n\t\t\t\tthis.elements.toArray()[index]?.elementRef.nativeElement;\n\n\t\t\tif (element) {\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'top', `${element.offsetTop}px`);\n\t\t\t\tthis.renderer.setStyle(this.selection.nativeElement, 'height', `${element.offsetHeight}px`);\n\n\t\t\t\telement.scrollIntoView({ block: 'nearest' });\n\t\t\t}\n\t\t}\n\n\t\tthis.activeItem.set(item);\n\t}\n}\n","<div class=\"ng-doc-toc-wrapper\">\n\t<div class=\"ng-doc-toc-container\">\n\t\t<div class=\"ng-doc-toc-selection\" #selection></div>\n\t\t<ul class=\"ng-doc-toc\">\n\t\t\t@for (item of tableOfContent; track item) {\n\t\t\t\t<li\n\t\t\t\t\tng-doc-toc-element\n\t\t\t\t\t[path]=\"item.path\"\n\t\t\t\t\t[hash]=\"item.hash\"\n\t\t\t\t\t[level]=\"item.level\"\n\t\t\t\t\t[selected]=\"item === activeItem()\">\n\t\t\t\t\t{{ item.title }}\n\t\t\t\t</li>\n\t\t\t}\n\t\t</ul>\n\t</div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAmBa,wBAAwB,CAAA;AARrC,IAAA,WAAA,GAAA;QAUC,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAIlB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAA,CAAA,UAAU,GAA4B,MAAM,CAAC,UAAU,CAAC,CAAC;AAClE,KAAA;8GAhBY,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAxB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,ECnBrC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,MAAA,EAAA,QAAA,EAAA,UAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,2BAAA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EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,EAG5B,wBAAwB,EC7CvC,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,0eAiBA,k2BDkBkB,wBAAwB,EAAA,QAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,UAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA,EAAA;;AAG7B,iBAAiB,GAAA,UAAA,CAAA;AAD7B,IAAA,YAAY,EAAE;;AACF,CAAA,EAAA,iBAAiB,CAuG7B,CAAA;2FAvGY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AACC,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAGL,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACnC,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,KAAK,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,EAAA,QAAA,EAAA,0eAAA,EAAA,MAAA,EAAA,CAAA,0yBAAA,CAAA,EAAA,CAAA;wDAKpE,cAAc,EAAA,CAAA;sBADb,KAAK;gBAIN,SAAS,EAAA,CAAA;sBADR,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAI5C,QAAQ,EAAA,CAAA;sBADP,YAAY;uBAAC,wBAAwB,CAAA;;;AE7CvC;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-toc.mjs","sources":["../../../../libs/app/components/toc/toc-element/toc-element.component.ts","../../../../libs/app/components/toc/toc-element/toc-element.component.html","../../../../libs/app/components/toc/toc.component.ts","../../../../libs/app/components/toc/toc.component.html","../../../../libs/app/components/toc/ng-doc-app-components-toc.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostBinding,\n inject,\n Input,\n} from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { NgDocDecodeUriComponentPipe } from '@ng-doc/app/pipes/decode-uri-component';\n\n@Component({\n selector: 'li[ng-doc-toc-element]',\n templateUrl: './toc-element.component.html',\n styleUrls: ['./toc-element.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [RouterLink, NgDocDecodeUriComponentPipe],\n})\nexport class NgDocTocElementComponent {\n @Input()\n path: string = '';\n\n @Input()\n hash: string = '';\n\n @Input()\n @HostBinding('attr.data-ng-doc-selected')\n selected: boolean = false;\n\n @Input()\n @HostBinding('attr.data-ng-doc-level')\n level: number = 1;\n\n readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n}\n","<a\n [routerLink]=\"[]\"\n [fragment]=\"hash | decodeUriComponent\"\n [style.padding-left]=\"'calc(var(--ng-doc-toc-indent) * ' + level + ')'\">\n <ng-content></ng-content>\n</a>\n","import { DOCUMENT, NgFor } from '@angular/common';\nimport {\n afterNextRender,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnInit,\n QueryList,\n Renderer2,\n signal,\n ViewChild,\n ViewChildren,\n WritableSignal,\n} from '@angular/core';\nimport { Event as REvent, Router, Scroll } from '@angular/router';\nimport { NgDocPageToc, NgDocTocItem } from '@ng-doc/app/interfaces';\nimport { isPresent } from '@ng-doc/core/helpers/is-present';\nimport { ngDocZoneOptimize } from '@ng-doc/ui-kit';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { fromEvent, merge, Observable } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, filter, map, startWith } from 'rxjs/operators';\n\nimport { NgDocTocElementComponent } from './toc-element/toc-element.component';\n\n@Component({\n selector: 'ng-doc-toc',\n templateUrl: './toc.component.html',\n styleUrls: ['./toc.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgFor, NgDocTocElementComponent],\n})\n@UntilDestroy()\nexport class NgDocTocComponent implements NgDocPageToc, OnInit {\n @Input()\n tableOfContent: NgDocTocItem[] = [];\n\n @ViewChild('selection', { read: ElementRef })\n selection?: ElementRef<HTMLElement>;\n\n @ViewChildren(NgDocTocElementComponent)\n elements: QueryList<NgDocTocElementComponent> = new QueryList<NgDocTocElementComponent>();\n\n activeItem: WritableSignal<NgDocTocItem | undefined> = signal(undefined);\n\n protected readonly document: Document = inject(DOCUMENT);\n protected readonly ngZone: NgZone = inject(NgZone);\n protected readonly changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n protected readonly renderer: Renderer2 = inject(Renderer2);\n protected readonly router: Router = inject(Router);\n\n constructor() {\n afterNextRender({\n write: () => {\n const scrollSelection: Observable<NgDocTocItem> = fromEvent(this.document, 'scroll').pipe(\n filter(() => !!this.tableOfContent.length),\n map((event: Event) => (event.target as Document).scrollingElement as HTMLElement),\n startWith(this.document.scrollingElement as HTMLElement),\n map((target: HTMLElement) => {\n const percentage: number =\n (target.scrollTop * 100) / (target.scrollHeight - target.offsetHeight);\n const selectionLine: number =\n target.scrollTop + (target.offsetHeight * percentage) / 100;\n if (!this.tableOfContent.length) {\n return null;\n }\n return this.tableOfContent.reduce((pTarget: NgDocTocItem, cTarget: NgDocTocItem) => {\n const pTop: number = pTarget.element.getBoundingClientRect().top + target.scrollTop;\n const cTop: number = cTarget.element.getBoundingClientRect().top + target.scrollTop;\n return Math.abs(cTop - selectionLine) < Math.abs(pTop - selectionLine)\n ? cTarget\n : pTarget;\n });\n }),\n filter(isPresent),\n );\n const routerSelection: Observable<NgDocTocItem> = this.router.events.pipe(\n map((event: REvent) => {\n if (event instanceof Scroll) {\n const item: NgDocTocItem | undefined = this.tableOfContent.find(\n (item: NgDocTocItem) => item.path.includes(event.routerEvent.url),\n );\n if (item) {\n return item;\n }\n }\n return null;\n }),\n filter(isPresent),\n debounceTime(20),\n );\n const elementsChanges = this.elements.changes.pipe(\n map(() => this.activeItem()),\n filter(isPresent),\n );\n merge(merge(scrollSelection, routerSelection).pipe(distinctUntilChanged()), elementsChanges)\n .pipe(debounceTime(0), ngDocZoneOptimize(this.ngZone), untilDestroyed(this))\n .subscribe(this.select.bind(this));\n },\n });\n }\n\n ngOnInit(): void {\n this.activeItem.set(this.tableOfContent[0]);\n }\n\n /**\n * Selects the item in the table of content.\n * @param item - Item to select.\n */\n protected select(item: NgDocTocItem): void {\n const index: number = this.tableOfContent.indexOf(item);\n\n if (this.selection) {\n const element: HTMLElement | undefined =\n this.elements.toArray()[index]?.elementRef.nativeElement;\n\n if (element) {\n this.renderer.setStyle(this.selection.nativeElement, 'top', `${element.offsetTop}px`);\n this.renderer.setStyle(this.selection.nativeElement, 'height', `${element.offsetHeight}px`);\n\n element.scrollIntoView({ block: 'nearest' });\n }\n }\n\n this.activeItem.set(item);\n }\n}\n","<div class=\"ng-doc-toc-wrapper\">\n <div class=\"ng-doc-toc-container\">\n <div class=\"ng-doc-toc-selection\" #selection></div>\n <ul class=\"ng-doc-toc\">\n @for (item of tableOfContent; track item) {\n <li\n ng-doc-toc-element\n [path]=\"item.path\"\n [hash]=\"item.hash\"\n [level]=\"item.level\"\n [selected]=\"item === activeItem()\">\n {{ item.title }}\n </li>\n }\n </ul>\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAmBa,wBAAwB,CAAA;AARrC,IAAA,WAAA,GAAA;QAUE,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAGlB,IAAI,CAAA,IAAA,GAAW,EAAE,CAAC;QAIlB,IAAQ,CAAA,QAAA,GAAY,KAAK,CAAC;QAI1B,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;AAET,QAAA,IAAA,CAAA,UAAU,GAA4B,MAAM,CAAC,UAAU,CAAC,CAAC;AACnE,KAAA;8GAhBY,wBAAwB,EAAA,IAAA,EAAA,EAAA,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,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;gBAI5C,QAAQ,EAAA,CAAA;sBADP,YAAY;uBAAC,wBAAwB,CAAA;;;AE5CxC;;AAEG;;;;"}
@@ -1,19 +1,26 @@
1
1
  export * from '@ng-doc/app/components/api-list';
2
2
  export * from '@ng-doc/app/components/breadcrumb';
3
3
  export * from '@ng-doc/app/components/code';
4
+ export * from '@ng-doc/app/components/copy-button';
4
5
  export * from '@ng-doc/app/components/demo';
5
6
  export * from '@ng-doc/app/components/demo-displayer';
6
7
  export * from '@ng-doc/app/components/demo-pane';
7
8
  export * from '@ng-doc/app/components/fullscreen-button';
9
+ export * from '@ng-doc/app/components/heading-anchor';
10
+ export * from '@ng-doc/app/components/image-viewer';
8
11
  export * from '@ng-doc/app/components/kind-icon';
9
12
  export * from '@ng-doc/app/components/link';
13
+ export * from '@ng-doc/app/components/mermaid-viewer';
10
14
  export * from '@ng-doc/app/components/navbar';
11
15
  export * from '@ng-doc/app/components/page';
16
+ export * from '@ng-doc/app/components/page-header';
12
17
  export * from '@ng-doc/app/components/page-link';
13
18
  export * from '@ng-doc/app/components/page-navigation';
19
+ export * from '@ng-doc/app/components/page-wrapper';
14
20
  export * from '@ng-doc/app/components/playground';
15
21
  export * from '@ng-doc/app/components/root';
16
22
  export * from '@ng-doc/app/components/search';
23
+ export * from '@ng-doc/app/components/search-dialog';
17
24
  export * from '@ng-doc/app/components/search-result';
18
25
  export * from '@ng-doc/app/components/sidebar';
19
26
  export * from '@ng-doc/app/components/tabs';
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components.mjs","sources":["../../../../libs/app/components/ng-doc-app-components.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-components.mjs","sources":["../../../../libs/app/components/ng-doc-app-components.ts"],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEG"}
@@ -1,44 +1,8 @@
1
1
  const NG_DOC_STORE_THEME_KEY = 'ng-doc-theme-id';
2
2
 
3
- /**
4
- * Dark theme. You can set it manually by calling `NgDocThemeService.set` method.
5
- *
6
- * ```typescript
7
- * import {Component} from '@angular/core';
8
- * import {NgDocThemeService, NG_DOC_NIGHT_THEME} from '@ng-doc/app';
9
- *
10
- * @Component()
11
- * export class AppComponent {
12
- * constructor(
13
- * private readonly themeService: NgDocThemeService,
14
- * ) {
15
- * this.themeService.setTheme(NG_DOC_NIGHT_THEME.id);
16
- * }
17
- * }
18
- * ```
19
- *
20
- * Or you can set it as default theme in your app module:
21
- * ```typescript
22
- * import {NgModule} from '@angular/core';
23
- * import {NgDocModule, NG_DOC_NIGHT_THEME} from '@ng-doc/app';
24
- * import {AppComponent} from './app.component';
25
- *
26
- * @NgModule({
27
- * declarations: [AppComponent],
28
- * imports: [NgDocModule.forRoot({defaultTheme: NG_DOC_NIGHT_THEME.id})],
29
- * bootstrap: [AppComponent],
30
- * })
31
- * export class AppModule {}
32
- * ```
33
- */
34
- const NG_DOC_NIGHT_THEME = {
35
- id: 'ng-doc-night',
36
- path: 'assets/ng-doc/app/themes/ng-doc-night.css',
37
- };
38
-
39
3
  /**
40
4
  * Generated bundle index. Do not edit.
41
5
  */
42
6
 
43
- export { NG_DOC_NIGHT_THEME, NG_DOC_STORE_THEME_KEY };
7
+ export { NG_DOC_STORE_THEME_KEY };
44
8
  //# sourceMappingURL=ng-doc-app-constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-constants.mjs","sources":["../../../../libs/app/constants/store-keys.ts","../../../../libs/app/constants/themes.ts","../../../../libs/app/constants/ng-doc-app-constants.ts"],"sourcesContent":["export const NG_DOC_STORE_THEME_KEY: string = 'ng-doc-theme-id';\n","import { NgDocTheme } from '@ng-doc/app/interfaces';\n\n/**\n * Dark theme. You can set it manually by calling `NgDocThemeService.set` method.\n *\n * ```typescript\n * import {Component} from '@angular/core';\n * import {NgDocThemeService, NG_DOC_NIGHT_THEME} from '@ng-doc/app';\n *\n * @Component()\n * export class AppComponent {\n * constructor(\n * private readonly themeService: NgDocThemeService,\n * ) {\n * this.themeService.setTheme(NG_DOC_NIGHT_THEME.id);\n * }\n * }\n * ```\n *\n * Or you can set it as default theme in your app module:\n * ```typescript\n * import {NgModule} from '@angular/core';\n * import {NgDocModule, NG_DOC_NIGHT_THEME} from '@ng-doc/app';\n * import {AppComponent} from './app.component';\n *\n * @NgModule({\n * declarations: [AppComponent],\n * imports: [NgDocModule.forRoot({defaultTheme: NG_DOC_NIGHT_THEME.id})],\n * bootstrap: [AppComponent],\n * })\n * export class AppModule {}\n * ```\n */\nexport const NG_DOC_NIGHT_THEME: NgDocTheme = {\n\tid: 'ng-doc-night',\n\tpath: 'assets/ng-doc/app/themes/ng-doc-night.css',\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB,GAAW;;ACE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACU,MAAA,kBAAkB,GAAe;AAC7C,IAAA,EAAE,EAAE,cAAc;AAClB,IAAA,IAAI,EAAE,2CAA2C;;;ACnClD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-constants.mjs","sources":["../../../../libs/app/constants/store-keys.ts","../../../../libs/app/constants/ng-doc-app-constants.ts"],"sourcesContent":["export const NG_DOC_STORE_THEME_KEY: string = 'ng-doc-theme-id';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAO,MAAM,sBAAsB,GAAW;;ACA9C;;AAEG;;;;"}