@ng-prism/core 22.2.0 → 22.3.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 (292) hide show
  1. package/README.md +22 -24
  2. package/builders.json +11 -11
  3. package/dist/app/canvas/canvas-bg.styles.d.ts +1 -1
  4. package/dist/app/canvas/canvas-bg.styles.d.ts.map +1 -1
  5. package/dist/app/canvas/canvas-bg.styles.js +17 -0
  6. package/dist/app/canvas/prism-canvas-bg-pill.component.d.ts.map +1 -1
  7. package/dist/app/canvas/prism-canvas-bg-pill.component.js +3 -18
  8. package/dist/app/canvas/prism-canvas-rulers.component.d.ts +1 -0
  9. package/dist/app/canvas/prism-canvas-rulers.component.d.ts.map +1 -1
  10. package/dist/app/canvas/prism-canvas-rulers.component.js +9 -14
  11. package/dist/app/canvas/prism-canvas-toolbar.component.d.ts +23 -6
  12. package/dist/app/canvas/prism-canvas-toolbar.component.d.ts.map +1 -1
  13. package/dist/app/canvas/prism-canvas-toolbar.component.js +110 -140
  14. package/dist/app/canvas/prism-template-popover.component.d.ts.map +1 -1
  15. package/dist/app/canvas/prism-template-popover.component.js +8 -49
  16. package/dist/app/canvas/viewport-snap.d.ts +12 -0
  17. package/dist/app/canvas/viewport-snap.d.ts.map +1 -0
  18. package/dist/app/canvas/viewport-snap.js +23 -0
  19. package/dist/app/component-head/head-metrics.d.ts.map +1 -1
  20. package/dist/app/component-head/head-metrics.js +2 -2
  21. package/dist/app/component-head/prism-component-head.component.d.ts +1 -1
  22. package/dist/app/component-head/prism-component-head.component.d.ts.map +1 -1
  23. package/dist/app/component-head/prism-component-head.component.js +17 -50
  24. package/dist/app/component-head/prism-head-gauge.component.d.ts.map +1 -1
  25. package/dist/app/component-head/prism-head-gauge.component.js +4 -36
  26. package/dist/app/component-head/prism-head-info.component.d.ts.map +1 -1
  27. package/dist/app/component-head/prism-head-info.component.js +3 -36
  28. package/dist/app/component-head/prism-stat.component.d.ts.map +1 -1
  29. package/dist/app/component-head/prism-stat.component.js +3 -14
  30. package/dist/app/controls/boolean-control.component.d.ts.map +1 -1
  31. package/dist/app/controls/boolean-control.component.js +4 -12
  32. package/dist/app/controls/json-control.component.d.ts.map +1 -1
  33. package/dist/app/controls/json-control.component.js +4 -24
  34. package/dist/app/controls/number-control.component.d.ts.map +1 -1
  35. package/dist/app/controls/number-control.component.js +4 -11
  36. package/dist/app/controls/string-control.component.d.ts.map +1 -1
  37. package/dist/app/controls/string-control.component.js +4 -11
  38. package/dist/app/controls/union-control.component.d.ts.map +1 -1
  39. package/dist/app/controls/union-control.component.js +4 -16
  40. package/dist/app/directives/prism-resizer.directive.d.ts +24 -1
  41. package/dist/app/directives/prism-resizer.directive.d.ts.map +1 -1
  42. package/dist/app/directives/prism-resizer.directive.js +44 -7
  43. package/dist/app/directives/resize-value.d.ts +22 -0
  44. package/dist/app/directives/resize-value.d.ts.map +1 -0
  45. package/dist/app/directives/resize-value.js +23 -0
  46. package/dist/app/discovery-manifest.d.ts.map +1 -1
  47. package/dist/app/discovery-manifest.js +5 -7
  48. package/dist/app/header/prism-header-widget-host.component.d.ts.map +1 -1
  49. package/dist/app/header/prism-header-widget-host.component.js +4 -8
  50. package/dist/app/header/prism-header.component.d.ts.map +1 -1
  51. package/dist/app/header/prism-header.component.js +8 -77
  52. package/dist/app/hmr.d.ts.map +1 -1
  53. package/dist/app/icons/icon-registry.d.ts.map +1 -1
  54. package/dist/app/icons/icon-registry.js +2 -1
  55. package/dist/app/icons/prism-icon.component.d.ts.map +1 -1
  56. package/dist/app/icons/prism-icon.component.js +5 -5
  57. package/dist/app/index.d.ts +3 -3
  58. package/dist/app/index.d.ts.map +1 -1
  59. package/dist/app/index.js +3 -3
  60. package/dist/app/layout-menu/prism-layout-menu.component.d.ts.map +1 -1
  61. package/dist/app/layout-menu/prism-layout-menu.component.js +3 -77
  62. package/dist/app/overview/overview-panel.js +1 -1
  63. package/dist/app/overview/overview-visibility.d.ts.map +1 -1
  64. package/dist/app/overview/prism-overview-cell.component.d.ts.map +1 -1
  65. package/dist/app/overview/prism-overview-cell.component.js +10 -17
  66. package/dist/app/overview/prism-overview.component.d.ts.map +1 -1
  67. package/dist/app/overview/prism-overview.component.js +4 -12
  68. package/dist/app/page-renderer/prism-page-renderer.component.d.ts.map +1 -1
  69. package/dist/app/page-renderer/prism-page-renderer.component.js +4 -17
  70. package/dist/app/panels/a11y/a11y-audit.service.d.ts.map +1 -1
  71. package/dist/app/panels/a11y/a11y-audit.service.js +14 -2
  72. package/dist/app/panels/a11y/a11y-core.plugin.d.ts.map +1 -1
  73. package/dist/app/panels/a11y/a11y-core.plugin.js +1 -1
  74. package/dist/app/panels/a11y/a11y-dom-utils.d.ts.map +1 -1
  75. package/dist/app/panels/a11y/a11y-dom-utils.js +9 -6
  76. package/dist/app/panels/a11y/a11y-header-badge.component.d.ts.map +1 -1
  77. package/dist/app/panels/a11y/a11y-header-badge.component.js +6 -22
  78. package/dist/app/panels/a11y/a11y-keyboard-overlay.component.d.ts.map +1 -1
  79. package/dist/app/panels/a11y/a11y-keyboard-overlay.component.js +6 -25
  80. package/dist/app/panels/a11y/a11y-keyboard.component.d.ts.map +1 -1
  81. package/dist/app/panels/a11y/a11y-keyboard.component.js +5 -36
  82. package/dist/app/panels/a11y/a11y-keyboard.service.d.ts.map +1 -1
  83. package/dist/app/panels/a11y/a11y-keyboard.service.js +2 -2
  84. package/dist/app/panels/a11y/a11y-overlay-host.component.d.ts.map +1 -1
  85. package/dist/app/panels/a11y/a11y-overlay-host.component.js +5 -32
  86. package/dist/app/panels/a11y/a11y-panel-state.service.d.ts.map +1 -1
  87. package/dist/app/panels/a11y/a11y-panel.component.d.ts +1 -1
  88. package/dist/app/panels/a11y/a11y-panel.component.d.ts.map +1 -1
  89. package/dist/app/panels/a11y/a11y-panel.component.js +7 -69
  90. package/dist/app/panels/a11y/a11y-perspective.service.d.ts.map +1 -1
  91. package/dist/app/panels/a11y/a11y-score.component.d.ts.map +1 -1
  92. package/dist/app/panels/a11y/a11y-score.component.js +4 -31
  93. package/dist/app/panels/a11y/a11y-sr-overlay.component.d.ts.map +1 -1
  94. package/dist/app/panels/a11y/a11y-sr-overlay.component.js +8 -28
  95. package/dist/app/panels/a11y/a11y-sr.component.d.ts.map +1 -1
  96. package/dist/app/panels/a11y/a11y-sr.component.js +5 -28
  97. package/dist/app/panels/a11y/a11y-sr.service.d.ts.map +1 -1
  98. package/dist/app/panels/a11y/a11y-sr.service.js +4 -7
  99. package/dist/app/panels/a11y/a11y-summary.d.ts.map +1 -1
  100. package/dist/app/panels/a11y/a11y-summary.js +2 -5
  101. package/dist/app/panels/a11y/a11y-thresholds.d.ts.map +1 -1
  102. package/dist/app/panels/a11y/a11y-thresholds.js +1 -1
  103. package/dist/app/panels/a11y/a11y-tree.component.d.ts.map +1 -1
  104. package/dist/app/panels/a11y/a11y-tree.component.js +9 -46
  105. package/dist/app/panels/a11y/a11y-tree.service.d.ts.map +1 -1
  106. package/dist/app/panels/a11y/a11y-tree.service.js +3 -5
  107. package/dist/app/panels/a11y/a11y-violations.component.d.ts.map +1 -1
  108. package/dist/app/panels/a11y/a11y-violations.component.js +7 -58
  109. package/dist/app/panels/a11y/a11y.types.d.ts.map +1 -1
  110. package/dist/app/panels/builtin-header-widgets.js +2 -2
  111. package/dist/app/panels/builtin-navigation-decorations.d.ts.map +1 -1
  112. package/dist/app/panels/builtin-navigation-decorations.js +2 -2
  113. package/dist/app/panels/builtin-panels.d.ts.map +1 -1
  114. package/dist/app/panels/builtin-panels.js +2 -7
  115. package/dist/app/panels/controls/controls-plugin.js +3 -3
  116. package/dist/app/panels/controls/non-editable-input-types.d.ts.map +1 -1
  117. package/dist/app/panels/controls/non-editable-input-types.js +1 -5
  118. package/dist/app/panels/controls/prism-controls-panel.component.d.ts.map +1 -1
  119. package/dist/app/panels/controls/prism-controls-panel.component.js +5 -95
  120. package/dist/app/panels/events/events-plugin.js +3 -3
  121. package/dist/app/panels/events/prism-events-panel.component.d.ts.map +1 -1
  122. package/dist/app/panels/events/prism-events-panel.component.js +5 -23
  123. package/dist/app/panels/events/prism-json-node.component.d.ts.map +1 -1
  124. package/dist/app/panels/events/prism-json-node.component.js +4 -86
  125. package/dist/app/panels/events/prism-json-node.utils.d.ts.map +1 -1
  126. package/dist/app/panels/panel-host/panel-badge.d.ts.map +1 -1
  127. package/dist/app/panels/panel-host/panel-badge.js +2 -4
  128. package/dist/app/panels/panel-host/prism-panel-host.component.d.ts +1 -1
  129. package/dist/app/panels/panel-host/prism-panel-host.component.d.ts.map +1 -1
  130. package/dist/app/panels/panel-host/prism-panel-host.component.js +12 -67
  131. package/dist/app/provide-prism.d.ts +1 -1
  132. package/dist/app/provide-prism.d.ts.map +1 -1
  133. package/dist/app/provide-prism.js +7 -11
  134. package/dist/app/renderer/known-inputs.d.ts.map +1 -1
  135. package/dist/app/renderer/overlay-resolver.d.ts.map +1 -1
  136. package/dist/app/renderer/overlay-resolver.js +1 -1
  137. package/dist/app/renderer/prism-renderer.component.d.ts +27 -2
  138. package/dist/app/renderer/prism-renderer.component.d.ts.map +1 -1
  139. package/dist/app/renderer/prism-renderer.component.js +94 -76
  140. package/dist/app/renderer/projectable-content.d.ts.map +1 -1
  141. package/dist/app/renderer/projectable-content.js +1 -3
  142. package/dist/app/renderer/snippet-generator.d.ts +1 -1
  143. package/dist/app/renderer/snippet-generator.d.ts.map +1 -1
  144. package/dist/app/renderer/snippet-generator.js +7 -22
  145. package/dist/app/services/navigation-item.types.d.ts +1 -1
  146. package/dist/app/services/navigation-item.types.d.ts.map +1 -1
  147. package/dist/app/services/prism-canvas.service.d.ts +22 -0
  148. package/dist/app/services/prism-canvas.service.d.ts.map +1 -1
  149. package/dist/app/services/prism-canvas.service.js +49 -2
  150. package/dist/app/services/prism-capture.service.d.ts.map +1 -1
  151. package/dist/app/services/prism-capture.service.js +2 -6
  152. package/dist/app/services/prism-event-log.service.d.ts.map +1 -1
  153. package/dist/app/services/prism-event-log.service.js +1 -4
  154. package/dist/app/services/prism-layout.service.d.ts.map +1 -1
  155. package/dist/app/services/prism-layout.service.js +5 -4
  156. package/dist/app/services/prism-manifest.service.d.ts +1 -1
  157. package/dist/app/services/prism-manifest.service.d.ts.map +1 -1
  158. package/dist/app/services/prism-manifest.service.js +1 -1
  159. package/dist/app/services/prism-navigation.service.d.ts +1 -1
  160. package/dist/app/services/prism-navigation.service.d.ts.map +1 -1
  161. package/dist/app/services/prism-navigation.service.js +5 -13
  162. package/dist/app/services/prism-panel.service.d.ts.map +1 -1
  163. package/dist/app/services/prism-panel.service.js +2 -5
  164. package/dist/app/services/prism-persistence.service.d.ts.map +1 -1
  165. package/dist/app/services/prism-persistence.service.js +8 -10
  166. package/dist/app/services/prism-plugin.service.d.ts.map +1 -1
  167. package/dist/app/services/prism-renderer.service.d.ts.map +1 -1
  168. package/dist/app/services/prism-renderer.service.js +5 -9
  169. package/dist/app/services/prism-search.service.d.ts.map +1 -1
  170. package/dist/app/services/prism-search.service.js +1 -2
  171. package/dist/app/services/prism-theme.service.d.ts.map +1 -1
  172. package/dist/app/services/prism-theme.service.js +6 -4
  173. package/dist/app/services/prism-url-state.service.d.ts.map +1 -1
  174. package/dist/app/services/prism-url-state.service.js +3 -9
  175. package/dist/app/services/prism-variant-bg.service.d.ts.map +1 -1
  176. package/dist/app/services/prism-variant-bg.service.js +3 -5
  177. package/dist/app/shared/prism-metric-badge.component.d.ts.map +1 -1
  178. package/dist/app/shared/prism-metric-badge.component.js +4 -17
  179. package/dist/app/shell/prism-shell.component.d.ts.map +1 -1
  180. package/dist/app/shell/prism-shell.component.js +20 -122
  181. package/dist/app/sidebar/navigation-decorations.d.ts.map +1 -1
  182. package/dist/app/sidebar/navigation-decorations.js +1 -1
  183. package/dist/app/sidebar/prism-sidebar.component.d.ts +1 -1
  184. package/dist/app/sidebar/prism-sidebar.component.d.ts.map +1 -1
  185. package/dist/app/sidebar/prism-sidebar.component.js +19 -154
  186. package/dist/app/theme/prism-default-theme.d.ts.map +1 -1
  187. package/dist/app/theme/prism-default-theme.js +5 -5
  188. package/dist/app/tokens/prism-tokens.d.ts.map +1 -1
  189. package/dist/app/tokens/prism-tokens.js +1 -1
  190. package/dist/app/variant-ribbon/prism-variant-ribbon.component.d.ts.map +1 -1
  191. package/dist/app/variant-ribbon/prism-variant-ribbon.component.js +4 -49
  192. package/dist/app/variant-ribbon/spectrum.d.ts.map +1 -1
  193. package/dist/app/view-tab-bar/next-view-id.d.ts.map +1 -1
  194. package/dist/app/view-tab-bar/next-view-id.js +1 -3
  195. package/dist/app/view-tab-bar/prism-view-panel-host.component.d.ts.map +1 -1
  196. package/dist/app/view-tab-bar/prism-view-panel-host.component.js +5 -17
  197. package/dist/app/view-tab-bar/prism-view-tab-bar.component.d.ts.map +1 -1
  198. package/dist/app/view-tab-bar/prism-view-tab-bar.component.js +4 -27
  199. package/dist/builder/a11y/a11y-report-reader.d.ts +1 -1
  200. package/dist/builder/a11y/a11y-report-reader.d.ts.map +1 -1
  201. package/dist/builder/a11y/a11y-report-reader.js +7 -7
  202. package/dist/builder/build/index.d.ts.map +1 -1
  203. package/dist/builder/build/index.js +5 -9
  204. package/dist/builder/build/schema.d.ts.map +1 -1
  205. package/dist/builder/config-loader/config-loader.d.ts.map +1 -1
  206. package/dist/builder/config-loader/config-loader.js +4 -5
  207. package/dist/builder/manifest/host-parser.d.ts.map +1 -1
  208. package/dist/builder/manifest/host-parser.js +1 -1
  209. package/dist/builder/manifest/runtime-manifest.generator.d.ts +1 -1
  210. package/dist/builder/manifest/runtime-manifest.generator.d.ts.map +1 -1
  211. package/dist/builder/manifest/runtime-manifest.generator.js +9 -34
  212. package/dist/builder/plugin-runner/plugin-runner.d.ts.map +1 -1
  213. package/dist/builder/plugin-runner/plugin-runner.js +1 -3
  214. package/dist/builder/scanner/ast-utils.d.ts.map +1 -1
  215. package/dist/builder/scanner/ast-utils.js +2 -8
  216. package/dist/builder/scanner/component.scanner.d.ts.map +1 -1
  217. package/dist/builder/scanner/component.scanner.js +15 -22
  218. package/dist/builder/scanner/entry-point-discovery.d.ts.map +1 -1
  219. package/dist/builder/scanner/entry-point-discovery.js +3 -5
  220. package/dist/builder/scanner/entry-point.scanner.d.ts.map +1 -1
  221. package/dist/builder/scanner/entry-point.scanner.js +1 -3
  222. package/dist/builder/scanner/index.d.ts +1 -1
  223. package/dist/builder/scanner/index.d.ts.map +1 -1
  224. package/dist/builder/scanner/input.extractor.d.ts.map +1 -1
  225. package/dist/builder/scanner/input.extractor.js +11 -28
  226. package/dist/builder/scanner/manifest.generator.d.ts.map +1 -1
  227. package/dist/builder/scanner/manifest.generator.js +2 -4
  228. package/dist/builder/scanner/scanner.d.ts.map +1 -1
  229. package/dist/builder/scanner/scanner.js +4 -4
  230. package/dist/builder/serve/index.d.ts.map +1 -1
  231. package/dist/builder/serve/index.js +8 -10
  232. package/dist/builder/serve/schema.d.ts.map +1 -1
  233. package/dist/builder/shared/index.d.ts +1 -1
  234. package/dist/builder/shared/index.d.ts.map +1 -1
  235. package/dist/builder/shared/index.js +1 -1
  236. package/dist/builder/shared/prism-pipeline.d.ts.map +1 -1
  237. package/dist/builder/shared/prism-pipeline.js +18 -25
  238. package/dist/builder/shared/resolve-cache-dir.d.ts.map +1 -1
  239. package/dist/builder/shared/resolve-cache-dir.js +1 -1
  240. package/dist/builder/watcher/index.d.ts +1 -1
  241. package/dist/builder/watcher/index.d.ts.map +1 -1
  242. package/dist/builder/watcher/prism-watcher.d.ts.map +1 -1
  243. package/dist/builder/watcher/prism-watcher.js +12 -10
  244. package/dist/config/index.d.ts +2 -2
  245. package/dist/config/index.d.ts.map +1 -1
  246. package/dist/config/index.js +1 -1
  247. package/dist/decorator/index.d.ts +1 -1
  248. package/dist/decorator/index.d.ts.map +1 -1
  249. package/dist/decorator/showcase.decorator.d.ts.map +1 -1
  250. package/dist/decorator/showcase.types.d.ts.map +1 -1
  251. package/dist/plugin/index.d.ts +4 -4
  252. package/dist/plugin/index.d.ts.map +1 -1
  253. package/dist/plugin/index.js +2 -2
  254. package/dist/plugin/page-helpers.d.ts +1 -1
  255. package/dist/plugin/page-helpers.d.ts.map +1 -1
  256. package/dist/plugin/page-helpers.js +2 -2
  257. package/dist/plugin/page.types.d.ts.map +1 -1
  258. package/dist/plugin/plugin.types.d.ts +1 -1
  259. package/dist/plugin/plugin.types.d.ts.map +1 -1
  260. package/dist/schematics/migrations/v21-13-manifest-cache/index.d.ts.map +1 -1
  261. package/dist/schematics/migrations/v21-13-manifest-cache/index.js +4 -10
  262. package/dist/schematics/migrations/v22-0-cache-dir-rename/index.d.ts.map +1 -1
  263. package/dist/schematics/migrations/v22-0-cache-dir-rename/index.js +4 -8
  264. package/dist/schematics/ng-add/index.d.ts.map +1 -1
  265. package/dist/schematics/ng-add/index.js +122 -56
  266. package/dist/schematics/ng-add/schema.d.ts.map +1 -1
  267. package/dist/schematics/utils/config-ast.d.ts.map +1 -1
  268. package/dist/schematics/utils/config-ast.js +8 -15
  269. package/dist/schematics/utils/tsconfig-paths.d.ts.map +1 -1
  270. package/dist/schematics/utils/tsconfig-paths.js +1 -1
  271. package/dist/shared/canvas-bg.type.d.ts.map +1 -1
  272. package/dist/shared/canvas-bg.type.js +1 -8
  273. package/dist/shared/canvas-layout.type.d.ts.map +1 -1
  274. package/dist/shared/canvas-layout.type.js +1 -4
  275. package/dist/shared/variant-bg.d.ts.map +1 -1
  276. package/dist/shared/viewport.type.d.ts +47 -0
  277. package/dist/shared/viewport.type.d.ts.map +1 -0
  278. package/dist/shared/viewport.type.js +48 -0
  279. package/dist/transformer/cli.js +0 -0
  280. package/dist/transformer/index.d.ts +2 -2
  281. package/dist/transformer/index.d.ts.map +1 -1
  282. package/dist/transformer/index.js +2 -2
  283. package/dist/transformer/showcase-strip.transformer.d.ts.map +1 -1
  284. package/dist/transformer/showcase-strip.transformer.js +6 -15
  285. package/dist/transformer/strip-directory.d.ts.map +1 -1
  286. package/dist/transformer/strip-directory.js +2 -4
  287. package/package.json +4 -1
  288. package/schematics/collection.json +7 -7
  289. package/schematics/migrations.json +12 -12
  290. package/schematics/ng-add/schema.json +22 -22
  291. package/src/builder/build/schema.json +36 -36
  292. package/src/builder/serve/schema.json +37 -37
