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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (421) hide show
  1. package/README.md +19 -28
  2. package/application/index.js +2 -2
  3. package/application/index.js.map +1 -1
  4. package/application/schema.json +1 -2
  5. package/builders.json +23 -13
  6. package/classes/observable-map.d.ts +1 -0
  7. package/classes/observable-map.js +14 -3
  8. package/classes/observable-map.js.map +1 -1
  9. package/classes/observable-set.js +2 -1
  10. package/classes/observable-set.js.map +1 -1
  11. package/dev-server/index.js +5 -3
  12. package/dev-server/index.js.map +1 -1
  13. package/engine/builders/api-list/api-list-component.builder.js +4 -4
  14. package/engine/builders/api-list/api-list-component.builder.js.map +1 -1
  15. package/engine/builders/api-list/api-page-template.builder.js +2 -2
  16. package/engine/builders/api-list/api-page-template.builder.js.map +1 -1
  17. package/engine/builders/global/keywords.builder.d.ts +1 -4
  18. package/engine/builders/global/keywords.builder.js +5 -9
  19. package/engine/builders/global/keywords.builder.js.map +1 -1
  20. package/engine/builders/global/search-indexes.builder.js +1 -1
  21. package/engine/builders/global/search-indexes.builder.js.map +1 -1
  22. package/engine/builders/helpers/create-entry-metadata.js +2 -1
  23. package/engine/builders/helpers/create-entry-metadata.js.map +1 -1
  24. package/engine/builders/helpers/create-import-path.js.map +1 -1
  25. package/engine/builders/helpers/get-entry-relative-path.js.map +1 -1
  26. package/engine/builders/page/demo-assets.builder.js +8 -5
  27. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  28. package/engine/builders/page/playground.builder.js +1 -0
  29. package/engine/builders/page/playground.builder.js.map +1 -1
  30. package/engine/builders/shared/content.builder.js +3 -3
  31. package/engine/builders/shared/content.builder.js.map +1 -1
  32. package/engine/builders/shared/page-component.builder.js +16 -6
  33. package/engine/builders/shared/page-component.builder.js.map +1 -1
  34. package/engine/builders/shared/page-wrapper.builder.js +8 -5
  35. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  36. package/engine/core/operators/distinct-pending.js.map +1 -1
  37. package/engine/core/operators/factory.js +1 -4
  38. package/engine/core/operators/factory.js.map +1 -1
  39. package/engine/core/operators/merge-factory.js +19 -17
  40. package/engine/core/operators/merge-factory.js.map +1 -1
  41. package/engine/core/operators/when-builders-done.js.map +1 -1
  42. package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
  43. package/engine/core/triggers/on-dependencies-change.js +2 -2
  44. package/engine/core/triggers/on-dependencies-change.js.map +1 -1
  45. package/generator/artifacts/index.d.ts +317 -0
  46. package/generator/bootstrap/bin.d.ts +18 -0
  47. package/generator/bootstrap/bin.js +7274 -0
  48. package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
  49. package/generator/bootstrap/cli.d.ts +42 -0
  50. package/generator/bootstrap/cli.js +7123 -0
  51. package/generator/bootstrap/constants.d.ts +4 -0
  52. package/generator/bootstrap/index.d.ts +111 -0
  53. package/generator/bootstrap/index.js +5020 -0
  54. package/generator/bootstrap/prerender-command.d.ts +31 -0
  55. package/generator/bootstrap/process-tree.d.ts +49 -0
  56. package/generator/build-metafile.json +11701 -0
  57. package/generator/build-provenance.json +119 -0
  58. package/generator/compiler/assemble.d.ts +41 -0
  59. package/generator/compiler/classify.d.ts +161 -0
  60. package/generator/compiler/closure-store.d.ts +55 -0
  61. package/generator/compiler/common.d.ts +32 -0
  62. package/generator/compiler/describe.d.ts +21 -0
  63. package/generator/compiler/dry-run.d.ts +108 -0
  64. package/generator/compiler/fast-start.d.ts +104 -0
  65. package/generator/compiler/fold.d.ts +116 -0
  66. package/generator/compiler/index.d.ts +111 -0
  67. package/generator/compiler/index.js +17759 -0
  68. package/generator/compiler/link.d.ts +38 -0
  69. package/generator/compiler/memo.d.ts +44 -0
  70. package/generator/compiler/plan.d.ts +92 -0
  71. package/generator/compiler/progress.d.ts +54 -0
  72. package/generator/compiler/render.d.ts +27 -0
  73. package/generator/compiler/retention.d.ts +181 -0
  74. package/generator/compiler/semantic-closure.d.ts +46 -0
  75. package/generator/compiler/targeted.d.ts +280 -0
  76. package/generator/content/content-compiler.d.ts +118 -0
  77. package/generator/content/highlight-cache.d.ts +139 -0
  78. package/generator/content/html-pipeline.d.ts +170 -0
  79. package/generator/content/html-pool.d.ts +239 -0
  80. package/generator/content/html-worker.js +1598 -0
  81. package/generator/content-module-ids.d.ts +8 -0
  82. package/generator/contracts.d.ts +1063 -0
  83. package/generator/contracts.js +15 -0
  84. package/generator/discovery/index.d.ts +77 -0
  85. package/generator/graph/index.d.ts +211 -0
  86. package/generator/graph/unit-index.d.ts +216 -0
  87. package/generator/kernel/canonical.d.ts +57 -0
  88. package/generator/kernel/flags.d.ts +49 -0
  89. package/generator/kernel/footprint.d.ts +88 -0
  90. package/generator/kernel/observations.d.ts +68 -0
  91. package/generator/kernel/paths.d.ts +22 -0
  92. package/generator/kernel/runtime-identity.d.ts +11 -0
  93. package/generator/outputs/index.d.ts +67 -0
  94. package/generator/package.json +3 -0
  95. package/generator/progress/ci.d.ts +22 -0
  96. package/generator/progress/detect.d.ts +60 -0
  97. package/generator/progress/events.d.ts +126 -0
  98. package/generator/progress/format.d.ts +83 -0
  99. package/generator/progress/gate.d.ts +49 -0
  100. package/generator/progress/host.d.ts +29 -0
  101. package/generator/progress/lines.d.ts +42 -0
  102. package/generator/progress/live.d.ts +115 -0
  103. package/generator/progress/model.d.ts +85 -0
  104. package/generator/progress/reporter.d.ts +87 -0
  105. package/generator/progress/settings.d.ts +60 -0
  106. package/generator/semantic/angular.d.ts +9 -0
  107. package/generator/semantic/api-enumeration.d.ts +19 -0
  108. package/generator/semantic/api-summary.d.ts +33 -0
  109. package/generator/semantic/dependencies.d.ts +20 -0
  110. package/generator/semantic/derived-classes.d.ts +58 -0
  111. package/generator/semantic/documentation-cache.d.ts +23 -0
  112. package/generator/semantic/fragments.d.ts +28 -0
  113. package/generator/semantic/owned-roots.d.ts +59 -0
  114. package/generator/semantic/program-builder.d.ts +55 -0
  115. package/generator/semantic/program-index.d.ts +124 -0
  116. package/generator/semantic/program-inputs.d.ts +26 -0
  117. package/generator/semantic/program-observations.d.ts +158 -0
  118. package/generator/semantic/program-retention.d.ts +147 -0
  119. package/generator/semantic/program-state.d.ts +196 -0
  120. package/generator/semantic/program-verify.d.ts +22 -0
  121. package/generator/semantic/recorder.d.ts +89 -0
  122. package/generator/semantic/rendering.d.ts +34 -0
  123. package/generator/semantic/semantic-closure.d.ts +129 -0
  124. package/generator/semantic/semantic-service.d.ts +186 -0
  125. package/generator/semantic/type-text.d.ts +5 -0
  126. package/generator/session/build-session.d.ts +206 -0
  127. package/generator/session/input-verification.d.ts +38 -0
  128. package/generator/session/parcel-event-source.d.ts +22 -0
  129. package/generator/session/progress.d.ts +72 -0
  130. package/generator/session/unchanged-saves.d.ts +63 -0
  131. package/generator/session/watch-inputs.d.ts +6 -0
  132. package/generator/session/watch-signals.d.ts +10 -0
  133. package/generator/templates/api/base.html.nunj +26 -0
  134. package/generator/templates/api/class-declaration.html.nunj +57 -0
  135. package/generator/templates/api/details/class-declaration.html.nunj +47 -0
  136. package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
  137. package/generator/templates/api/details/function-declaration.html.nunj +14 -0
  138. package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
  139. package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
  140. package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
  141. package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
  142. package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
  143. package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
  144. package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
  145. package/generator/templates/api/details.html.nunj +9 -0
  146. package/generator/templates/api/enum-declaration.html.nunj +12 -0
  147. package/generator/templates/api/function-declaration.html.nunj +35 -0
  148. package/generator/templates/api/interface-declaration.html.nunj +37 -0
  149. package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
  150. package/generator/templates/api/variable-declaration.html.nunj +8 -0
  151. package/generator/templates/api-header.html.nunj +11 -0
  152. package/generator/templates/api-list.ts.nunj +22 -0
  153. package/generator/templates/api-page-content.html.nunj +1 -0
  154. package/generator/templates/api-scope.ts.nunj +22 -0
  155. package/generator/templates/category.ts.nunj +22 -0
  156. package/generator/templates/code.html.nunj +3 -0
  157. package/generator/templates/context.ts.nunj +55 -0
  158. package/generator/templates/demo-assets.ts.nunj +25 -0
  159. package/generator/templates/helpers/accessor.html.nunj +76 -0
  160. package/generator/templates/helpers/accessors.html.nunj +7 -0
  161. package/generator/templates/helpers/badge.html.nunj +4 -0
  162. package/generator/templates/helpers/call-signature.html.nunj +70 -0
  163. package/generator/templates/helpers/code.html.nunj +3 -0
  164. package/generator/templates/helpers/constructor.html.nunj +32 -0
  165. package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
  166. package/generator/templates/helpers/decorators.html.nunj +11 -0
  167. package/generator/templates/helpers/members.html.nunj +29 -0
  168. package/generator/templates/helpers/method.html.nunj +89 -0
  169. package/generator/templates/helpers/methods.html.nunj +7 -0
  170. package/generator/templates/helpers/modifier.html.nunj +4 -0
  171. package/generator/templates/helpers/no-content.html.nunj +3 -0
  172. package/generator/templates/helpers/overload.html.nunj +57 -0
  173. package/generator/templates/helpers/parameters.html.nunj +44 -0
  174. package/generator/templates/helpers/properties.html.nunj +61 -0
  175. package/generator/templates/helpers/status.html.nunj +33 -0
  176. package/generator/templates/helpers/tag.html.nunj +4 -0
  177. package/generator/templates/helpers/type.html.nunj +11 -0
  178. package/generator/templates/index.ts.nunj +2 -0
  179. package/generator/templates/page-header.html.nunj +5 -0
  180. package/generator/templates/page-wrapper.ts.nunj +64 -0
  181. package/generator/templates/page.ts.nunj +97 -0
  182. package/generator/templates/parts/examples.html.nunj +11 -0
  183. package/generator/templates/parts/member-examples.html.nunj +12 -0
  184. package/generator/templates/parts/member-remarks.html.nunj +8 -0
  185. package/generator/templates/parts/page-tags.html.nunj +10 -0
  186. package/generator/templates/parts/remarks.html.nunj +10 -0
  187. package/generator/templates/parts/see-also.html.nunj +23 -0
  188. package/generator/templates/parts/usage-notes.html.nunj +8 -0
  189. package/generator/templates/playgrounds.ts.nunj +63 -0
  190. package/generator/templates/routes.ts.nunj +49 -0
  191. package/generator/templates/symbol/decorators.html.nunj +12 -0
  192. package/generator/templates/symbol/details.html.nunj +62 -0
  193. package/generator/templates/symbol/extended-by.html.nunj +17 -0
  194. package/generator/templates/symbol/header.html.nunj +22 -0
  195. package/generator/templates/symbol/members.html.nunj +301 -0
  196. package/generator/templates/symbol/page.html.nunj +76 -0
  197. package/generator/templates/symbol/see-also.html.nunj +16 -0
  198. package/generator/vite/angular/ANALOG-LICENSE +21 -0
  199. package/generator/vite/angular/analog-provenance.json +880 -0
  200. package/generator/vite/angular/index.d.ts +14 -0
  201. package/generator/vite/angular/index.js +7300 -0
  202. package/generator/vite/angular-compatibility.d.ts +6 -0
  203. package/generator/vite/angular-composition.d.ts +68 -0
  204. package/generator/vite/angular-version.d.ts +38 -0
  205. package/generator/vite/application-builder.js +331 -0
  206. package/generator/vite/application-builder.schema.json +46 -0
  207. package/generator/vite/application.d.ts +91 -0
  208. package/generator/vite/assets.d.ts +11 -0
  209. package/generator/vite/bounded-close.d.ts +33 -0
  210. package/generator/vite/component-updates.d.ts +21 -0
  211. package/generator/vite/configuration.d.ts +3 -0
  212. package/generator/vite/dev-server-builder.js +334 -0
  213. package/generator/vite/dev-server-builder.schema.json +27 -0
  214. package/generator/vite/dev-styles.d.ts +65 -0
  215. package/generator/vite/diagnostics.d.ts +4 -0
  216. package/generator/vite/external-probes.d.ts +40 -0
  217. package/generator/vite/host-updates.d.ts +145 -0
  218. package/generator/vite/index.d.ts +13 -0
  219. package/generator/vite/index.js +11589 -0
  220. package/generator/vite/lease.d.ts +6 -0
  221. package/generator/vite/lifecycle.d.ts +119 -0
  222. package/generator/vite/mime.d.ts +2 -0
  223. package/generator/vite/missing-paths.d.ts +44 -0
  224. package/generator/vite/options.d.ts +87 -0
  225. package/generator/vite/output-watch.d.ts +41 -0
  226. package/generator/vite/paths.d.ts +7 -0
  227. package/generator/vite/plugin.d.ts +3 -0
  228. package/generator/vite/prerender-entry.js +395 -0
  229. package/generator/vite/prerender-runtime.d.ts +66 -0
  230. package/generator/vite/prerender.d.ts +27 -0
  231. package/generator/vite/production.d.ts +66 -0
  232. package/generator/vite/progress.d.ts +33 -0
  233. package/generator/vite/restore-theme.js +13 -0
  234. package/generator/vite/route-inventory.d.ts +24 -0
  235. package/generator/vite/ssr-renderer-control.d.ts +1 -0
  236. package/generator/vite/ssr-renderer-entry.js +444 -0
  237. package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
  238. package/generator/vite/ssr-renderer.d.ts +74 -0
  239. package/generator/vite/theme-index.d.ts +13 -0
  240. package/generator/vite/tsconfig-paths.d.ts +64 -0
  241. package/generator/vite/vite-event-source.d.ts +198 -0
  242. package/generator/vite/vite-version.d.ts +26 -0
  243. package/generator/vite/watch-inputs.d.ts +39 -0
  244. package/generator/worker/entry.d.ts +1 -0
  245. package/generator/worker/entry.js +614 -0
  246. package/generator/worker/index.d.ts +156 -0
  247. package/generator/worker/index.js +1030 -0
  248. package/generator/worker/protocol.d.ts +160 -0
  249. package/helpers/angular/get-component-decorator.js +6 -6
  250. package/helpers/angular/get-component-decorator.js.map +1 -1
  251. package/helpers/angular/get-directive-decorator.js +3 -3
  252. package/helpers/angular/get-directive-decorator.js.map +1 -1
  253. package/helpers/angular/get-pipe-decorator.js +3 -3
  254. package/helpers/angular/get-pipe-decorator.js.map +1 -1
  255. package/helpers/build-indexes.js +5 -2
  256. package/helpers/build-indexes.js.map +1 -1
  257. package/helpers/construct-page-keyword.js +2 -1
  258. package/helpers/construct-page-keyword.js.map +1 -1
  259. package/helpers/extract-selectors.d.ts +1 -1
  260. package/helpers/extract-selectors.js +5 -3
  261. package/helpers/extract-selectors.js.map +1 -1
  262. package/helpers/filter-useless-members.d.ts +1 -1
  263. package/helpers/format-code.d.ts +2 -1
  264. package/helpers/format-code.js +13 -4
  265. package/helpers/format-code.js.map +1 -1
  266. package/helpers/import-fresh-esm.js.map +1 -1
  267. package/helpers/index.d.ts +2 -0
  268. package/helpers/index.js +2 -0
  269. package/helpers/index.js.map +1 -1
  270. package/helpers/keyword-heading-title.d.ts +7 -0
  271. package/helpers/keyword-heading-title.js +21 -0
  272. package/helpers/keyword-heading-title.js.map +1 -0
  273. package/helpers/markdown-to-html.js +3 -3
  274. package/helpers/markdown-to-html.js.map +1 -1
  275. package/helpers/navigation-title-order.d.ts +8 -0
  276. package/helpers/navigation-title-order.js +15 -0
  277. package/helpers/navigation-title-order.js.map +1 -0
  278. package/helpers/playground/get-playground-inputs.js +8 -4
  279. package/helpers/playground/get-playground-inputs.js.map +1 -1
  280. package/helpers/playground/get-playground-template-inputs.js +2 -1
  281. package/helpers/playground/get-playground-template-inputs.js.map +1 -1
  282. package/helpers/presentation.d.ts +7 -7
  283. package/helpers/presentation.js +23 -23
  284. package/helpers/presentation.js.map +1 -1
  285. package/helpers/print.js +32 -5
  286. package/helpers/print.js.map +1 -1
  287. package/helpers/process-snippets.d.ts +1 -1
  288. package/helpers/process-snippets.js +3 -3
  289. package/helpers/process-snippets.js.map +1 -1
  290. package/helpers/snippets-from-asset.d.ts +1 -1
  291. package/helpers/snippets-from-asset.js +2 -2
  292. package/helpers/snippets-from-asset.js.map +1 -1
  293. package/helpers/sort-navigation-entities.js +2 -1
  294. package/helpers/sort-navigation-entities.js.map +1 -1
  295. package/helpers/stable-generated-id.d.ts +2 -0
  296. package/helpers/stable-generated-id.js +12 -0
  297. package/helpers/stable-generated-id.js.map +1 -0
  298. package/helpers/text-order.d.ts +8 -0
  299. package/helpers/text-order.js +26 -0
  300. package/helpers/text-order.js.map +1 -0
  301. package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
  302. package/helpers/typescript/member/get-inherited-parent.js +2 -2
  303. package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
  304. package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
  305. package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
  306. package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
  307. package/helpers/typescript/property/get-property-assignment.js.map +1 -1
  308. package/package.json +86 -29
  309. package/parsers/helpers/number.d.ts +1 -1
  310. package/parsers/helpers/number.js +2 -2
  311. package/parsers/helpers/number.js.map +1 -1
  312. package/parsers/helpers/param-value.d.ts +1 -1
  313. package/parsers/helpers/param-value.js +2 -2
  314. package/parsers/helpers/param-value.js.map +1 -1
  315. package/parsers/helpers/param.js +3 -3
  316. package/parsers/helpers/param.js.map +1 -1
  317. package/parsers/parse-code-block-params.d.ts +1 -1
  318. package/parsers/parse-code-block-params.js +22 -16
  319. package/parsers/parse-code-block-params.js.map +1 -1
  320. package/parsers/parse-snippet.js +10 -10
  321. package/parsers/parse-snippet.js.map +1 -1
  322. package/schematics/collection.json +34 -23
  323. package/schematics/migrate-to-vite/analyze.d.ts +76 -0
  324. package/schematics/migrate-to-vite/analyze.js +816 -0
  325. package/schematics/migrate-to-vite/analyze.js.map +1 -0
  326. package/schematics/migrate-to-vite/index.d.ts +9 -0
  327. package/schematics/migrate-to-vite/index.js +585 -0
  328. package/schematics/migrate-to-vite/index.js.map +1 -0
  329. package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
  330. package/schematics/migrate-to-vite/legacy-folder.js +340 -0
  331. package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
  332. package/schematics/migrate-to-vite/report.d.ts +32 -0
  333. package/schematics/migrate-to-vite/report.js +97 -0
  334. package/schematics/migrate-to-vite/report.js.map +1 -0
  335. package/schematics/migrate-to-vite/schema.d.ts +13 -0
  336. package/schematics/migrate-to-vite/schema.js +3 -0
  337. package/schematics/migrate-to-vite/schema.js.map +1 -0
  338. package/schematics/migrate-to-vite/schema.json +31 -0
  339. package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
  340. package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
  341. package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
  342. package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
  343. package/schematics/migrate-to-vite/setup/index.js +13 -0
  344. package/schematics/migrate-to-vite/setup/index.js.map +1 -0
  345. package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
  346. package/schematics/migrate-to-vite/setup/json-file.js +115 -0
  347. package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
  348. package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
  349. package/schematics/migrate-to-vite/setup/source.js +202 -0
  350. package/schematics/migrate-to-vite/setup/source.js.map +1 -0
  351. package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
  352. package/schematics/migrate-to-vite/setup/targets.js +48 -0
  353. package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
  354. package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
  355. package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
  356. package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
  357. package/schematics/migrate-to-vite/setup/workspace.d.ts +100 -0
  358. package/schematics/migrate-to-vite/setup/workspace.js +225 -0
  359. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
  360. package/schematics/migrate-to-vite/state.d.ts +65 -0
  361. package/schematics/migrate-to-vite/state.js +92 -0
  362. package/schematics/migrate-to-vite/state.js.map +1 -0
  363. package/schematics/migrate-to-vite/testing/fixtures.d.ts +18 -0
  364. package/schematics/migrate-to-vite/testing/fixtures.js +279 -0
  365. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
  366. package/schematics/migrate-to-vite/update-note.d.ts +6 -0
  367. package/schematics/migrate-to-vite/update-note.js +23 -0
  368. package/schematics/migrate-to-vite/update-note.js.map +1 -0
  369. package/schematics/migration.json +5 -0
  370. package/schematics/migrations/standalone-pages/index.js +7 -6
  371. package/schematics/migrations/standalone-pages/index.js.map +1 -1
  372. package/schematics/vite-setup/index.d.ts +20 -0
  373. package/schematics/vite-setup/index.js +206 -0
  374. package/schematics/vite-setup/index.js.map +1 -0
  375. package/schematics/vite-setup/schema.d.ts +7 -0
  376. package/schematics/vite-setup/schema.js +3 -0
  377. package/schematics/vite-setup/schema.js.map +1 -0
  378. package/schematics/vite-setup/schema.json +19 -0
  379. package/scripts/restore-theme.js +9 -2
  380. package/templates/context.ts.nunj +3 -0
  381. package/templates/helpers/badge.html.nunj +1 -1
  382. package/templates/helpers/status.html.nunj +4 -8
  383. package/templates/page-wrapper.ts.nunj +24 -1
  384. package/templates/page.ts.nunj +25 -0
  385. package/templates/parts/page-tags.html.nunj +1 -1
  386. package/templates/playgrounds.ts.nunj +8 -9
  387. package/templates/routes.ts.nunj +6 -1
  388. package/templates/symbol/decorators.html.nunj +12 -0
  389. package/templates/symbol/details.html.nunj +62 -0
  390. package/templates/symbol/extended-by.html.nunj +17 -0
  391. package/templates/symbol/header.html.nunj +22 -0
  392. package/templates/symbol/members.html.nunj +301 -0
  393. package/templates/symbol/page.html.nunj +76 -0
  394. package/templates/symbol/see-also.html.nunj +16 -0
  395. package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
  396. package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
  397. package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
  398. package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
  399. package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
  400. package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
  401. package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
  402. package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
  403. package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
  404. package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
  405. package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
  406. package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
  407. package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
  408. package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
  409. package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
  410. package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
  411. package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
  412. package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
  413. package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
  414. package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
  415. package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
  416. package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
  417. package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
  418. package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
  419. package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
  420. package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
  421. package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
