@ng-prism/core 22.5.0 → 22.7.0-beta.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 (437) hide show
  1. package/README.md +13 -9
  2. package/dist/app/canvas/canvas-bg.styles.d.ts +1 -1
  3. package/dist/app/canvas/canvas-bg.styles.d.ts.map +1 -1
  4. package/dist/app/canvas/canvas-bg.styles.js +1 -1
  5. package/dist/app/canvas/canvas-overlay-tokens.d.ts +12 -0
  6. package/dist/app/canvas/canvas-overlay-tokens.d.ts.map +1 -0
  7. package/dist/app/canvas/canvas-overlay-tokens.js +52 -0
  8. package/dist/app/canvas/prism-canvas-bg-pill.component.js +2 -2
  9. package/dist/app/canvas/prism-canvas-pin-row.component.js +2 -2
  10. package/dist/app/canvas/prism-canvas-rulers.component.d.ts +2 -0
  11. package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -1
  12. package/dist/app/canvas/prism-canvas-rulers.component.js +17 -12
  13. package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +25 -3
  14. package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
  15. package/dist/app/canvas/prism-canvas-toolbar.component.js +154 -89
  16. package/dist/app/canvas/prism-template-popover.component.d.ts.map +1 -1
  17. package/dist/app/canvas/prism-template-popover.component.js +16 -7
  18. package/dist/app/canvas/state-chips.d.ts +50 -0
  19. package/dist/app/canvas/state-chips.d.ts.map +1 -0
  20. package/dist/app/canvas/state-chips.js +40 -0
  21. package/dist/app/component-head/head-metrics.d.ts +35 -19
  22. package/dist/app/component-head/head-metrics.d.ts.map +1 -1
  23. package/dist/app/component-head/head-metrics.js +57 -27
  24. package/dist/app/component-head/pipe-facts.d.ts +9 -0
  25. package/dist/app/component-head/pipe-facts.d.ts.map +1 -0
  26. package/dist/app/component-head/pipe-facts.js +15 -0
  27. package/dist/app/component-head/prism-component-head.component.d.ts +20 -22
  28. package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -1
  29. package/dist/app/component-head/prism-component-head.component.js +85 -96
  30. package/dist/app/component-head/prism-head-gauge.component.d.ts +8 -12
  31. package/dist/app/component-head/prism-head-gauge.component.d.ts.map +1 -1
  32. package/dist/app/component-head/prism-head-gauge.component.js +51 -67
  33. package/dist/app/component-head/prism-head-info.component.d.ts +14 -2
  34. package/dist/app/component-head/prism-head-info.component.d.ts.map +1 -1
  35. package/dist/app/component-head/prism-head-info.component.js +84 -20
  36. package/dist/app/component-head/prism-stat.component.d.ts +4 -5
  37. package/dist/app/component-head/prism-stat.component.d.ts.map +1 -1
  38. package/dist/app/component-head/prism-stat.component.js +16 -12
  39. package/dist/app/component-head/service-facts.d.ts +8 -0
  40. package/dist/app/component-head/service-facts.d.ts.map +1 -0
  41. package/dist/app/component-head/service-facts.js +11 -0
  42. package/dist/app/controls/boolean-control.component.js +2 -2
  43. package/dist/app/controls/json-control.component.js +2 -2
  44. package/dist/app/controls/union-control.component.js +4 -3
  45. package/dist/app/directives/resize-value.d.ts +1 -1
  46. package/dist/app/directives/resize-value.js +1 -1
  47. package/dist/app/discovery-manifest.d.ts +2 -2
  48. package/dist/app/discovery-manifest.d.ts.map +1 -1
  49. package/dist/app/discovery-manifest.js +15 -3
  50. package/dist/app/header/header-brand.d.ts +25 -0
  51. package/dist/app/header/header-brand.d.ts.map +1 -0
  52. package/dist/app/header/header-brand.js +10 -0
  53. package/dist/app/header/prism-header.component.d.ts +2 -2
  54. package/dist/app/header/prism-header.component.d.ts.map +1 -1
  55. package/dist/app/header/prism-header.component.js +73 -57
  56. package/dist/app/icons/icon-registry.d.ts.map +1 -1
  57. package/dist/app/icons/icon-registry.js +4 -1
  58. package/dist/app/index.d.ts +12 -0
  59. package/dist/app/index.d.ts.map +1 -1
  60. package/dist/app/index.js +12 -1
  61. package/dist/app/layout-menu/prism-layout-menu.component.d.ts +3 -0
  62. package/dist/app/layout-menu/prism-layout-menu.component.d.ts.map +1 -1
  63. package/dist/app/layout-menu/prism-layout-menu.component.js +72 -58
  64. package/dist/app/overview/open-in-playground.d.ts +19 -0
  65. package/dist/app/overview/open-in-playground.d.ts.map +1 -0
  66. package/dist/app/overview/open-in-playground.js +25 -0
  67. package/dist/app/overview/overview-matrix.d.ts +85 -0
  68. package/dist/app/overview/overview-matrix.d.ts.map +1 -0
  69. package/dist/app/overview/overview-matrix.js +98 -0
  70. package/dist/app/overview/overview-visibility.d.ts +10 -2
  71. package/dist/app/overview/overview-visibility.d.ts.map +1 -1
  72. package/dist/app/overview/overview-visibility.js +14 -3
  73. package/dist/app/overview/prism-overview-cell.component.d.ts +27 -2
  74. package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
  75. package/dist/app/overview/prism-overview-cell.component.js +145 -28
  76. package/dist/app/overview/prism-overview-matrix.component.d.ts +29 -0
  77. package/dist/app/overview/prism-overview-matrix.component.d.ts.map +1 -0
  78. package/dist/app/overview/prism-overview-matrix.component.js +155 -0
  79. package/dist/app/overview/prism-overview.component.d.ts +4 -0
  80. package/dist/app/overview/prism-overview.component.d.ts.map +1 -1
  81. package/dist/app/overview/prism-overview.component.js +37 -14
  82. package/dist/app/page-renderer/prism-page-renderer.component.js +2 -2
  83. package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
  84. package/dist/app/panels/a11y/a11y-core.plugin.js +0 -1
  85. package/dist/app/panels/a11y/a11y-header-badge.component.d.ts +1 -4
  86. package/dist/app/panels/a11y/a11y-header-badge.component.d.ts.map +1 -1
  87. package/dist/app/panels/a11y/a11y-header-badge.component.js +8 -19
  88. package/dist/app/panels/a11y/a11y-keyboard-overlay.component.js +2 -2
  89. package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts +1 -0
  90. package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts.map +1 -1
  91. package/dist/app/panels/a11y/a11y-overlay-host.component.js +4 -3
  92. package/dist/app/panels/a11y/a11y-panel.component.d.ts +4 -1
  93. package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
  94. package/dist/app/panels/a11y/a11y-panel.component.js +32 -54
  95. package/dist/app/panels/a11y/a11y-score.component.d.ts +8 -3
  96. package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
  97. package/dist/app/panels/a11y/a11y-score.component.js +19 -35
  98. package/dist/app/panels/a11y/a11y-sr-overlay.component.js +2 -2
  99. package/dist/app/panels/a11y/a11y-sr.component.js +2 -2
  100. package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -1
  101. package/dist/app/panels/a11y/a11y-summary.js +8 -1
  102. package/dist/app/panels/a11y/a11y-tree.component.js +2 -2
  103. package/dist/app/panels/a11y/a11y-violations.component.d.ts +23 -2
  104. package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
  105. package/dist/app/panels/a11y/a11y-violations.component.js +104 -89
  106. package/dist/app/panels/a11y/severity.d.ts +9 -0
  107. package/dist/app/panels/a11y/severity.d.ts.map +1 -0
  108. package/dist/app/panels/a11y/severity.js +12 -0
  109. package/dist/app/panels/controls/controls-plugin.d.ts.map +1 -1
  110. package/dist/app/panels/controls/controls-plugin.js +1 -2
  111. package/dist/app/panels/controls/non-editable-input-types.d.ts +9 -1
  112. package/dist/app/panels/controls/non-editable-input-types.d.ts.map +1 -1
  113. package/dist/app/panels/controls/non-editable-input-types.js +18 -0
  114. package/dist/app/panels/controls/prism-controls-panel.component.d.ts +2 -1
  115. package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
  116. package/dist/app/panels/controls/prism-controls-panel.component.js +77 -59
  117. package/dist/app/panels/events/events-plugin.d.ts.map +1 -1
  118. package/dist/app/panels/events/events-plugin.js +1 -2
  119. package/dist/app/panels/events/prism-events-panel.component.d.ts +2 -0
  120. package/dist/app/panels/events/prism-events-panel.component.d.ts.map +1 -1
  121. package/dist/app/panels/events/prism-events-panel.component.js +20 -7
  122. package/dist/app/panels/events/prism-json-node.utils.d.ts +6 -0
  123. package/dist/app/panels/events/prism-json-node.utils.d.ts.map +1 -1
  124. package/dist/app/panels/events/prism-json-node.utils.js +8 -0
  125. package/dist/app/panels/panel-host/addon-panels.d.ts +11 -0
  126. package/dist/app/panels/panel-host/addon-panels.d.ts.map +1 -0
  127. package/dist/app/panels/panel-host/addon-panels.js +12 -0
  128. package/dist/app/panels/panel-host/panel-badge.d.ts +22 -0
  129. package/dist/app/panels/panel-host/panel-badge.d.ts.map +1 -1
  130. package/dist/app/panels/panel-host/panel-badge.js +56 -11
  131. package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +4 -1
  132. package/dist/app/panels/panel-host/prism-panel-host.component.d.ts.map +1 -1
  133. package/dist/app/panels/panel-host/prism-panel-host.component.js +36 -70
  134. package/dist/app/pseudo/pseudo-state-marker.d.ts +32 -10
  135. package/dist/app/pseudo/pseudo-state-marker.d.ts.map +1 -1
  136. package/dist/app/pseudo/pseudo-state-marker.js +83 -67
  137. package/dist/app/pseudo/pseudo-targets.d.ts +11 -0
  138. package/dist/app/pseudo/pseudo-targets.d.ts.map +1 -0
  139. package/dist/app/pseudo/pseudo-targets.js +46 -0
  140. package/dist/app/pseudo/state-fit.d.ts +28 -0
  141. package/dist/app/pseudo/state-fit.d.ts.map +1 -0
  142. package/dist/app/pseudo/state-fit.js +97 -0
  143. package/dist/app/renderer/composition.d.ts +20 -0
  144. package/dist/app/renderer/composition.d.ts.map +1 -0
  145. package/dist/app/renderer/composition.js +26 -0
  146. package/dist/app/renderer/input-bindings.d.ts +28 -0
  147. package/dist/app/renderer/input-bindings.d.ts.map +1 -0
  148. package/dist/app/renderer/input-bindings.js +42 -0
  149. package/dist/app/renderer/known-inputs.d.ts +8 -1
  150. package/dist/app/renderer/known-inputs.d.ts.map +1 -1
  151. package/dist/app/renderer/known-inputs.js +13 -5
  152. package/dist/app/renderer/prism-renderer.component.d.ts +18 -4
  153. package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
  154. package/dist/app/renderer/prism-renderer.component.js +78 -44
  155. package/dist/app/renderer/projectable-content.d.ts +8 -1
  156. package/dist/app/renderer/projectable-content.d.ts.map +1 -1
  157. package/dist/app/renderer/projectable-content.js +40 -29
  158. package/dist/app/renderer/rendered-key.d.ts +20 -6
  159. package/dist/app/renderer/rendered-key.d.ts.map +1 -1
  160. package/dist/app/renderer/rendered-key.js +25 -8
  161. package/dist/app/renderer/snippet-generator.d.ts +14 -2
  162. package/dist/app/renderer/snippet-generator.d.ts.map +1 -1
  163. package/dist/app/renderer/snippet-generator.js +138 -81
  164. package/dist/app/services/navigation-item.d.ts +10 -0
  165. package/dist/app/services/navigation-item.d.ts.map +1 -0
  166. package/dist/app/services/navigation-item.js +20 -0
  167. package/dist/app/services/navigation-item.types.d.ts +8 -0
  168. package/dist/app/services/navigation-item.types.d.ts.map +1 -1
  169. package/dist/app/services/prism-layout.service.d.ts +12 -0
  170. package/dist/app/services/prism-layout.service.d.ts.map +1 -1
  171. package/dist/app/services/prism-layout.service.js +17 -7
  172. package/dist/app/services/prism-manifest.service.d.ts +4 -0
  173. package/dist/app/services/prism-manifest.service.d.ts.map +1 -1
  174. package/dist/app/services/prism-manifest.service.js +4 -0
  175. package/dist/app/services/prism-navigation.service.d.ts +12 -0
  176. package/dist/app/services/prism-navigation.service.d.ts.map +1 -1
  177. package/dist/app/services/prism-navigation.service.js +85 -19
  178. package/dist/app/services/prism-panel.service.d.ts +7 -3
  179. package/dist/app/services/prism-panel.service.d.ts.map +1 -1
  180. package/dist/app/services/prism-panel.service.js +13 -4
  181. package/dist/app/services/prism-pseudo-state.service.d.ts +59 -14
  182. package/dist/app/services/prism-pseudo-state.service.d.ts.map +1 -1
  183. package/dist/app/services/prism-pseudo-state.service.js +86 -29
  184. package/dist/app/services/prism-renderer.service.d.ts +23 -0
  185. package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
  186. package/dist/app/services/prism-renderer.service.js +77 -8
  187. package/dist/app/services/prism-search.service.d.ts +4 -0
  188. package/dist/app/services/prism-search.service.d.ts.map +1 -1
  189. package/dist/app/services/prism-search.service.js +29 -6
  190. package/dist/app/services/prism-theme.service.d.ts +11 -3
  191. package/dist/app/services/prism-theme.service.d.ts.map +1 -1
  192. package/dist/app/services/prism-theme.service.js +27 -19
  193. package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
  194. package/dist/app/services/prism-url-state.service.js +81 -12
  195. package/dist/app/shared/badge.types.d.ts +7 -0
  196. package/dist/app/shared/badge.types.d.ts.map +1 -0
  197. package/dist/app/shared/badge.types.js +9 -0
  198. package/dist/app/shared/brand-mark.d.ts +35 -0
  199. package/dist/app/shared/brand-mark.d.ts.map +1 -0
  200. package/dist/app/shared/brand-mark.js +52 -0
  201. package/dist/app/shared/metric-bar.d.ts +6 -0
  202. package/dist/app/shared/metric-bar.d.ts.map +1 -0
  203. package/dist/app/shared/metric-bar.js +7 -0
  204. package/dist/app/shared/prism-badge.component.d.ts +21 -0
  205. package/dist/app/shared/prism-badge.component.d.ts.map +1 -0
  206. package/dist/app/shared/prism-badge.component.js +68 -0
  207. package/dist/app/shared/prism-button.component.d.ts +12 -0
  208. package/dist/app/shared/prism-button.component.d.ts.map +1 -0
  209. package/dist/app/shared/prism-button.component.js +28 -0
  210. package/dist/app/shared/prism-icon-button.component.d.ts +17 -0
  211. package/dist/app/shared/prism-icon-button.component.d.ts.map +1 -0
  212. package/dist/app/shared/prism-icon-button.component.js +37 -0
  213. package/dist/app/shared/prism-list-row.component.d.ts +17 -0
  214. package/dist/app/shared/prism-list-row.component.d.ts.map +1 -0
  215. package/dist/app/shared/prism-list-row.component.js +57 -0
  216. package/dist/app/shared/prism-logo.component.d.ts +24 -0
  217. package/dist/app/shared/prism-logo.component.d.ts.map +1 -0
  218. package/dist/app/shared/prism-logo.component.js +77 -0
  219. package/dist/app/shared/prism-metric-badge.component.d.ts +9 -4
  220. package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -1
  221. package/dist/app/shared/prism-metric-badge.component.js +33 -12
  222. package/dist/app/shared/prism-metric-card.component.d.ts +30 -0
  223. package/dist/app/shared/prism-metric-card.component.d.ts.map +1 -0
  224. package/dist/app/shared/prism-metric-card.component.js +111 -0
  225. package/dist/app/shared/prism-panel-toolbar.component.d.ts +13 -0
  226. package/dist/app/shared/prism-panel-toolbar.component.d.ts.map +1 -0
  227. package/dist/app/shared/prism-panel-toolbar.component.js +28 -0
  228. package/dist/app/shared/prism-segmented.component.d.ts +25 -0
  229. package/dist/app/shared/prism-segmented.component.d.ts.map +1 -0
  230. package/dist/app/shared/prism-segmented.component.js +77 -0
  231. package/dist/app/shared/prism-tabs.component.d.ts +44 -0
  232. package/dist/app/shared/prism-tabs.component.d.ts.map +1 -0
  233. package/dist/app/shared/prism-tabs.component.js +134 -0
  234. package/dist/app/shared/roving-focus.d.ts +13 -0
  235. package/dist/app/shared/roving-focus.d.ts.map +1 -0
  236. package/dist/app/shared/roving-focus.js +34 -0
  237. package/dist/app/shell/prism-shell.component.d.ts +13 -0
  238. package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
  239. package/dist/app/shell/prism-shell.component.js +57 -28
  240. package/dist/app/shell/should-select-first.d.ts +17 -0
  241. package/dist/app/shell/should-select-first.d.ts.map +1 -0
  242. package/dist/app/shell/should-select-first.js +13 -0
  243. package/dist/app/sidebar/navigation-decorations.d.ts +23 -1
  244. package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -1
  245. package/dist/app/sidebar/navigation-decorations.js +33 -2
  246. package/dist/app/sidebar/prism-sidebar.component.d.ts +5 -15
  247. package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
  248. package/dist/app/sidebar/prism-sidebar.component.js +89 -77
  249. package/dist/app/theme/deprecated-tokens.d.ts +15 -0
  250. package/dist/app/theme/deprecated-tokens.d.ts.map +1 -0
  251. package/dist/app/theme/deprecated-tokens.js +22 -0
  252. package/dist/app/theme/favicon.d.ts +3 -0
  253. package/dist/app/theme/favicon.d.ts.map +1 -0
  254. package/dist/app/theme/favicon.js +3 -0
  255. package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
  256. package/dist/app/theme/prism-default-theme.js +122 -66
  257. package/dist/app/theme/resolve-theme-tokens.d.ts +29 -0
  258. package/dist/app/theme/resolve-theme-tokens.d.ts.map +1 -0
  259. package/dist/app/theme/resolve-theme-tokens.js +43 -0
  260. package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts +4 -7
  261. package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -1
  262. package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +31 -69
  263. package/dist/app/view-tab-bar/next-view-id.d.ts +7 -1
  264. package/dist/app/view-tab-bar/next-view-id.d.ts.map +1 -1
  265. package/dist/app/view-tab-bar/next-view-id.js +9 -1
  266. package/dist/app/view-tab-bar/panel-inputs.d.ts +28 -0
  267. package/dist/app/view-tab-bar/panel-inputs.d.ts.map +1 -0
  268. package/dist/app/view-tab-bar/panel-inputs.js +41 -0
  269. package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts +2 -3
  270. package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts.map +1 -1
  271. package/dist/app/view-tab-bar/prism-view-panel-host.component.js +9 -9
  272. package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts +6 -0
  273. package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts.map +1 -1
  274. package/dist/app/view-tab-bar/prism-view-tab-bar.component.js +22 -29
  275. package/dist/builder/config-loader/deprecated-options.d.ts +9 -0
  276. package/dist/builder/config-loader/deprecated-options.d.ts.map +1 -0
  277. package/dist/builder/config-loader/deprecated-options.js +34 -0
  278. package/dist/builder/manifest/composition-wrapper.generator.d.ts +14 -0
  279. package/dist/builder/manifest/composition-wrapper.generator.d.ts.map +1 -0
  280. package/dist/builder/manifest/composition-wrapper.generator.js +66 -0
  281. package/dist/builder/manifest/host-parser.d.ts +2 -0
  282. package/dist/builder/manifest/host-parser.d.ts.map +1 -1
  283. package/dist/builder/manifest/host-parser.js +9 -4
  284. package/dist/builder/manifest/manifest-imports.d.ts +34 -0
  285. package/dist/builder/manifest/manifest-imports.d.ts.map +1 -0
  286. package/dist/builder/manifest/manifest-imports.js +91 -0
  287. package/dist/builder/manifest/runtime-manifest.generator.d.ts +13 -0
  288. package/dist/builder/manifest/runtime-manifest.generator.d.ts.map +1 -1
  289. package/dist/builder/manifest/runtime-manifest.generator.js +137 -65
  290. package/dist/builder/manifest/selector-element.d.ts +16 -0
  291. package/dist/builder/manifest/selector-element.d.ts.map +1 -0
  292. package/dist/builder/manifest/selector-element.js +46 -0
  293. package/dist/builder/manifest/template-literal.d.ts +3 -0
  294. package/dist/builder/manifest/template-literal.d.ts.map +1 -0
  295. package/dist/builder/manifest/template-literal.js +4 -0
  296. package/dist/builder/plugin-runner/plugin-runner.d.ts.map +1 -1
  297. package/dist/builder/plugin-runner/plugin-runner.js +29 -26
  298. package/dist/builder/scanner/api/angular-decorators.d.ts +84 -0
  299. package/dist/builder/scanner/api/angular-decorators.d.ts.map +1 -0
  300. package/dist/builder/scanner/api/angular-decorators.js +157 -0
  301. package/dist/builder/scanner/api/component-api.extractor.d.ts +13 -0
  302. package/dist/builder/scanner/api/component-api.extractor.d.ts.map +1 -0
  303. package/dist/builder/scanner/api/component-api.extractor.js +104 -0
  304. package/dist/builder/scanner/api/doc-tags.d.ts +13 -0
  305. package/dist/builder/scanner/api/doc-tags.d.ts.map +1 -0
  306. package/dist/builder/scanner/api/doc-tags.js +101 -0
  307. package/dist/builder/scanner/api/export-index.d.ts +18 -0
  308. package/dist/builder/scanner/api/export-index.d.ts.map +1 -0
  309. package/dist/builder/scanner/api/export-index.js +22 -0
  310. package/dist/builder/scanner/api/member.extractor.d.ts +90 -0
  311. package/dist/builder/scanner/api/member.extractor.d.ts.map +1 -0
  312. package/dist/builder/scanner/api/member.extractor.js +270 -0
  313. package/dist/builder/scanner/api/pipe-api.extractor.d.ts +12 -0
  314. package/dist/builder/scanner/api/pipe-api.extractor.d.ts.map +1 -0
  315. package/dist/builder/scanner/api/pipe-api.extractor.js +52 -0
  316. package/dist/builder/scanner/api/service-api.extractor.d.ts +14 -0
  317. package/dist/builder/scanner/api/service-api.extractor.d.ts.map +1 -0
  318. package/dist/builder/scanner/api/service-api.extractor.js +119 -0
  319. package/dist/builder/scanner/api/setup.reader.d.ts +26 -0
  320. package/dist/builder/scanner/api/setup.reader.d.ts.map +1 -0
  321. package/dist/builder/scanner/api/setup.reader.js +89 -0
  322. package/dist/builder/scanner/api/type-collector.d.ts +24 -0
  323. package/dist/builder/scanner/api/type-collector.d.ts.map +1 -0
  324. package/dist/builder/scanner/api/type-collector.js +211 -0
  325. package/dist/builder/scanner/ast-utils.d.ts +8 -0
  326. package/dist/builder/scanner/ast-utils.d.ts.map +1 -1
  327. package/dist/builder/scanner/ast-utils.js +37 -1
  328. package/dist/builder/scanner/class-hierarchy.d.ts +5 -3
  329. package/dist/builder/scanner/class-hierarchy.d.ts.map +1 -1
  330. package/dist/builder/scanner/class-hierarchy.js +12 -6
  331. package/dist/builder/scanner/component.scanner.d.ts +60 -6
  332. package/dist/builder/scanner/component.scanner.d.ts.map +1 -1
  333. package/dist/builder/scanner/component.scanner.js +229 -58
  334. package/dist/builder/scanner/composition/compose-template.d.ts +36 -0
  335. package/dist/builder/scanner/composition/compose-template.d.ts.map +1 -0
  336. package/dist/builder/scanner/composition/compose-template.js +187 -0
  337. package/dist/builder/scanner/composition/declarables.d.ts +54 -0
  338. package/dist/builder/scanner/composition/declarables.d.ts.map +1 -0
  339. package/dist/builder/scanner/composition/declarables.js +182 -0
  340. package/dist/builder/scanner/composition/match-declarables.d.ts +43 -0
  341. package/dist/builder/scanner/composition/match-declarables.d.ts.map +1 -0
  342. package/dist/builder/scanner/composition/match-declarables.js +131 -0
  343. package/dist/builder/scanner/composition/read-composition.d.ts +77 -0
  344. package/dist/builder/scanner/composition/read-composition.d.ts.map +1 -0
  345. package/dist/builder/scanner/composition/read-composition.js +302 -0
  346. package/dist/builder/scanner/composition/template-elements.d.ts +12 -0
  347. package/dist/builder/scanner/composition/template-elements.d.ts.map +1 -0
  348. package/dist/builder/scanner/composition/template-elements.js +41 -0
  349. package/dist/builder/scanner/entry-point-discovery.d.ts +5 -0
  350. package/dist/builder/scanner/entry-point-discovery.d.ts.map +1 -1
  351. package/dist/builder/scanner/entry-point-discovery.js +14 -0
  352. package/dist/builder/scanner/entry-point.scanner.d.ts +3 -1
  353. package/dist/builder/scanner/entry-point.scanner.d.ts.map +1 -1
  354. package/dist/builder/scanner/entry-point.scanner.js +7 -6
  355. package/dist/builder/scanner/index.d.ts +4 -0
  356. package/dist/builder/scanner/index.d.ts.map +1 -1
  357. package/dist/builder/scanner/index.js +2 -0
  358. package/dist/builder/scanner/input.extractor.d.ts +31 -2
  359. package/dist/builder/scanner/input.extractor.d.ts.map +1 -1
  360. package/dist/builder/scanner/input.extractor.js +73 -17
  361. package/dist/builder/scanner/pipe.scanner.d.ts +29 -0
  362. package/dist/builder/scanner/pipe.scanner.d.ts.map +1 -0
  363. package/dist/builder/scanner/pipe.scanner.js +65 -0
  364. package/dist/builder/scanner/pseudo-states.d.ts +1 -0
  365. package/dist/builder/scanner/pseudo-states.d.ts.map +1 -1
  366. package/dist/builder/scanner/pseudo-states.js +1 -1
  367. package/dist/builder/scanner/scanner.d.ts +27 -3
  368. package/dist/builder/scanner/scanner.d.ts.map +1 -1
  369. package/dist/builder/scanner/scanner.js +68 -24
  370. package/dist/builder/scanner/service/angular-decorators.d.ts +80 -0
  371. package/dist/builder/scanner/service/angular-decorators.d.ts.map +1 -0
  372. package/dist/builder/scanner/service/angular-decorators.js +154 -0
  373. package/dist/builder/scanner/service/doc-tags.d.ts +13 -0
  374. package/dist/builder/scanner/service/doc-tags.d.ts.map +1 -0
  375. package/dist/builder/scanner/service/doc-tags.js +97 -0
  376. package/dist/builder/scanner/service/export-index.d.ts +18 -0
  377. package/dist/builder/scanner/service/export-index.d.ts.map +1 -0
  378. package/dist/builder/scanner/service/export-index.js +22 -0
  379. package/dist/builder/scanner/service/member.extractor.d.ts +65 -0
  380. package/dist/builder/scanner/service/member.extractor.d.ts.map +1 -0
  381. package/dist/builder/scanner/service/member.extractor.js +216 -0
  382. package/dist/builder/scanner/service/pipe-api.extractor.d.ts +12 -0
  383. package/dist/builder/scanner/service/pipe-api.extractor.d.ts.map +1 -0
  384. package/dist/builder/scanner/service/pipe-api.extractor.js +72 -0
  385. package/dist/builder/scanner/service/service-api.extractor.d.ts +14 -0
  386. package/dist/builder/scanner/service/service-api.extractor.d.ts.map +1 -0
  387. package/dist/builder/scanner/service/service-api.extractor.js +119 -0
  388. package/dist/builder/scanner/service/setup.reader.d.ts +26 -0
  389. package/dist/builder/scanner/service/setup.reader.d.ts.map +1 -0
  390. package/dist/builder/scanner/service/setup.reader.js +89 -0
  391. package/dist/builder/scanner/service/type-collector.d.ts +23 -0
  392. package/dist/builder/scanner/service/type-collector.d.ts.map +1 -0
  393. package/dist/builder/scanner/service/type-collector.js +210 -0
  394. package/dist/builder/scanner/service.scanner.d.ts +26 -0
  395. package/dist/builder/scanner/service.scanner.d.ts.map +1 -0
  396. package/dist/builder/scanner/service.scanner.js +61 -0
  397. package/dist/builder/scanner/showcase-diagnostics.d.ts +60 -1
  398. package/dist/builder/scanner/showcase-diagnostics.d.ts.map +1 -1
  399. package/dist/builder/scanner/showcase-diagnostics.js +123 -10
  400. package/dist/builder/scanner/showcase-states.d.ts +17 -0
  401. package/dist/builder/scanner/showcase-states.d.ts.map +1 -0
  402. package/dist/builder/scanner/showcase-states.js +58 -0
  403. package/dist/builder/scanner/source-file-cache.d.ts +26 -0
  404. package/dist/builder/scanner/source-file-cache.d.ts.map +1 -0
  405. package/dist/builder/scanner/source-file-cache.js +60 -0
  406. package/dist/builder/shared/prism-pipeline.d.ts +6 -0
  407. package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
  408. package/dist/builder/shared/prism-pipeline.js +71 -18
  409. package/dist/decorator/index.d.ts +1 -1
  410. package/dist/decorator/index.d.ts.map +1 -1
  411. package/dist/decorator/showcase.types.d.ts +102 -9
  412. package/dist/decorator/showcase.types.d.ts.map +1 -1
  413. package/dist/plugin/index.d.ts +6 -1
  414. package/dist/plugin/index.d.ts.map +1 -1
  415. package/dist/plugin/index.js +4 -0
  416. package/dist/plugin/pipe.types.d.ts +36 -0
  417. package/dist/plugin/pipe.types.d.ts.map +1 -0
  418. package/dist/plugin/pipe.types.js +1 -0
  419. package/dist/plugin/plugin.types.d.ts +184 -8
  420. package/dist/plugin/plugin.types.d.ts.map +1 -1
  421. package/dist/plugin/service.types.d.ts +124 -0
  422. package/dist/plugin/service.types.d.ts.map +1 -0
  423. package/dist/plugin/service.types.js +1 -0
  424. package/dist/plugin/status.d.ts +27 -0
  425. package/dist/plugin/status.d.ts.map +1 -0
  426. package/dist/plugin/status.js +26 -0
  427. package/dist/shared/composition.d.ts +30 -0
  428. package/dist/shared/composition.d.ts.map +1 -0
  429. package/dist/shared/composition.js +29 -0
  430. package/dist/shared/pseudo-state.type.d.ts +2 -1
  431. package/dist/shared/pseudo-state.type.d.ts.map +1 -1
  432. package/dist/shared/void-elements.d.ts +3 -0
  433. package/dist/shared/void-elements.d.ts.map +1 -0
  434. package/dist/shared/void-elements.js +2 -0
  435. package/package.json +1 -1
  436. package/src/builder/build/schema.json +6 -6
  437. package/src/builder/serve/schema.json +6 -6
