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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/README.md +20 -29
  2. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs +363 -0
  3. package/fesm2022/ng-doc-app-classes-content-anchor-controller.mjs.map +1 -0
  4. package/fesm2022/ng-doc-app-classes-content-controller.mjs +299 -0
  5. package/fesm2022/ng-doc-app-classes-content-controller.mjs.map +1 -0
  6. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs +51 -35
  7. package/fesm2022/ng-doc-app-classes-default-search-engine.mjs.map +1 -1
  8. package/fesm2022/ng-doc-app-classes-root-page.mjs.map +1 -1
  9. package/fesm2022/ng-doc-app-classes-search-engine.mjs.map +1 -1
  10. package/fesm2022/ng-doc-app-classes.mjs +2 -0
  11. package/fesm2022/ng-doc-app-classes.mjs.map +1 -1
  12. package/fesm2022/ng-doc-app-components-api-list.mjs +173 -69
  13. package/fesm2022/ng-doc-app-components-api-list.mjs.map +1 -1
  14. package/fesm2022/ng-doc-app-components-breadcrumb.mjs +13 -10
  15. package/fesm2022/ng-doc-app-components-breadcrumb.mjs.map +1 -1
  16. package/fesm2022/ng-doc-app-components-code.mjs +152 -25
  17. package/fesm2022/ng-doc-app-components-code.mjs.map +1 -1
  18. package/fesm2022/ng-doc-app-components-command-palette.mjs +498 -0
  19. package/fesm2022/ng-doc-app-components-command-palette.mjs.map +1 -0
  20. package/fesm2022/ng-doc-app-components-copy-button.mjs +38 -21
  21. package/fesm2022/ng-doc-app-components-copy-button.mjs.map +1 -1
  22. package/fesm2022/ng-doc-app-components-demo-displayer.mjs +36 -29
  23. package/fesm2022/ng-doc-app-components-demo-displayer.mjs.map +1 -1
  24. package/fesm2022/ng-doc-app-components-demo-pane.mjs +39 -36
  25. package/fesm2022/ng-doc-app-components-demo-pane.mjs.map +1 -1
  26. package/fesm2022/ng-doc-app-components-demo.mjs +129 -44
  27. package/fesm2022/ng-doc-app-components-demo.mjs.map +1 -1
  28. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs +12 -9
  29. package/fesm2022/ng-doc-app-components-fullscreen-button.mjs.map +1 -1
  30. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs +79 -0
  31. package/fesm2022/ng-doc-app-components-fullscreen-toggle.mjs.map +1 -0
  32. package/fesm2022/ng-doc-app-components-heading-anchor.mjs +54 -21
  33. package/fesm2022/ng-doc-app-components-heading-anchor.mjs.map +1 -1
  34. package/fesm2022/ng-doc-app-components-image-viewer.mjs +183 -89
  35. package/fesm2022/ng-doc-app-components-image-viewer.mjs.map +1 -1
  36. package/fesm2022/ng-doc-app-components-kind-icon.mjs +42 -25
  37. package/fesm2022/ng-doc-app-components-kind-icon.mjs.map +1 -1
  38. package/fesm2022/ng-doc-app-components-link.mjs +12 -9
  39. package/fesm2022/ng-doc-app-components-link.mjs.map +1 -1
  40. package/fesm2022/ng-doc-app-components-members.mjs +30 -0
  41. package/fesm2022/ng-doc-app-components-members.mjs.map +1 -0
  42. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs +61 -20
  43. package/fesm2022/ng-doc-app-components-mermaid-viewer.mjs.map +1 -1
  44. package/fesm2022/ng-doc-app-components-navbar.mjs +39 -49
  45. package/fesm2022/ng-doc-app-components-navbar.mjs.map +1 -1
  46. package/fesm2022/ng-doc-app-components-page-header.mjs +73 -10
  47. package/fesm2022/ng-doc-app-components-page-header.mjs.map +1 -1
  48. package/fesm2022/ng-doc-app-components-page-link.mjs +123 -31
  49. package/fesm2022/ng-doc-app-components-page-link.mjs.map +1 -1
  50. package/fesm2022/ng-doc-app-components-page-navigation.mjs +17 -19
  51. package/fesm2022/ng-doc-app-components-page-navigation.mjs.map +1 -1
  52. package/fesm2022/ng-doc-app-components-page-wrapper.mjs +56 -35
  53. package/fesm2022/ng-doc-app-components-page-wrapper.mjs.map +1 -1
  54. package/fesm2022/ng-doc-app-components-page.mjs +168 -24
  55. package/fesm2022/ng-doc-app-components-page.mjs.map +1 -1
  56. package/fesm2022/ng-doc-app-components-playground.mjs +392 -263
  57. package/fesm2022/ng-doc-app-components-playground.mjs.map +1 -1
  58. package/fesm2022/ng-doc-app-components-root.mjs +48 -31
  59. package/fesm2022/ng-doc-app-components-root.mjs.map +1 -1
  60. package/fesm2022/ng-doc-app-components-search-result.mjs +22 -21
  61. package/fesm2022/ng-doc-app-components-search-result.mjs.map +1 -1
  62. package/fesm2022/ng-doc-app-components-search.mjs +64 -33
  63. package/fesm2022/ng-doc-app-components-search.mjs.map +1 -1
  64. package/fesm2022/ng-doc-app-components-sidebar.mjs +86 -61
  65. package/fesm2022/ng-doc-app-components-sidebar.mjs.map +1 -1
  66. package/fesm2022/ng-doc-app-components-tabs.mjs +18 -12
  67. package/fesm2022/ng-doc-app-components-tabs.mjs.map +1 -1
  68. package/fesm2022/ng-doc-app-components-theme-toggle.mjs +33 -21
  69. package/fesm2022/ng-doc-app-components-theme-toggle.mjs.map +1 -1
  70. package/fesm2022/ng-doc-app-components-toc.mjs +267 -90
  71. package/fesm2022/ng-doc-app-components-toc.mjs.map +1 -1
  72. package/fesm2022/ng-doc-app-components.mjs +3 -1
  73. package/fesm2022/ng-doc-app-components.mjs.map +1 -1
  74. package/fesm2022/ng-doc-app-defaults-default-processors.mjs +2 -1
  75. package/fesm2022/ng-doc-app-defaults-default-processors.mjs.map +1 -1
  76. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs +11 -5
  77. package/fesm2022/ng-doc-app-directives-code-highlighter.mjs.map +1 -1
  78. package/fesm2022/ng-doc-app-directives-members-filter.mjs +276 -0
  79. package/fesm2022/ng-doc-app-directives-members-filter.mjs.map +1 -0
  80. package/fesm2022/ng-doc-app-directives-route-active.mjs +34 -30
  81. package/fesm2022/ng-doc-app-directives-route-active.mjs.map +1 -1
  82. package/fesm2022/ng-doc-app-directives.mjs +1 -0
  83. package/fesm2022/ng-doc-app-directives.mjs.map +1 -1
  84. package/fesm2022/ng-doc-app-helpers.mjs +285 -1
  85. package/fesm2022/ng-doc-app-helpers.mjs.map +1 -1
  86. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs +6 -4
  87. package/fesm2022/ng-doc-app-pipes-decode-uri-component.mjs.map +1 -1
  88. package/fesm2022/ng-doc-app-pipes-extract-value.mjs +6 -4
  89. package/fesm2022/ng-doc-app-pipes-extract-value.mjs.map +1 -1
  90. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs +7 -4
  91. package/fesm2022/ng-doc-app-pipes-filter-by-text.mjs.map +1 -1
  92. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs +8 -5
  93. package/fesm2022/ng-doc-app-pipes-sanitize-html.mjs.map +1 -1
  94. package/fesm2022/ng-doc-app-processors-page-processor.mjs +86 -23
  95. package/fesm2022/ng-doc-app-processors-page-processor.mjs.map +1 -1
  96. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs +26 -25
  97. package/fesm2022/ng-doc-app-processors-processors-tooltip.mjs.map +1 -1
  98. package/fesm2022/ng-doc-app-processors-processors.mjs +12 -1
  99. package/fesm2022/ng-doc-app-processors-processors.mjs.map +1 -1
  100. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs +31 -2
  101. package/fesm2022/ng-doc-app-providers-ng-doc-app.mjs.map +1 -1
  102. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs +122 -0
  103. package/fesm2022/ng-doc-app-services-content-scroll-intent.mjs.map +1 -0
  104. package/fesm2022/ng-doc-app-services-content-state.mjs +57 -0
  105. package/fesm2022/ng-doc-app-services-content-state.mjs.map +1 -0
  106. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs +74 -0
  107. package/fesm2022/ng-doc-app-services-fullscreen-route.mjs.map +1 -0
  108. package/fesm2022/ng-doc-app-services-highlighter.mjs +83 -14
  109. package/fesm2022/ng-doc-app-services-highlighter.mjs.map +1 -1
  110. package/fesm2022/ng-doc-app-services-route-preloader.mjs +360 -0
  111. package/fesm2022/ng-doc-app-services-route-preloader.mjs.map +1 -0
  112. package/fesm2022/ng-doc-app-services-shortcuts.mjs +214 -0
  113. package/fesm2022/ng-doc-app-services-shortcuts.mjs.map +1 -0
  114. package/fesm2022/ng-doc-app-services-sidebar.mjs +59 -25
  115. package/fesm2022/ng-doc-app-services-sidebar.mjs.map +1 -1
  116. package/fesm2022/ng-doc-app-services-store.mjs +8 -8
  117. package/fesm2022/ng-doc-app-services-store.mjs.map +1 -1
  118. package/fesm2022/ng-doc-app-services-theme.mjs +32 -12
  119. package/fesm2022/ng-doc-app-services-theme.mjs.map +1 -1
  120. package/fesm2022/ng-doc-app-services.mjs +143 -0
  121. package/fesm2022/ng-doc-app-services.mjs.map +1 -1
  122. package/fesm2022/ng-doc-app-tokens.mjs +7 -28
  123. package/fesm2022/ng-doc-app-tokens.mjs.map +1 -1
  124. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs +18 -9
  125. package/fesm2022/ng-doc-app-type-controls-boolean-control.mjs.map +1 -1
  126. package/fesm2022/ng-doc-app-type-controls-number-control.mjs +12 -9
  127. package/fesm2022/ng-doc-app-type-controls-number-control.mjs.map +1 -1
  128. package/fesm2022/ng-doc-app-type-controls-string-control.mjs +12 -9
  129. package/fesm2022/ng-doc-app-type-controls-string-control.mjs.map +1 -1
  130. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs +22 -16
  131. package/fesm2022/ng-doc-app-type-controls-type-alias-control.mjs.map +1 -1
  132. package/package.json +69 -28
  133. package/styles/global.css +1125 -201
  134. package/styles/main.css +1125 -201
  135. package/styles/themes/dark.css +78 -56
  136. package/types/ng-doc-app-classes-content-anchor-controller.d.ts +54 -0
  137. package/types/ng-doc-app-classes-content-controller.d.ts +94 -0
  138. package/types/ng-doc-app-classes-default-search-engine.d.ts +9 -1
  139. package/types/ng-doc-app-classes-root-page.d.ts +6 -1
  140. package/types/ng-doc-app-classes-search-engine.d.ts +5 -0
  141. package/types/ng-doc-app-classes.d.ts +2 -0
  142. package/types/ng-doc-app-components-api-list.d.ts +69 -20
  143. package/types/ng-doc-app-components-breadcrumb.d.ts +8 -3
  144. package/types/ng-doc-app-components-code.d.ts +46 -12
  145. package/types/ng-doc-app-components-command-palette.d.ts +147 -0
  146. package/types/ng-doc-app-components-copy-button.d.ts +18 -6
  147. package/types/ng-doc-app-components-demo-displayer.d.ts +23 -10
  148. package/types/ng-doc-app-components-demo-pane.d.ts +19 -15
  149. package/types/ng-doc-app-components-demo.d.ts +62 -15
  150. package/types/ng-doc-app-components-fullscreen-button.d.ts +4 -2
  151. package/types/ng-doc-app-components-fullscreen-toggle.d.ts +24 -0
  152. package/types/ng-doc-app-components-heading-anchor.d.ts +26 -7
  153. package/types/ng-doc-app-components-image-viewer.d.ts +71 -7
  154. package/types/ng-doc-app-components-kind-icon.d.ts +28 -7
  155. package/types/ng-doc-app-components-link.d.ts +6 -2
  156. package/types/ng-doc-app-components-members.d.ts +13 -0
  157. package/types/ng-doc-app-components-mermaid-viewer.d.ts +21 -6
  158. package/types/ng-doc-app-components-navbar.d.ts +25 -15
  159. package/types/ng-doc-app-components-page-header.d.ts +28 -4
  160. package/types/ng-doc-app-components-page-link.d.ts +34 -15
  161. package/types/ng-doc-app-components-page-navigation.d.ts +10 -5
  162. package/types/ng-doc-app-components-page-wrapper.d.ts +35 -11
  163. package/types/ng-doc-app-components-page.d.ts +57 -6
  164. package/types/ng-doc-app-components-playground.d.ts +146 -78
  165. package/types/ng-doc-app-components-root.d.ts +28 -7
  166. package/types/ng-doc-app-components-search-result.d.ts +14 -6
  167. package/types/ng-doc-app-components-search.d.ts +19 -7
  168. package/types/ng-doc-app-components-tabs.d.ts +13 -4
  169. package/types/ng-doc-app-components-theme-toggle.d.ts +18 -5
  170. package/types/ng-doc-app-components-toc.d.ts +76 -29
  171. package/types/ng-doc-app-components.d.ts +3 -1
  172. package/types/ng-doc-app-directives-code-highlighter.d.ts +8 -4
  173. package/types/ng-doc-app-directives-members-filter.d.ts +61 -0
  174. package/types/ng-doc-app-directives-route-active.d.ts +21 -7
  175. package/types/ng-doc-app-directives.d.ts +1 -0
  176. package/types/ng-doc-app-helpers.d.ts +124 -3
  177. package/types/ng-doc-app-interfaces.d.ts +48 -28
  178. package/types/ng-doc-app-pipes-decode-uri-component.d.ts +3 -0
  179. package/types/ng-doc-app-pipes-extract-value.d.ts +3 -0
  180. package/types/ng-doc-app-pipes-filter-by-text.d.ts +4 -0
  181. package/types/ng-doc-app-pipes-sanitize-html.d.ts +4 -2
  182. package/types/ng-doc-app-processors-page-processor.d.ts +39 -10
  183. package/types/ng-doc-app-processors-processors-tooltip.d.ts +11 -10
  184. package/types/ng-doc-app-processors-processors.d.ts +5 -1
  185. package/types/ng-doc-app-providers-ng-doc-app.d.ts +17 -0
  186. package/types/ng-doc-app-services-content-scroll-intent.d.ts +52 -0
  187. package/types/ng-doc-app-services-content-state.d.ts +40 -0
  188. package/types/ng-doc-app-services-fullscreen-route.d.ts +35 -0
  189. package/types/ng-doc-app-services-highlighter.d.ts +40 -5
  190. package/types/ng-doc-app-services-route-preloader.d.ts +109 -0
  191. package/types/ng-doc-app-services-shortcuts.d.ts +96 -0
  192. package/types/ng-doc-app-services-sidebar.d.ts +24 -4
  193. package/types/ng-doc-app-services-store.d.ts +24 -1
  194. package/types/ng-doc-app-services-theme.d.ts +19 -3
  195. package/types/ng-doc-app-services.d.ts +77 -0
  196. package/types/ng-doc-app-tokens.d.ts +10 -30
  197. package/types/ng-doc-app-type-controls-boolean-control.d.ts +11 -6
  198. package/types/ng-doc-app-type-controls-number-control.d.ts +5 -3
  199. package/types/ng-doc-app-type-controls-string-control.d.ts +5 -3
  200. package/types/ng-doc-app-type-controls-type-alias-control.d.ts +13 -6
  201. package/fesm2022/ng-doc-app-components-search-dialog.mjs +0 -78
  202. package/fesm2022/ng-doc-app-components-search-dialog.mjs.map +0 -1
  203. package/types/ng-doc-app-components-search-dialog.d.ts +0 -28
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-demo-pane.mjs","sources":["../../../../libs/app/components/demo-pane/demo-pane.component.ts","../../../../libs/app/components/demo-pane/demo-pane.component.html","../../../../libs/app/components/demo-pane/ng-doc-app-components-demo-pane.ts"],"sourcesContent":["import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n inject,\n Input,\n OnInit,\n Type,\n} from '@angular/core';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocFullscreenButtonComponent } from '@ng-doc/app/components/fullscreen-button';\nimport { NgDocDemoAsset } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocDemoPaneActionOptions } from '@ng-doc/core/interfaces';\nimport {\n NgDocPaneBackDirective,\n NgDocPaneComponent,\n NgDocPaneFrontDirective,\n NgDocTabComponent,\n NgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n@Component({\n selector: 'ng-doc-demo-pane',\n templateUrl: './demo-pane.component.html',\n styleUrls: ['./demo-pane.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocPaneComponent,\n NgTemplateOutlet,\n NgDocPaneBackDirective,\n NgDocPaneFrontDirective,\n NgDocCodeComponent,\n NgDocTabGroupComponent,\n NgDocTabComponent,\n NgDocFullscreenButtonComponent,\n NgComponentOutlet,\n ],\n})\nexport class NgDocDemoPaneComponent implements OnInit {\n private readonly rootPage = inject(NgDocRootPage);\n\n @Input()\n componentName?: string;\n\n @Input()\n options: NgDocDemoPaneActionOptions = {};\n\n demo?: Type<unknown>;\n assets: NgDocDemoAsset[] = [];\n\n constructor() {}\n\n @HostBinding('class')\n protected get classes(): string | string[] {\n return this.options.class ?? '';\n }\n\n ngOnInit(): void {\n this.demo = this.getDemo();\n this.assets = this.getAssets();\n }\n\n private getDemo(): Type<unknown> | undefined {\n if (this.componentName) {\n return this.rootPage.page?.demos && this.rootPage.page.demos[this.componentName];\n }\n\n return undefined;\n }\n\n private getAssets(): NgDocDemoAsset[] {\n if (this.componentName) {\n return (\n (this.rootPage.demoAssets && this.rootPage.demoAssets[this.componentName]) ??\n []\n ).filter(\n (asset: NgDocDemoAsset) =>\n !this.options.tabs?.length || asArray(this.options.tabs).includes(asset.title),\n );\n }\n\n return [];\n }\n}\n","<ng-doc-pane [expanded]=\"options.expanded ?? false\">\n <ng-container *ngTemplateOutlet=\"codeContent\" ngDocPaneBack></ng-container>\n <ng-container *ngTemplateOutlet=\"demoTemplate\" ngDocPaneFront></ng-container>\n</ng-doc-pane>\n\n<ng-template #demoTemplate>\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n</ng-template>\n\n<ng-template #codeContent>\n @if (assets.length === 1) {\n @for (asset of assets; track asset) {\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n }\n }\n\n @if (assets.length > 1) {\n <ng-doc-tab-group [openedTab]=\"options.defaultTab\">\n @for (asset of assets; track asset) {\n <ng-doc-tab [id]=\"asset.title\" [label]=\"asset.title\" [content]=\"assetContent\">\n <ng-template #assetContent>\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n </ng-template>\n </ng-doc-tab>\n }\n </ng-doc-tab-group>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAyCa,sBAAsB,CAAA;AAYjC,IAAA,WAAA,GAAA;AAXiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAMjD,IAAA,CAAA,OAAO,GAA+B,EAAE;QAGxC,IAAA,CAAA,MAAM,GAAqB,EAAE;IAEd;AAEf,IAAA,IACc,OAAO,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,O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CAAA,EAAA;;sBAKA;;sBAGA;;sBAQA,WAAW;uBAAC,OAAO;;;AEvDtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-demo-pane.mjs","sources":["../../../../libs/app/components/demo-pane/demo-pane.component.ts","../../../../libs/app/components/demo-pane/demo-pane.component.html","../../../../libs/app/components/demo-pane/ng-doc-app-components-demo-pane.ts"],"sourcesContent":["import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n Signal,\n Type,\n} from '@angular/core';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocFullscreenButtonComponent } from '@ng-doc/app/components/fullscreen-button';\nimport { NgDocFullscreenToggleComponent } from '@ng-doc/app/components/fullscreen-toggle';\nimport { NgDocDemoAsset } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocDemoPaneActionOptions } from '@ng-doc/core/interfaces';\nimport {\n NgDocFullscreenDirective,\n NgDocIconComponent,\n NgDocPaneBackDirective,\n NgDocPaneComponent,\n NgDocPaneFrontDirective,\n NgDocTabComponent,\n NgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n/**\n * Renders a demo of the page in front of its source files, which the reader reveals by dragging\n * the pane's resizer. The demo sits on the dot-grid canvas of demos, with a control that shows it\n * fullscreen with the browser Fullscreen API where the browser supports it.\n */\n@Component({\n selector: 'ng-doc-demo-pane',\n templateUrl: './demo-pane.component.html',\n styleUrls: ['./demo-pane.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocPaneComponent,\n NgTemplateOutlet,\n NgDocPaneBackDirective,\n NgDocPaneFrontDirective,\n NgDocCodeComponent,\n NgDocTabGroupComponent,\n NgDocTabComponent,\n NgDocFullscreenButtonComponent,\n NgDocFullscreenDirective,\n NgDocFullscreenToggleComponent,\n NgComponentOutlet,\n NgDocIconComponent,\n ],\n host: {\n '[class]': 'options().class ?? \"\"',\n },\n})\nexport class NgDocDemoPaneComponent {\n private readonly rootPage = inject(NgDocRootPage);\n\n /** Name of the demo component in the page's `demos`. */\n readonly componentName = input<string | undefined>(undefined);\n\n /** Options of the `demoPane` action. */\n readonly options = input<NgDocDemoPaneActionOptions>({});\n\n /** The demo component. */\n readonly demo: Signal<Type<unknown> | undefined> = computed(() => {\n const name: string | undefined = this.componentName();\n\n return name ? this.rootPage.page?.demos?.[name] : undefined;\n });\n\n /** Source files of the demo, filtered by the `tabs` option. */\n readonly assets: Signal<NgDocDemoAsset[]> = computed(() => {\n const name: string | undefined = this.componentName();\n const tabs: string | string[] | undefined = this.options().tabs;\n\n return name\n ? (this.rootPage.demoAssets?.[name] ?? []).filter(\n (asset: NgDocDemoAsset) => !tabs?.length || asArray(tabs).includes(asset.title),\n )\n : [];\n });\n}\n","<ng-doc-pane [expanded]=\"options().expanded ?? false\">\n <ng-container *ngTemplateOutlet=\"codeContent\" ngDocPaneBack></ng-container>\n <div class=\"ng-doc-demo-pane-stage\" ngDocPaneFront ngDocFullscreen #stage=\"ngDocFullscreen\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n @if (!options().fullscreenRoute) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-pane-fullscreen\" [target]=\"stage\" />\n }\n </div>\n</ng-doc-pane>\n\n<ng-template #demoTemplate>\n @if (options().fullscreenRoute; as route) {\n <ng-doc-fullscreen-button [route]=\"route\"></ng-doc-fullscreen-button>\n } @else if (demo(); as demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options().inputs\"></ng-container>\n }\n</ng-template>\n\n<ng-template #codeContent>\n @if (assets().length === 1) {\n <ng-doc-code [html]=\"assets()[0].code\"></ng-doc-code>\n }\n\n @if (assets().length > 1) {\n <ng-doc-tab-group [openedTab]=\"options().defaultTab\">\n @for (asset of assets(); track asset.title) {\n <ng-doc-tab [id]=\"asset.title\" [label]=\"label\" [content]=\"assetContent\">\n <ng-template #label>\n @if (asset.icon) {\n <ng-doc-icon [customIcon]=\"asset.icon\"></ng-doc-icon>\n }\n {{ asset.title }}\n </ng-template>\n <ng-template #assetContent>\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n </ng-template>\n </ng-doc-tab>\n }\n </ng-doc-tab-group>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AA2BA;;;;AAIG;MAwBU,sBAAsB,CAAA;AAvBnC,IAAA,WAAA,GAAA;AAwBmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;;QAGxC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAqB,SAAS;0FAAC;;QAGpD,IAAA,CAAA,OAAO,GAAG,KAAK,CAA6B,EAAE;oFAAC;;AAG/C,QAAA,IAAA,CAAA,IAAI,GAAsC,QAAQ,CAAC,MAAK;AAC/D,YAAA,MAAM,IAAI,GAAuB,IAAI,CAAC,aAAa,EAAE;AAErD,YAAA,OAAO,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,SAAS;QAC7D,CAAC;iFAAC;;AAGO,QAAA,IAAA,CAAA,MAAM,GAA6B,QAAQ,CAAC,MAAK;AACxD,YAAA,MAAM,IAAI,GAAuB,IAAI,CAAC,aAAa,EAAE;YACrD,MAAM,IAAI,GAAkC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI;AAE/D,YAAA,OAAO;AACL,kBAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,CAC7C,CAAC,KAAqB,KAAK,CAAC,IAAI,EAAE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;kBAEjF,EAAE;QACR,CAAC;mFA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;wBACtB,uBAAuB;wBACvB,kBAAkB;wBAClB,sBAAsB;wBACtB,iBAAiB;wBACjB,8BAA8B;wBAC9B,wBAAwB;wBACxB,8BAA8B;wBAC9B,iBAAiB;wBACjB,kBAAkB;qBACnB,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,uBAAuB;AACnC,qBAAA,EAAA,QAAA,EAAA,ihDAAA,EAAA,MAAA,EAAA,CAAA,qiCAAA,CAAA,EAAA;;;AErDH;;AAEG;;;;"}
@@ -1,66 +1,151 @@
1
- import { NgTemplateOutlet, NgComponentOutlet } from '@angular/common';
1
+ import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, HostBinding, Input, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { inject, DOCUMENT, input, computed, linkedSignal, signal, viewChildren, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
4
4
  import { NgDocRootPage } from '@ng-doc/app/classes/root-page';
5
5
  import { NgDocCodeComponent } from '@ng-doc/app/components/code';
6
- import { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';
6
+ import { NgDocCopyButtonComponent } from '@ng-doc/app/components/copy-button';
7
7
  import { NgDocFullscreenButtonComponent } from '@ng-doc/app/components/fullscreen-button';
8
+ import { NgDocFullscreenToggleComponent } from '@ng-doc/app/components/fullscreen-toggle';
8
9
  import { asArray } from '@ng-doc/core/helpers/as-array';
9
- import { NgDocTabGroupComponent, NgDocTabComponent, NgDocIconComponent, NgDocExecutePipe } from '@ng-doc/ui-kit';
10
+ import { NgDocFullscreenDirective, NgDocIconComponent, NgDocSelectionComponent, NgDocSelectionHostDirective, NgDocSelectionOriginDirective, NgDocTooltipDirective } from '@ng-doc/ui-kit';
10
11
 
12
+ /** The preview widths, in the order of their buttons. */
13
+ const PREVIEW_WIDTHS = [
14
+ { width: 'full', label: 'Full width', readout: '100% × auto' },
15
+ { width: '480', label: '480 pixels wide', readout: '480 × auto' },
16
+ { width: '280', label: '280 pixels wide', readout: '280 × auto' },
17
+ ];
18
+ let nextId = 0;
19
+ /**
20
+ * Renders a demo of the page in a panel: a toolbar with Preview and source tabs, the preview
21
+ * width, copy and fullscreen controls, over the demo on a dot-grid stage. The fullscreen control
22
+ * shows the stage fullscreen with the browser Fullscreen API; it is hidden where the browser does
23
+ * not support it.
24
+ *
25
+ * The preview widths set the width of the demo's container; they do not emulate a device, so
26
+ * media queries inside the demo do not respond to them.
27
+ */
11
28
  class NgDocDemoComponent {
12
29
  constructor() {
13
30
  this.rootPage = inject(NgDocRootPage);
14
- this.options = {};
15
- this.assets = [];
16
- }
17
- get classes() {
18
- return this.options.class ?? '';
19
- }
20
- ngOnInit() {
21
- this.demo = this.getDemo();
22
- this.assets = this.getAssets();
23
- }
24
- getOpenedAssetId(assets) {
25
- return assets.find((asset) => asset.opened)?.title;
31
+ this.document = inject(DOCUMENT);
32
+ /** Name of the demo component in the page's `demos`. */
33
+ this.componentName = input(undefined, /* @ts-ignore */
34
+ ...(ngDevMode ? [{ debugName: "componentName" }] : /* istanbul ignore next */ []));
35
+ /** Options of the `demo` action. */
36
+ this.options = input({}, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
38
+ /** The demo component. */
39
+ this.demo = computed(() => {
40
+ const name = this.componentName();
41
+ return name ? this.rootPage.page?.demos?.[name] : undefined;
42
+ }, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "demo" }] : /* istanbul ignore next */ []));
44
+ /** Source files of the demo, filtered by the `tabs` option. */
45
+ this.assets = computed(() => {
46
+ const name = this.componentName();
47
+ const tabs = this.options().tabs;
48
+ return name
49
+ ? (this.rootPage.demoAssets?.[name] ?? []).filter((asset) => !tabs?.length || asArray(tabs).includes(asset.title))
50
+ : [];
51
+ }, /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "assets" }] : /* istanbul ignore next */ []));
53
+ /**
54
+ * The open view: `preview`, or the title of a source file. It starts on the preview, or on the
55
+ * default source file when the `expanded` option is set.
56
+ */
57
+ this.view = linkedSignal(() => {
58
+ const options = this.options();
59
+ return options.expanded ? this.defaultAsset()?.title ?? 'preview' : 'preview';
60
+ }, /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "view" }] : /* istanbul ignore next */ []));
62
+ /** The width the demo is previewed at. */
63
+ this.previewWidth = signal('full', /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "previewWidth" }] : /* istanbul ignore next */ []));
65
+ this.previewWidths = PREVIEW_WIDTHS;
66
+ /** Readout of the preview width. */
67
+ this.widthReadout = computed(() => PREVIEW_WIDTHS.find(({ width }) => width === this.previewWidth())?.readout ?? '100% × auto', /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "widthReadout" }] : /* istanbul ignore next */ []));
69
+ /** The views in tab order: the preview, then the source files. */
70
+ this.views = computed(() => [
71
+ 'preview',
72
+ ...this.assets().map((asset) => asset.title),
73
+ ], /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "views" }] : /* istanbul ignore next */ []));
75
+ /** Prefix of the ids that tie the view tabs to their panels. */
76
+ this.idPrefix = `ng-doc-demo-${nextId++}`;
77
+ /** Reads the code of the open source file (or the default one) when copy is pressed. */
78
+ this.copyText = () => {
79
+ const assets = this.assets();
80
+ const asset = assets.find((item) => item.title === this.view()) ?? this.defaultAsset();
81
+ const template = this.document.createElement('template');
82
+ template.innerHTML = asset?.code ?? '';
83
+ return template.content.textContent ?? '';
84
+ };
85
+ this.viewTabs = viewChildren('viewTab', /* @ts-ignore */
86
+ ...(ngDevMode ? [{ debugName: "viewTabs" }] : /* istanbul ignore next */ []));
87
+ /**
88
+ * The source file that opens first: the snippet marked `opened`, then `defaultTab`, then the
89
+ * first file (the order the demo has always used).
90
+ */
91
+ this.defaultAsset = computed(() => {
92
+ const assets = this.assets();
93
+ const defaultTab = this.options().defaultTab;
94
+ return (assets.find((asset) => asset.opened) ??
95
+ assets.find((asset) => asset.title === defaultTab) ??
96
+ assets[0]);
97
+ }, /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "defaultAsset" }] : /* istanbul ignore next */ []));
26
99
  }