@@ -0,0 +1,42 @@
1
+ import type { CiVendor } from './detect.js';
2
+ import type { GenerationView } from './model.js';
3
+ /** Never more than one heartbeat line per 5 s, whatever the configured cadence. */
4
+ export declare const LINES_MIN_HEARTBEAT_MS = 5000;
5
+ export interface LinesOptions {
6
+ /** Prints one line (never throws into the renderer's caller; the reporter contains it). */
7
+ print: (text: string) => void;
8
+ /** Prints a CI service message verbatim (free text goes through `print`, which neutralizes them). */
9
+ service?: (text: string) => void;
10
+ heartbeatMs: number;
11
+ /** Nx TUI / stream output: short append-only lines. */
12
+ compact: boolean;
13
+ /** Azure/TeamCity hidden progress messages, printed after each progress line. */
14
+ assist?: CiVendor;
15
+ project?: string;
16
+ }
17
+ /**
18
+ * LINES renderer for one build generation: a start line, one line per step, and a heartbeat on a
19
+ * fixed cadence. ASCII only, no escape bytes. About 5–10 lines for a 20–40 s build.
20
+ */
21
+ export declare class LinesRenderer {
22
+ private readonly options;
23
+ private view;
24
+ private elapsed;
25
+ private printedSteps;
26
+ private lastLineAt;
27
+ /** Lines written for the tracked generation, for volume checks. */
28
+ lines: number;
29
+ constructor(options: LinesOptions);
30
+ get tracking(): boolean;
31
+ /** Starts a generation: prints the start line. */
32
+ track(view: GenerationView, elapsed: (now: number) => number, now: number): void;
33
+ /** A progress event was accepted: prints a line when a new step started. */
34
+ update(now: number): void;
35
+ nextWake(): number | undefined;
36
+ /** Heartbeat. */
37
+ wake(now: number): void;
38
+ stop(): void;
39
+ /** `step`: the line that announces a step shows totals; a heartbeat shows the count so far. */
40
+ private progressLine;
41
+ private emit;
42
+ }
@@ -0,0 +1,115 @@
1
+ /** The stream the live line is drawn on (normally `process.stderr`). */
2
+ export interface LiveStream {
3
+ write(chunk: string): unknown;
4
+ columns?: number;
5
+ }
6
+ /**
7
+ * Registers a callback for the end of the process and returns its removal
8
+ * ({@link processExitHook} by default).
9
+ */
10
+ export type ExitHook = (callback: () => void) => () => void;
11
+ /** The process-control port of {@link createProcessExitHook}. */
12
+ export interface ExitProcess {
13
+ once(event: 'exit', listener: () => void): unknown;
14
+ prependListener(event: NodeJS.Signals, listener: (signal: NodeJS.Signals) => void): unknown;
15
+ removeListener(event: 'exit' | NodeJS.Signals, listener: (...args: never[]) => void): unknown;
16
+ listenerCount(event: NodeJS.Signals): number;
17
+ kill(pid: number, signal: NodeJS.Signals): unknown;
18
+ exit(code: number): unknown;
19
+ readonly pid: number;
20
+ readonly platform: string;
21
+ readonly stdin?: {
22
+ isTTY?: boolean;
23
+ isRaw?: boolean;
24
+ setRawMode?(mode: boolean): unknown;
25
+ };
26
+ }
27
+ /**
28
+ * Calls `callback` once, at `exit` or on SIGINT, SIGTERM or SIGHUP, and removes every listener it
29
+ * added.
30
+ *
31
+ * Host signal behaviour is kept in both cases:
32
+ * - **The host handles the signal** (a listener of its own, added before or after this one): the
33
+ * callback runs first, so the line is gone before the host prints its shutdown lines, and the
34
+ * host decides what happens next. Node's disposition does not change, since the host's listener
35
+ * already replaced the default.
36
+ * - **Nobody else does**: this listener is what replaced Node's default ending, so it gives it
37
+ * back. It restores the terminal mode (stdin raw mode), removes itself and raises the signal
38
+ * again, and the process ends by that signal. Limitation: the rest of Node's own stdio reset on a
39
+ * fatal signal (terminal attributes changed by native code) is not reproduced. Where a signal
40
+ * cannot be raised (Windows, where only SIGINT and SIGTERM can be sent, or a failing `kill`), it
41
+ * exits with `128 + signal number`, the shells' code for that signal.
42
+ *
43
+ * Not listening while alone would keep the default ending but leave the line on the screen after
44
+ * Ctrl-C; not listening next to a host's listener would put the host's shutdown lines behind the
45
+ * line. Neither changes behaviour more than this, so the line is always cleared.
46
+ */
47
+ export declare function createProcessExitHook(target: ExitProcess): ExitHook;
48
+ export declare const processExitHook: ExitHook;
49
+ /** Live cadence: bounded redraws keep screen readers and Nx cache replays quiet. */
50
+ export declare const LIVE_FIRST_DRAW_MS = 500;
51
+ export declare const LIVE_ACTIVITY_DRAW_MS = 1000;
52
+ /**
53
+ * Edits draw the in-progress line only past 1 s, so a sub-second edit never flashes one. The
54
+ * edit's completion line is printed regardless.
55
+ */
56
+ export declare const LIVE_EDIT_DRAW_MS = 1000;
57
+ /**
58
+ * Change-driven redraws: at most one per 750 ms (the ceiling is 5 per second). With whole-second
59
+ * elapsed time and a short bar, an Nx cache replay of a 60 s build stays around 10 KB, even when
60
+ * every update changes the text.
61
+ */
62
+ export declare const LIVE_MIN_INTERVAL_MS = 750;
63
+ export declare const LIVE_IDLE_TICK_MS = 1000;
64
+ export declare const CLEAR_LINE = "\r\u001B[2K";
65
+ /** What the live line shows right now. */
66
+ export interface LiveFrame {
67
+ body: string;
68
+ elapsedMs: number;
69
+ /** Drives the bar; absent before the steps are known. */
70
+ fraction?: number;
71
+ }
72
+ export interface LiveOptions {
73
+ stream: LiveStream;
74
+ unicode: boolean;
75
+ /** Read at every draw: the terminal may be resized while a build runs. */
76
+ columns: () => number;
77
+ bar: boolean;
78
+ exitHook?: ExitHook;
79
+ }
80
+ /** Below this width a live line says too little to be worth redrawing: draw nothing. */
81
+ export declare const LIVE_MIN_COLUMNS = 20;
82
+ /**
83
+ * LIVE renderer: one line on the stream, redrawn in place. It is drawn first after a delay (quick
84
+ * work never flashes), then at most every 500 ms when the text changed and on a 1 s idle tick.
85
+ * It never writes `\n` and is cleared at the end, on dispose and at process exit.
86
+ */
87
+ export declare class LiveRenderer {
88
+ private readonly options;
89
+ private source;
90
+ private firstDrawAt;
91
+ private lastDrawAt;
92
+ private dirty;
93
+ private shown;
94
+ private frame;
95
+ private removeExitHook;
96
+ /** The process is ending (exit or a signal): nothing is drawn again, even if a host lives on. */
97
+ private ended;
98
+ /** Frames written, for volume checks. */
99
+ frames: number;
100
+ constructor(options: LiveOptions);
101
+ get tracking(): boolean;
102
+ get showing(): boolean;
103
+ /** Starts showing `source`; the first frame is drawn `delayMs` after `now`. */
104
+ track(source: (now: number) => LiveFrame, now: number, delayMs?: number): void;
105
+ /** Something visible changed. */
106
+ touch(): void;
107
+ /** The absolute time of the next draw, or `undefined` when nothing is tracked. */
108
+ nextWake(): number | undefined;
109
+ /** Draws when a frame is due at `now`. */
110
+ wake(now: number): void;
111
+ /** Removes the line (before another line is printed); the next wake redraws it. */
112
+ clear(): void;
113
+ /** Stops tracking and clears the line. */
114
+ stop(): void;
115
+ }
@@ -0,0 +1,85 @@
1
+ import type { ProgressActivityEvent, ProgressEvent, ProgressPass, ProgressPhase, ProgressSettledEvent, ProgressState, ProgressTrigger } from './events.js';
2
+ /** The four user-facing steps; each groups the internal phases that run in it. */
3
+ export interface ProgressStep {
4
+ label: 'preparing' | 'rendering' | 'linking' | 'writing';
5
+ phases: readonly ProgressPhase[];
6
+ }
7
+ export declare const PROGRESS_STEPS: readonly ProgressStep[];
8
+ /** Zero-based index of the step a phase belongs to. */
9
+ export declare const stepOf: (phase: ProgressPhase) => number;
10
+ /**
11
+ * Default share of a cold build per phase (preparing ≈35 %, rendering ≈25 %, linking ≈15 %,
12
+ * writing ≈25 % on a large site). They only drive the percentage, never results.
13
+ */
14
+ export declare const PHASE_WEIGHTS: Readonly<Record<ProgressPhase, number>>;
15
+ /** What the model knows about one generation. */
16
+ export interface GenerationView {
17
+ generation: number;
18
+ trigger: ProgressTrigger;
19
+ mode: 'development' | 'production';
20
+ changes: number;
21
+ /** Session clock of the newest accepted event. */
22
+ elapsedMs: number;
23
+ lastSeq: number;
24
+ pass?: ProgressPass;
25
+ reason?: string;
26
+ /** The phase sequence restarted once for a FULL pass. */
27
+ restarted: boolean;
28
+ phase?: ProgressPhase;
29
+ phaseState?: ProgressState;
30
+ completed?: number;
31
+ /** Totals fixed at each phase's start, in the current pass. */
32
+ totals: Partial<Record<ProgressPhase, number>>;
33
+ reused?: number;
34
+ /** Compiler phases are reported, so the four steps and a percentage can be shown. */
35
+ stepped: boolean;
36
+ /** Weighted overall fraction, clamped so the percentage never goes backwards. */
37
+ fraction: number;
38
+ settled?: ProgressSettledEvent;
39
+ }
40
+ export type ModelChange = {
41
+ kind: 'started';
42
+ view: GenerationView;
43
+ superseded?: GenerationView;
44
+ } | {
45
+ kind: 'progress';
46
+ view: GenerationView;
47
+ phaseStarted: boolean;
48
+ passRestarted: boolean;
49
+ } | {
50
+ kind: 'settled';
51
+ view: GenerationView;
52
+ event: ProgressSettledEvent;
53
+ } | {
54
+ kind: 'activity';
55
+ event: ProgressActivityEvent;
56
+ };
57
+ /**
58
+ * The generation-scoped progress state: one start, strictly increasing `seq`, one settle; phases in
59
+ * declared order; fixed totals and monotonic counts. Only the newest started generation
60
+ * is tracked. Stale, out-of-order and malformed events are dropped (`apply` returns `undefined`);
61
+ * nothing throws.
62
+ */
63
+ export declare class ProgressModel {
64
+ private latest;
65
+ private currentView;
66
+ /** Running activities, per kind: a warm-up and an input check may overlap. */
67
+ private readonly activities;
68
+ /** Sticky: once any generation reported a compiler phase, later generations are stepped. */
69
+ private compilerReports;
70
+ get current(): GenerationView | undefined;
71
+ /** A generation has started and not settled. */
72
+ get inFlight(): boolean;
73
+ apply(event: ProgressEvent): ModelChange | undefined;
74
+ private started;
75
+ /** The view when `event` belongs to the in-flight generation and advances its `seq`. */
76
+ private accepting;
77
+ private progress;
78
+ private settled;
79
+ /**
80
+ * Activities are tracked per kind and are accepted during a generation too: the session does
81
+ * not run them inside one, but a failure must never be lost to an ordering surprise. An `end`
82
+ * without a matching `start` is dropped, unless it reports a failure.
83
+ */
84
+ private activityChange;
85
+ }
@@ -0,0 +1,87 @@
1
+ import type { ProgressEnvironment, ProgressStream } from './detect.js';
2
+ import type { ProgressEvent } from './events.js';
3
+ import type { ExitHook, LiveStream } from './live.js';
4
+ import type { ProgressSetting } from './settings.js';
5
+ /**
6
+ * The host's output port. Every method writes one complete line, except `live`, which receives the
7
+ * in-place line. Hosts map it to their logger: the CLI writes progress to stderr and results to
8
+ * stdout; Vite uses `server.config.logger.info` (never with `clear`) and, after listen,
9
+ * `{ timestamp: true }`; Angular uses `context.logger.info`.
10
+ */
11
+ export interface ProgressWriter {
12
+ /** Progress and notice lines. */
13
+ line(text: string): void;
14
+ /** Result lines (build summary, per-edit line). Defaults to `line`. */
15
+ summary?(text: string): void;
16
+ /** Lines after another writer took the terminal (`foreign`). Defaults to `summary`/`line`. */
17
+ timestampedLine?(text: string): void;
18
+ /** The `json` style: one event per line, for the CLI's `--json` stdout stream. Defaults to `line`. */
19
+ json?(text: string): void;
20
+ /** Where the live line is drawn; without it the reporter never redraws in place. */
21
+ live?: LiveStream & ProgressStream;
22
+ }
23
+ /** Injectable time source: the reporter's own cadence. Displayed durations come from the session clock. */
24
+ export interface ProgressClock {
25
+ now(): number;
26
+ setTimeout(callback: () => void, ms: number): unknown;
27
+ clearTimeout(handle: unknown): void;
28
+ }
29
+ export declare const systemClock: ProgressClock;
30
+ /**
31
+ * What the reporter still prints once another writer shares the terminal. `notices`: results plus
32
+ * the slow-edit and background notices (the Vite dev server, whose log is NgDoc's to share).
33
+ * `summaries`: results only (the CLI after it spawns a host), because the host's own output owns
34
+ * the terminal.
35
+ */
36
+ export type ForeignMode = 'summaries' | 'notices';
37
+ export interface ProgressReporterOptions {
38
+ writer: ProgressWriter;
39
+ /** The resolved setting; by default `resolveProgressSetting({ env })`. */
40
+ setting?: ProgressSetting;
41
+ env?: NodeJS.ProcessEnv;
42
+ platform?: NodeJS.Platform;
43
+ /** Another writer already shares the terminal (`true` means `notices`). */
44
+ foreign?: boolean | ForeignMode;
45
+ /** Named in the LINES start line; defaults to the Nx task project. */
46
+ project?: string;
47
+ clock?: ProgressClock;
48
+ /** Wall clock for GitLab section timestamps; `Date.now` by default. */
49
+ date?: () => number;
50
+ exitHook?: ExitHook;
51
+ /** Used for `$GITHUB_STEP_SUMMARY` (sections only). */
52
+ appendFile?: (file: string, data: string) => void;
53
+ /**
54
+ * The reporter stopped after its writer threw. Called once; hosts report it as the
55
+ * `SESSION_PROGRESS_FAILED` warning (`progressFailure`). Progress never stops a build or a watch.
56
+ */
57
+ onError?: (error: unknown) => void;
58
+ }
59
+ export interface ProgressReporter {
60
+ readonly environment: ProgressEnvironment;
61
+ /** Feeds one event. Never throws. */
62
+ handle(event: ProgressEvent): void;
63
+ /**
64
+ * Another writer took the terminal: the Vite dev server after it listens (`notices`) and the CLI
65
+ * after it spawns a host (`summaries`).
66
+ */
67
+ setForeign(mode?: ForeignMode): void;
68
+ /**
69
+ * The host is about to print its own output (a result's diagnostics): the live line is cleared
70
+ * first, so the output never lands behind it, and it is redrawn on its next frame.
71
+ */
72
+ interrupt(): void;
73
+ /**
74
+ * Clears the live line synchronously and stops. An unfinished generation gets no summary; a
75
+ * superseded one whose successor never started gets its committed result line.
76
+ */
77
+ dispose(): void;
78
+ }
79
+ /** Slow edits and background work stay quiet unless they run longer than this. */
80
+ export declare const NOTICE_AFTER_MS = 2000;
81
+ /** How long a superseded generation's result waits for the generation that continues it. */
82
+ export declare const CARRY_EXPIRY_MS = 1000;
83
+ /**
84
+ * Creates the reporter for one build session. Use one reporter per session: it follows a single
85
+ * generation sequence and drops events of generations older than the newest it has seen.
86
+ */
87
+ export declare function createProgressReporter(options: ProgressReporterOptions): ProgressReporter;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Progress settings. Precedence: CLI flag > `NGDOC_PROGRESS` > builder or plugin
3
+ * option > host quiet settings > `auto`.
4
+ */
5
+ export type ProgressSetting = 'auto' | 'live' | 'plain' | 'summary' | 'off' | 'json' | 'verbose';
6
+ /** Builder and plugin options take every setting except `json`, which is for tools. */
7
+ export type ProgressOptionSetting = Exclude<ProgressSetting, 'json'>;
8
+ export declare const PROGRESS_SETTINGS: readonly ProgressSetting[];
9
+ export declare const PROGRESS_ENV = "NGDOC_PROGRESS";
10
+ /** Opt-in GitHub/GitLab collapsible groups and the GitHub step summary. */
11
+ export declare const PROGRESS_SECTIONS_ENV = "NGDOC_PROGRESS_SECTIONS";
12
+ /** Node warning code for an unknown `NGDOC_PROGRESS` value (once per process). */
13
+ export declare const NGDOC_PROGRESS_VALUE = "NGDOC_PROGRESS_VALUE";
14
+ export type ProgressSettingSource = 'cli' | 'env' | 'option' | 'host' | 'default';
15
+ export interface ResolvedProgressSetting {
16
+ setting: ProgressSetting;
17
+ source: ProgressSettingSource;
18
+ }
19
+ /** What the host says about its own quietness. */
20
+ export interface HostQuiet {
21
+ /** Vite `logLevel`: `warn`, `error` and `silent` turn progress off. */
22
+ viteLogLevel?: 'info' | 'warn' | 'error' | 'silent';
23
+ }
24
+ export interface ResolveProgressOptions {
25
+ /** `--progress <value>`, already validated by the CLI (`isProgressSetting`). */
26
+ cli?: ProgressSetting;
27
+ env?: NodeJS.ProcessEnv;
28
+ /** The Vite plugin option `progress` (Vite dev server and build). */
29
+ option?: ProgressOptionSetting;
30
+ host?: HostQuiet;
31
+ /** Defaults to `process.emitWarning`. */
32
+ warn?: (message: string, code: string) => void;
33
+ }
34
+ export declare const isProgressSetting: (value: unknown) => value is ProgressSetting;
35
+ /** Normalises a user-typed value (`' Plain '` → `plain`); `undefined` when it is not a setting. */
36
+ export declare function parseProgressSetting(value: string | undefined): ProgressSetting | undefined;
37
+ /** Test hook: forget which unknown values were already reported in this process. */
38
+ export declare function resetProgressWarnings(): void;
39
+ /**
40
+ * Resolves the effective setting. An unknown `NGDOC_PROGRESS` warns once and counts as unset. The
41
+ * first explicit setting wins, except that an explicit `auto` ("decide for me") still yields to
42
+ * the host's quiet settings.
43
+ */
44
+ export declare function resolveProgressSetting(options?: ResolveProgressOptions): ResolvedProgressSetting;
45
+ /** `NGDOC_PROGRESS_SECTIONS`: `1`/`true`/`on`/`yes` turn the CI sections on. */
46
+ export declare function sectionsEnabled(env?: NodeJS.ProcessEnv): boolean;
47
+ /**
48
+ * Engine switches that change how fast NgDoc works. When one is set to a non-default value, the
49
+ * reporter prints one notice, so a slow edit explains itself.
50
+ */
51
+ export declare const ENGINE_SWITCHES: ReadonlyArray<{
52
+ name: string;
53
+ values: RegExp;
54
+ effect: string;
55
+ }>;
56
+ /**
57
+ * The engine switches set in `env`, in declaration order, each as `NAME=value (effect)`. `verify`
58
+ * values add checks rather than turning something off.
59
+ */
60
+ export declare function activeEngineSwitches(env?: NodeJS.ProcessEnv): string[];
@@ -0,0 +1,9 @@
1
+ import { type ObjectLiteralExpression, type SourceFile, Node, ts } from 'ts-morph';
2
+ import type { GeneratorConfiguration, GuideSemantics, JsonValue } from '../contracts.js';
3
+ import { type TrackedFiles } from './dependencies.js';
4
+ import type { JsDoc } from './rendering.js';
5
+ /** Resolves wrappers and local constants without executing source code. */
6
+ export declare function unwrap(node: Node | undefined, seen?: Set<Node<ts.Node>>): Node | undefined;
7
+ export declare function entryObject(source: SourceFile): ObjectLiteralExpression;
8
+ export declare function literal(node: Node | undefined): JsonValue;
9
+ export declare function guideSemantics(source: SourceFile, files: TrackedFiles, config: GeneratorConfiguration, docs: JsDoc, values?: JsonValue): GuideSemantics;
@@ -0,0 +1,19 @@
1
+ import { type JSDocableNode, Node } from 'ts-morph';
2
+ import type { DeclarationDescriptor, Diagnostic } from '../contracts.js';
3
+ import { type TrackedFiles } from './dependencies.js';
4
+ import type { QueryContext } from './fragments.js';
5
+ import { type Snapshot, type SupportedDeclaration } from './program-state.js';
6
+ /**
7
+ * API enumeration: the declarations of an API entry's scopes, with their identities, routes and
8
+ * exported keywords.
9
+ */
10
+ /** The node whose JSDoc documents a declaration (a variable's statement). */
11
+ export declare function docNode(node: Node): JSDocableNode | undefined;
12
+ export declare function supported(node: Node): node is SupportedDeclaration;
13
+ /** Semantic names and relative source paths survive checkout relocation and scope reordering. */
14
+ export declare function declarationIdentity(project: string, api: string, scope: string, workspace: string, source: string, name: string): string;
15
+ /**
16
+ * The public declarations of an API entry, in scope and export order, registered in the snapshot
17
+ * for later fragment requests.
18
+ */
19
+ export declare function enumerateApi(state: Snapshot, entryId: string, files: TrackedFiles, diagnostics: Diagnostic[], context: QueryContext): DeclarationDescriptor[];
@@ -0,0 +1,33 @@
1
+ import { type ClassDeclaration, type EnumDeclaration, type InterfaceDeclaration, type JSDocableNode } from 'ts-morph';
2
+ import type { SupportedDeclaration } from './program-state.js';
3
+ /**
4
+ * The summary of an API declaration that the search palette and the API index show: a short
5
+ * signature and a one-line description.
6
+ *
7
+ * Both are read from the declaration's own syntax (its header and its doc comment), never from
8
+ * the type checker, so they depend only on the text of the declaring file, which the enumeration
9
+ * that calls this has already read. A type the declaration only refers to is printed as written.
10
+ */
11
+ export interface ApiSummary {
12
+ /** The declaration header, for example `export class Name<T> extends Base`; a line per decorator. */
13
+ signature: string;
14
+ /**
15
+ * The first paragraph of the doc comment as plain text: its first sentence when the paragraph is
16
+ * longer than {@link API_DESCRIPTION_LIMIT} characters, cut at a word when that is still longer.
17
+ */
18
+ description?: string;
19
+ }
20
+ /** The longest description kept: one line in the palette preview and the index. */
21
+ export declare const API_DESCRIPTION_LIMIT = 160;
22
+ /**
23
+ * The summary of a declaration.
24
+ * @param node - The declaration.
25
+ * @param doc - The node that holds its doc comment (a variable's statement).
26
+ */
27
+ export declare function apiSummary(node: SupportedDeclaration, doc: JSDocableNode | undefined): ApiSummary;
28
+ /**
29
+ * The declaration panel of a class, an interface or an enum page: its signature with an elided
30
+ * body, and each heritage clause on its own indented line when the header does not fit on one line.
31
+ * @param node - The class, interface or enum.
32
+ */
33
+ export declare function apiDeclaration(node: ClassDeclaration | InterfaceDeclaration | EnumDeclaration): string;
@@ -0,0 +1,20 @@
1
+ import type { Dependency, Diagnostic, SourceLocation } from '../contracts.js';
2
+ import { ObservationRecorder } from '../kernel/observations.js';
3
+ export declare const normalize: (file: string) => string;
4
+ /** The sha256 of a text; digests of values go through `digestOf` (`kernel/canonical.ts`). */
5
+ export declare const digest: (text: string) => string;
6
+ export declare class SemanticFailure extends Error {
7
+ readonly code: string;
8
+ readonly source?: SourceLocation | undefined;
9
+ constructor(code: string, message: string, source?: SourceLocation | undefined);
10
+ }
11
+ export declare function diagnostic(error: unknown, source?: SourceLocation): Diagnostic;
12
+ /**
13
+ * The semantic service's files recorder: the kernel {@link ObservationRecorder} without a byte
14
+ * cache (program observations outlive a generation), whose reads fail as semantic diagnostics.
15
+ * Two reads of one path that saw different bytes record a conflicting digest.
16
+ */
17
+ export declare class TrackedFiles extends ObservationRecorder {
18
+ constructor(initial?: Dependency[], observer?: (dependency: Dependency) => void);
19
+ read(file: string): string;
20
+ }
@@ -0,0 +1,58 @@
1
+ import { type ClassDeclaration, type Project, Node, ts } from 'ts-morph';
2
+ /**
3
+ * One heritage index per TypeScript program for the API "See Also" section.
4
+ *
5
+ * ts-morph `ClassDeclaration#getDerivedClasses()` runs a language-service `findReferences`
6
+ * for the class and then again for every class it finds, so a base class with N subclasses
7
+ * costs N + 1 whole-program reference searches (apps/ng-doc: 658 page subclasses of
8
+ * `NgDocRootPage`, about 16 s for one page).
9
+ *
10
+ * The index is built in one pass over the class declarations of the program. It records, for
11
+ * every `extends` clause, each identifier that ts-morph would accept as the reference to the
12
+ * base class (the expression itself, or any name in a property-access chain) both by text and
13
+ * by the declarations its symbol resolves to through any import/export aliases. A class that
14
+ * appears in neither set cannot be returned by a reference search: TypeScript reports only
15
+ * identifiers that bind to the searched symbol, directly or through an alias. Such a class has
16
+ * no derived classes, and no reference search runs for it.
17
+ *
18
+ * A class that the index marks may have subclasses keeps the exact ts-morph lookup, so the
19
+ * result, including its order (which follows TypeScript's reference-group order), is the one
20
+ * `getDerivedClasses()` returns.
21
+ */
22
+ export declare class DerivedClassIndex {
23
+ private readonly names;
24
+ private readonly targets;
25
+ constructor(program: ts.Program);
26
+ /** False only when no reference search can find a class deriving from `declaration`. */
27
+ mayHaveDerivedClasses(declaration: ClassDeclaration): boolean;
28
+ }
29
+ /**
30
+ * The index of the project's current program; a changed program gets a new index. It is a shared
31
+ * index, so it is built with recording suspended: the one pass over every class would otherwise
32
+ * land in the footprint of whichever unit happens to render first.
33
+ *
34
+ * Its answers are NOT covered by the unit's footprint. A `true` is followed by the recorded
35
+ * reference search, but a `false` ("no subclass can exist") depends on the heritage clauses of
36
+ * every file in the program: adding `class Sub extends Lone` anywhere changes `Lone`'s See Also
37
+ * while `R(Lone)` does not contain that file. The scope records the class instead
38
+ * (`recordDerivedQuery`), and its semantic closure recomputes the list (`derivedClassList`); the
39
+ * index must not be turned into a replayed `recordedAnswer`, whose footprint could not state it.
40
+ */
41
+ export declare function derivedClassIndex(project: Project): DerivedClassIndex;
42
+ /** Same result and order as ts-morph `getDerivedClasses()`, without searches for leaf classes. */
43
+ export declare function getDerivedClasses(declaration: ClassDeclaration, index: DerivedClassIndex): ClassDeclaration[];
44
+ /** The identity of a class for the semantic closure: its file and start position. */
45
+ export declare function classIdentity(declaration: ts.ClassDeclaration): string;
46
+ /**
47
+ * The derived-class list of the class `identity` names in the project's current program, as it
48
+ * would be rendered (order included): each class's identity and name. `absent` when no class
49
+ * starts there. Callers run it with recording suspended.
50
+ */
51
+ export declare function derivedClassList(project: Project, identity: string): string;
52
+ /**
53
+ * Runs `render` while `declaration.getDerivedClasses()` is served from the program index.
54
+ *
55
+ * The shared API templates call that method directly and are shared with the legacy engine,
56
+ * so the modern engine changes the value it supplies rather than the template.
57
+ */
58
+ export declare function withIndexedDerivedClasses<T>(declaration: Node, project: Project, render: () => T): T;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * TypeScript caches the documentation of a symbol on the symbol object (`documentationComment`,
3
+ * `tags` and the contextual accessor variants), including documentation it inherited from base
4
+ * types in other files. A patched program reuses the unchanged files' source files, and with them
5
+ * the symbols their binder created, so after a base file is patched a reused symbol would keep
6
+ * answering with the documentation of the old base, where a cold program computes the new one.
7
+ *
8
+ * The readers below remember, per symbol, the checker its cached answers were computed with, and
9
+ * drop the cache when another checker asks (a patched program's, or the language service's, which
10
+ * sees the same files and computes the same answer). A cache found without a remembered checker
11
+ * (computed before these readers were installed) is dropped once as well. Signatures are created by
12
+ * the checker, so each program has its own.
13
+ */
14
+ /** The symbol methods that cache documentation, with the position of their checker argument. */
15
+ export declare const CACHED_DOCUMENTATION_METHODS: ReadonlyArray<readonly [string, number]>;
16
+ /** The fields TypeScript caches those answers in. */
17
+ export declare const CACHED_DOCUMENTATION_FIELDS: readonly string[];
18
+ /**
19
+ * Installs the checker-aware documentation readers on TypeScript's symbol prototype, once per
20
+ * process. Throws when a pinned-version assumption does not hold (a method is missing), which the
21
+ * caller treats as a patch it cannot make.
22
+ */
23
+ export declare function installDocumentationFreshness(): void;
@@ -0,0 +1,28 @@
1
+ import type { SemanticFragment, SemanticFragmentRequest } from '../contracts.js';
2
+ import type { FootprintScopeKind } from '../kernel/footprint.js';
3
+ import { TrackedFiles } from './dependencies.js';
4
+ import { type Snapshot } from './program-state.js';
5
+ import { type SemanticRecorder } from './recorder.js';
6
+ import { type createJsDoc } from './rendering.js';
7
+ /**
8
+ * Semantic fragments: the entry JSDoc value, the JSDoc fragments of a declaration, and the
9
+ * rendered API templates.
10
+ */
11
+ /** The service's rendering helpers a query needs, bound to the query's observations. */
12
+ export interface QueryContext {
13
+ docs(source: string, files: TrackedFiles): ReturnType<typeof createJsDoc>;
14
+ markdown(text: string, source: string, files: TrackedFiles): string;
15
+ }
16
+ export interface FragmentContext extends QueryContext {
17
+ recorder: SemanticRecorder;
18
+ /** Whether queries record semantic closures (their footprint states the program files read). */
19
+ scoped?(): boolean;
20
+ /** Whether whole-program queries share one tracking of the program (`trackWholeProgram`). */
21
+ trackedProgramReuse?: boolean;
22
+ /** The API template root (the option, or the shipped templates). */
23
+ templateRoot(): string;
24
+ }
25
+ /** The recorder scope of a fragment request: its phase kind and its unit key. */
26
+ export declare function fragmentScope(request: SemanticFragmentRequest): [FootprintScopeKind, string];
27
+ /** Renders one fragment request against the snapshot, recording its reads in `files`. */
28
+ export declare function renderFragment(state: Snapshot, request: SemanticFragmentRequest, files: TrackedFiles, context: FragmentContext): SemanticFragment;
@@ -0,0 +1,59 @@
1
+ import { type FileSystemHost, ts } from 'ts-morph';
2
+ /**
3
+ * Generator-owned roots hold this generator's own output and cache. They are never semantic
4
+ * inputs: the TypeScript program must not resolve into them and dependency tracking must not
5
+ * record them, otherwise a generation's own commit would change the next generation's
6
+ * semantic scope. Every other path resolves exactly as through the real file system.
7
+ */
8
+ export declare class OwnedRoots {
9
+ private readonly roots;
10
+ /** The raw reads that began with a byte order mark, which the program's text omits. */
11
+ private readonly marked;
12
+ constructor(roots: readonly string[]);
13
+ has(file: string): boolean;
14
+ /** The owned root containing a path, if any. */
15
+ describe(file: string): string | undefined;
16
+ /**
17
+ * A non-owned path that is a symlink into an owned root stays unresolved: it is read through
18
+ * its own path like any other input instead of resolving to a hidden owned file.
19
+ */
20
+ realpath(path: string, resolve: (path: string) => string): string;
21
+ /** Notes a raw text read of the program's file system (see {@link contentDigest}). */
22
+ recordRead(file: string, text: string): void;
23
+ /**
24
+ * The content digest of a program file whose text is `text`. TypeScript drops a leading byte
25
+ * order mark from the text it compiles, while every other reader (and the refresher) digests the
26
+ * file's bytes; so a file read with one is digested from its raw read, and the recorded digest
27
+ * matches theirs.
28
+ */
29
+ contentDigest(file: string, text: string): string;
30
+ /** A module resolution host view without owned paths; owned probes are neither made nor recorded. */
31
+ resolutionHost(host: ts.ModuleResolutionHost): ts.ModuleResolutionHost;
32
+ /** The real ts-morph file system with owned paths absent. Writes are never issued by semantic. */
33
+ fileSystem(): FileSystemHost;
34
+ }
35
+ type NotFoundError = new (path: string) => Error;
36
+ /**
37
+ * Returns the error class a real ts-morph file system throws for a missing file. ts-morph's
38
+ * transactional file system recognises "does not exist" only by that class (for example in
39
+ * readFileIfExistsSync), and the class is not part of its public declarations. It is therefore
40
+ * observed from the real host itself. If a ts-morph upgrade stops reporting a missing file this
41
+ * way, owned-root hiding cannot be enforced and synchronization fails loudly instead of silently
42
+ * treating owned files as unreadable.
43
+ */
44
+ export declare function missingFileError(fileSystem: FileSystemHost): NotFoundError;
45
+ /**
46
+ * The first owned root an API scope pattern can reach, judged from the patterns and the file
47
+ * shapes the generator writes, not from files that exist now: a scope that can match generated
48
+ * output would otherwise start failing only after the first commit. A generated path is excluded
49
+ * when a scope exclude matches it or one of its directories, as the scope scan's ignore does.
50
+ * Matches that exist anyway are still rejected by the caller's actual-match check.
51
+ */
52
+ export declare function ownedRootReach(workspaceRoot: string, include: readonly string[], exclude: readonly string[], roots: {
53
+ outputRoot: string;
54
+ cacheRoot: string;
55
+ }): {
56
+ root: string;
57
+ pattern: string;
58
+ } | undefined;
59
+ export {};