@@ -0,0 +1,40 @@
1
+ /**
2
+ * One chip per state in declaration order. `fits` is parallel to `states`; a
3
+ * state without an entry yet (nothing evaluated) counts as fitting.
4
+ *
5
+ * A chip that does not fit says why, even while it is the active one: it is
6
+ * selected, but what the title would otherwise promise ("is shown") is not true.
7
+ */
8
+ export function buildStateChips(states, activeIndex, fits) {
9
+ return states.map((state, index) => {
10
+ const fit = fits[index] ?? { fits: true };
11
+ const active = index === activeIndex;
12
+ let title = `Show ${state.name} on this variant`;
13
+ if (!fit.fits)
14
+ title = `${state.name} does not fit this variant: ${fit.reason}`;
15
+ else if (active)
16
+ title = `${state.name} is shown; click to turn it off`;
17
+ return { index, name: state.name, active, fits: fit.fits, title };
18
+ });
19
+ }
20
+ /**
21
+ * Whether each of `states` fits what is on the canvas, in the order of `states`.
22
+ *
23
+ * The active state takes the fit the canvas measured, so a chip and the canvas
24
+ * cannot disagree; the others are evaluated against the same element. Without an
25
+ * element there is nothing to measure and everything counts as fitting, as it
26
+ * does on the canvas before the first render.
27
+ */
28
+ export function chipFits(states, { element, optedOut, activeIndex, canvasFit }, evaluate) {
29
+ if (optedOut)
30
+ return states.map(() => ({ fits: false, reason: 'states: false' }));
31
+ if (element === null)
32
+ return states.map(() => ({ fits: true }));
33
+ return states.map((state, index) => (index === activeIndex && canvasFit !== null ? canvasFit : evaluate(element, state.pseudo)));
34
+ }
35
+ /** Tooltip of a `:hover`… toggle: where its default comes from, or what switching it on does. */
36
+ export function toggleTitle(state, source) {
37
+ if (source === null)
38
+ return `Force :${state} on the whole component`;
39
+ return source.by === 'variant' ? `:${state} is forced by this variant` : `:${state} is forced by the state "${source.name}"`;
40
+ }
@@ -1,3 +1,5 @@
1
+ import type { StatusTone } from '../../plugin/status.js';
2
+ import type { A11yScoreResult, A11yThresholds } from '../panels/a11y/a11y.types.js';
1
3
  /**
2
4
  * How a metric compares to its threshold.
3
5
  *
@@ -12,30 +14,44 @@ export interface HeadMetric {
12
14
  id: string;
13
15
  label: string;
14
16
  value: string;
17
+ /** What the value is graded against, for the readout's Threshold column. */
18
+ threshold: string;
15
19
  variant: MetricVariant;