@@ -12,8 +12,7 @@ export function addPluginToConfig(tree, configPath, options) {
12
12
  throw new SchematicsException(`${configPath} not found. Run "ng add @ng-prism/core" first.`);
13
13
  }
14
14
  const source = buffer.toString('utf-8');
15
- const sf = ts.createSourceFile(configPath, source, ts.ScriptTarget.Latest,
16
- /* setParentNodes */ true);
15
+ const sf = ts.createSourceFile(configPath, source, ts.ScriptTarget.Latest, /* setParentNodes */ true);
17
16
  const imports = sf.statements.filter(ts.isImportDeclaration);
18
17
  const defineConfigCall = findDefineConfigCall(sf);
19
18
  if (!defineConfigCall) {
@@ -30,9 +29,7 @@ export function addPluginToConfig(tree, configPath, options) {
30
29
  }
31
30
  const importAlreadyPresent = imports.some((imp) => importHasNamedBinding(imp, options.importFrom, options.importName));
32
31
  const callAlreadyPresent = !!pluginsProp &&
33
- pluginsProp.initializer.elements.some((el) => ts.isCallExpression(el) &&
34
- ts.isIdentifier(el.expression) &&
35
- el.expression.text === options.importName);
32
+ pluginsProp.initializer.elements.some((el) => ts.isCallExpression(el) && ts.isIdentifier(el.expression) && el.expression.text === options.importName);
36
33
  if (importAlreadyPresent && callAlreadyPresent)
37
34
  return false;
38
35
  const edits = [];
@@ -41,7 +38,7 @@ export function addPluginToConfig(tree, configPath, options) {
41
38
  edits.push({
42
39
  start: insertPos,
43
40
  end: insertPos,
44
- newText: `\nimport { ${options.importName} } from '${options.importFrom}';`,
41
+ newText: `\nimport { ${options.importName} } from '${options.importFrom}';`
45
42
  });
46
43
  }
47
44
  if (!callAlreadyPresent) {
@@ -50,7 +47,7 @@ export function addPluginToConfig(tree, configPath, options) {
50
47
  edits.push({
51
48
  start: insertPos,
52
49
  end: insertPos,
53
- newText: `\n plugins: [${options.call}],`,
50
+ newText: `\n plugins: [${options.call}],`
54
51
  });
55
52
  }
56
53
  else {
@@ -59,7 +56,7 @@ export function addPluginToConfig(tree, configPath, options) {
59
56
  edits.push({
60
57
  start: arr.getStart(sf),
61
58
  end: arr.getEnd(),
62
- newText: `[${options.call}]`,
59
+ newText: `[${options.call}]`
63
60
  });
64
61
  }
65
62
  else {
@@ -68,7 +65,7 @@ export function addPluginToConfig(tree, configPath, options) {
68
65
  edits.push({
69
66
  start: insertPos,
70
67
  end: insertPos,
71
- newText: `, ${options.call}`,
68
+ newText: `, ${options.call}`
72
69
  });
73
70
  }
74
71
  }
@@ -86,9 +83,7 @@ function findDefineConfigCall(sf) {
86
83
  if (!ts.isExportAssignment(stmt) || stmt.isExportEquals)
87
84
  continue;
88
85
  const expr = stmt.expression;
89
- if (ts.isCallExpression(expr) &&
90
- ts.isIdentifier(expr.expression) &&
91
- expr.expression.text === 'defineConfig') {
86
+ if (ts.isCallExpression(expr) && ts.isIdentifier(expr.expression) && expr.expression.text === 'defineConfig') {
92
87
  return expr;
93
88
  }
94
89
  }
@@ -96,9 +91,7 @@ function findDefineConfigCall(sf) {
96
91
  }
97
92
  function findPluginsProperty(obj) {
98
93
  for (const prop of obj.properties) {
99
- if (ts.isPropertyAssignment(prop) &&
100
- ts.isIdentifier(prop.name) &&
101
- prop.name.text === 'plugins') {
94
+ if (ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'plugins') {
102
95
  return prop;
103
96
  }
104
97
  }
@@ -1 +1 @@
1
- {"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/schematics/utils/tsconfig-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAevD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,MAAM,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EAAE,GACd,OAAO,CAkBT"}
1
+ {"version":3,"file":"tsconfig-paths.d.ts","sourceRoot":"","sources":["../../../src/schematics/utils/tsconfig-paths.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAWvD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAgBvG"}
@@ -1,4 +1,4 @@
1
- import { parse as parseJsonc, modify as modifyJsonc, applyEdits as applyJsoncEdits, } from 'jsonc-parser';
1
+ import { applyEdits as applyJsoncEdits, modify as modifyJsonc, parse as parseJsonc } from 'jsonc-parser';
2
2
  /**
3
3
  * Adds `compilerOptions.paths[<key>] = <value>` to a tsconfig.json (JSONC-safe).
4
4
  * Idempotent: does not overwrite an existing entry.
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-bg.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-bg.type.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAChB,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM;AACR;;;;;;;GAOG;GACD,SAAS,GACT,aAAa,CAAC;AAElB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAOhC,CAAC"}
1
+ {"version":3,"file":"canvas-bg.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-bg.type.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GACd,MAAM,GACN,OAAO,GACP,OAAO,GACP,MAAM;AACR;;;;;;;GAOG;GACD,SAAS,GACT,aAAa,CAAC;AAEpB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAA0E,CAAC"}
@@ -7,11 +7,4 @@
7
7
  * to offer. Persisted canvas state is validated against this list too, so a
8
8
  * value only a decorator can reach still round-trips.
9
9
  */
10
- export const CANVAS_BGS = [
11
- 'dots',
12
- 'plain',
13
- 'light',
14
- 'dark',
15
- 'checker',
16
- 'transparent',
17
- ];
10
+ export const CANVAS_BGS = ['dots', 'plain', 'light', 'dark', 'checker', 'transparent'];
@@ -1 +1 @@
1
- {"version":3,"file":"canvas-layout.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-layout.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAGxC,CAAC"}
1
+ {"version":3,"file":"canvas-layout.type.d.ts","sourceRoot":"","sources":["../../src/shared/canvas-layout.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7C,eAAO,MAAM,cAAc,EAAE,SAAS,YAAY,EAAgC,CAAC"}
@@ -1,4 +1 @@
1
- export const CANVAS_LAYOUTS = [
2
- 'fit',
3
- 'stretch',
4
- ];
1
+ export const CANVAS_LAYOUTS = ['fit', 'stretch'];
@@ -1 +1 @@
1
- {"version":3,"file":"variant-bg.d.ts","sourceRoot":"","sources":["../../src/shared/variant-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAwB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS;QAAE,EAAE,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,CAAC;CACzC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,MAAM,GACnB,QAAQ,GAAG,IAAI,CAEjB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,eAAe,EACvB,YAAY,EAAE,MAAM,GACnB,QAAQ,CAEV"}
1
+ {"version":3,"file":"variant-bg.d.ts","sourceRoot":"","sources":["../../src/shared/variant-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAwB,CAAC;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,eAAe;IAC5B,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS;QAAE,EAAE,CAAC,EAAE,QAAQ,CAAA;KAAE,EAAE,CAAC;CAC3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,IAAI,CAEhG;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,CAExF"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The canvas viewport: one nullable number, not a device list.
3
+ *
4
+ * The question this tool answers is "where does the layout break", not "how
5
+ * does it look on a Pixel 8" — so the presets below are plain widths and carry
6
+ * no device names. A name would imply a simulation the constraint does not
7
+ * perform: it narrows the box and nothing else. Media queries still read the
8
+ * real browser viewport; only `@container` rules respond.
9
+ */
10
+ /**
11
+ * The narrowest the constraint will go.
12
+ *
13
+ * Below any real device on purpose. The presets cover the widths people design
14
+ * against; this floor is for the other half of the job — dragging past where a
15
+ * layout still works to find the point at which it gives up. A floor set to the
16
+ * narrowest real phone would put that point out of reach on exactly the
17
+ * components most worth checking.
18
+ */
19
+ export declare const VIEWPORT_MIN = 100;
20
+ /** Wide enough for a desktop breakpoint, short of the point where the stage scrolls on any realistic screen. */
21
+ export declare const VIEWPORT_MAX = 1600;
22
+ /** Where the toggle lands when no width has been set this session. */
23
+ export declare const VIEWPORT_DEFAULT = 390;
24
+ /** How near a drag has to come before it rests on a preset, in pixels. */
25
+ export declare const VIEWPORT_SNAP_TOLERANCE = 8;
26
+ /**
27
+ * The named widths, as numbers.
28
+ *
29
+ * Common CSS breakpoints plus the two phone widths that actually differ from
30
+ * them. Rendered as the "Width" group in the canvas tools menu, exactly like
31
+ * the zoom chooser next to it.
32
+ */
33
+ export declare const VIEWPORT_SNAPS: readonly number[];
34
+ /**
35
+ * `width` brought inside the legal range and onto a whole pixel.
36
+ *
37
+ * Lives beside the bounds it enforces rather than next to the canvas's
38
+ * snapping: the clamp is the service's business — it is what keeps a stored
39
+ * or programmatic width legal — and a service reaching into the canvas UI
40
+ * folder for arithmetic over these two constants was the wrong direction.
41
+ *
42
+ * Rounded rather than truncated: the value is read back out as a label on the
43
+ * canvas, and `389.6 px` under a drag reads as a rendering fault rather than as
44
+ * the sub-pixel arithmetic it is.
45
+ */
46
+ export declare function clampViewportWidth(width: number): number;
47
+ //# sourceMappingURL=viewport.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"viewport.type.d.ts","sourceRoot":"","sources":["../../src/shared/viewport.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,MAAM,CAAC;AAEhC,gHAAgH;AAChH,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,MAAM,EAAoC,CAAC;AAEjF;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAExD"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The canvas viewport: one nullable number, not a device list.
3
+ *
4
+ * The question this tool answers is "where does the layout break", not "how
5
+ * does it look on a Pixel 8" — so the presets below are plain widths and carry
6
+ * no device names. A name would imply a simulation the constraint does not
7
+ * perform: it narrows the box and nothing else. Media queries still read the
8
+ * real browser viewport; only `@container` rules respond.
9
+ */
10
+ /**
11
+ * The narrowest the constraint will go.
12
+ *
13
+ * Below any real device on purpose. The presets cover the widths people design
14
+ * against; this floor is for the other half of the job — dragging past where a
15
+ * layout still works to find the point at which it gives up. A floor set to the
16
+ * narrowest real phone would put that point out of reach on exactly the
17
+ * components most worth checking.
18
+ */
19
+ export const VIEWPORT_MIN = 100;
20
+ /** Wide enough for a desktop breakpoint, short of the point where the stage scrolls on any realistic screen. */
21
+ export const VIEWPORT_MAX = 1600;
22
+ /** Where the toggle lands when no width has been set this session. */
23
+ export const VIEWPORT_DEFAULT = 390;
24
+ /** How near a drag has to come before it rests on a preset, in pixels. */
25
+ export const VIEWPORT_SNAP_TOLERANCE = 8;
26
+ /**
27
+ * The named widths, as numbers.
28
+ *
29
+ * Common CSS breakpoints plus the two phone widths that actually differ from
30
+ * them. Rendered as the "Width" group in the canvas tools menu, exactly like
31
+ * the zoom chooser next to it.
32
+ */
33
+ export const VIEWPORT_SNAPS = [320, 390, 480, 640, 768, 1024];
34
+ /**
35
+ * `width` brought inside the legal range and onto a whole pixel.
36
+ *
37
+ * Lives beside the bounds it enforces rather than next to the canvas's
38
+ * snapping: the clamp is the service's business — it is what keeps a stored
39
+ * or programmatic width legal — and a service reaching into the canvas UI
40
+ * folder for arithmetic over these two constants was the wrong direction.
41
+ *
42
+ * Rounded rather than truncated: the value is read back out as a label on the
43
+ * canvas, and `389.6 px` under a drag reads as a rendering fault rather than as
44
+ * the sub-pixel arithmetic it is.
45
+ */
46
+ export function clampViewportWidth(width) {
47
+ return Math.round(Math.max(VIEWPORT_MIN, Math.min(VIEWPORT_MAX, width)));
48
+ }
File without changes
@@ -1,3 +1,3 @@
1
- export { createShowcaseStripTransformer, stripShowcaseDecorators, } from './showcase-strip.transformer.js';
2
- export { stripShowcaseFromDirectory, type StripResult, } from './strip-directory.js';
1
+ export { createShowcaseStripTransformer, stripShowcaseDecorators } from './showcase-strip.transformer.js';
2
+ export { type StripResult, stripShowcaseFromDirectory } from './strip-directory.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,0BAA0B,EAC1B,KAAK,WAAW,GACjB,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transformer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,EAAE,KAAK,WAAW,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,2 +1,2 @@
1
- export { createShowcaseStripTransformer, stripShowcaseDecorators, } from './showcase-strip.transformer.js';
2
- export { stripShowcaseFromDirectory, } from './strip-directory.js';
1
+ export { createShowcaseStripTransformer, stripShowcaseDecorators } from './showcase-strip.transformer.js';
2
+ export { stripShowcaseFromDirectory } from './strip-directory.js';
@@ -1 +1 @@
1
- {"version":3,"file":"showcase-strip.transformer.d.ts","sourceRoot":"","sources":["../../src/transformer/showcase-strip.transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAoN5B,wBAAgB,8BAA8B,IAAI,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,CA8CrF;AA6BD,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,QAAQ,SAAY,GACnB,MAAM,CAgCR"}
1
+ {"version":3,"file":"showcase-strip.transformer.d.ts","sourceRoot":"","sources":["../../src/transformer/showcase-strip.transformer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAqK5B,wBAAgB,8BAA8B,IAAI,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,UAAU,CAAC,CA2CrF;AAyBD,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,MAAM,CAyBpF"}
@@ -4,9 +4,7 @@ function isShowcaseModule(specifier) {
4
4
  return SHOWCASE_MODULE_PREFIXES.some((prefix) => specifier === prefix || specifier.startsWith(prefix + '/'));
5
5
  }
6
6
  function isShowcaseCall(expr, names) {
7
- return (ts.isCallExpression(expr) &&
8
- ts.isIdentifier(expr.expression) &&
9
- names.has(expr.expression.text));
7
+ return ts.isCallExpression(expr) && ts.isIdentifier(expr.expression) && names.has(expr.expression.text);
10
8
  }
11
9
  function isLoweredShowcaseCall(expr, names) {
12
10
  if (!ts.isCallExpression(expr))
@@ -15,21 +13,17 @@ function isLoweredShowcaseCall(expr, names) {
15
13
  }
16
14
  function tryHandleDecorateStatement(stmt, names, factory) {
17
15
  const expr = stmt.expression;
18
- if (!ts.isBinaryExpression(expr) ||
19
- expr.operatorToken.kind !== ts.SyntaxKind.EqualsToken) {
16
+ if (!ts.isBinaryExpression(expr) || expr.operatorToken.kind !== ts.SyntaxKind.EqualsToken) {
20
17
  return undefined;
21
18
  }
22
19
  const chain = [];
23
20
  let current = expr;
24
- while (ts.isBinaryExpression(current) &&
25
- current.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
21
+ while (ts.isBinaryExpression(current) && current.operatorToken.kind === ts.SyntaxKind.EqualsToken) {
26
22
  chain.push(current);
27
23
  current = current.right;
28
24
  }
29
25
  const rhs = current;
30
- if (!ts.isCallExpression(rhs) ||
31
- !ts.isIdentifier(rhs.expression) ||
32
- rhs.expression.text !== '__decorate') {
26
+ if (!ts.isCallExpression(rhs) || !ts.isIdentifier(rhs.expression) || rhs.expression.text !== '__decorate') {
33
27
  return undefined;
34
28
  }
35
29
  const args = rhs.arguments;
@@ -55,9 +49,7 @@ function tryHandleDecorateStatement(stmt, names, factory) {
55
49
  return { action: 'replace', statement: newStmt };
56
50
  }
57
51
  function isShowcaseDecorator(d, names) {
58
- return (ts.isCallExpression(d.expression) &&
59
- ts.isIdentifier(d.expression.expression) &&
60
- names.has(d.expression.expression.text));
52
+ return ts.isCallExpression(d.expression) && ts.isIdentifier(d.expression.expression) && names.has(d.expression.expression.text);
61
53
  }
62
54
  function stripNativeDecorators(node, names, factory) {
63
55
  const decorators = ts.getDecorators(node);
@@ -128,8 +120,7 @@ export function createShowcaseStripTransformer() {
128
120
  continue;
129
121
  const decorateResult = tryHandleDecorateStatement(stmt, names, factory);
130
122
  if (decorateResult) {
131
- if (decorateResult.action === 'replace' &&
132
- decorateResult.statement) {
123
+ if (decorateResult.action === 'replace' && decorateResult.statement) {
133
124
  filtered.push(decorateResult.statement);
134
125
  }
135
126
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"strip-directory.d.ts","sourceRoot":"","sources":["../../src/transformer/strip-directory.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACvB;AAID,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBlF"}
1
+ {"version":3,"file":"strip-directory.d.ts","sourceRoot":"","sources":["../../src/transformer/strip-directory.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,WAAW;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAiBlF"}
@@ -1,12 +1,10 @@
1
1
  import { readdir, readFile, writeFile } from 'node:fs/promises';
2
- import { join, extname } from 'node:path';
2
+ import { extname, join } from 'node:path';
3
3
  import { stripShowcaseDecorators } from './showcase-strip.transformer.js';
4
4
  const JS_EXTENSIONS = new Set(['.js', '.mjs']);
5
5
  export async function stripShowcaseFromDirectory(dir) {
6
6
  const entries = await readdir(dir, { recursive: true });
7
- const files = entries
8
- .filter((entry) => JS_EXTENSIONS.has(extname(entry)))
9
- .map((entry) => join(dir, entry));
7
+ const files = entries.filter((entry) => JS_EXTENSIONS.has(extname(entry))).map((entry) => join(dir, entry));
10
8
  let strippedFiles = 0;
11
9
  for (const file of files) {
12
10
  const source = await readFile(file, 'utf-8');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-prism/core",
3
- "version": "22.2.0",
3
+ "version": "22.3.0",
4
4
  "description": "ng-prism — the Angular-native Storybook alternative. Lightweight component showcase with @Showcase decorator, no story files needed.",
5
5
  "keywords": [
6
6
  "ng-prism",
@@ -76,6 +76,7 @@
76
76
  "peerDependencies": {
77
77
  "@angular/core": ">=20.0.0",
78
78
  "@angular/common": ">=20.0.0",
79
+ "@angular/compiler": ">=20.0.0",
79
80
  "@angular-devkit/architect": ">=0.2000.0",
80
81
  "@angular-devkit/core": ">=20.0.0",
81
82
  "@angular-devkit/schematics": ">=20.0.0",
@@ -92,7 +93,9 @@
92
93
  }
93
94
  },
94
95
  "dependencies": {
96
+ "axe-core": "^4.11.1",
95
97
  "chokidar": "^5.0.0",
98
+ "jsonc-parser": "^3.3.1",
96
99
  "tslib": "^2.3.0"
97
100
  },
98
101
  "repository": {
@@ -1,10 +1,10 @@
1
1
  {
2
- "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "ng-add": {
5
- "description": "Set up ng-prism in an Angular workspace",
6
- "factory": "../dist/schematics/ng-add/index#ngAdd",
7
- "schema": "./ng-add/schema.json"
2
+ "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "ng-add": {
5
+ "description": "Set up ng-prism in an Angular workspace",
6
+ "factory": "../dist/schematics/ng-add/index#ngAdd",
7
+ "schema": "./ng-add/schema.json"
8
+ }
8
9
  }
9
- }
10
10
  }
@@ -1,15 +1,15 @@
1
1
  {
2
- "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "migration-v22-manifest-cache": {
5
- "version": "22.0.0-beta.0",
6
- "description": "Move generated prism-manifest.ts into <workspaceRoot>/ng-prism-cache/<prismProject>/ and resolve it via a wildcard tsconfig path mapping.",
7
- "factory": "../dist/schematics/migrations/v21-13-manifest-cache/index#migrate"
8
- },
9
- "migration-v22-cache-dir-rename": {
10
- "version": "22.0.0-beta.4",
11
- "description": "Rename the manifest cache directory from .ng-prism/ to ng-prism-cache/. The dot-prefixed name was silently excluded from @angular/build's watcher (hardcoded **/.*/** ignore pattern), so @Showcase decorator edits never triggered an HMR / reload.",
12
- "factory": "../dist/schematics/migrations/v22-0-cache-dir-rename/index#migrate"
2
+ "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "migration-v22-manifest-cache": {
5
+ "version": "22.0.0-beta.0",
6
+ "description": "Move generated prism-manifest.ts into <workspaceRoot>/ng-prism-cache/<prismProject>/ and resolve it via a wildcard tsconfig path mapping.",
7
+ "factory": "../dist/schematics/migrations/v21-13-manifest-cache/index#migrate"
8
+ },
9
+ "migration-v22-cache-dir-rename": {
10
+ "version": "22.0.0-beta.4",
11
+ "description": "Rename the manifest cache directory from .ng-prism/ to ng-prism-cache/. The dot-prefixed name was silently excluded from @angular/build's watcher (hardcoded **/.*/** ignore pattern), so @Showcase decorator edits never triggered an HMR / reload.",
12
+ "factory": "../dist/schematics/migrations/v22-0-cache-dir-rename/index#migrate"
13
+ }
13
14
  }
14
- }
15
15
  }
@@ -1,25 +1,25 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "ng-prism ng-add Schematic",
4
- "description": "Set up ng-prism in an Angular workspace",
5
- "type": "object",
6
- "properties": {
7
- "project": {
8
- "type": "string",
9
- "description": "The library project to set up ng-prism for",
10
- "x-prompt": "Which library project should ng-prism showcase?"
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ng-prism ng-add Schematic",
4
+ "description": "Set up ng-prism in an Angular workspace",
5
+ "type": "object",
6
+ "properties": {
7
+ "project": {
8
+ "type": "string",
9
+ "description": "The library project to set up ng-prism for",
10
+ "x-prompt": "Which library project should ng-prism showcase?"
11
+ },
12
+ "port": {
13
+ "type": "number",
14
+ "default": 4400,
15
+ "description": "Dev server port for the Prism styleguide"
16
+ },
17
+ "zoneless": {
18
+ "type": "boolean",
19
+ "default": false,
20
+ "description": "Use zoneless change detection (no zone.js polyfill)"
21
+ }
11
22
  },
12
- "port": {
13
- "type": "number",
14
- "default": 4400,
15
- "description": "Dev server port for the Prism styleguide"
16
- },
17
- "zoneless": {
18
- "type": "boolean",
19
- "default": false,
20
- "description": "Use zoneless change detection (no zone.js polyfill)"
21
- }
22
- },
23
- "required": ["project"],
24
- "additionalProperties": false
23
+ "required": ["project"],
24
+ "additionalProperties": false
25
25
  }
@@ -1,39 +1,39 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "ng-prism Build Builder",
4
- "description": "Build the ng-prism styleguide for production",
5
- "type": "object",
6
- "properties": {
7
- "entryPoint": {
8
- "type": "string",
9
- "description": "Path to the library's public-api.ts (entry point for scanning)"
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ng-prism Build Builder",
4
+ "description": "Build the ng-prism styleguide for production",
5
+ "type": "object",
6
+ "properties": {
7
+ "entryPoint": {
8
+ "type": "string",
9
+ "description": "Path to the library's public-api.ts (entry point for scanning)"
10
+ },
11
+ "prismProject": {
12
+ "type": "string",
13
+ "description": "Angular project name for the Prism styleguide app"
14
+ },
15
+ "libraryProject": {
16
+ "type": "string",
17
+ "description": "Library project name (used to resolve source root)"
18
+ },
19
+ "outputPath": {
20
+ "type": "string",
21
+ "description": "Output directory for the production build"
22
+ },
23
+ "libraryImportPath": {
24
+ "type": "string",
25
+ "description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
26
+ },
27
+ "configFile": {
28
+ "type": "string",
29
+ "default": "ng-prism.config.ts",
30
+ "description": "Path to the ng-prism config file"
31
+ },
32
+ "cacheDir": {
33
+ "type": "string",
34
+ "description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
35
+ }
10
36
  },
11
- "prismProject": {
12
- "type": "string",
13
- "description": "Angular project name for the Prism styleguide app"
14
- },
15
- "libraryProject": {
16
- "type": "string",
17
- "description": "Library project name (used to resolve source root)"
18
- },
19
- "outputPath": {
20
- "type": "string",
21
- "description": "Output directory for the production build"
22
- },
23
- "libraryImportPath": {
24
- "type": "string",
25
- "description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
26
- },
27
- "configFile": {
28
- "type": "string",
29
- "default": "ng-prism.config.ts",
30
- "description": "Path to the ng-prism config file"
31
- },
32
- "cacheDir": {
33
- "type": "string",
34
- "description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
35
- }
36
- },
37
- "required": ["entryPoint", "prismProject"],
38
- "additionalProperties": false
37
+ "required": ["entryPoint", "prismProject"],
38
+ "additionalProperties": false
39
39
  }
@@ -1,40 +1,40 @@
1
1
  {
2
- "$schema": "http://json-schema.org/draft-07/schema#",
3
- "title": "ng-prism Serve Builder",
4
- "description": "Start the ng-prism development server",
5
- "type": "object",
6
- "properties": {
7
- "entryPoint": {
8
- "type": "string",
9
- "description": "Path to the library's public-api.ts (entry point for scanning)"
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "ng-prism Serve Builder",
4
+ "description": "Start the ng-prism development server",
5
+ "type": "object",
6
+ "properties": {
7
+ "entryPoint": {
8
+ "type": "string",
9
+ "description": "Path to the library's public-api.ts (entry point for scanning)"
10
+ },
11
+ "prismProject": {
12
+ "type": "string",
13
+ "description": "Angular project name for the Prism styleguide app"
14
+ },
15
+ "libraryProject": {
16
+ "type": "string",
17
+ "description": "Library project name (used to resolve source root)"
18
+ },
19
+ "port": {
20
+ "type": "number",
21
+ "default": 4400,
22
+ "description": "Dev server port"
23
+ },
24
+ "libraryImportPath": {
25
+ "type": "string",
26
+ "description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
27
+ },
28
+ "configFile": {
29
+ "type": "string",
30
+ "default": "ng-prism.config.ts",
31
+ "description": "Path to the ng-prism config file"
32
+ },
33
+ "cacheDir": {
34
+ "type": "string",
35
+ "description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
36
+ }
10
37
  },
11
- "prismProject": {
12
- "type": "string",
13
- "description": "Angular project name for the Prism styleguide app"
14
- },
15
- "libraryProject": {
16
- "type": "string",
17
- "description": "Library project name (used to resolve source root)"
18
- },
19
- "port": {
20
- "type": "number",
21
- "default": 4400,
22
- "description": "Dev server port"
23
- },
24
- "libraryImportPath": {
25
- "type": "string",
26
- "description": "NPM package name used for imports in the generated manifest (defaults to libraryProject)"
27
- },
28
- "configFile": {
29
- "type": "string",
30
- "default": "ng-prism.config.ts",
31
- "description": "Path to the ng-prism config file"
32
- },
33
- "cacheDir": {
34
- "type": "string",
35
- "description": "Override directory for the generated prism-manifest.ts. Default: <workspaceRoot>/.ng-prism/<prismProject>/. Relative paths resolve against workspaceRoot."
36
- }
37
- },
38
- "required": ["entryPoint", "prismProject"],
39
- "additionalProperties": false
38
+ "required": ["entryPoint", "prismProject"],
39
+ "additionalProperties": false
40
40
  }