27
- getDemo() {
28
- if (this.componentName) {
29
- return this.rootPage.page?.demos && this.rootPage.page.demos[this.componentName];
30
- }
31
- return undefined;
100
+ /**
101
+ * Opens a view.
102
+ * @param view - `preview` or the title of a source file.
103
+ */
104
+ openView(view) {
105
+ untracked(() => this.view.set(view));
32
106
  }
33
- getAssets() {
34
- if (this.componentName) {
35
- return ((this.rootPage.demoAssets && this.rootPage.demoAssets[this.componentName]) ??
36
- []).filter((asset) => !this.options.tabs?.length || asArray(this.options.tabs).includes(asset.title));
107
+ /**
108
+ * Moves between the view tabs with the keyboard.
109
+ * @param event - The key press on a view tab.
110
+ */
111
+ onViewKeydown(event) {
112
+ const views = this.views();
113
+ const current = Math.max(views.indexOf(this.view()), 0);
114
+ const next = {
115
+ ArrowRight: (current + 1) % views.length,
116
+ ArrowLeft: (current - 1 + views.length) % views.length,
117
+ Home: 0,
118
+ End: views.length - 1,
119
+ }[event.key];
120
+ if (next !== undefined) {
121
+ event.preventDefault();
122
+ this.openView(views[next]);
123
+ this.viewTabs()[next]?.nativeElement.focus();
37
124
  }
38
- return [];
39
125
  }
40
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgDocDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
41
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: NgDocDemoComponent, isStandalone: true, selector: "ng-doc-demo", inputs: { componentName: "componentName", options: "options" }, host: { properties: { "class": "this.classes" } }, ngImport: i0, template: "@if (options.container ?? true) {\n <ng-doc-demo-displayer [codeContent]=\"codeContent\" [expanded]=\"!!options.expanded\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n <ng-template #codeContent>\n @if (assets.length === 1) {\n @for (asset of assets; track asset) {\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n }\n }\n @if (assets.length > 1) {\n <ng-doc-tab-group [openedTab]=\"(getOpenedAssetId | execute: assets) ?? options.defaultTab\">\n @for (asset of assets; track asset) {\n <ng-doc-tab [id]=\"asset.title\" [label]=\"label\" [content]=\"assetContent\">\n <ng-template #label>\n @if (asset.icon) {\n <ng-doc-icon [customIcon]=\"asset.icon\"></ng-doc-icon>\n }\n {{ asset.title }}\n </ng-template>\n <ng-template #assetContent>\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n </ng-template>\n </ng-doc-tab>\n }\n </ng-doc-tab-group>\n }\n </ng-template>\n </ng-doc-demo-displayer>\n} @else {\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n}\n\n<ng-template #demoTemplate>\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n</ng-template>\n", styles: [":host{display:block;margin:var(--ng-doc-demo-margin);--ng-doc-tab-group-background: var(--ng-doc-code-background);--ng-doc-tab-group-tabs-background: var(--ng-doc-base-2);--ng-doc-tab-group-border-radius: 0;--ng-doc-tab-group-border: none;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none}:host .ng-doc-example{padding:calc(var(--ng-doc-base-gutter) * 3)}:host ng-doc-icon{margin-right:calc(var(--ng-doc-base-gutter) / 2)}:host ng-doc-tab-group{border-top:1px solid var(--ng-doc-border-color)}\n"], dependencies: [{ kind: "component", type: NgDocDemoDisplayerComponent, selector: "ng-doc-demo-displayer", inputs: ["codeContent", "code", "language", "container", "border", "expanded"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocCodeComponent, selector: "ng-doc-code", inputs: ["html", "copyButton", "name", "icon"] }, { 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: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocFullscreenButtonComponent, selector: "ng-doc-fullscreen-button", inputs: ["route"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "pipe", type: NgDocExecutePipe, name: "execute" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
126
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDemoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
127
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocDemoComponent, isStandalone: true, selector: "ng-doc-demo", inputs: { componentName: { classPropertyName: "componentName", publicName: "componentName", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "options().class ?? \"\"", "attr.data-ng-doc-container": "options().container ?? true" } }, viewQueries: [{ propertyName: "viewTabs", predicate: ["viewTab"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (options().container ?? true) {\n <div class=\"ng-doc-demo-toolbar\">\n <div class=\"ng-doc-demo-views\" role=\"tablist\" aria-label=\"Demo view\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of views(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-view\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"view() === item\"\n [ngDocSelectionOrigin]=\"view() === item\"\n [attr.aria-controls]=\"idPrefix + '-panel-' + i\"\n [attr.tabindex]=\"view() === item ? 0 : -1\"\n (click)=\"openView(item)\"\n (keydown)=\"onViewKeydown($event)\"\n #viewTab>\n @if (item === 'preview') {\n Preview\n } @else {\n @if (assets()[i - 1].icon; as icon) {\n <ng-doc-icon [customIcon]=\"icon\"></ng-doc-icon>\n }\n {{ item }}\n }\n </button>\n }\n </div>\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <span class=\"ng-doc-demo-width-readout\">{{ widthReadout() }}</span>\n <div class=\"ng-doc-demo-widths\" role=\"group\" aria-label=\"Preview width\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of previewWidths; track item.width) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-width\"\n [attr.aria-pressed]=\"previewWidth() === item.width\"\n [ngDocSelectionOrigin]=\"previewWidth() === item.width\"\n [attr.aria-label]=\"item.label\"\n [ngDocTooltip]=\"item.label\"\n (click)=\"previewWidth.set(item.width)\">\n @switch (item.width) {\n @case ('full') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M8 21h8M12 17v4\" />\n </svg>\n }\n @case ('480') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"4\" y=\"2\" width=\"16\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n @case ('280') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"6\" y=\"2\" width=\"12\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n }\n </button>\n }\n </div>\n }\n\n @if (assets().length) {\n <ng-doc-copy-button class=\"ng-doc-demo-copy\" [text]=\"copyText\" label=\"Copy code\">\n <ng-doc-icon icon=\"copy\"></ng-doc-icon>\n </ng-doc-copy-button>\n }\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen\" [target]=\"stage\" />\n }\n </div>\n\n <div\n class=\"ng-doc-demo-stage\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-0'\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-0'\"\n [attr.data-ng-doc-width]=\"previewWidth()\"\n [hidden]=\"view() !== 'preview'\"\n ngDocFullscreen\n #stage=\"ngDocFullscreen\">\n <div class=\"ng-doc-demo-frame\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n </div>\n <!-- The toolbar is not shown in fullscreen, so the stage carries its own way out. -->\n @if (stage.active()) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen-exit\" [target]=\"stage\" />\n }\n </div>\n\n @for (asset of assets(); track asset.title; let i = $index) {\n @if (view() === asset.title) {\n <div\n class=\"ng-doc-demo-source\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-' + (i + 1)\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-' + (i + 1)\">\n <ng-doc-code [html]=\"asset.code\" [copyButton]=\"false\"></ng-doc-code>\n </div>\n }\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n}\n\n<ng-template #demoTemplate>\n @if (options().fullscreenRoute; as route) {\n <ng-doc-fullscreen-button [route]=\"route\"></ng-doc-fullscreen-button>\n } @else if (demo(); as demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options().inputs\"></ng-container>\n }\n</ng-template>\n", styles: [":host{display:block;margin:var(--ng-doc-demo-margin);border:var(--ng-doc-demo-displayer-border);border-radius:var(--ng-doc-demo-displayer-border-radius);background:var(--ng-doc-demo-displayer-background, var(--ng-doc-background));overflow:hidden;min-width:0;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none}:host[data-ng-doc-container=false]{border:none;border-radius:0;background:none;overflow:visible}.ng-doc-demo-toolbar{display:flex;align-items:center;gap:var(--ng-doc-space-2);min-height:48px;padding:var(--ng-doc-space-2);background:var(--ng-doc-demo-toolbar-background);border-bottom:1px solid var(--ng-doc-border-color);font-family:var(--ng-doc-font-family)}.ng-doc-demo-views,.ng-doc-demo-widths{display:inline-flex;flex:none;gap:2px;max-width:100%;padding:3px;border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-2);overflow-x:auto;scrollbar-width:none}.ng-doc-demo-views{flex:0 1 auto}.ng-doc-demo-view,.ng-doc-demo-width{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:0;border-radius:var(--ng-doc-radius-sm);background:none;font:inherit;font-size:13px;font-weight:500;line-height:18px;color:var(--ng-doc-text-muted);white-space:nowrap;cursor:pointer;--ng-doc-icon-color: currentColor}.ng-doc-demo-view:hover,.ng-doc-demo-width:hover{color:var(--ng-doc-heading-color)}.ng-doc-demo-view:focus-visible,.ng-doc-demo-width:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-demo-view[aria-selected=true],.ng-doc-demo-view[aria-pressed=true],.ng-doc-demo-width[aria-selected=true],.ng-doc-demo-width[aria-pressed=true]{color:var(--ng-doc-heading-color)}.ng-doc-demo-views,.ng-doc-demo-widths{position:relative}.ng-doc-demo-views ng-doc-selection,.ng-doc-demo-views ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],.ng-doc-demo-views ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true],.ng-doc-demo-widths ng-doc-selection,.ng-doc-demo-widths ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],.ng-doc-demo-widths ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{border-radius:var(--ng-doc-radius-sm);background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}.ng-doc-demo-view,.ng-doc-demo-width{position:relative}.ng-doc-demo-width{padding:0 7px}.ng-doc-demo-width svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}:host-context([data-theme=dark]) ng-doc-selection,:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}@media(prefers-color-scheme:dark){:host-context([data-theme=auto]) ng-doc-selection,:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}}.ng-doc-demo-width-readout{margin-left:auto;font-size:12px;font-variant-numeric:tabular-nums;color:var(--ng-doc-text-muted);white-space:nowrap}.ng-doc-demo-copy{margin-left:auto;--ng-doc-icon-color: var(--ng-doc-text-muted)}.ng-doc-demo-width-readout~.ng-doc-demo-copy{margin-left:0}.ng-doc-demo-fullscreen{margin-left:auto}.ng-doc-demo-width-readout~.ng-doc-demo-fullscreen,.ng-doc-demo-copy~.ng-doc-demo-fullscreen{margin-left:0}.ng-doc-demo-stage{background-image:radial-gradient(color-mix(in srgb,var(--ng-doc-base-5) 55%,transparent) 1px,transparent 1px);background-size:16px 16px;position:relative;display:grid;place-items:center;min-height:160px;padding:var(--ng-doc-space-8) var(--ng-doc-space-4);background-color:var(--ng-doc-demo-displayer-background, var(--ng-doc-background))}.ng-doc-demo-stage[hidden]{display:none}.ng-doc-demo-stage[data-ng-doc-fullscreen=true]{overflow:auto;padding:var(--ng-doc-space-16) var(--ng-doc-space-8)}.ng-doc-demo-stage[data-ng-doc-fullscreen=true][data-ng-doc-width=full]>.ng-doc-demo-frame{width:auto;max-width:100%}.ng-doc-demo-fullscreen-exit{position:absolute;top:var(--ng-doc-space-4);right:var(--ng-doc-space-4);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-sm)}.ng-doc-demo-frame{width:100%;min-width:0;border-radius:var(--ng-doc-radius-md);transition:width var(--ng-doc-transition) var(--ng-doc-easing)}[data-ng-doc-width=\"480\"]>.ng-doc-demo-frame,[data-ng-doc-width=\"280\"]>.ng-doc-demo-frame{padding:var(--ng-doc-space-5);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-sm);overflow:auto}[data-ng-doc-width=\"480\"]>.ng-doc-demo-frame{width:min(480px,100%)}[data-ng-doc-width=\"280\"]>.ng-doc-demo-frame{width:min(280px,100%)}.ng-doc-demo-source{background:var(--ng-doc-code-background)}@media(prefers-reduced-motion:reduce){.ng-doc-demo-frame{transition:none}}@media(max-width:640px){.ng-doc-demo-width-readout,.ng-doc-demo-widths{display:none}.ng-doc-demo-copy{margin-left:auto}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: NgDocCodeComponent, selector: "ng-doc-code", inputs: ["html", "copyButton", "name", "icon"] }, { kind: "component", type: NgDocCopyButtonComponent, selector: "ng-doc-copy-button", inputs: ["text", "label"] }, { kind: "component", type: NgDocFullscreenButtonComponent, selector: "ng-doc-fullscreen-button", inputs: ["route"] }, { kind: "directive", type: NgDocFullscreenDirective, selector: "[ngDocFullscreen]", exportAs: ["ngDocFullscreen"] }, { kind: "component", type: NgDocFullscreenToggleComponent, selector: "ng-doc-fullscreen-toggle", inputs: ["target"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "component", type: NgDocSelectionComponent, selector: "ng-doc-selection", inputs: ["align"] }, { kind: "directive", type: NgDocSelectionHostDirective, selector: "[ngDocSelectionHost]" }, { kind: "directive", type: NgDocSelectionOriginDirective, selector: "[ngDocSelectionOrigin]", inputs: ["ngDocSelectionOrigin"] }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
42
128
  }
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgDocDemoComponent, decorators: [{
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocDemoComponent, decorators: [{
44
130
  type: Component,
45
131
  args: [{ selector: 'ng-doc-demo', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
46
- NgDocDemoDisplayerComponent,
132
+ NgComponentOutlet,
47
133
  NgTemplateOutlet,
48
134
  NgDocCodeComponent,
49
- NgDocTabGroupComponent,
50
- NgDocTabComponent,
51
- NgDocIconComponent,
52
- NgDocExecutePipe,
135
+ NgDocCopyButtonComponent,
53
136
  NgDocFullscreenButtonComponent,
54
- NgComponentOutlet,
55
- ], template: "@if (options.container ?? true) {\n <ng-doc-demo-displayer [codeContent]=\"codeContent\" [expanded]=\"!!options.expanded\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n <ng-template #codeContent>\n @if (assets.length === 1) {\n @for (asset of assets; track asset) {\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n }\n }\n @if (assets.length > 1) {\n <ng-doc-tab-group [openedTab]=\"(getOpenedAssetId | execute: assets) ?? options.defaultTab\">\n @for (asset of assets; track asset) {\n <ng-doc-tab [id]=\"asset.title\" [label]=\"label\" [content]=\"assetContent\">\n <ng-template #label>\n @if (asset.icon) {\n <ng-doc-icon [customIcon]=\"asset.icon\"></ng-doc-icon>\n }\n {{ asset.title }}\n </ng-template>\n <ng-template #assetContent>\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n </ng-template>\n </ng-doc-tab>\n }\n </ng-doc-tab-group>\n }\n </ng-template>\n </ng-doc-demo-displayer>\n} @else {\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n}\n\n<ng-template #demoTemplate>\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n</ng-template>\n", styles: [":host{display:block;margin:var(--ng-doc-demo-margin);--ng-doc-tab-group-background: var(--ng-doc-code-background);--ng-doc-tab-group-tabs-background: var(--ng-doc-base-2);--ng-doc-tab-group-border-radius: 0;--ng-doc-tab-group-border: none;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none}:host .ng-doc-example{padding:calc(var(--ng-doc-base-gutter) * 3)}:host ng-doc-icon{margin-right:calc(var(--ng-doc-base-gutter) / 2)}:host ng-doc-tab-group{border-top:1px solid var(--ng-doc-border-color)}\n"] }]
56
- }], ctorParameters: () => [], propDecorators: { componentName: [{
57
- type: Input
58
- }], options: [{
59
- type: Input
60
- }], classes: [{
61
- type: HostBinding,
62
- args: ['class']
63
- }] } });
137
+ NgDocFullscreenDirective,
138
+ NgDocFullscreenToggleComponent,
139
+ NgDocIconComponent,
140
+ NgDocSelectionComponent,
141
+ NgDocSelectionHostDirective,
142
+ NgDocSelectionOriginDirective,
143
+ NgDocTooltipDirective,
144
+ ], host: {
145
+ '[class]': 'options().class ?? ""',
146
+ '[attr.data-ng-doc-container]': 'options().container ?? true',
147
+ }, template: "@if (options().container ?? true) {\n <div class=\"ng-doc-demo-toolbar\">\n <div class=\"ng-doc-demo-views\" role=\"tablist\" aria-label=\"Demo view\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of views(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-view\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"view() === item\"\n [ngDocSelectionOrigin]=\"view() === item\"\n [attr.aria-controls]=\"idPrefix + '-panel-' + i\"\n [attr.tabindex]=\"view() === item ? 0 : -1\"\n (click)=\"openView(item)\"\n (keydown)=\"onViewKeydown($event)\"\n #viewTab>\n @if (item === 'preview') {\n Preview\n } @else {\n @if (assets()[i - 1].icon; as icon) {\n <ng-doc-icon [customIcon]=\"icon\"></ng-doc-icon>\n }\n {{ item }}\n }\n </button>\n }\n </div>\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <span class=\"ng-doc-demo-width-readout\">{{ widthReadout() }}</span>\n <div class=\"ng-doc-demo-widths\" role=\"group\" aria-label=\"Preview width\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of previewWidths; track item.width) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-width\"\n [attr.aria-pressed]=\"previewWidth() === item.width\"\n [ngDocSelectionOrigin]=\"previewWidth() === item.width\"\n [attr.aria-label]=\"item.label\"\n [ngDocTooltip]=\"item.label\"\n (click)=\"previewWidth.set(item.width)\">\n @switch (item.width) {\n @case ('full') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M8 21h8M12 17v4\" />\n </svg>\n }\n @case ('480') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"4\" y=\"2\" width=\"16\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n @case ('280') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"6\" y=\"2\" width=\"12\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n }\n </button>\n }\n </div>\n }\n\n @if (assets().length) {\n <ng-doc-copy-button class=\"ng-doc-demo-copy\" [text]=\"copyText\" label=\"Copy code\">\n <ng-doc-icon icon=\"copy\"></ng-doc-icon>\n </ng-doc-copy-button>\n }\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen\" [target]=\"stage\" />\n }\n </div>\n\n <div\n class=\"ng-doc-demo-stage\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-0'\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-0'\"\n [attr.data-ng-doc-width]=\"previewWidth()\"\n [hidden]=\"view() !== 'preview'\"\n ngDocFullscreen\n #stage=\"ngDocFullscreen\">\n <div class=\"ng-doc-demo-frame\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n </div>\n <!-- The toolbar is not shown in fullscreen, so the stage carries its own way out. -->\n @if (stage.active()) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen-exit\" [target]=\"stage\" />\n }\n </div>\n\n @for (asset of assets(); track asset.title; let i = $index) {\n @if (view() === asset.title) {\n <div\n class=\"ng-doc-demo-source\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-' + (i + 1)\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-' + (i + 1)\">\n <ng-doc-code [html]=\"asset.code\" [copyButton]=\"false\"></ng-doc-code>\n </div>\n }\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n}\n\n<ng-template #demoTemplate>\n @if (options().fullscreenRoute; as route) {\n <ng-doc-fullscreen-button [route]=\"route\"></ng-doc-fullscreen-button>\n } @else if (demo(); as demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options().inputs\"></ng-container>\n }\n</ng-template>\n", styles: [":host{display:block;margin:var(--ng-doc-demo-margin);border:var(--ng-doc-demo-displayer-border);border-radius:var(--ng-doc-demo-displayer-border-radius);background:var(--ng-doc-demo-displayer-background, var(--ng-doc-background));overflow:hidden;min-width:0;--ng-doc-code-margin: 0;--ng-doc-code-border-radius: 0;--ng-doc-code-border: none}:host[data-ng-doc-container=false]{border:none;border-radius:0;background:none;overflow:visible}.ng-doc-demo-toolbar{display:flex;align-items:center;gap:var(--ng-doc-space-2);min-height:48px;padding:var(--ng-doc-space-2);background:var(--ng-doc-demo-toolbar-background);border-bottom:1px solid var(--ng-doc-border-color);font-family:var(--ng-doc-font-family)}.ng-doc-demo-views,.ng-doc-demo-widths{display:inline-flex;flex:none;gap:2px;max-width:100%;padding:3px;border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-base-2);overflow-x:auto;scrollbar-width:none}.ng-doc-demo-views{flex:0 1 auto}.ng-doc-demo-view,.ng-doc-demo-width{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border:0;border-radius:var(--ng-doc-radius-sm);background:none;font:inherit;font-size:13px;font-weight:500;line-height:18px;color:var(--ng-doc-text-muted);white-space:nowrap;cursor:pointer;--ng-doc-icon-color: currentColor}.ng-doc-demo-view:hover,.ng-doc-demo-width:hover{color:var(--ng-doc-heading-color)}.ng-doc-demo-view:focus-visible,.ng-doc-demo-width:focus-visible{outline:none;box-shadow:var(--ng-doc-focus-ring)}.ng-doc-demo-view[aria-selected=true],.ng-doc-demo-view[aria-pressed=true],.ng-doc-demo-width[aria-selected=true],.ng-doc-demo-width[aria-pressed=true]{color:var(--ng-doc-heading-color)}.ng-doc-demo-views,.ng-doc-demo-widths{position:relative}.ng-doc-demo-views ng-doc-selection,.ng-doc-demo-views ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],.ng-doc-demo-views ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true],.ng-doc-demo-widths ng-doc-selection,.ng-doc-demo-widths ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],.ng-doc-demo-widths ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{border-radius:var(--ng-doc-radius-sm);background:var(--ng-doc-background);box-shadow:var(--ng-doc-shadow-xs)}.ng-doc-demo-view,.ng-doc-demo-width{position:relative}.ng-doc-demo-width{padding:0 7px}.ng-doc-demo-width svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}:host-context([data-theme=dark]) ng-doc-selection,:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],:host-context([data-theme=dark]) ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}@media(prefers-color-scheme:dark){:host-context([data-theme=auto]) ng-doc-selection,:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~[aria-selected=true],:host-context([data-theme=auto]) ng-doc-selection:not([data-ng-doc-placed])~[aria-pressed=true]{box-shadow:var(--ng-doc-shadow-xs),inset 0 0 0 1px var(--ng-doc-base-4)}}.ng-doc-demo-width-readout{margin-left:auto;font-size:12px;font-variant-numeric:tabular-nums;color:var(--ng-doc-text-muted);white-space:nowrap}.ng-doc-demo-copy{margin-left:auto;--ng-doc-icon-color: var(--ng-doc-text-muted)}.ng-doc-demo-width-readout~.ng-doc-demo-copy{margin-left:0}.ng-doc-demo-fullscreen{margin-left:auto}.ng-doc-demo-width-readout~.ng-doc-demo-fullscreen,.ng-doc-demo-copy~.ng-doc-demo-fullscreen{margin-left:0}.ng-doc-demo-stage{background-image:radial-gradient(color-mix(in srgb,var(--ng-doc-base-5) 55%,transparent) 1px,transparent 1px);background-size:16px 16px;position:relative;display:grid;place-items:center;min-height:160px;padding:var(--ng-doc-space-8) var(--ng-doc-space-4);background-color:var(--ng-doc-demo-displayer-background, var(--ng-doc-background))}.ng-doc-demo-stage[hidden]{display:none}.ng-doc-demo-stage[data-ng-doc-fullscreen=true]{overflow:auto;padding:var(--ng-doc-space-16) var(--ng-doc-space-8)}.ng-doc-demo-stage[data-ng-doc-fullscreen=true][data-ng-doc-width=full]>.ng-doc-demo-frame{width:auto;max-width:100%}.ng-doc-demo-fullscreen-exit{position:absolute;top:var(--ng-doc-space-4);right:var(--ng-doc-space-4);border-radius:var(--ng-doc-radius-md);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-sm)}.ng-doc-demo-frame{width:100%;min-width:0;border-radius:var(--ng-doc-radius-md);transition:width var(--ng-doc-transition) var(--ng-doc-easing)}[data-ng-doc-width=\"480\"]>.ng-doc-demo-frame,[data-ng-doc-width=\"280\"]>.ng-doc-demo-frame{padding:var(--ng-doc-space-5);background:var(--ng-doc-background);box-shadow:0 0 0 1px var(--ng-doc-border-color),var(--ng-doc-shadow-sm);overflow:auto}[data-ng-doc-width=\"480\"]>.ng-doc-demo-frame{width:min(480px,100%)}[data-ng-doc-width=\"280\"]>.ng-doc-demo-frame{width:min(280px,100%)}.ng-doc-demo-source{background:var(--ng-doc-code-background)}@media(prefers-reduced-motion:reduce){.ng-doc-demo-frame{transition:none}}@media(max-width:640px){.ng-doc-demo-width-readout,.ng-doc-demo-widths{display:none}.ng-doc-demo-copy{margin-left:auto}}\n"] }]
148
+ }], propDecorators: { componentName: [{ type: i0.Input, args: [{ isSignal: true, alias: "componentName", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], viewTabs: [{ type: i0.ViewChildren, args: ['viewTab', { isSignal: true }] }] } });
64
149
 
65
150
  /**
66
151
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-demo.mjs","sources":["../../../../libs/app/components/demo/demo.component.ts","../../../../libs/app/components/demo/demo.component.html","../../../../libs/app/components/demo/ng-doc-app-components-demo.ts"],"sourcesContent":["import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n HostBinding,\n inject,\n Input,\n OnInit,\n Type,\n} from '@angular/core';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocDemoDisplayerComponent } from '@ng-doc/app/components/demo-displayer';\nimport { NgDocFullscreenButtonComponent } from '@ng-doc/app/components/fullscreen-button';\nimport { NgDocDemoAsset } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocDemoActionOptions } from '@ng-doc/core/interfaces';\nimport {\n NgDocExecutePipe,\n NgDocIconComponent,\n NgDocTabComponent,\n NgDocTabGroupComponent,\n} from '@ng-doc/ui-kit';\n\n@Component({\n selector: 'ng-doc-demo',\n templateUrl: './demo.component.html',\n styleUrls: ['./demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgDocDemoDisplayerComponent,\n NgTemplateOutlet,\n NgDocCodeComponent,\n NgDocTabGroupComponent,\n NgDocTabComponent,\n NgDocIconComponent,\n NgDocExecutePipe,\n NgDocFullscreenButtonComponent,\n NgComponentOutlet,\n ],\n})\nexport class NgDocDemoComponent implements OnInit {\n private readonly rootPage = inject(NgDocRootPage);\n\n @Input()\n componentName?: string;\n\n @Input()\n options: NgDocDemoActionOptions = {};\n\n demo?: Type<unknown>;\n assets: NgDocDemoAsset[] = [];\n\n constructor() {}\n\n @HostBinding('class')\n protected get classes(): string | string[] {\n return this.options.class ?? '';\n }\n\n ngOnInit(): void {\n this.demo = this.getDemo();\n this.assets = this.getAssets();\n }\n\n getOpenedAssetId(assets: NgDocDemoAsset[]): string | undefined {\n return assets.find((asset: NgDocDemoAsset) => asset.opened)?.title;\n }\n\n private getDemo(): Type<unknown> | undefined {\n if (this.componentName) {\n return this.rootPage.page?.demos && this.rootPage.page.demos[this.componentName];\n }\n\n return undefined;\n }\n\n private getAssets(): NgDocDemoAsset[] {\n if (this.componentName) {\n return (\n (this.rootPage.demoAssets && this.rootPage.demoAssets[this.componentName]) ??\n []\n ).filter(\n (asset: NgDocDemoAsset) =>\n !this.options.tabs?.length || asArray(this.options.tabs).includes(asset.title),\n );\n }\n\n return [];\n }\n}\n","@if (options.container ?? true) {\n <ng-doc-demo-displayer [codeContent]=\"codeContent\" [expanded]=\"!!options.expanded\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n <ng-template #codeContent>\n @if (assets.length === 1) {\n @for (asset of assets; track asset) {\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n }\n }\n @if (assets.length > 1) {\n <ng-doc-tab-group [openedTab]=\"(getOpenedAssetId | execute: assets) ?? options.defaultTab\">\n @for (asset of assets; track asset) {\n <ng-doc-tab [id]=\"asset.title\" [label]=\"label\" [content]=\"assetContent\">\n <ng-template #label>\n @if (asset.icon) {\n <ng-doc-icon [customIcon]=\"asset.icon\"></ng-doc-icon>\n }\n {{ asset.title }}\n </ng-template>\n <ng-template #assetContent>\n <ng-doc-code [html]=\"asset.code\"></ng-doc-code>\n </ng-template>\n </ng-doc-tab>\n }\n </ng-doc-tab-group>\n }\n </ng-template>\n </ng-doc-demo-displayer>\n} @else {\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n}\n\n<ng-template #demoTemplate>\n @if (options.fullscreenRoute) {\n <ng-doc-fullscreen-button [route]=\"options.fullscreenRoute!\"></ng-doc-fullscreen-button>\n } @else if (demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options.inputs\"></ng-container>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAyCa,kBAAkB,CAAA;AAY7B,IAAA,WAAA,GAAA;AAXiB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;QAMjD,IAAA,CAAA,OAAO,GAA2B,EAAE;QAGpC,IAAA,CAAA,MAAM,GAAqB,EAAE;IAEd;AAEf,IAAA,IACc,OAAO,GAAA;AACnB,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE;IACjC;IAEA,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE;AAC1B,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE;IAChC;AAEA,IAAA,gBAAgB,CAAC,MAAwB,EAAA;AACvC,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAqB,KAAK,KAAK,CAAC,MAAM,CAAC,EAAE,KAAK;IACpE;IAEQ,OAAO,GAAA;AACb,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;QAClF;AAEA,QAAA,OAAO,SAAS;IAClB;IAEQ,SAAS,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,aAAa,EAAE;AACtB,YAAA,OAAO,CACL,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC;AACzE,gBAAA,EAAE,EACF,MAAM,CACN,CAAC,KAAqB,KACpB,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,IAAI,OAAO,CAAC,IAAI,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WAAA,EAAA,IAAA,EAC9B,iBAAiB,oRAFjB,gBAAgB,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAjB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,2BAA2B;wBAC3B,gBAAgB;wBAChB,kBAAkB;wBAClB,sBAAsB;wBACtB,iBAAiB;wBACjB,kBAAkB;wBAClB,gBAAgB;wBAChB,8BAA8B;wBAC9B,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,wrDAAA,EAAA,MAAA,EAAA,CAAA,yfAAA,CAAA,EAAA;;sBAKA;;sBAGA;;sBAQA,WAAW;uBAAC,OAAO;;;AEvDtB;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-demo.mjs","sources":["../../../../libs/app/components/demo/demo.component.ts","../../../../libs/app/components/demo/demo.component.html","../../../../libs/app/components/demo/ng-doc-app-components-demo.ts"],"sourcesContent":["import { NgComponentOutlet, NgTemplateOutlet } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n DOCUMENT,\n ElementRef,\n inject,\n input,\n linkedSignal,\n Signal,\n signal,\n Type,\n untracked,\n viewChildren,\n} from '@angular/core';\nimport { NgDocRootPage } from '@ng-doc/app/classes/root-page';\nimport { NgDocCodeComponent } from '@ng-doc/app/components/code';\nimport { NgDocCopyButtonComponent } from '@ng-doc/app/components/copy-button';\nimport { NgDocFullscreenButtonComponent } from '@ng-doc/app/components/fullscreen-button';\nimport { NgDocFullscreenToggleComponent } from '@ng-doc/app/components/fullscreen-toggle';\nimport { NgDocDemoAsset } from '@ng-doc/app/interfaces';\nimport { asArray } from '@ng-doc/core/helpers/as-array';\nimport { NgDocDemoActionOptions } from '@ng-doc/core/interfaces';\nimport {\n NgDocFullscreenDirective,\n NgDocIconComponent,\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n NgDocSelectionOriginDirective,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\n/** Widths the demo can be previewed at. */\nexport type NgDocDemoPreviewWidth = 'full' | '480' | '280';\n\n/** The preview widths, in the order of their buttons. */\nconst PREVIEW_WIDTHS: ReadonlyArray<{\n readonly width: NgDocDemoPreviewWidth;\n readonly label: string;\n readonly readout: string;\n}> = [\n { width: 'full', label: 'Full width', readout: '100% × auto' },\n { width: '480', label: '480 pixels wide', readout: '480 × auto' },\n { width: '280', label: '280 pixels wide', readout: '280 × auto' },\n];\n\nlet nextId = 0;\n\n/**\n * Renders a demo of the page in a panel: a toolbar with Preview and source tabs, the preview\n * width, copy and fullscreen controls, over the demo on a dot-grid stage. The fullscreen control\n * shows the stage fullscreen with the browser Fullscreen API; it is hidden where the browser does\n * not support it.\n *\n * The preview widths set the width of the demo's container; they do not emulate a device, so\n * media queries inside the demo do not respond to them.\n */\n@Component({\n selector: 'ng-doc-demo',\n templateUrl: './demo.component.html',\n styleUrls: ['./demo.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgComponentOutlet,\n NgTemplateOutlet,\n NgDocCodeComponent,\n NgDocCopyButtonComponent,\n NgDocFullscreenButtonComponent,\n NgDocFullscreenDirective,\n NgDocFullscreenToggleComponent,\n NgDocIconComponent,\n NgDocSelectionComponent,\n NgDocSelectionHostDirective,\n NgDocSelectionOriginDirective,\n NgDocTooltipDirective,\n ],\n host: {\n '[class]': 'options().class ?? \"\"',\n '[attr.data-ng-doc-container]': 'options().container ?? true',\n },\n})\nexport class NgDocDemoComponent {\n private readonly rootPage = inject(NgDocRootPage);\n private readonly document = inject(DOCUMENT);\n\n /** Name of the demo component in the page's `demos`. */\n readonly componentName = input<string | undefined>(undefined);\n\n /** Options of the `demo` action. */\n readonly options = input<NgDocDemoActionOptions>({});\n\n /** The demo component. */\n readonly demo: Signal<Type<unknown> | undefined> = computed(() => {\n const name: string | undefined = this.componentName();\n\n return name ? this.rootPage.page?.demos?.[name] : undefined;\n });\n\n /** Source files of the demo, filtered by the `tabs` option. */\n readonly assets: Signal<NgDocDemoAsset[]> = computed(() => {\n const name: string | undefined = this.componentName();\n const tabs: string | string[] | undefined = this.options().tabs;\n\n return name\n ? (this.rootPage.demoAssets?.[name] ?? []).filter(\n (asset: NgDocDemoAsset) => !tabs?.length || asArray(tabs).includes(asset.title),\n )\n : [];\n });\n\n /**\n * The open view: `preview`, or the title of a source file. It starts on the preview, or on the\n * default source file when the `expanded` option is set.\n */\n readonly view = linkedSignal<string>(() => {\n const options: NgDocDemoActionOptions = this.options();\n\n return options.expanded ? this.defaultAsset()?.title ?? 'preview' : 'preview';\n });\n\n /** The width the demo is previewed at. */\n readonly previewWidth = signal<NgDocDemoPreviewWidth>('full');\n\n protected readonly previewWidths = PREVIEW_WIDTHS;\n\n /** Readout of the preview width. */\n protected readonly widthReadout: Signal<string> = computed(\n () =>\n PREVIEW_WIDTHS.find(({ width }) => width === this.previewWidth())?.readout ?? '100% × auto',\n );\n\n /** The views in tab order: the preview, then the source files. */\n protected readonly views: Signal<string[]> = computed(() => [\n 'preview',\n ...this.assets().map((asset: NgDocDemoAsset) => asset.title),\n ]);\n\n /** Prefix of the ids that tie the view tabs to their panels. */\n protected readonly idPrefix: string = `ng-doc-demo-${nextId++}`;\n\n /** Reads the code of the open source file (or the default one) when copy is pressed. */\n protected readonly copyText = (): string => {\n const assets: NgDocDemoAsset[] = this.assets();\n const asset: NgDocDemoAsset | undefined =\n assets.find((item: NgDocDemoAsset) => item.title === this.view()) ?? this.defaultAsset();\n const template: HTMLTemplateElement = this.document.createElement('template');\n\n template.innerHTML = asset?.code ?? '';\n\n return template.content.textContent ?? '';\n };\n\n private readonly viewTabs = viewChildren<ElementRef<HTMLElement>>('viewTab');\n\n /**\n * The source file that opens first: the snippet marked `opened`, then `defaultTab`, then the\n * first file (the order the demo has always used).\n */\n private readonly defaultAsset: Signal<NgDocDemoAsset | undefined> = computed(() => {\n const assets: NgDocDemoAsset[] = this.assets();\n const defaultTab: string | undefined = this.options().defaultTab;\n\n return (\n assets.find((asset: NgDocDemoAsset) => asset.opened) ??\n assets.find((asset: NgDocDemoAsset) => asset.title === defaultTab) ??\n assets[0]\n );\n });\n\n /**\n * Opens a view.\n * @param view - `preview` or the title of a source file.\n */\n openView(view: string): void {\n untracked(() => this.view.set(view));\n }\n\n /**\n * Moves between the view tabs with the keyboard.\n * @param event - The key press on a view tab.\n */\n protected onViewKeydown(event: KeyboardEvent): void {\n const views: string[] = this.views();\n const current: number = Math.max(views.indexOf(this.view()), 0);\n const next: number | undefined = {\n ArrowRight: (current + 1) % views.length,\n ArrowLeft: (current - 1 + views.length) % views.length,\n Home: 0,\n End: views.length - 1,\n }[event.key];\n\n if (next !== undefined) {\n event.preventDefault();\n this.openView(views[next]);\n this.viewTabs()[next]?.nativeElement.focus();\n }\n }\n}\n","@if (options().container ?? true) {\n <div class=\"ng-doc-demo-toolbar\">\n <div class=\"ng-doc-demo-views\" role=\"tablist\" aria-label=\"Demo view\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of views(); track item; let i = $index) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-view\"\n role=\"tab\"\n [id]=\"idPrefix + '-tab-' + i\"\n [attr.aria-selected]=\"view() === item\"\n [ngDocSelectionOrigin]=\"view() === item\"\n [attr.aria-controls]=\"idPrefix + '-panel-' + i\"\n [attr.tabindex]=\"view() === item ? 0 : -1\"\n (click)=\"openView(item)\"\n (keydown)=\"onViewKeydown($event)\"\n #viewTab>\n @if (item === 'preview') {\n Preview\n } @else {\n @if (assets()[i - 1].icon; as icon) {\n <ng-doc-icon [customIcon]=\"icon\"></ng-doc-icon>\n }\n {{ item }}\n }\n </button>\n }\n </div>\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <span class=\"ng-doc-demo-width-readout\">{{ widthReadout() }}</span>\n <div class=\"ng-doc-demo-widths\" role=\"group\" aria-label=\"Preview width\" ngDocSelectionHost>\n <ng-doc-selection [align]=\"null\" />\n @for (item of previewWidths; track item.width) {\n <button\n type=\"button\"\n class=\"ng-doc-demo-width\"\n [attr.aria-pressed]=\"previewWidth() === item.width\"\n [ngDocSelectionOrigin]=\"previewWidth() === item.width\"\n [attr.aria-label]=\"item.label\"\n [ngDocTooltip]=\"item.label\"\n (click)=\"previewWidth.set(item.width)\">\n @switch (item.width) {\n @case ('full') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"2\" y=\"3\" width=\"20\" height=\"14\" rx=\"2\" />\n <path d=\"M8 21h8M12 17v4\" />\n </svg>\n }\n @case ('480') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"4\" y=\"2\" width=\"16\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n @case ('280') {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <rect x=\"6\" y=\"2\" width=\"12\" height=\"20\" rx=\"2\" />\n <path d=\"M12 18h.01\" />\n </svg>\n }\n }\n </button>\n }\n </div>\n }\n\n @if (assets().length) {\n <ng-doc-copy-button class=\"ng-doc-demo-copy\" [text]=\"copyText\" label=\"Copy code\">\n <ng-doc-icon icon=\"copy\"></ng-doc-icon>\n </ng-doc-copy-button>\n }\n\n @if (view() === 'preview' && !options().fullscreenRoute) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen\" [target]=\"stage\" />\n }\n </div>\n\n <div\n class=\"ng-doc-demo-stage\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-0'\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-0'\"\n [attr.data-ng-doc-width]=\"previewWidth()\"\n [hidden]=\"view() !== 'preview'\"\n ngDocFullscreen\n #stage=\"ngDocFullscreen\">\n <div class=\"ng-doc-demo-frame\">\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n </div>\n <!-- The toolbar is not shown in fullscreen, so the stage carries its own way out. -->\n @if (stage.active()) {\n <ng-doc-fullscreen-toggle class=\"ng-doc-demo-fullscreen-exit\" [target]=\"stage\" />\n }\n </div>\n\n @for (asset of assets(); track asset.title; let i = $index) {\n @if (view() === asset.title) {\n <div\n class=\"ng-doc-demo-source\"\n role=\"tabpanel\"\n [id]=\"idPrefix + '-panel-' + (i + 1)\"\n [attr.aria-labelledby]=\"idPrefix + '-tab-' + (i + 1)\">\n <ng-doc-code [html]=\"asset.code\" [copyButton]=\"false\"></ng-doc-code>\n </div>\n }\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"demoTemplate\"></ng-container>\n}\n\n<ng-template #demoTemplate>\n @if (options().fullscreenRoute; as route) {\n <ng-doc-fullscreen-button [route]=\"route\"></ng-doc-fullscreen-button>\n } @else if (demo(); as demo) {\n <ng-container *ngComponentOutlet=\"demo; inputs: options().inputs\"></ng-container>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAoCA;AACA,MAAM,cAAc,GAIf;IACH,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE;IAC9D,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,EAAE;IACjE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,OAAO,EAAE,YAAY,EAAE;CAClE;AAED,IAAI,MAAM,GAAG,CAAC;AAEd;;;;;;;;AAQG;MAyBU,kBAAkB,CAAA;AAxB/B,IAAA,WAAA,GAAA;AAyBmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,aAAa,CAAC;AAChC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ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EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAOZ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAxB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,aAAa,EAAA,eAAA,EAGN,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,iBAAiB;wBACjB,gBAAgB;wBAChB,kBAAkB;wBAClB,wBAAwB;wBACxB,8BAA8B;wBAC9B,wBAAwB;wBACxB,8BAA8B;wBAC9B,kBAAkB;wBAClB,uBAAuB;wBACvB,2BAA2B;wBAC3B,6BAA6B;wBAC7B,qBAAqB;qBACtB,EAAA,IAAA,EACK;AACJ,wBAAA,SAAS,EAAE,uBAAuB;AAClC,wBAAA,8BAA8B,EAAE,6BAA6B;AAC9D,qBAAA,EAAA,QAAA,EAAA,w4IAAA,EAAA,MAAA,EAAA,CAAA,2lKAAA,CAAA,EAAA;iRAyEiE,SAAS,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzJ7E;;AAEG;;;;"}
@@ -1,13 +1,19 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Input, ChangeDetectionStrategy, Component } from '@angular/core';
2
+ import { input, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { RouterLink } from '@angular/router';
4
4
  import { NgDocTextComponent, NgDocIconComponent, NgDocTextRightDirective, NgDocButtonComponent } from '@ng-doc/ui-kit';
5
5
 
6
+ /** A link that opens a demo's fullscreen route in a new tab. */
6
7
  class NgDocFullscreenButtonComponent {
7
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgDocFullscreenButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: NgDocFullscreenButtonComponent, isStandalone: true, selector: "ng-doc-fullscreen-button", inputs: { route: "route" }, ngImport: i0, template: "<a ng-doc-button-text [routerLink]=\"route\" target=\"_blank\">\n\t<span ng-doc-text>\n\t\tOpen demo in a new tab\n\t\t<ng-doc-icon icon=\"external-link\" ngDocTextRight></ng-doc-icon>\n\t</span>\n</a>\n", styles: [":host{display:flex;align-items:center;justify-content:center;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 2)}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: NgDocButtonComponent, selector: "button[ng-doc-button], a[ng-doc-button], button[ng-doc-button-flat], a[ng-doc-button-flat], button[ng-doc-button-text], a[ng-doc-button-text]", inputs: ["size", "color", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8
+ constructor() {
9
+ /** Route of the fullscreen demo. */
10
+ this.route = input.required(/* @ts-ignore */
11
+ ...(ngDevMode ? [{ debugName: "route" }] : /* istanbul ignore next */ []));
12
+ }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.2.1", type: NgDocFullscreenButtonComponent, isStandalone: true, selector: "ng-doc-fullscreen-button", inputs: { route: { classPropertyName: "route", publicName: "route", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<a ng-doc-button-text [routerLink]=\"route()\" target=\"_blank\">\n <span ng-doc-text>\n Open demo in a new tab\n <ng-doc-icon icon=\"external-link\" ngDocTextRight></ng-doc-icon>\n </span>\n</a>\n", styles: [":host{display:flex;align-items:center;justify-content:center;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 2)}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "component", type: NgDocTextComponent, selector: "[ng-doc-text]", inputs: ["size", "color", "align", "absoluteContent"] }, { kind: "component", type: NgDocIconComponent, selector: "ng-doc-icon", inputs: ["icon", "customIcon", "size"] }, { kind: "directive", type: NgDocTextRightDirective, selector: "[ngDocTextRight]" }, { kind: "component", type: NgDocButtonComponent, selector: "button[ng-doc-button], a[ng-doc-button], button[ng-doc-button-flat], a[ng-doc-button-flat], button[ng-doc-button-text], a[ng-doc-button-text]", inputs: ["size", "color", "rounded"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9
15
  }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: NgDocFullscreenButtonComponent, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenButtonComponent, decorators: [{
11
17
  type: Component,
12
18
  args: [{ selector: 'ng-doc-fullscreen-button', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
13
19
  RouterLink,
@@ -15,11 +21,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
15
21
  NgDocIconComponent,
16
22
  NgDocTextRightDirective,
17
23
  NgDocButtonComponent,
18
- ], template: "<a ng-doc-button-text [routerLink]=\"route\" target=\"_blank\">\n\t<span ng-doc-text>\n\t\tOpen demo in a new tab\n\t\t<ng-doc-icon icon=\"external-link\" ngDocTextRight></ng-doc-icon>\n\t</span>\n</a>\n", styles: [":host{display:flex;align-items:center;justify-content:center;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 2)}\n"] }]
19
- }], propDecorators: { route: [{
20
- type: Input,
21
- args: [{ required: true }]
22
- }] } });
24
+ ], template: "<a ng-doc-button-text [routerLink]=\"route()\" target=\"_blank\">\n <span ng-doc-text>\n Open demo in a new tab\n <ng-doc-icon icon=\"external-link\" ngDocTextRight></ng-doc-icon>\n </span>\n</a>\n", styles: [":host{display:flex;align-items:center;justify-content:center;padding:calc(var(--ng-doc-base-gutter) * 2) calc(var(--ng-doc-base-gutter) * 2)}\n"] }]
25
+ }], propDecorators: { route: [{ type: i0.Input, args: [{ isSignal: true, alias: "route", required: true }] }] } });
23
26
 