16
20
  }
17
- /** What the gauge chip renders, derived from the full metric list. */
18
- export interface GaugeSummary {
19
- /** Metrics that actually carry data. `none` does not count. */
20
- measured: number;
21
- /** The worst-ranked deviating metric, or null when nothing deviates. */
22
- worst: HeadMetric | null;
23
- /** How many further metrics deviate besides `worst`. */
24
- others: number;
25
- /** Colour role for the chip. */
26
- variant: 'ok' | 'warn' | 'danger';
21
+ /** What the head knows about the component it introduces. */
22
+ export interface HeadMetricInput {
23
+ /** The component's `showcaseConfig.meta`, where plugins leave their verdicts. */
24
+ meta: Record<string, unknown> | null;
25
+ /** The live audit of the current variant, or `null` before it ran. */
26
+ a11y: A11yScoreResult | null;
27
+ a11yThresholds: A11yThresholds;
27
28
  }
28
29
  /**
29
- * Folds the head's metrics into what one chip can say.
30
+ * The head's metrics, in source order: coverage, the a11y score, the visual
31
+ * regression headline.
30
32
  *
31
- * A pure function instead of a computed inside the component:
32
- * components using signal inputs cannot be rendered through TestBed in this
33
- * repo's Jest setup, so any logic left in a template is logic that never gets
34
- * a test. This mirrors `decorateItem` in the sidebar, which resolves the same
35
- * kind of question for navigation marks.
33
+ * It reads verdicts rather than computing them. Coverage and visual regression
34
+ * take what their plugins derived at build time from their own thresholds; the
35
+ * a11y score is the live audit graded by `deriveA11ySummary`, the rule the tab,
36
+ * the sidebar and the header use. A figure without a verdict stays `none`
37
+ * instead of being graded on a scale of the head's own.
38
+ */
39
+ export declare function headMetrics(input: HeadMetricInput): HeadMetric[];
40
+ /** What the gauge chip shows: one metric and the tone of the chip. */
41
+ export interface GaugeChip {
42
+ metric: HeadMetric;
43
+ variant: StatusTone;
44
+ /** Metrics that carry a verdict, for the tooltip. */
45
+ measured: number;
46
+ }
47
+ /**
48
+ * The one metric the chip shows: the worst, ties resolved by source order so
49
+ * the chip does not flicker between two equally bad ones; when everything is
50
+ * fine, the first measured one in the ok tone. `null` when nothing is
51
+ * measured, and the head shows no gauge.
36
52
  *
37
- * Ties resolve by source order so the chip shows a stable metric across
38
- * renders rather than flickering between two equally bad ones.
53
+ * A pure function instead of a computed inside the component: components using
54
+ * signal inputs cannot be rendered through TestBed in this repo's Jest setup.
39
55
  */
40
- export declare function summarizeMetrics(metrics: readonly HeadMetric[]): GaugeSummary;
56
+ export declare function gaugeChip(metrics: readonly HeadMetric[]): GaugeChip | null;
41
57
  //# sourceMappingURL=head-metrics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"head-metrics.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/head-metrics.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9D,yDAAyD;AACzD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED,sEAAsE;AACtE,MAAM,WAAW,YAAY;IACzB,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,OAAO,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAC;CACrC;AASD;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,YAAY,CAoB7E"}
1
+ {"version":3,"file":"head-metrics.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/head-metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEpF;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9D,yDAAyD;AACzD,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,aAAa,CAAC;CAC1B;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC5B,iFAAiF;IACjF,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACrC,sEAAsE;IACtE,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;CAClC;AAgBD;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,eAAe,GAAG,UAAU,EAAE,CA+BhE;AAED,sEAAsE;AACtE,MAAM,WAAW,SAAS;IACtB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,UAAU,CAAC;IACpB,qDAAqD;IACrD,QAAQ,EAAE,MAAM,CAAC;CACpB;AASD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,UAAU,EAAE,GAAG,SAAS,GAAG,IAAI,CAY1E"}
@@ -1,3 +1,46 @@
1
+ import { deriveA11ySummary } from '../panels/a11y/a11y-summary.js';
2
+ const isVerdict = (v) => v === 'ok' || v === 'warn' || v === 'danger';
3
+ /**
4
+ * The head's metrics, in source order: coverage, the a11y score, the visual
5
+ * regression headline.
6
+ *
7
+ * It reads verdicts rather than computing them. Coverage and visual regression
8
+ * take what their plugins derived at build time from their own thresholds; the
9
+ * a11y score is the live audit graded by `deriveA11ySummary`, the rule the tab,
10
+ * the sidebar and the header use. A figure without a verdict stays `none`
11
+ * instead of being graded on a scale of the head's own.
12
+ */
13
+ export function headMetrics(input) {
14
+ const coverage = input.meta?.['coverage'];
15
+ const vrt = input.meta?.['visualRegression'];
16
+ const t = coverage?.thresholds;
17
+ const coverageTarget = t ? Math.round((t.lines + t.branches + t.functions + t.statements) / 4) : null;
18
+ const hasCoverage = coverage?.found === true && typeof coverage.score === 'number';
19
+ const a11y = input.a11y;
20
+ return [
21
+ {
22
+ id: 'coverage',
23
+ label: 'Coverage',
24
+ value: hasCoverage ? `${coverage.score}%` : '—',
25
+ threshold: coverageTarget === null ? '—' : `≥ ${coverageTarget}%`,
26
+ variant: hasCoverage && isVerdict(coverage.summary?.variant) ? coverage.summary.variant : 'none'
27
+ },
28
+ {
29
+ id: 'a11y',
30
+ label: 'A11y score',
31
+ value: a11y === null ? '—' : String(a11y.score),
32
+ threshold: `≥ ${input.a11yThresholds.score}`,
33
+ variant: a11y === null ? 'none' : deriveA11ySummary(a11y, input.a11yThresholds).variant
34
+ },
35
+ {
36
+ id: 'vrt',
37
+ label: 'VRT diff',
38
+ value: vrt?.found && vrt.summary ? vrt.summary.value : '—',
39
+ threshold: 'no changes',
40
+ variant: vrt?.found && isVerdict(vrt.summary?.variant) ? vrt.summary.variant : 'none'
41
+ }
42
+ ];
43
+ }
1
44
  const SEVERITY = {
2
45
  none: 0,
3
46
  ok: 0,
@@ -5,35 +48,22 @@ const SEVERITY = {
5
48
  danger: 2
6
49
  };
7
50
  /**
8
- * Folds the head's metrics into what one chip can say.
9
- *
10
- * A pure function instead of a computed inside the component:
11
- * components using signal inputs cannot be rendered through TestBed in this
12
- * repo's Jest setup, so any logic left in a template is logic that never gets
13
- * a test. This mirrors `decorateItem` in the sidebar, which resolves the same
14
- * kind of question for navigation marks.
51
+ * The one metric the chip shows: the worst, ties resolved by source order so
52
+ * the chip does not flicker between two equally bad ones; when everything is
53
+ * fine, the first measured one in the ok tone. `null` when nothing is
54
+ * measured, and the head shows no gauge.
15
55
  *
16
- * Ties resolve by source order so the chip shows a stable metric across
17
- * renders rather than flickering between two equally bad ones.
56
+ * A pure function instead of a computed inside the component: components using
57
+ * signal inputs cannot be rendered through TestBed in this repo's Jest setup.
18
58
  */
19
- export function summarizeMetrics(metrics) {
20
- let measured = 0;
21
- let worst = null;
22
- let deviating = 0;
23
- for (const m of metrics) {
24
- if (m.variant !== 'none')
25
- measured++;
26
- if (SEVERITY[m.variant] === 0)
27
- continue;
28
- deviating++;
29
- if (worst === null || SEVERITY[m.variant] > SEVERITY[worst.variant]) {
59
+ export function gaugeChip(metrics) {
60
+ const measured = metrics.filter((m) => m.variant !== 'none');
61
+ if (measured.length === 0)
62
+ return null;
63
+ let worst = measured[0];
64
+ for (const m of measured) {
65
+ if (SEVERITY[m.variant] > SEVERITY[worst.variant])
30
66
  worst = m;
31
- }
32
67
  }
33
- return {
34
- measured,
35
- worst,
36
- others: deviating > 0 ? deviating - 1 : 0,
37
- variant: worst === null ? 'ok' : worst.variant
38
- };
68
+ return { metric: worst, variant: worst.variant, measured: measured.length };
39
69
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The plain facts about a pipe for the head's info popover: whether it is pure,
3
+ * and where to import it from. Both are optional on a scanned pipe (purity when
4
+ * `@Pipe({ pure })` could not be read, the import path when the scanner could not
5
+ * place the pipe), so a fact the scanner could not establish is left out rather
6
+ * than guessed.
7
+ */
8
+ export declare function pipeFacts(pure: boolean | undefined, importPath: string | undefined): string[];
9
+ //# sourceMappingURL=pipe-facts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipe-facts.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/pipe-facts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,EAAE,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAM7F"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The plain facts about a pipe for the head's info popover: whether it is pure,
3
+ * and where to import it from. Both are optional on a scanned pipe (purity when
4
+ * `@Pipe({ pure })` could not be read, the import path when the scanner could not
5
+ * place the pipe), so a fact the scanner could not establish is left out rather
6
+ * than guessed.
7
+ */
8
+ export function pipeFacts(pure, importPath) {
9
+ const facts = [];
10
+ if (pure !== undefined)
11
+ facts.push(pure ? 'Pure' : 'Impure');
12
+ if (importPath)
13
+ facts.push(importPath);
14
+ return facts;
15
+ }
@@ -1,40 +1,38 @@
1
1
  import type { ComponentStatus } from '../../decorator/showcase.types.js';
2
- import type { HeadMetric } from './head-metrics.js';
3
2
  import * as i0 from "@angular/core";
4
3
  interface StatusBadge {
5
4
  label: string;
6
5
  tooltip: string;
6
+ tone: 'success' | 'warn' | 'danger';
7
7
  }
8
8
  export declare class PrismComponentHeadComponent {
9
9
  private readonly navigationService;
10
10
  private readonly auditService;
11
- protected readonly comp: import("@angular/core").Signal<import("../../index.js").RuntimeComponent | null>;
11
+ private readonly manifest;
12
+ private readonly config;
13
+ protected readonly comp: import("@angular/core").Signal<import("../../plugin/plugin.types.js").RuntimeComponent | null>;
14
+ protected readonly service: import("@angular/core").Signal<import("../../index.js").RuntimeService | null>;
15
+ protected readonly pipe: import("@angular/core").Signal<import("../../index.js").RuntimePipe | null>;
16
+ /** What the head introduces: the active component or, on a service or pipe page, the service or the pipe. */
17
+ protected readonly subject: import("@angular/core").Signal<import("../../index.js").ScannedService | import("../../index.js").ScannedPipe | import("../../plugin/plugin.types.js").ScannedComponent | null>;
12
18
  protected readonly category: import("@angular/core").Signal<string>;
19
+ /** The selector of a component. A service or a pipe has none. */
20
+ protected readonly selector: import("@angular/core").Signal<string | undefined>;
21
+ /** A pipe is used in a template as `| name`, so that is what its code block shows. */
22
+ protected readonly code: import("@angular/core").Signal<string | undefined>;
23
+ protected readonly facts: import("@angular/core").Signal<string[]>;
13
24
  protected readonly variantCount: import("@angular/core").Signal<number>;
25
+ protected readonly stateCount: import("@angular/core").Signal<number>;
14
26
  protected readonly status: import("@angular/core").Signal<ComponentStatus | undefined>;
15
27
  protected readonly statusBadge: import("@angular/core").Signal<StatusBadge | null>;
16
- protected readonly coveragePercent: import("@angular/core").Signal<number | null>;
17
- protected readonly a11yScore: import("@angular/core").Signal<number | null>;
18
28
  /**
19
- * The visual regression headline, as the plugin already derived it.
20
- *
21
- * Read whole rather than recomputed: the colour follows the plugin's status
22
- * semantics (red for any changed variant, amber for ones that could not be
23
- * compared), and duplicating that rule here would mean the stat and the
24
- * plugin's own panel could disagree about the same component.
29
+ * The configured a11y thresholds, resolved the way the panel host and the
30
+ * header badge resolve them, so the gauge grades the live audit on the
31
+ * same scale as the tab and the sidebar.
25
32
  */
26
- protected readonly vrtStat: import("@angular/core").Signal<{
27
- value: string;
28
- variant: "ok" | "warn" | "danger";
29
- } | null>;
30
- /**
31
- * The full metric list for the gauge, in source order.
32
- *
33
- * Order matters: `summarizeMetrics` breaks severity ties by position, so
34
- * this sequence is what makes the chip show a stable metric rather than
35
- * flickering between two equally bad ones.
36
- */
37
- protected readonly metrics: import("@angular/core").Signal<HeadMetric[]>;
33
+ private readonly a11yThresholds;
34
+ /** The full metric list for the gauge, in source order. */
35
+ protected readonly metrics: import("@angular/core").Signal<import("./head-metrics.js").HeadMetric[]>;
38
36
  private readonly componentMeta;
39
37
  static ɵfac: i0.ɵɵFactoryDeclaration<PrismComponentHeadComponent, never>;
40
38
  static ɵcmp: i0.ɵɵComponentDeclaration<PrismComponentHeadComponent, "prism-component-head", never, {}, {}, never, ["[headEnd]"], true, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"prism-component-head.component.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/prism-component-head.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAGzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;;AAIpD,UAAU,WAAW;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACnB;AAqBD,qBAQa,2BAA2B;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IAEzD,SAAS,CAAC,QAAQ,CAAC,IAAI,mFAA4D;IAEnF,SAAS,CAAC,QAAQ,CAAC,QAAQ,yCAIxB;IAEH,SAAS,CAAC,QAAQ,CAAC,YAAY,yCAI5B;IAEH,SAAS,CAAC,QAAQ,CAAC,MAAM,8DAAwF;IAEjH,SAAS,CAAC,QAAQ,CAAC,WAAW,qDAI3B;IAEH,SAAS,CAAC,QAAQ,CAAC,eAAe,gDAM/B;IAWH,SAAS,CAAC,QAAQ,CAAC,SAAS,gDAEzB;IAEH;;;;;;;OAOG;IACH,SAAS,CAAC,QAAQ,CAAC,OAAO;eACf,MAAM;iBACJ,IAAI,GAAG,MAAM,GAAG,QAAQ;cAQlC;IAEH;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,CAAC,OAAO,+CAyBvB;IAEH,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK3B;yCA1GM,2BAA2B;2CAA3B,2BAA2B;CA2GvC"}
1
+ {"version":3,"file":"prism-component-head.component.d.ts","sourceRoot":"","sources":["../../../src/app/component-head/prism-component-head.component.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;;AAczE,UAAU,WAAW;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;CACvC;AAyBD,qBAQa,2BAA2B;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAkC;IACpE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA4B;IACzD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2C;IACpE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D,SAAS,CAAC,QAAQ,CAAC,IAAI,iGAA4D;IACnF,SAAS,CAAC,QAAQ,CAAC,OAAO,iFAA0D;IACpF,SAAS,CAAC,QAAQ,CAAC,IAAI,8EAAuD;IAE9E,6GAA6G;IAC7G,SAAS,CAAC,QAAQ,CAAC,OAAO,kLAA0F;IAEpH,SAAS,CAAC,QAAQ,CAAC,QAAQ,yCAA8E;IAEzG,iEAAiE;IACjE,SAAS,CAAC,QAAQ,CAAC,QAAQ,qDAA4D;IAEvF,sFAAsF;IACtF,SAAS,CAAC,QAAQ,CAAC,IAAI,qDAIpB;IAEH,SAAS,CAAC,QAAQ,CAAC,KAAK,2CAOrB;IAEH,SAAS,CAAC,QAAQ,CAAC,YAAY,yCAI5B;IAEH,SAAS,CAAC,QAAQ,CAAC,UAAU,yCAI1B;IAEH,SAAS,CAAC,QAAQ,CAAC,MAAM,8DAAsF;IAE/G,SAAS,CAAC,QAAQ,CAAC,WAAW,qDAI3B;IAEH;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAI5B;IAEH,2DAA2D;IAC3D,SAAS,CAAC,QAAQ,CAAC,OAAO,2EAMxB;IAEF,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK3B;yCA/EM,2BAA2B;2CAA3B,2BAA2B;CAgFvC"}
@@ -1,24 +1,32 @@
1
1
  import { ChangeDetectionStrategy, Component, computed, inject } from '@angular/core';
2
2
  import { A11yAuditService } from '../panels/a11y/a11y-audit.service.js';
3
+ import { resolveA11yThresholds } from '../panels/a11y/a11y-thresholds.js';
3
4
  import { PrismNavigationService } from '../services/prism-navigation.service.js';
5
+ import { PrismBadgeComponent } from '../shared/prism-badge.component.js';
6
+ import { PRISM_CONFIG, PRISM_MANIFEST } from '../tokens/prism-tokens.js';
7
+ import { headMetrics } from './head-metrics.js';
8
+ import { pipeFacts } from './pipe-facts.js';
4
9
  import { PrismHeadGaugeComponent } from './prism-head-gauge.component.js';
5
10
  import { PrismHeadInfoComponent } from './prism-head-info.component.js';
11
+ import { serviceFacts } from './service-facts.js';
6
12
  import * as i0 from "@angular/core";
7
13
  const _c0 = [[["", "headEnd", ""]]];
8
14
  const _c1 = ["[headEnd]"];
9
15
  const _c2 = () => [];
10
16
  function PrismComponentHeadComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
11
- i0.ɵɵelementStart(0, "span");
12
- i0.ɵɵelement(1, "span", 8);
13
- i0.ɵɵtext(2);
14
- i0.ɵɵelementEnd();
17
+ i0.ɵɵelement(0, "prism-badge", 8);
15
18
  } if (rf & 2) {
16
19
  const badge_r1 = ctx;
17
20
  const ctx_r1 = i0.ɵɵnextContext(2);
18
- i0.ɵɵclassMap(i0.ɵɵinterpolate1("comp-status comp-status--", ctx_r1.status()));
21
+ i0.ɵɵclassProp("comp-status--wip", ctx_r1.status() === "wip");
22
+ i0.ɵɵproperty("tone", badge_r1.tone)("label", badge_r1.label);
19
23
  i0.ɵɵattribute("title", badge_r1.tooltip);
20
- i0.ɵɵadvance(2);
21
- i0.ɵɵtextInterpolate1(" ", badge_r1.label, " ");
24
+ } }
25
+ function PrismComponentHeadComponent_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
26
+ i0.ɵɵelement(0, "prism-head-gauge", 5);
27
+ } if (rf & 2) {
28
+ const ctx_r1 = i0.ɵɵnextContext(2);
29
+ i0.ɵɵproperty("metrics", ctx_r1.metrics());
22
30
  } }
23
31
  function PrismComponentHeadComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
24
32
  i0.ɵɵelementStart(0, "section", 0)(1, "span", 1);
@@ -28,134 +36,115 @@ function PrismComponentHeadComponent_Conditional_0_Template(rf, ctx) { if (rf &
28
36
  i0.ɵɵtext(4);
29
37
  i0.ɵɵelementEnd();
30
38
  i0.ɵɵelement(5, "prism-head-info", 3);
31
- i0.ɵɵconditionalCreate(6, PrismComponentHeadComponent_Conditional_0_Conditional_6_Template, 3, 5, "span", 4);
32
- i0.ɵɵelement(7, "span", 5)(8, "prism-head-gauge", 6);
39
+ i0.ɵɵconditionalCreate(6, PrismComponentHeadComponent_Conditional_0_Conditional_6_Template, 1, 5, "prism-badge", 4);
40
+ i0.ɵɵconditionalCreate(7, PrismComponentHeadComponent_Conditional_0_Conditional_7_Template, 1, 1, "prism-head-gauge", 5);
41
+ i0.ɵɵelement(8, "span", 6);
33
42
  i0.ɵɵelementStart(9, "span", 7);
34
43
  i0.ɵɵprojection(10);
35
44
  i0.ɵɵelementEnd()();
36
45
  } if (rf & 2) {
37
- let tmp_8_0;
38
- const c_r3 = ctx;
46
+ let tmp_12_0;
47
+ const s_r3 = ctx;
39
48
  const ctx_r1 = i0.ɵɵnextContext();
40
49
  i0.ɵɵadvance(2);
41
50
  i0.ɵɵtextInterpolate(ctx_r1.category());
42
51
  i0.ɵɵadvance(2);
43
- i0.ɵɵtextInterpolate(c_r3.meta.showcaseConfig.title);
52
+ i0.ɵɵtextInterpolate(s_r3.showcaseConfig.title);
44
53
  i0.ɵɵadvance();
45
- i0.ɵɵproperty("selector", c_r3.meta.componentMeta.selector)("description", c_r3.meta.showcaseConfig.description)("tags", c_r3.meta.showcaseConfig.tags ?? i0.ɵɵpureFunction0(8, _c2))("variantCount", ctx_r1.variantCount());
54
+ i0.ɵɵproperty("selector", ctx_r1.selector())("code", ctx_r1.code())("className", s_r3.className)("description", s_r3.showcaseConfig.description)("tags", s_r3.showcaseConfig.tags ?? i0.ɵɵpureFunction0(12, _c2))("variantCount", ctx_r1.variantCount())("stateCount", ctx_r1.stateCount())("facts", ctx_r1.facts());
46
55
  i0.ɵɵadvance();
47
- i0.ɵɵconditional((tmp_8_0 = ctx_r1.statusBadge()) ? 6 : -1, tmp_8_0);
48
- i0.ɵɵadvance(2);
49
- i0.ɵɵproperty("metrics", ctx_r1.metrics());
56
+ i0.ɵɵconditional((tmp_12_0 = ctx_r1.statusBadge()) ? 6 : -1, tmp_12_0);
57
+ i0.ɵɵadvance();
58
+ i0.ɵɵconditional(ctx_r1.comp() ? 7 : -1);
50
59
  } }
51
60
  const STATUS_BADGES = {
52
61
  stable: {
53
62
  label: 'Stable',
54
- tooltip: 'Migrated and production-ready'
63
+ tooltip: 'Migrated and production-ready',
64
+ tone: 'success'
55
65
  },
56
66
  beta: {
57
67
  label: 'Beta',
58
- tooltip: 'Beta: API may change'
68
+ tooltip: 'Beta: API may change',
69
+ tone: 'warn'
59
70
  },
60
71
  wip: {
61
72
  label: 'Work in progress',
62
- tooltip: 'Migration in progress'
73
+ tooltip: 'Migration in progress',
74
+ tone: 'warn'
63
75
  },
64
76
  deprecated: {
65
77
  label: 'Deprecated',
66
- tooltip: 'Deprecated / Legacy. Do not use in new code'
78
+ tooltip: 'Deprecated / Legacy. Do not use in new code',
79
+ tone: 'danger'
67
80
  }
68
81
  };
69
82
  export class PrismComponentHeadComponent {
70
83
  navigationService = inject(PrismNavigationService);
71
84
  auditService = inject(A11yAuditService);
85
+ manifest = inject(PRISM_MANIFEST);
86
+ config = inject(PRISM_CONFIG);
72
87
  comp = computed(() => this.navigationService.activeComponent(), /* @ts-ignore */
73
88
  ...(ngDevMode ? [{ debugName: "comp" }] : /* istanbul ignore next */ []));
74
- category = computed(() => {
75
- const c = this.comp();
76
- return c?.meta.showcaseConfig.category ?? 'Uncategorized';
77
- }, /* @ts-ignore */
89
+ service = computed(() => this.navigationService.activeService(), /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "service" }] : /* istanbul ignore next */ []));
91
+ pipe = computed(() => this.navigationService.activePipe(), /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "pipe" }] : /* istanbul ignore next */ []));
93
+ /** What the head introduces: the active component or, on a service or pipe page, the service or the pipe. */
94
+ subject = computed(() => this.comp()?.meta ?? this.service()?.meta ?? this.pipe()?.meta ?? null, /* @ts-ignore */
95
+ ...(ngDevMode ? [{ debugName: "subject" }] : /* istanbul ignore next */ []));
96
+ category = computed(() => this.subject()?.showcaseConfig.category ?? 'Uncategorized', /* @ts-ignore */
78
97
  ...(ngDevMode ? [{ debugName: "category" }] : /* istanbul ignore next */ []));
98
+ /** The selector of a component. A service or a pipe has none. */
99
+ selector = computed(() => this.comp()?.meta.componentMeta.selector, /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "selector" }] : /* istanbul ignore next */ []));
101
+ /** A pipe is used in a template as `| name`, so that is what its code block shows. */
102
+ code = computed(() => {
103
+ const p = this.pipe();
104
+ return p ? `| ${p.meta.pipeName}` : undefined;
105
+ }, /* @ts-ignore */
106
+ ...(ngDevMode ? [{ debugName: "code" }] : /* istanbul ignore next */ []));
107
+ facts = computed(() => {
108
+ const s = this.service();
109
+ if (s)
110
+ return serviceFacts(s.meta.provision, s.meta.importPath);
111
+ const p = this.pipe();
112
+ return p ? pipeFacts(p.meta.pure, p.meta.importPath) : [];
113
+ }, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "facts" }] : /* istanbul ignore next */ []));
79
115
  variantCount = computed(() => {
80
116
  const c = this.comp();
81
117
  return c?.meta.showcaseConfig.variants?.length ?? 0;
82
118
  }, /* @ts-ignore */
83
119
  ...(ngDevMode ? [{ debugName: "variantCount" }] : /* istanbul ignore next */ []));
84
- status = computed(() => this.comp()?.meta.showcaseConfig.status, /* @ts-ignore */
120
+ stateCount = computed(() => {
121
+ const c = this.comp();
122
+ return c?.meta.showcaseConfig.states?.length ?? 0;
123
+ }, /* @ts-ignore */
124
+ ...(ngDevMode ? [{ debugName: "stateCount" }] : /* istanbul ignore next */ []));
125
+ status = computed(() => this.subject()?.showcaseConfig.status, /* @ts-ignore */
85
126
  ...(ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []));
86
127
  statusBadge = computed(() => {
87
128
  const s = this.status();
88
129
  return s ? STATUS_BADGES[s] : null;
89
130
  }, /* @ts-ignore */
90
131
  ...(ngDevMode ? [{ debugName: "statusBadge" }] : /* istanbul ignore next */ []));
91
- coveragePercent = computed(() => {
92
- const meta = this.componentMeta();
93
- const coverage = meta?.['coverage'];
94
- if (coverage?.['found'] && typeof coverage['score'] === 'number')
95
- return coverage['score'];
96
- return null;
97
- }, /* @ts-ignore */
98
- ...(ngDevMode ? [{ debugName: "coveragePercent" }] : /* istanbul ignore next */ []));
99
- /*
100
- * No bundle metric here. Reading `meta.perf.bundle.gzipKb`/`.sizeKb` finds
101
- * nothing: `@ng-prism/plugin-perf` stores `sourceSize` and `gzipEstimate`
102
- * (see `perf.types.ts`), so the tile would read `Bundle —` everywhere.
103
- *
104
- * Before wiring it to the real keys, settle with the perf plugin whether
105
- * `gzipEstimate` is bytes or kilobytes.
106
- */
107
- a11yScore = computed(() => {
108
- return this.auditService.scoreResult()?.score ?? null;
109
- }, /* @ts-ignore */
110
- ...(ngDevMode ? [{ debugName: "a11yScore" }] : /* istanbul ignore next */ []));
111
- /**
112
- * The visual regression headline, as the plugin already derived it.
113
- *
114
- * Read whole rather than recomputed: the colour follows the plugin's status
115
- * semantics (red for any changed variant, amber for ones that could not be
116
- * compared), and duplicating that rule here would mean the stat and the
117
- * plugin's own panel could disagree about the same component.
118
- */
119
- vrtStat = computed(() => {
120
- const vrt = this.componentMeta()?.['visualRegression'];
121
- if (!vrt?.found || !vrt.summary)
122
- return null;
123
- const { value, variant } = vrt.summary;
124
- return variant === 'ok' || variant === 'warn' || variant === 'danger' ? { value, variant } : null;
125
- }, /* @ts-ignore */
126
- ...(ngDevMode ? [{ debugName: "vrtStat" }] : /* istanbul ignore next */ []));
127
132
  /**
128
- * The full metric list for the gauge, in source order.
129
- *
130
- * Order matters: `summarizeMetrics` breaks severity ties by position, so
131
- * this sequence is what makes the chip show a stable metric rather than
132
- * flickering between two equally bad ones.
133
+ * The configured a11y thresholds, resolved the way the panel host and the
134
+ * header badge resolve them, so the gauge grades the live audit on the
135
+ * same scale as the tab and the sidebar.
133
136
  */
134
- metrics = computed(() => {
135
- const coverage = this.coveragePercent();
136
- const a11y = this.a11yScore();
137
- const vrt = this.vrtStat();
138
- return [
139
- {
140
- id: 'coverage',
141
- label: 'Coverage',
142
- value: coverage === null ? '—' : `${coverage}%`,
143
- variant: coverage === null ? 'none' : coverage >= 90 ? 'ok' : 'warn'
144
- },
145
- {
146
- id: 'a11y',
147
- label: 'A11y score',
148
- value: a11y === null ? '—' : String(a11y),
149
- variant: a11y === null ? 'none' : a11y >= 90 ? 'ok' : 'warn'
150
- },
151
- {
152
- id: 'vrt',
153
- label: 'VRT diff',
154
- value: vrt === null ? '—' : vrt.value,
155
- variant: vrt === null ? 'none' : vrt.variant
156
- }
157
- ];
137
+ a11yThresholds = computed(() => {
138
+ const meta = this.manifest.meta?.['a11y'];
139
+ return resolveA11yThresholds({ ...meta?.thresholds, ...this.config.a11y?.thresholds });
158
140
  }, /* @ts-ignore */
141
+ ...(ngDevMode ? [{ debugName: "a11yThresholds" }] : /* istanbul ignore next */ []));
142
+ /** The full metric list for the gauge, in source order. */
143
+ metrics = computed(() => headMetrics({
144
+ meta: this.componentMeta(),
145
+ a11y: this.auditService.scoreResult(),
146
+ a11yThresholds: this.a11yThresholds()
147
+ }), /* @ts-ignore */
159
148
  ...(ngDevMode ? [{ debugName: "metrics" }] : /* istanbul ignore next */ []));
160
149
  componentMeta = computed(() => {
161
150
  const c = this.comp();
@@ -164,16 +153,16 @@ export class PrismComponentHeadComponent {
164
153
  }, /* @ts-ignore */
165
154
  ...(ngDevMode ? [{ debugName: "componentMeta" }] : /* istanbul ignore next */ []));
166
155
  static ɵfac = function PrismComponentHeadComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PrismComponentHeadComponent)(); };
167
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismComponentHeadComponent, selectors: [["prism-component-head"]], ngContentSelectors: _c1, decls: 1, vars: 1, consts: [[1, "comp-head"], [1, "comp-crumb"], [1, "comp-title"], [3, "selector", "description", "tags", "variantCount"], [3, "class"], [1, "comp-spacer"], [3, "metrics"], [1, "comp-head-end"], ["aria-hidden", "true", 1, "comp-status-mark"]], template: function PrismComponentHeadComponent_Template(rf, ctx) { if (rf & 1) {
156
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PrismComponentHeadComponent, selectors: [["prism-component-head"]], ngContentSelectors: _c1, decls: 1, vars: 1, consts: [[1, "comp-head"], [1, "comp-crumb"], [1, "comp-title"], [3, "selector", "code", "className", "description", "tags", "variantCount", "stateCount", "facts"], ["dot", "", 1, "comp-status", 3, "comp-status--wip", "tone", "label"], [3, "metrics"], [1, "comp-spacer"], [1, "comp-head-end"], ["dot", "", 1, "comp-status", 3, "tone", "label"]], template: function PrismComponentHeadComponent_Template(rf, ctx) { if (rf & 1) {
168
157
  i0.ɵɵprojectionDef(_c0);
169
- i0.ɵɵconditionalCreate(0, PrismComponentHeadComponent_Conditional_0_Template, 11, 9, "section", 0);
158
+ i0.ɵɵconditionalCreate(0, PrismComponentHeadComponent_Conditional_0_Template, 11, 13, "section", 0);
170
159
  } if (rf & 2) {
171
160
  let tmp_0_0;
172
- i0.ɵɵconditional((tmp_0_0 = ctx.comp()) ? 0 : -1, tmp_0_0);
173
- } }, dependencies: [PrismHeadInfoComponent, PrismHeadGaugeComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n flex-shrink: 0;\n}\n\n.comp-head[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--%NS%sp-3);\n align-items: center;\n height: var(--%NS%band-head);\n padding: 0 var(--%NS%sp-5);\n background: var(--%NS%prism-bg);\n border-bottom: 1px solid var(--%NS%prism-border);\n}\n\n\n\n\n\n\n\n.comp-crumb[_ngcontent-%COMP%] {\n flex: 0 8 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n white-space: nowrap;\n}\n\n.comp-crumb[_ngcontent-%COMP%]::after {\n content: ' /';\n}\n\n.comp-title[_ngcontent-%COMP%] {\n flex: 0 1 auto;\n min-width: 0;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--%NS%fs-xl);\n font-weight: 600;\n color: var(--%NS%prism-text);\n letter-spacing: -0.015em;\n white-space: nowrap;\n}\n\n.comp-spacer[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.comp-status[_ngcontent-%COMP%], \nprism-head-info[_ngcontent-%COMP%], \nprism-head-gauge[_ngcontent-%COMP%], \n.comp-head-end[_ngcontent-%COMP%] {\n flex: none;\n}\n\n\n\n\n.comp-head-end[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n}\n\n.comp-head-end[_ngcontent-%COMP%]:empty {\n display: none;\n}\n\n\n\n\n\n.comp-status[_ngcontent-%COMP%] {\n display: inline-flex;\n gap: var(--%NS%sp-2);\n align-items: center;\n height: 18px;\n padding: 0 var(--%NS%sp-3) 0 var(--%NS%sp-2);\n font-size: var(--%NS%fs-xs);\n font-weight: 600;\n color: var(--%NS%prism-text-muted);\n letter-spacing: 0.03em;\n white-space: nowrap;\n border: 1px solid currentcolor;\n border-radius: var(--%NS%radius-xs);\n}\n\n.comp-status-mark[_ngcontent-%COMP%] {\n width: 6px;\n height: 6px;\n background: currentcolor;\n border-radius: 50%;\n}\n\n.comp-status--stable[_ngcontent-%COMP%] {\n color: var(--%NS%prism-mark-nominal);\n background: color-mix(in srgb, var(--%NS%prism-mark-nominal) 10%, transparent);\n}\n\n.comp-status--beta[_ngcontent-%COMP%], \n.comp-status--wip[_ngcontent-%COMP%] {\n color: var(--%NS%prism-mark-attention);\n background: color-mix(in srgb, var(--%NS%prism-mark-attention) 10%, transparent);\n}\n\n.comp-status--wip[_ngcontent-%COMP%] .comp-status-mark[_ngcontent-%COMP%] {\n box-sizing: border-box;\n width: 7px;\n height: 7px;\n background: transparent;\n border: 1.5px solid currentcolor;\n}\n\n.comp-status--deprecated[_ngcontent-%COMP%] {\n color: var(--%NS%prism-mark-critical);\n background: color-mix(in srgb, var(--%NS%prism-mark-critical) 12%, transparent);\n border-color: color-mix(in srgb, var(--%NS%prism-mark-critical) 55%, transparent);\n}"] });
161
+ i0.ɵɵconditional((tmp_0_0 = ctx.subject()) ? 0 : -1, tmp_0_0);
162
+ } }, dependencies: [PrismHeadInfoComponent, PrismHeadGaugeComponent, PrismBadgeComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n flex-shrink: 0;\n}\n\n.comp-head[_ngcontent-%COMP%] {\n display: flex;\n gap: var(--%NS%sp-3);\n align-items: center;\n height: var(--%NS%band-head);\n padding: 0 var(--%NS%sp-5);\n background: var(--%NS%prism-bg);\n border-bottom: 1px solid var(--%NS%prism-border);\n}\n\n\n\n\n\n\n\n.comp-crumb[_ngcontent-%COMP%] {\n flex: 0 8 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--%NS%fs-xs);\n color: var(--%NS%prism-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n white-space: nowrap;\n}\n\n.comp-crumb[_ngcontent-%COMP%]::after {\n content: ' /';\n}\n\n.comp-title[_ngcontent-%COMP%] {\n flex: 0 1 auto;\n min-width: 0;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--%NS%fs-xl);\n font-weight: 600;\n color: var(--%NS%prism-text);\n letter-spacing: -0.015em;\n white-space: nowrap;\n}\n\n.comp-spacer[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.comp-status[_ngcontent-%COMP%], \nprism-head-info[_ngcontent-%COMP%], \nprism-head-gauge[_ngcontent-%COMP%], \n.comp-head-end[_ngcontent-%COMP%] {\n flex: none;\n}\n\n\n\n\n.comp-head-end[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n}\n\n.comp-head-end[_ngcontent-%COMP%]:empty {\n display: none;\n}\n\n\n.comp-status--wip[_ngcontent-%COMP%] {\n --%NS%prism-badge-dot-fill: transparent;\n}"] });
174
163
  }