24
27
  /**
25
28
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"ng-doc-app-components-fullscreen-button.mjs","sources":["../../../../libs/app/components/fullscreen-button/fullscreen-button.component.ts","../../../../libs/app/components/fullscreen-button/fullscreen-button.component.html","../../../../libs/app/components/fullscreen-button/ng-doc-app-components-fullscreen-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport {\n NgDocButtonComponent,\n NgDocIconComponent,\n NgDocTextComponent,\n NgDocTextRightDirective,\n} from '@ng-doc/ui-kit';\n\n@Component({\n selector: 'ng-doc-fullscreen-button',\n templateUrl: './fullscreen-button.component.html',\n styleUrls: ['./fullscreen-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n RouterLink,\n NgDocTextComponent,\n NgDocIconComponent,\n NgDocTextRightDirective,\n NgDocButtonComponent,\n ],\n})\nexport class NgDocFullscreenButtonComponent {\n @Input({ required: true })\n route!: string;\n}\n","<a ng-doc-button-text [routerLink]=\"route\" target=\"_blank\">\n\t<span ng-doc-text>\n\t\tOpen demo in a new t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,CAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGX,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAb1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,eAAA,EAGnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,UAAU;wBACV,kBAAkB;wBAClB,kBAAkB;wBAClB,uBAAuB;wBACvB,oBAAoB;AACrB,qBAAA,EAAA,QAAA,EAAA,6MAAA,EAAA,MAAA,EAAA,CAAA,iJAAA,CAAA,EAAA;;sBAGA,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;AEvB3B;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-doc-app-components-fullscreen-button.mjs","sources":["../../../../libs/app/components/fullscreen-button/fullscreen-button.component.ts","../../../../libs/app/components/fullscreen-button/fullscreen-button.component.html","../../../../libs/app/components/fullscreen-button/ng-doc-app-components-fullscreen-button.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport {\n NgDocButtonComponent,\n NgDocIconComponent,\n NgDocTextComponent,\n NgDocTextRightDirective,\n} from '@ng-doc/ui-kit';\n\n/** A link that opens a demo's fullscreen route in a new tab. */\n@Component({\n selector: 'ng-doc-fullscreen-button',\n templateUrl: './fullscreen-button.component.html',\n styleUrls: ['./fullscreen-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n RouterLink,\n NgDocTextComponent,\n NgDocIconComponent,\n NgDocTextRightDirective,\n NgDocButtonComponent,\n ],\n})\nexport class NgDocFullscreenButtonComponent {\n /** Route of the fullscreen demo. */\n readonly route = input.required<string>();\n}\n","<a ng-doc-button-text [routerLink]=\"route()\" target=\"_blank\">\n <span ng-doc-text>\n Open demo in a new tab\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EAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAClB,uBAAuB,EAAA,QAAA,EAAA,kBAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACvB,oBAAoB,EAAA,QAAA,EAAA,+IAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGX,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAb1C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,eAAA,EAGnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,UAAU;wBACV,kBAAkB;wBAClB,kBAAkB;wBAClB,uBAAuB;wBACvB,oBAAoB;AACrB,qBAAA,EAAA,QAAA,EAAA,+MAAA,EAAA,MAAA,EAAA,CAAA,iJAAA,CAAA,EAAA;;;AErBH;;AAEG;;;;"}
@@ -0,0 +1,79 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NgDocButtonIconComponent, NgDocTooltipDirective } from '@ng-doc/ui-kit';
4
+
5
+ /**
6
+ * An icon button that shows an element fullscreen with the browser Fullscreen API, or leaves
7
+ * fullscreen. Its icon, label and tooltip follow the fullscreen state, and it is hidden where the
8
+ * browser does not support fullscreen and on the server.
9
+ * @example
10
+ * ```html
11
+ * <div ngDocFullscreen #stage="ngDocFullscreen">…</div>
12
+ * <ng-doc-fullscreen-toggle [target]="stage" />
13
+ * ```
14
+ */
15
+ class NgDocFullscreenToggleComponent {
16
+ constructor() {
17
+ /** The element to show fullscreen. */
18
+ this.target = input.required(/* @ts-ignore */
19
+ ...(ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []));
20
+ /** Accessible name and tooltip of the button, which follow the fullscreen state. */
21
+ this.label = computed(() => this.target().active() ? 'Exit fullscreen' : 'Fullscreen', /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
23
+ }
24
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.1", type: NgDocFullscreenToggleComponent, isStandalone: true, selector: "ng-doc-fullscreen-toggle", inputs: { target: { classPropertyName: "target", publicName: "target", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "hidden": "!target().supported()" } }, ngImport: i0, template: `
26
+ @if (target().supported()) {
27
+ <button
28
+ type="button"
29
+ ng-doc-button-icon
30
+ [rounded]="false"
31
+ [attr.aria-label]="label()"
32
+ [ngDocTooltip]="label()"
33
+ (click)="target().toggle()">
34
+ <svg viewBox="0 0 24 24" aria-hidden="true">
35
+ @if (target().active()) {
36
+ <path
37
+ d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" />
38
+ } @else {
39
+ <path
40
+ d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" />
41
+ }
42
+ </svg>
43
+ </button>
44
+ }
45
+ `, isInline: true, styles: [":host{display:inline-flex}:host([hidden]){display:none}svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
46
+ }
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.1", ngImport: i0, type: NgDocFullscreenToggleComponent, decorators: [{
48
+ type: Component,
49
+ args: [{ selector: 'ng-doc-fullscreen-toggle', imports: [NgDocButtonIconComponent, NgDocTooltipDirective], template: `
50
+ @if (target().supported()) {
51
+ <button
52
+ type="button"
53
+ ng-doc-button-icon
54
+ [rounded]="false"
55
+ [attr.aria-label]="label()"
56
+ [ngDocTooltip]="label()"
57
+ (click)="target().toggle()">
58
+ <svg viewBox="0 0 24 24" aria-hidden="true">
59
+ @if (target().active()) {
60
+ <path
61
+ d="M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3" />
62
+ } @else {
63
+ <path
64
+ d="M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3" />
65
+ }
66
+ </svg>
67
+ </button>
68
+ }
69
+ `, changeDetection: ChangeDetectionStrategy.OnPush, host: {
70
+ '[hidden]': '!target().supported()',
71
+ }, styles: [":host{display:inline-flex}:host([hidden]){display:none}svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}\n"] }]
72
+ }], propDecorators: { target: [{ type: i0.Input, args: [{ isSignal: true, alias: "target", required: true }] }] } });
73
+
74
+ /**
75
+ * Generated bundle index. Do not edit.
76
+ */
77
+
78
+ export { NgDocFullscreenToggleComponent };
79
+ //# sourceMappingURL=ng-doc-app-components-fullscreen-toggle.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-doc-app-components-fullscreen-toggle.mjs","sources":["../../../../libs/app/components/fullscreen-toggle/fullscreen-toggle.component.ts","../../../../libs/app/components/fullscreen-toggle/ng-doc-app-components-fullscreen-toggle.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, Signal } from '@angular/core';\nimport {\n NgDocButtonIconComponent,\n NgDocFullscreenDirective,\n NgDocTooltipDirective,\n} from '@ng-doc/ui-kit';\n\n/**\n * An icon button that shows an element fullscreen with the browser Fullscreen API, or leaves\n * fullscreen. Its icon, label and tooltip follow the fullscreen state, and it is hidden where the\n * browser does not support fullscreen and on the server.\n * @example\n * ```html\n * <div ngDocFullscreen #stage=\"ngDocFullscreen\">…</div>\n * <ng-doc-fullscreen-toggle [target]=\"stage\" />\n * ```\n */\n@Component({\n selector: 'ng-doc-fullscreen-toggle',\n imports: [NgDocButtonIconComponent, NgDocTooltipDirective],\n template: `\n @if (target().supported()) {\n <button\n type=\"button\"\n ng-doc-button-icon\n [rounded]=\"false\"\n [attr.aria-label]=\"label()\"\n [ngDocTooltip]=\"label()\"\n (click)=\"target().toggle()\">\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n @if (target().active()) {\n <path\n d=\"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3\" />\n } @else {\n <path\n d=\"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3\" />\n }\n </svg>\n </button>\n }\n `,\n styles: `\n :host {\n display: inline-flex;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n svg {\n width: 16px;\n height: 16px;\n fill: none;\n stroke: currentColor;\n stroke-width: 2;\n stroke-linecap: round;\n stroke-linejoin: round;\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[hidden]': '!target().supported()',\n },\n})\nexport class NgDocFullscreenToggleComponent {\n /** The element to show fullscreen. */\n readonly target = input.required<NgDocFullscreenDirective>();\n\n /** Accessible name and tooltip of the button, which follow the fullscreen state. */\n protected readonly label: Signal<string> = computed(() =>\n this.target().active() ? 'Exit fullscreen' : 'Fullscreen',\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAOA;;;;;;;;;AASG;MAiDU,8BAA8B,CAAA;AAhD3C,IAAA,WAAA,GAAA;;QAkDW,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,QAAQ;mFAA4B;;QAGzC,IAAA,CAAA,KAAK,GAAmB,QAAQ,CAAC,MAClD,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,GAAG,iBAAiB,GAAG,YAAY;kFAC1D;AACF,IAAA;8GARY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAA9B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,MAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAA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