175
164
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PrismComponentHeadComponent, [{
176
165
  type: Component,
177
- args: [{ selector: 'prism-component-head', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismHeadInfoComponent, PrismHeadGaugeComponent], template: "@if (comp(); as c) {\n <section class=\"comp-head\">\n <span class=\"comp-crumb\">{{ category() }}</span>\n <h1 class=\"comp-title\">{{ c.meta.showcaseConfig.title }}</h1>\n\n <prism-head-info\n [selector]=\"c.meta.componentMeta.selector\"\n [description]=\"c.meta.showcaseConfig.description\"\n [tags]=\"c.meta.showcaseConfig.tags ?? []\"\n [variantCount]=\"variantCount()\" />\n\n @if (statusBadge(); as badge) {\n <span\n class=\"comp-status comp-status--{{ status() }}\"\n [attr.title]=\"badge.tooltip\">\n <span\n class=\"comp-status-mark\"\n aria-hidden=\"true\"></span>\n {{ badge.label }}\n </span>\n }\n\n <span class=\"comp-spacer\"></span>\n\n <prism-head-gauge [metrics]=\"metrics()\" />\n <span class=\"comp-head-end\"><ng-content select=\"[headEnd]\" /></span>\n </section>\n}\n", styles: [":host {\n display: block;\n flex-shrink: 0;\n}\n\n.comp-head {\n display: flex;\n gap: var(--sp-3);\n align-items: center;\n height: var(--band-head);\n padding: 0 var(--sp-5);\n background: var(--prism-bg);\n border-bottom: 1px solid var(--prism-border);\n}\n\n/* The text yields, the controls never do. A long category and a long title\n would otherwise push the gauge out of a fixed-height row whose ancestors\n clip, making the measurement unreachable when you most want to read it,\n and costing the gauge the fixed position it was designed around. So the\n title truncates with an ellipsis and the chip stays at the right edge. The crumb gives way\n first, being the least important text in the row. */\n.comp-crumb {\n flex: 0 8 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fs-xs);\n color: var(--prism-text-ghost);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n white-space: nowrap;\n}\n\n.comp-crumb::after {\n content: ' /';\n}\n\n.comp-title {\n flex: 0 1 auto;\n min-width: 0;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fs-xl);\n font-weight: 600;\n color: var(--prism-text);\n letter-spacing: -0.015em;\n white-space: nowrap;\n}\n\n.comp-spacer {\n flex: 1;\n}\n\n.comp-status,\nprism-head-info,\nprism-head-gauge,\n.comp-head-end {\n flex: none;\n}\n\n/* Wraps the slot rather than styling the projected element, which this\n stylesheet cannot reach. :empty keeps the row's trailing gap from\n appearing when nothing is projected; comment anchors do not count. */\n.comp-head-end {\n display: inline-flex;\n align-items: center;\n}\n\n.comp-head-end:empty {\n display: none;\n}\n\n/* Always an outline, never a filled surface. Deprecated separates itself\n by hue, not by weight. A filled alarm-coloured chip in a permanently\n visible band is the \"red as background texture\" problem this\n redesign exists to fix. */\n.comp-status {\n display: inline-flex;\n gap: var(--sp-2);\n align-items: center;\n height: 18px;\n padding: 0 var(--sp-3) 0 var(--sp-2);\n font-size: var(--fs-xs);\n font-weight: 600;\n color: var(--prism-text-muted);\n letter-spacing: 0.03em;\n white-space: nowrap;\n border: 1px solid currentcolor;\n border-radius: var(--radius-xs);\n}\n\n.comp-status-mark {\n width: 6px;\n height: 6px;\n background: currentcolor;\n border-radius: 50%;\n}\n\n.comp-status--stable {\n color: var(--prism-mark-nominal);\n background: color-mix(in srgb, var(--prism-mark-nominal) 10%, transparent);\n}\n\n.comp-status--beta,\n.comp-status--wip {\n color: var(--prism-mark-attention);\n background: color-mix(in srgb, var(--prism-mark-attention) 10%, transparent);\n}\n\n.comp-status--wip .comp-status-mark {\n box-sizing: border-box;\n width: 7px;\n height: 7px;\n background: transparent;\n border: 1.5px solid currentcolor;\n}\n\n.comp-status--deprecated {\n color: var(--prism-mark-critical);\n background: color-mix(in srgb, var(--prism-mark-critical) 12%, transparent);\n border-color: color-mix(in srgb, var(--prism-mark-critical) 55%, transparent);\n}\n"] }]
166
+ args: [{ selector: 'prism-component-head', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [PrismHeadInfoComponent, PrismHeadGaugeComponent, PrismBadgeComponent], template: "@if (subject(); as s) {\n <section class=\"comp-head\">\n <span class=\"comp-crumb\">{{ category() }}</span>\n <h1 class=\"comp-title\">{{ s.showcaseConfig.title }}</h1>\n\n <prism-head-info\n [selector]=\"selector()\"\n [code]=\"code()\"\n [className]=\"s.className\"\n [description]=\"s.showcaseConfig.description\"\n [tags]=\"s.showcaseConfig.tags ?? []\"\n [variantCount]=\"variantCount()\"\n [stateCount]=\"stateCount()\"\n [facts]=\"facts()\" />\n\n @if (statusBadge(); as badge) {\n <prism-badge\n class=\"comp-status\"\n [class.comp-status--wip]=\"status() === 'wip'\"\n dot\n [tone]=\"badge.tone\"\n [label]=\"badge.label\"\n [attr.title]=\"badge.tooltip\" />\n }\n\n @if (comp()) {\n <prism-head-gauge [metrics]=\"metrics()\" />\n }\n\n <span class=\"comp-spacer\"></span>\n\n <span class=\"comp-head-end\"><ng-content select=\"[headEnd]\" /></span>\n </section>\n}\n", styles: [":host {\n display: block;\n flex-shrink: 0;\n}\n\n.comp-head {\n display: flex;\n gap: var(--sp-3);\n align-items: center;\n height: var(--band-head);\n padding: 0 var(--sp-5);\n background: var(--prism-bg);\n border-bottom: 1px solid var(--prism-border);\n}\n\n/* The text yields, the controls never do. A long category and a long title\n would otherwise push the gauge out of a fixed-height row whose ancestors\n clip, making the measurement unreachable when you most want to read it,\n and costing the gauge the fixed position it was designed around. So the\n title truncates with an ellipsis and the chip stays at the right edge. The crumb gives way\n first, being the least important text in the row. */\n.comp-crumb {\n flex: 0 8 auto;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fs-xs);\n color: var(--prism-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.06em;\n white-space: nowrap;\n}\n\n.comp-crumb::after {\n content: ' /';\n}\n\n.comp-title {\n flex: 0 1 auto;\n min-width: 0;\n margin: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fs-xl);\n font-weight: 600;\n color: var(--prism-text);\n letter-spacing: -0.015em;\n white-space: nowrap;\n}\n\n.comp-spacer {\n flex: 1;\n}\n\n.comp-status,\nprism-head-info,\nprism-head-gauge,\n.comp-head-end {\n flex: none;\n}\n\n/* Wraps the slot rather than styling the projected element, which this\n stylesheet cannot reach. :empty keeps the row's trailing gap from\n appearing when nothing is projected; comment anchors do not count. */\n.comp-head-end {\n display: inline-flex;\n align-items: center;\n}\n\n.comp-head-end:empty {\n display: none;\n}\n\n/* Work in progress keeps its ring: the one status without a settled state. */\n.comp-status--wip {\n --prism-badge-dot-fill: transparent;\n}\n"] }]
178
167
  }], null, null); })();
179
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismComponentHeadComponent, { className: "PrismComponentHeadComponent", filePath: "app/component-head/prism-component-head.component.ts", lineNumber: 41 }); })();
168
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PrismComponentHeadComponent, { className: "PrismComponentHeadComponent", filePath: "app/component-head/prism-component-head.component.ts", lineNumber: 53 }); })();