@ng-doc/builder 22.0.0-beta.2 → 22.1.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 (441) 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/helpers/get-playground-metadata.js +7 -1
  27. package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
  28. package/engine/builders/page/demo-assets.builder.js +10 -5
  29. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  30. package/engine/builders/page/playground.builder.js +1 -0
  31. package/engine/builders/page/playground.builder.js.map +1 -1
  32. package/engine/builders/shared/content.builder.js +5 -3
  33. package/engine/builders/shared/content.builder.js.map +1 -1
  34. package/engine/builders/shared/page-component.builder.js +16 -6
  35. package/engine/builders/shared/page-component.builder.js.map +1 -1
  36. package/engine/builders/shared/page-wrapper.builder.js +10 -5
  37. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  38. package/engine/core/operators/distinct-pending.js.map +1 -1
  39. package/engine/core/operators/factory.js +1 -4
  40. package/engine/core/operators/factory.js.map +1 -1
  41. package/engine/core/operators/merge-factory.js +19 -17
  42. package/engine/core/operators/merge-factory.js.map +1 -1
  43. package/engine/core/operators/when-builders-done.js.map +1 -1
  44. package/engine/core/triggers/on-dependencies-change.d.ts +1 -1
  45. package/engine/core/triggers/on-dependencies-change.js +2 -2
  46. package/engine/core/triggers/on-dependencies-change.js.map +1 -1
  47. package/generator/artifacts/index.d.ts +317 -0
  48. package/generator/bootstrap/bin.d.ts +18 -0
  49. package/generator/bootstrap/bin.js +7298 -0
  50. package/generator/bootstrap/candidate-output-committer.d.ts +12 -0
  51. package/generator/bootstrap/cli.d.ts +42 -0
  52. package/generator/bootstrap/cli.js +7147 -0
  53. package/generator/bootstrap/constants.d.ts +4 -0
  54. package/generator/bootstrap/index.d.ts +111 -0
  55. package/generator/bootstrap/index.js +5034 -0
  56. package/generator/bootstrap/prerender-command.d.ts +31 -0
  57. package/generator/bootstrap/process-tree.d.ts +49 -0
  58. package/generator/build-metafile.json +12009 -0
  59. package/generator/build-provenance.json +121 -0
  60. package/generator/compiler/assemble.d.ts +41 -0
  61. package/generator/compiler/classify.d.ts +161 -0
  62. package/generator/compiler/closure-store.d.ts +55 -0
  63. package/generator/compiler/common.d.ts +32 -0
  64. package/generator/compiler/describe.d.ts +21 -0
  65. package/generator/compiler/dry-run.d.ts +108 -0
  66. package/generator/compiler/fast-start.d.ts +104 -0
  67. package/generator/compiler/fold.d.ts +116 -0
  68. package/generator/compiler/index.d.ts +131 -0
  69. package/generator/compiler/index.js +19009 -0
  70. package/generator/compiler/link.d.ts +38 -0
  71. package/generator/compiler/memo.d.ts +44 -0
  72. package/generator/compiler/plan.d.ts +116 -0
  73. package/generator/compiler/progress.d.ts +54 -0
  74. package/generator/compiler/render.d.ts +27 -0
  75. package/generator/compiler/retention.d.ts +181 -0
  76. package/generator/compiler/semantic-closure.d.ts +46 -0
  77. package/generator/compiler/targeted.d.ts +280 -0
  78. package/generator/content/code-snippet.d.ts +20 -0
  79. package/generator/content/content-compiler.d.ts +122 -0
  80. package/generator/content/format-cache.d.ts +108 -0
  81. package/generator/content/highlight-cache.d.ts +115 -0
  82. package/generator/content/html-pipeline.d.ts +179 -0
  83. package/generator/content/html-pool.d.ts +245 -0
  84. package/generator/content/html-worker.js +2181 -0
  85. package/generator/content-module-ids.d.ts +8 -0
  86. package/generator/contracts.d.ts +1102 -0
  87. package/generator/contracts.js +15 -0
  88. package/generator/discovery/index.d.ts +79 -0
  89. package/generator/graph/index.d.ts +211 -0
  90. package/generator/graph/unit-index.d.ts +216 -0
  91. package/generator/kernel/canonical.d.ts +57 -0
  92. package/generator/kernel/flags.d.ts +51 -0
  93. package/generator/kernel/footprint.d.ts +88 -0
  94. package/generator/kernel/observations.d.ts +68 -0
  95. package/generator/kernel/paths.d.ts +22 -0
  96. package/generator/kernel/runtime-identity.d.ts +11 -0
  97. package/generator/outputs/index.d.ts +80 -0
  98. package/generator/package.json +3 -0
  99. package/generator/progress/ci.d.ts +22 -0
  100. package/generator/progress/detect.d.ts +60 -0
  101. package/generator/progress/events.d.ts +126 -0
  102. package/generator/progress/format.d.ts +83 -0
  103. package/generator/progress/gate.d.ts +49 -0
  104. package/generator/progress/host.d.ts +29 -0
  105. package/generator/progress/lines.d.ts +42 -0
  106. package/generator/progress/live.d.ts +115 -0
  107. package/generator/progress/model.d.ts +85 -0
  108. package/generator/progress/reporter.d.ts +87 -0
  109. package/generator/progress/settings.d.ts +60 -0
  110. package/generator/semantic/angular.d.ts +29 -0
  111. package/generator/semantic/api-enumeration.d.ts +19 -0
  112. package/generator/semantic/api-summary.d.ts +33 -0
  113. package/generator/semantic/dependencies.d.ts +20 -0
  114. package/generator/semantic/derived-classes.d.ts +58 -0
  115. package/generator/semantic/documentation-cache.d.ts +23 -0
  116. package/generator/semantic/formatting.d.ts +27 -0
  117. package/generator/semantic/fragments.d.ts +37 -0
  118. package/generator/semantic/owned-roots.d.ts +59 -0
  119. package/generator/semantic/program-builder.d.ts +55 -0
  120. package/generator/semantic/program-index.d.ts +124 -0
  121. package/generator/semantic/program-inputs.d.ts +26 -0
  122. package/generator/semantic/program-observations.d.ts +158 -0
  123. package/generator/semantic/program-retention.d.ts +147 -0
  124. package/generator/semantic/program-state.d.ts +196 -0
  125. package/generator/semantic/program-verify.d.ts +22 -0
  126. package/generator/semantic/recorder.d.ts +89 -0
  127. package/generator/semantic/rendering.d.ts +34 -0
  128. package/generator/semantic/semantic-closure.d.ts +129 -0
  129. package/generator/semantic/semantic-service.d.ts +186 -0
  130. package/generator/semantic/type-text.d.ts +5 -0
  131. package/generator/session/build-session.d.ts +206 -0
  132. package/generator/session/input-verification.d.ts +38 -0
  133. package/generator/session/parcel-event-source.d.ts +22 -0
  134. package/generator/session/progress.d.ts +72 -0
  135. package/generator/session/unchanged-saves.d.ts +63 -0
  136. package/generator/session/watch-inputs.d.ts +6 -0
  137. package/generator/session/watch-signals.d.ts +10 -0
  138. package/generator/templates/api/base.html.nunj +26 -0
  139. package/generator/templates/api/class-declaration.html.nunj +59 -0
  140. package/generator/templates/api/details/class-declaration.html.nunj +47 -0
  141. package/generator/templates/api/details/enum-declaration.html.nunj +0 -0
  142. package/generator/templates/api/details/function-declaration.html.nunj +14 -0
  143. package/generator/templates/api/details/helpers/decorators.html.nunj +14 -0
  144. package/generator/templates/api/details/helpers/extends.html.nunj +6 -0
  145. package/generator/templates/api/details/helpers/selectors.html.nunj +12 -0
  146. package/generator/templates/api/details/helpers/type-parameters.html.nunj +14 -0
  147. package/generator/templates/api/details/interface-declaration.html.nunj +27 -0
  148. package/generator/templates/api/details/type-alias-declaration.html.nunj +14 -0
  149. package/generator/templates/api/details/variable-declaration.html.nunj +0 -0
  150. package/generator/templates/api/details.html.nunj +9 -0
  151. package/generator/templates/api/enum-declaration.html.nunj +12 -0
  152. package/generator/templates/api/function-declaration.html.nunj +35 -0
  153. package/generator/templates/api/interface-declaration.html.nunj +37 -0
  154. package/generator/templates/api/type-alias-declaration.html.nunj +16 -0
  155. package/generator/templates/api/variable-declaration.html.nunj +8 -0
  156. package/generator/templates/api-header.html.nunj +11 -0
  157. package/generator/templates/api-list.ts.nunj +22 -0
  158. package/generator/templates/api-page-content.html.nunj +1 -0
  159. package/generator/templates/api-scope.ts.nunj +22 -0
  160. package/generator/templates/category.ts.nunj +22 -0
  161. package/generator/templates/code.html.nunj +3 -0
  162. package/generator/templates/context.ts.nunj +55 -0
  163. package/generator/templates/demo-app.ts.nunj +37 -0
  164. package/generator/templates/demo-assets.ts.nunj +25 -0
  165. package/generator/templates/demo-routes.ts.nunj +23 -0
  166. package/generator/templates/helpers/accessor.html.nunj +76 -0
  167. package/generator/templates/helpers/accessors.html.nunj +7 -0
  168. package/generator/templates/helpers/badge.html.nunj +4 -0
  169. package/generator/templates/helpers/call-signature.html.nunj +70 -0
  170. package/generator/templates/helpers/code.html.nunj +3 -0
  171. package/generator/templates/helpers/constructor.html.nunj +32 -0
  172. package/generator/templates/helpers/declaration-modifiers.html.nunj +45 -0
  173. package/generator/templates/helpers/decorators.html.nunj +11 -0
  174. package/generator/templates/helpers/members.html.nunj +29 -0
  175. package/generator/templates/helpers/method.html.nunj +89 -0
  176. package/generator/templates/helpers/methods.html.nunj +7 -0
  177. package/generator/templates/helpers/modifier.html.nunj +4 -0
  178. package/generator/templates/helpers/no-content.html.nunj +3 -0
  179. package/generator/templates/helpers/overload.html.nunj +57 -0
  180. package/generator/templates/helpers/parameters.html.nunj +44 -0
  181. package/generator/templates/helpers/properties.html.nunj +61 -0
  182. package/generator/templates/helpers/status.html.nunj +33 -0
  183. package/generator/templates/helpers/tag.html.nunj +4 -0
  184. package/generator/templates/helpers/type.html.nunj +11 -0
  185. package/generator/templates/index.ts.nunj +7 -0
  186. package/generator/templates/page-header.html.nunj +5 -0
  187. package/generator/templates/page-wrapper.ts.nunj +69 -0
  188. package/generator/templates/page.ts.nunj +104 -0
  189. package/generator/templates/parts/examples.html.nunj +11 -0
  190. package/generator/templates/parts/member-examples.html.nunj +12 -0
  191. package/generator/templates/parts/member-remarks.html.nunj +8 -0
  192. package/generator/templates/parts/page-tags.html.nunj +10 -0
  193. package/generator/templates/parts/remarks.html.nunj +10 -0
  194. package/generator/templates/parts/see-also.html.nunj +23 -0
  195. package/generator/templates/parts/usage-notes.html.nunj +8 -0
  196. package/generator/templates/playgrounds.ts.nunj +63 -0
  197. package/generator/templates/routes.ts.nunj +53 -0
  198. package/generator/templates/symbol/decorators.html.nunj +12 -0
  199. package/generator/templates/symbol/details.html.nunj +62 -0
  200. package/generator/templates/symbol/extended-by.html.nunj +17 -0
  201. package/generator/templates/symbol/header.html.nunj +22 -0
  202. package/generator/templates/symbol/members.html.nunj +303 -0
  203. package/generator/templates/symbol/page.html.nunj +76 -0
  204. package/generator/templates/symbol/see-also.html.nunj +16 -0
  205. package/generator/vite/angular/ANALOG-LICENSE +21 -0
  206. package/generator/vite/angular/analog-provenance.json +880 -0
  207. package/generator/vite/angular/index.d.ts +14 -0
  208. package/generator/vite/angular/index.js +7300 -0
  209. package/generator/vite/angular-compatibility.d.ts +6 -0
  210. package/generator/vite/angular-composition.d.ts +68 -0
  211. package/generator/vite/angular-version.d.ts +38 -0
  212. package/generator/vite/application-builder.js +336 -0
  213. package/generator/vite/application-builder.schema.json +46 -0
  214. package/generator/vite/application.d.ts +105 -0
  215. package/generator/vite/assets.d.ts +11 -0
  216. package/generator/vite/bounded-close.d.ts +33 -0
  217. package/generator/vite/component-updates.d.ts +21 -0
  218. package/generator/vite/configuration.d.ts +3 -0
  219. package/generator/vite/demo-application.d.ts +34 -0
  220. package/generator/vite/dev-server-builder.js +339 -0
  221. package/generator/vite/dev-server-builder.schema.json +27 -0
  222. package/generator/vite/dev-styles.d.ts +65 -0
  223. package/generator/vite/diagnostics.d.ts +4 -0
  224. package/generator/vite/external-probes.d.ts +40 -0
  225. package/generator/vite/host-updates.d.ts +212 -0
  226. package/generator/vite/index.d.ts +13 -0
  227. package/generator/vite/index.js +11949 -0
  228. package/generator/vite/lease.d.ts +6 -0
  229. package/generator/vite/lifecycle.d.ts +120 -0
  230. package/generator/vite/mime.d.ts +2 -0
  231. package/generator/vite/missing-paths.d.ts +44 -0
  232. package/generator/vite/options.d.ts +87 -0
  233. package/generator/vite/output-watch.d.ts +41 -0
  234. package/generator/vite/paths.d.ts +7 -0
  235. package/generator/vite/plugin.d.ts +3 -0
  236. package/generator/vite/prerender-entry.js +465 -0
  237. package/generator/vite/prerender-runtime.d.ts +79 -0
  238. package/generator/vite/prerender.d.ts +29 -0
  239. package/generator/vite/production.d.ts +66 -0
  240. package/generator/vite/progress.d.ts +33 -0
  241. package/generator/vite/restore-theme.js +13 -0
  242. package/generator/vite/route-inventory.d.ts +24 -0
  243. package/generator/vite/ssr-renderer-control.d.ts +1 -0
  244. package/generator/vite/ssr-renderer-entry.js +444 -0
  245. package/generator/vite/ssr-renderer-protocol.d.ts +101 -0
  246. package/generator/vite/ssr-renderer.d.ts +74 -0
  247. package/generator/vite/theme-index.d.ts +13 -0
  248. package/generator/vite/tsconfig-paths.d.ts +64 -0
  249. package/generator/vite/vite-event-source.d.ts +198 -0
  250. package/generator/vite/vite-version.d.ts +26 -0
  251. package/generator/vite/watch-inputs.d.ts +39 -0
  252. package/generator/worker/entry.d.ts +1 -0
  253. package/generator/worker/entry.js +614 -0
  254. package/generator/worker/index.d.ts +156 -0
  255. package/generator/worker/index.js +1030 -0
  256. package/generator/worker/protocol.d.ts +160 -0
  257. package/helpers/angular/get-component-decorator.js +6 -6
  258. package/helpers/angular/get-component-decorator.js.map +1 -1
  259. package/helpers/angular/get-directive-decorator.js +3 -3
  260. package/helpers/angular/get-directive-decorator.js.map +1 -1
  261. package/helpers/angular/get-pipe-decorator.js +3 -3
  262. package/helpers/angular/get-pipe-decorator.js.map +1 -1
  263. package/helpers/build-indexes.js +5 -2
  264. package/helpers/build-indexes.js.map +1 -1
  265. package/helpers/construct-page-keyword.js +2 -1
  266. package/helpers/construct-page-keyword.js.map +1 -1
  267. package/helpers/extract-selectors.d.ts +1 -1
  268. package/helpers/extract-selectors.js +5 -3
  269. package/helpers/extract-selectors.js.map +1 -1
  270. package/helpers/filter-useless-members.d.ts +1 -1
  271. package/helpers/format-cache.d.ts +34 -0
  272. package/helpers/format-cache.js +26 -0
  273. package/helpers/format-cache.js.map +1 -0
  274. package/helpers/format-code.d.ts +2 -1
  275. package/helpers/format-code.js +20 -4
  276. package/helpers/format-code.js.map +1 -1
  277. package/helpers/import-fresh-esm.js.map +1 -1
  278. package/helpers/index.d.ts +2 -0
  279. package/helpers/index.js +2 -0
  280. package/helpers/index.js.map +1 -1
  281. package/helpers/keyword-heading-title.d.ts +7 -0
  282. package/helpers/keyword-heading-title.js +21 -0
  283. package/helpers/keyword-heading-title.js.map +1 -0
  284. package/helpers/markdown-to-html.js +3 -3
  285. package/helpers/markdown-to-html.js.map +1 -1
  286. package/helpers/navigation-title-order.d.ts +8 -0
  287. package/helpers/navigation-title-order.js +15 -0
  288. package/helpers/navigation-title-order.js.map +1 -0
  289. package/helpers/playground/get-playground-inputs.js +8 -4
  290. package/helpers/playground/get-playground-inputs.js.map +1 -1
  291. package/helpers/playground/get-playground-template-inputs.js +2 -1
  292. package/helpers/playground/get-playground-template-inputs.js.map +1 -1
  293. package/helpers/presentation.d.ts +7 -7
  294. package/helpers/presentation.js +23 -23
  295. package/helpers/presentation.js.map +1 -1
  296. package/helpers/print.js +32 -5
  297. package/helpers/print.js.map +1 -1
  298. package/helpers/process-snippets.d.ts +1 -1
  299. package/helpers/process-snippets.js +3 -3
  300. package/helpers/process-snippets.js.map +1 -1
  301. package/helpers/snippets-from-asset.d.ts +1 -1
  302. package/helpers/snippets-from-asset.js +2 -2
  303. package/helpers/snippets-from-asset.js.map +1 -1
  304. package/helpers/sort-navigation-entities.js +2 -1
  305. package/helpers/sort-navigation-entities.js.map +1 -1
  306. package/helpers/stable-generated-id.d.ts +2 -0
  307. package/helpers/stable-generated-id.js +12 -0
  308. package/helpers/stable-generated-id.js.map +1 -0
  309. package/helpers/text-order.d.ts +8 -0
  310. package/helpers/text-order.js +26 -0
  311. package/helpers/text-order.js.map +1 -0
  312. package/helpers/to-template-string.d.ts +5 -1
  313. package/helpers/to-template-string.js +7 -2
  314. package/helpers/to-template-string.js.map +1 -1
  315. package/helpers/typescript/member/get-inherited-parent.d.ts +1 -1
  316. package/helpers/typescript/member/get-inherited-parent.js +2 -2
  317. package/helpers/typescript/member/get-inherited-parent.js.map +1 -1
  318. package/helpers/typescript/node/sort-by-nodes-name.d.ts +4 -2
  319. package/helpers/typescript/node/sort-by-nodes-name.js +6 -3
  320. package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -1
  321. package/helpers/typescript/property/get-property-assignment.js.map +1 -1
  322. package/interfaces/code-block-options.d.ts +5 -0
  323. package/interfaces/configuration.d.ts +84 -1
  324. package/package.json +87 -29
  325. package/parsers/helpers/number.d.ts +1 -1
  326. package/parsers/helpers/number.js +2 -2
  327. package/parsers/helpers/number.js.map +1 -1
  328. package/parsers/helpers/param-value.d.ts +1 -1
  329. package/parsers/helpers/param-value.js +2 -2
  330. package/parsers/helpers/param-value.js.map +1 -1
  331. package/parsers/helpers/param.js +3 -3
  332. package/parsers/helpers/param.js.map +1 -1
  333. package/parsers/parse-code-block-params.d.ts +11 -2
  334. package/parsers/parse-code-block-params.js +50 -18
  335. package/parsers/parse-code-block-params.js.map +1 -1
  336. package/parsers/parse-snippet.js +10 -10
  337. package/parsers/parse-snippet.js.map +1 -1
  338. package/schematics/collection.json +34 -23
  339. package/schematics/migrate-to-vite/analyze.d.ts +76 -0
  340. package/schematics/migrate-to-vite/analyze.js +859 -0
  341. package/schematics/migrate-to-vite/analyze.js.map +1 -0
  342. package/schematics/migrate-to-vite/index.d.ts +9 -0
  343. package/schematics/migrate-to-vite/index.js +585 -0
  344. package/schematics/migrate-to-vite/index.js.map +1 -0
  345. package/schematics/migrate-to-vite/legacy-folder.d.ts +84 -0
  346. package/schematics/migrate-to-vite/legacy-folder.js +340 -0
  347. package/schematics/migrate-to-vite/legacy-folder.js.map +1 -0
  348. package/schematics/migrate-to-vite/report.d.ts +32 -0
  349. package/schematics/migrate-to-vite/report.js +97 -0
  350. package/schematics/migrate-to-vite/report.js.map +1 -0
  351. package/schematics/migrate-to-vite/schema.d.ts +13 -0
  352. package/schematics/migrate-to-vite/schema.js +3 -0
  353. package/schematics/migrate-to-vite/schema.js.map +1 -0
  354. package/schematics/migrate-to-vite/schema.json +31 -0
  355. package/schematics/migrate-to-vite/setup/dependencies.d.ts +64 -0
  356. package/schematics/migrate-to-vite/setup/dependencies.js +183 -0
  357. package/schematics/migrate-to-vite/setup/dependencies.js.map +1 -0
  358. package/schematics/migrate-to-vite/setup/index.d.ts +6 -0
  359. package/schematics/migrate-to-vite/setup/index.js +13 -0
  360. package/schematics/migrate-to-vite/setup/index.js.map +1 -0
  361. package/schematics/migrate-to-vite/setup/json-file.d.ts +51 -0
  362. package/schematics/migrate-to-vite/setup/json-file.js +115 -0
  363. package/schematics/migrate-to-vite/setup/json-file.js.map +1 -0
  364. package/schematics/migrate-to-vite/setup/source.d.ts +30 -0
  365. package/schematics/migrate-to-vite/setup/source.js +202 -0
  366. package/schematics/migrate-to-vite/setup/source.js.map +1 -0
  367. package/schematics/migrate-to-vite/setup/targets.d.ts +51 -0
  368. package/schematics/migrate-to-vite/setup/targets.js +48 -0
  369. package/schematics/migrate-to-vite/setup/targets.js.map +1 -0
  370. package/schematics/migrate-to-vite/setup/vite-config.d.ts +100 -0
  371. package/schematics/migrate-to-vite/setup/vite-config.js +175 -0
  372. package/schematics/migrate-to-vite/setup/vite-config.js.map +1 -0
  373. package/schematics/migrate-to-vite/setup/workspace.d.ts +105 -0
  374. package/schematics/migrate-to-vite/setup/workspace.js +245 -0
  375. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -0
  376. package/schematics/migrate-to-vite/state.d.ts +65 -0
  377. package/schematics/migrate-to-vite/state.js +92 -0
  378. package/schematics/migrate-to-vite/state.js.map +1 -0
  379. package/schematics/migrate-to-vite/testing/fixtures.d.ts +30 -0
  380. package/schematics/migrate-to-vite/testing/fixtures.js +306 -0
  381. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -0
  382. package/schematics/migrate-to-vite/update-note.d.ts +6 -0
  383. package/schematics/migrate-to-vite/update-note.js +23 -0
  384. package/schematics/migrate-to-vite/update-note.js.map +1 -0
  385. package/schematics/migration.json +5 -0
  386. package/schematics/migrations/standalone-pages/index.js +7 -6
  387. package/schematics/migrations/standalone-pages/index.js.map +1 -1
  388. package/schematics/vite-setup/index.d.ts +24 -0
  389. package/schematics/vite-setup/index.js +212 -0
  390. package/schematics/vite-setup/index.js.map +1 -0
  391. package/schematics/vite-setup/schema.d.ts +7 -0
  392. package/schematics/vite-setup/schema.js +3 -0
  393. package/schematics/vite-setup/schema.js.map +1 -0
  394. package/schematics/vite-setup/schema.json +19 -0
  395. package/scripts/restore-theme.js +9 -2
  396. package/templates/api/class-declaration.html.nunj +5 -3
  397. package/templates/context.ts.nunj +3 -0
  398. package/templates/demo-app.ts.nunj +37 -0
  399. package/templates/demo-routes.ts.nunj +23 -0
  400. package/templates/helpers/badge.html.nunj +1 -1
  401. package/templates/helpers/status.html.nunj +4 -8
  402. package/templates/index.ts.nunj +5 -0
  403. package/templates/page-wrapper.ts.nunj +30 -2
  404. package/templates/page.ts.nunj +33 -1
  405. package/templates/parts/page-tags.html.nunj +1 -1
  406. package/templates/playgrounds.ts.nunj +8 -9
  407. package/templates/routes.ts.nunj +10 -1
  408. package/templates/symbol/decorators.html.nunj +12 -0
  409. package/templates/symbol/details.html.nunj +62 -0
  410. package/templates/symbol/extended-by.html.nunj +17 -0
  411. package/templates/symbol/header.html.nunj +22 -0
  412. package/templates/symbol/members.html.nunj +303 -0
  413. package/templates/symbol/page.html.nunj +76 -0
  414. package/templates/symbol/see-also.html.nunj +16 -0
  415. package/engine/.cache/apps/ng-doc/docs/api-documentation/auto-generation/ng-doc.page.mjs +0 -20
  416. package/engine/.cache/apps/ng-doc/docs/api-documentation/documenting-declarations/ng-doc.page.mjs +0 -20
  417. package/engine/.cache/apps/ng-doc/docs/api-documentation/rendering-api/ng-doc.page.mjs +0 -19
  418. package/engine/.cache/apps/ng-doc/docs/customization/icons/ng-doc.page.mjs +0 -19
  419. package/engine/.cache/apps/ng-doc/docs/customization/layout/ng-doc.page.mjs +0 -19
  420. package/engine/.cache/apps/ng-doc/docs/customization/page-processors/ng-doc.page.mjs +0 -19
  421. package/engine/.cache/apps/ng-doc/docs/customization/page-skeleton/ng-doc.page.mjs +0 -19
  422. package/engine/.cache/apps/ng-doc/docs/customization/search/ng-doc.page.mjs +0 -19
  423. package/engine/.cache/apps/ng-doc/docs/customization/themes/ng-doc.page.mjs +0 -19
  424. package/engine/.cache/apps/ng-doc/docs/develop/ng-doc.page.mjs +0 -36
  425. package/engine/.cache/apps/ng-doc/docs/getting-started/configuration/ng-doc.page.mjs +0 -19
  426. package/engine/.cache/apps/ng-doc/docs/getting-started/installation/ng-doc.page.mjs +0 -19
  427. package/engine/.cache/apps/ng-doc/docs/getting-started/migrations/ng-doc.page.mjs +0 -18
  428. package/engine/.cache/apps/ng-doc/docs/getting-started/ssr/ng-doc.page.mjs +0 -19
  429. package/engine/.cache/apps/ng-doc/docs/getting-started/what-is-ng-doc/ng-doc.page.mjs +0 -19
  430. package/engine/.cache/apps/ng-doc/docs/ng-doc.api.mjs +0 -42
  431. package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.mjs +0 -18
  432. package/engine/.cache/apps/ng-doc/docs/recipes/performance/ng-doc.page.mjs +0 -19
  433. package/engine/.cache/apps/ng-doc/docs/writing-content/blockquotes/ng-doc.page.mjs +0 -18
  434. package/engine/.cache/apps/ng-doc/docs/writing-content/code-blocks/ng-doc.page.mjs +0 -18
  435. package/engine/.cache/apps/ng-doc/docs/writing-content/demo-and-demo-pane/ng-doc.page.mjs +0 -19
  436. package/engine/.cache/apps/ng-doc/docs/writing-content/images-videos-and-embeds/ng-doc.page.mjs +0 -18
  437. package/engine/.cache/apps/ng-doc/docs/writing-content/keywords/ng-doc.page.mjs +0 -17
  438. package/engine/.cache/apps/ng-doc/docs/writing-content/mermaid-diagrams/ng-doc.page.mjs +0 -18
  439. package/engine/.cache/apps/ng-doc/docs/writing-content/nunjucks/ng-doc.page.mjs +0 -18
  440. package/engine/.cache/apps/ng-doc/docs/writing-content/pages-and-categories/ng-doc.page.mjs +0 -18
  441. package/engine/.cache/apps/ng-doc/docs/writing-content/playground/ng-doc.page.mjs +0 -33
@@ -0,0 +1,38 @@
1
+ import type { Dependency, KeywordExport, PageArtifact } from '../contracts.js';
2
+ import { type Unit } from './common.js';
3
+ import type { GenerationPlan } from './plan.js';
4
+ import type { ReplayScope } from './targeted.js';
5
+ /** The keyword set every link of this generation reads. */
6
+ export interface KeywordPlan {
7
+ keywords: KeywordExport[];
8
+ keywordSetDigest: string;
9
+ }
10
+ /** What the link phase leaves for assembly. */
11
+ export interface LinkOutcome {
12
+ linkedByUnit: Map<Unit, PageArtifact['content']>;
13
+ keywordDependenciesByUnit: Map<Unit, Dependency[]>;
14
+ }
15
+ /**
16
+ * Keywords phase: the combined keyword set (remote, configured, then local exports) and the
17
+ * index completeness check: every current descriptor must have its IR, or the generation fails
18
+ * (`undefined`).
19
+ */
20
+ export declare function combineUnitKeywords(plan: GenerationPlan, units: Unit[]): KeywordPlan | undefined;
21
+ /**
22
+ * Link phase: per unit its keyword dependencies, then each IR linked against the keyword set,
23
+ * or reused when linking again provably yields the previous document (see `createLinkReuse`).
24
+ *
25
+ * On the targeted path (`scope`), a replayed unit outside the link set keeps its previous linked
26
+ * content and its retained link record: none of the keys it uses changed binding, and linking
27
+ * reads nothing else, so linking it again would yield exactly those.
28
+ *
29
+ * `done`, when progress is reported, hears how many units are done: the kept ones at once, then
30
+ * each linked unit.
31
+ *
32
+ * With render threads (`content/html-pool`), the back half of each link that will not be reused is
33
+ * dispatched a window of units ahead (`prepareLink`); the loop below still takes every result,
34
+ * records it and reports it in unit order, exactly as when it links each one in its turn. Linking
35
+ * is a pure function of the IR and the keyword set, so the result does not depend on when or where
36
+ * it ran.
37
+ */
38
+ export declare function linkUnits(plan: GenerationPlan, units: Unit[], keywordPlan: KeywordPlan, scope?: ReplayScope, done?: (count: number) => void): Promise<LinkOutcome>;
@@ -0,0 +1,44 @@
1
+ import { type FileStamp } from '../artifacts/index.js';
2
+ import type { CompilationOptions } from './index.js';
3
+ export interface LinkMemo {
4
+ /** SHA-256 of the IR HTML that was linked. */
5
+ input: string;
6
+ /** SHA-256 of the linked HTML it produced. */
7
+ output: string;
8
+ /** Every keyword key the link pass looked up, sorted and unique. */
9
+ keys: string[];
10
+ /** Digest of those keys' bindings when it linked. */
11
+ bindings: string;
12
+ }
13
+ export interface AssemblyMemo {
14
+ key: string;
15
+ revision: string;
16
+ }
17
+ export interface CacheMemo {
18
+ revision: string;
19
+ stamp: FileStamp;
20
+ }
21
+ /**
22
+ * Per-project reuse facts kept beside the artifact cache. Every entry states a fact about a
23
+ * pure computation or a file identity ("linking this HTML with these consulted bindings
24
+ * produced that HTML", "this assembly key produced the page of that revision", "this cache
25
+ * file with this stamp holds that revision"), and every use re-checks the fact against the
26
+ * current inputs, so a stale, missing or corrupt memo only disables reuse.
27
+ */
28
+ export interface MemoState {
29
+ enabled: boolean;
30
+ link(id: string): LinkMemo | undefined;
31
+ recordLink(id: string, entry: LinkMemo | undefined): void;
32
+ assembly(id: string): AssemblyMemo | undefined;
33
+ recordAssembly(id: string, entry: AssemblyMemo): void;
34
+ cacheEntry(id: string): CacheMemo | undefined;
35
+ recordCache(id: string, entry: CacheMemo): void;
36
+ /**
37
+ * Keeps the recorded facts of a unit the targeted path did not link, assemble or write again
38
+ * (its assembly and cache entries, and the link entries of its content): the full path would
39
+ * record the same facts for it, since each still holds for its unchanged inputs.
40
+ */
41
+ carry(unitId: string, contentIds: readonly string[]): void;
42
+ save(projectId: string): Promise<void>;
43
+ }
44
+ export declare function createMemoState(enabled: boolean, root: string, options: Pick<CompilationOptions, 'projectId' | 'compilerVersion' | 'toolchainDigest'>): MemoState;
@@ -0,0 +1,116 @@
1
+ import { JsonArtifactCache } from '../artifacts/index.js';
2
+ import { GeneratorContentCompiler } from '../content/content-compiler.js';
3
+ import { type FormatSession } from '../content/format-cache.js';
4
+ import { type HighlightSession } from '../content/highlight-cache.js';
5
+ import { type RenderBack } from '../content/html-pool.js';
6
+ import type { CompilationRequest, Dependency, Diagnostic, DiscoverySnapshot, PageArtifact, RebuildReason } from '../contracts.js';
7
+ import type { createDiscoveryServices } from '../discovery/index.js';
8
+ import { type DependencyRefresher } from '../graph/index.js';
9
+ import type { OutputAssembler } from '../outputs/index.js';
10
+ import type { SemanticServiceImpl } from '../semantic/semantic-service.js';
11
+ import { type Unit } from './common.js';
12
+ import type { GenerationRecords } from './fold.js';
13
+ import type { CompilationOptions } from './index.js';
14
+ import { type MemoState } from './memo.js';
15
+ import type { ScopedSemanticMode } from './semantic-closure.js';
16
+ /** The services one compile runs its phases with. */
17
+ export interface CompilationServices {
18
+ options: CompilationOptions;
19
+ discovery: ReturnType<typeof createDiscoveryServices>;
20
+ semantic: SemanticServiceImpl;
21
+ assembler: OutputAssembler;
22
+ }
23
+ /**
24
+ * Everything the unit phases of one generation share: the request and its services, the discovered
25
+ * site, and the previous artifacts and what may be reused from them. Built once by
26
+ * `planGeneration`.
27
+ */
28
+ export interface GenerationPlan extends CompilationServices {
29
+ request: CompilationRequest;
30
+ signal: AbortSignal;
31
+ records: GenerationRecords;
32
+ refresher: DependencyRefresher;
33
+ found: DiscoverySnapshot;
34
+ configuration: DiscoverySnapshot['configuration'];
35
+ /**
36
+ * Turns semantic scopes into references and, unless semantic invalidation is scoped, drops the
37
+ * program inputs the aggregate owns (a scoped unit keeps the program files it read).
38
+ */
39
+ compact(values: Dependency[]): Dependency[];
40
+ /** The global `semantic-reference` every unit records; empty when semantic invalidation is scoped. */
41
+ semanticReferences: Dependency[];
42
+ /** Scoped semantic invalidation in this generation (`./semantic-closure`). */
43
+ scopedSemantic: ScopedSemanticMode;
44
+ outputDependencies: Dependency[];
45
+ /** The program's own dependencies, owned once by the aggregate artifact. */
46
+ programDependencies: Dependency[];
47
+ cache: JsonArtifactCache;
48
+ hadCacheIndex: boolean;
49
+ previous: PageArtifact[];
50
+ previousById: Map<string, PageArtifact>;
51
+ /** Index-derived `whyRebuilt` reasons of these (removed or rebuilt) owners. */
52
+ affectedFor(ownerIds: string[]): RebuildReason[];
53
+ /**
54
+ * The previous artifacts are reused beyond their IRs (links, assemblies, revisions): the
55
+ * session's snapshot, or the cache index of a start (`restoredReuse`).
56
+ */
57
+ sessionPrevious: boolean;
58
+ memo: MemoState;
59
+ compiler: GeneratorContentCompiler;
60
+ /** The cache of highlighted code blocks, when this generation uses one (`content/highlight-cache`). */
61
+ highlight?: HighlightSession;
62
+ /** The cache of formatted signatures and snippets, when this generation uses one (`content/format-cache`). */
63
+ format?: FormatSession;
64
+ /** Where the content's HTML pipeline runs, when it may run on threads (`content/html-pool`). */
65
+ back?: RenderBack;
66
+ }
67
+ /**
68
+ * Setup phase: previous artifacts (session snapshot or cache index), reuse switches and the output
69
+ * templates. Its diagnostics are recorded as the `setup` phase.
70
+ * @param services
71
+ * @param input
72
+ * @param input.request
73
+ * @param input.signal
74
+ * @param input.records
75
+ * @param input.refresher
76
+ * @param input.found
77
+ * @param input.programDependencies
78
+ * @param input.scopedSemantic
79
+ * @param input.scratch
80
+ */
81
+ export declare function planGeneration(services: CompilationServices, input: {
82
+ request: CompilationRequest;
83
+ signal: AbortSignal;
84
+ records: GenerationRecords;
85
+ refresher: DependencyRefresher;
86
+ found: DiscoverySnapshot;
87
+ programDependencies: Dependency[];
88
+ scopedSemantic?: ScopedSemanticMode;
89
+ /**
90
+ * No previous artifacts at all, not even the cache index's: with the reference path's options
91
+ * (`incrementalReuse: false`), a compile from scratch (the fast start's `verify`).
92
+ */
93
+ scratch?: boolean;
94
+ }): Promise<GenerationPlan>;
95
+ /**
96
+ * Plan phase, after describe: the current descriptor plan, in which a duplicate descriptor fails
97
+ * the generation. Every descriptor of the plan is rendered.
98
+ * @param plan
99
+ * @param units
100
+ */
101
+ export declare function planContent(plan: GenerationPlan, units: Unit[]): void;
102
+ /**
103
+ * The artifacts the cache index names, in its order. An entry that cannot be read is left out
104
+ * with its diagnostics; an index of another schema version restores nothing.
105
+ * @param root
106
+ * @param projectId
107
+ * @param diagnostics
108
+ */
109
+ export declare function restoreIndex(root: string, projectId: string, diagnostics: Diagnostic[]): Promise<PageArtifact[]>;
110
+ /**
111
+ *
112
+ * @param root
113
+ * @param projectId
114
+ * @param artifacts
115
+ */
116
+ export declare function saveIndex(root: string, projectId: string, artifacts: PageArtifact[]): Promise<void>;
@@ -0,0 +1,54 @@
1
+ import type { CompilationContext, CompilationPhase } from '../contracts.js';
2
+ /**
3
+ * The compiler's side of progress reporting (`CompilationContext.progress`). Advisory only:
4
+ * nothing here reads or changes what a generation compiles, and a sink that throws is ignored.
5
+ *
6
+ * It exists only when the context carries a sink, so a compile without a consumer does no
7
+ * progress work at all (every call site is an optional call). It reads no clock: throttling is
8
+ * the transport's job (a worker runtime coalesces advances before they cross the process
9
+ * boundary), and the session stamps every event with its own clock.
10
+ *
11
+ * Phases are reported in execution order. Starting a phase ends the open one, so each call site
12
+ * marks only where its phase begins. Per-unit loops report through `unit`, which counts the units
13
+ * the open phase finished.
14
+ */
15
+ export declare class CompilationProgress {
16
+ private readonly sink;
17
+ private open?;
18
+ private completed;
19
+ private reused;
20
+ private total?;
21
+ private pass?;
22
+ /** A reason waiting for the first update of the `full` pass. */
23
+ private reason?;
24
+ private constructor();
25
+ /** The reporter for a compile, or `undefined` when nobody listens. */
26
+ static of(context: CompilationContext | undefined): CompilationProgress | undefined;
27
+ /**
28
+ * The generation's first pass: `targeted` when it may compile only what its changes reach;
29
+ * `full` with the reason when the targeted rebuild considered the generation and decided before
30
+ * compiling that it rebuilds every page. A generation the targeted rebuild never considers (it
31
+ * is off, or the generation retains nothing) reports no pass.
32
+ */
33
+ begin(pass: 'targeted' | 'full', reason?: string): void;
34
+ /**
35
+ * The fast start published the recorded candidate: the open phase (`restore`) ends with the
36
+ * `restored` pass, which the host's result line reports, and nothing else runs.
37
+ */
38
+ restored(): void;
39
+ /** The generation is still on its targeted pass. */
40
+ get targeted(): boolean;
41
+ /**
42
+ * The targeted pass fell back to the full one. The next phase start carries `full` and the
43
+ * reason, and the phases may start again from the beginning. Only the first fall back counts.
44
+ */
45
+ full(reason?: string): void;
46
+ /** `phase` starts (ending the open one). `total` is fixed for the phase. */
47
+ phase(phase: CompilationPhase, total?: number): void;
48
+ /** Units of the open phase finished; `reused` of them were reused rather than computed again. */
49
+ unit(count?: number, reused?: boolean): void;
50
+ /** The open phase ends. Nothing when no phase is open. */
51
+ end(): void;
52
+ private passFields;
53
+ private emit;
54
+ }
@@ -0,0 +1,27 @@
1
+ import { type Unit } from './common.js';
2
+ import type { GenerationPlan } from './plan.js';
3
+ import type { ReplayScope } from './targeted.js';
4
+ /**
5
+ * Render phase: per unit, each descriptor reuses the previous IR when the full path's predicate
6
+ * holds (equal descriptor, matching IR, refreshed dependencies unchanged) and is rendered
7
+ * otherwise; a guide with demos then reuses or compiles its demo-assets IR (reused
8
+ * only for an unchanged descriptor plan). Each step records its projection on the unit's record.
9
+ *
10
+ * On the targeted path (`scope`), a unit it replays keeps its retained render record when that
11
+ * record already holds the reuse projection, and otherwise runs the same predicate without
12
+ * refreshing its dependencies: the classifier and the sweep established that none of its paths
13
+ * changed, and the admission that none of its non-physical dependencies did, which is what the
14
+ * refresh would find.
15
+ *
16
+ * Each unit has a front (`renderFront`: the reuse predicates and the fronts of its compiles, which
17
+ * read files, evaluate templates and query the program) and a settle (its records, IRs,
18
+ * dependencies, input digest and progress). Fronts run strictly one after the other in plan order,
19
+ * so the semantic queries and their order are those of a sequential render. Settles run in plan
20
+ * order too, each once its unit's back halves are done. With render threads
21
+ * (`content/html-pool`), up to `window()` units may wait for their back halves while the next
22
+ * fronts run; without them, each unit settles before the next front starts, as it always did.
23
+ *
24
+ * `rendered`, when progress is reported, hears of each unit as it finishes, and whether all of its
25
+ * content was reused.
26
+ */
27
+ export declare function renderUnits(plan: GenerationPlan, units: Unit[], scope?: ReplayScope, rendered?: (reused: boolean) => void): Promise<void>;
@@ -0,0 +1,181 @@
1
+ import type { CompilationContext, CompilationRequest, CompilationRetention, FileChange, RetainedCompilation, RetainedSemanticState, SemanticProgramRetention, SemanticProgramSynchronization, SemanticRetentionRequest } from '../contracts.js';
2
+ import type { UnitIndex } from '../graph/unit-index.js';
3
+ import type { IncrementalProgramMode, SynchronizationPath } from '../semantic/semantic-service.js';
4
+ import type { CompilationOptions } from './index.js';
5
+ import type { RetainedBuild } from './targeted.js';
6
+ /**
7
+ * Kill switch for the retained-program skip only: `0`, `false`, `off` or `no` in the compiler
8
+ * runtime's environment (the worker inherits the host's) makes every development generation
9
+ * synchronize its program from scratch and retain nothing. Exact incremental reuse
10
+ * (`incrementalReuse`) is unaffected.
11
+ */
12
+ export declare const INCREMENTAL_SKIP_ENV = "NGDOC_INCREMENTAL_SKIP";
13
+ /**
14
+ * Kill switch of the incremental program (`NGDOC_INCREMENTAL_PROGRAM`): `0`, `false`, `off` or `no`
15
+ * make a development generation synchronize its program anew after any program-file edit, as
16
+ * before patching existed; `verify` checks every patch against a cold synchronization. Read in the
17
+ * compiler runtime's environment (the worker inherits the host's).
18
+ */
19
+ export declare const INCREMENTAL_PROGRAM_ENV = "NGDOC_INCREMENTAL_PROGRAM";
20
+ /** The switch as the process sets it: the option first, then `NGDOC_INCREMENTAL_PROGRAM`. */
21
+ export declare function incrementalProgramMode(options: CompilationOptions): IncrementalProgramMode;
22
+ /**
23
+ * The program a development generation retains for the next one: valid only for the base revision
24
+ * it produced, so the next generation may use it only when its request's previous snapshot is
25
+ * exactly that candidate (the caller committed it). It is keyed by the compiler options as well, so
26
+ * another project or configuration never reuses it.
27
+ */
28
+ export interface RetainedGeneration extends RetainedCompilation {
29
+ key: string;
30
+ base: string;
31
+ semantic: RetainedSemanticState;
32
+ /**
33
+ * The reverse index of this base's build (graph/unit-index.ts): built at the end of a
34
+ * generation that returned the candidate `base`, while the targeted rebuild is on. It follows
35
+ * the entry's committed/working lifetime, beside the program.
36
+ */
37
+ index?: UnitIndex;
38
+ /** The per-unit records a targeted generation replays for the units it does not rebuild. */
39
+ build?: RetainedBuild;
40
+ /**
41
+ * The changes of every generation against this base that did not commit (failed, aborted or
42
+ * discarded). A targeted generation adds them to its own changes before it skips anything: a
43
+ * full generation re-reads every input, a targeted one only what its changes reach. Each
44
+ * restore appends to a new entry's list; the entry of the next committed candidate starts empty.
45
+ */
46
+ pending?: readonly FileChange[];
47
+ }
48
+ /** What a compile may use from the committed entry for its base. */
49
+ export interface CommittedGeneration {
50
+ index: UnitIndex;
51
+ build?: RetainedBuild;
52
+ pending: readonly FileChange[];
53
+ }
54
+ export interface IncrementalRetentionReport {
55
+ /**
56
+ * Generations that reused / rebuilt the program, promoted / restored a retained program, or
57
+ * discarded one. `promoted` counts the offers of a candidate's program: with an in-process
58
+ * slot or a `compile-end` handle that commits it, with an `acknowledged` handle (a delta
59
+ * compile) it becomes the working entry, which the caller's acknowledgement may still drop (the
60
+ * runtime slot's own `promoted` counts only the promotions). `restored` counts the committed
61
+ * entries handed back, also those restored beside a working entry.
62
+ */
63
+ counters: {
64
+ reused: number;
65
+ rebuilt: number;
66
+ promoted: number;
67
+ restored: number;
68
+ discarded: number;
69
+ };
70
+ /** The retained program's base revision, if one is held. */
71
+ retained?: {
72
+ base: string;
73
+ };
74
+ /**
75
+ * A long-lived runtime's retained candidate program awaiting the commit's acknowledgement;
76
+ * never present for the in-process slot.
77
+ */
78
+ working?: {
79
+ base: string;
80
+ };
81
+ /**
82
+ * The last retaining generation: how its program was obtained, and why a retained one was
83
+ * discarded. When it found no committed entry because an earlier generation invalidated it,
84
+ * `discarded` says so (`invalidated: consumed`, `invalidated: mutated`, …) instead of looking
85
+ * like a cold start, so a rebuild can always be explained; a fresh slot reports no reason.
86
+ */
87
+ last?: {
88
+ synchronization?: SynchronizationPath;
89
+ discarded?: string;
90
+ };
91
+ }
92
+ /** The in-process slot of this runtime. */
93
+ export declare const processRetention: CompilationRetention & {
94
+ reset(): void;
95
+ };
96
+ /** Instrumentation and tests: what the retained-program skip did in this runtime. */
97
+ export declare function incrementalRetention(): IncrementalRetentionReport;
98
+ /** Drops the in-process retained program and resets the counters (tests). */
99
+ export declare function resetIncrementalRetention(): void;
100
+ /**
101
+ * One compile's use of a retention slot (its context's, or the in-process one): takes the
102
+ * committed entry when the compile starts, decides whether the semantic service may reuse its
103
+ * program, offers the program of a returned candidate, and restores the taken entry only when its
104
+ * program is still intact. The slot decides where an offer goes (committed at once, or a working
105
+ * entry promoted on the commit's acknowledgement).
106
+ */
107
+ export declare class GenerationRetention {
108
+ /**
109
+ * Retained-program skip: development generations of a long-lived runtime only. Production,
110
+ * one-shot builds and the reference path neither use nor keep a program.
111
+ */
112
+ readonly retaining: boolean;
113
+ private readonly key;
114
+ private readonly port;
115
+ private taken;
116
+ private takenBase;
117
+ /** The index, build and pending changes of the taken entry, kept to restore it with its program. */
118
+ private takenIndex;
119
+ private takenBuild;
120
+ private takenPending;
121
+ /** Whether this generation took an entry of this compiler from the slot. */
122
+ private tookEntry;
123
+ /** Why the slot held no usable entry for this generation (another compile invalidated it). */
124
+ private invalidated;
125
+ private reusedProgram;
126
+ /**
127
+ * The taken program was patched in place: it now describes this generation's tree, not the
128
+ * taken entry's base, so it is offered only for this generation's candidate and never restored.
129
+ */
130
+ private patched;
131
+ /** A `patched-failed` synchronization's taken program, restored as the same object. */
132
+ private handedBack;
133
+ private discarded;
134
+ constructor(options: CompilationOptions, request: CompilationRequest, context: CompilationContext | undefined);
135
+ /**
136
+ * The committed entry's index when this generation may use it: the entry was
137
+ * built under the same compiler options for exactly the request's previous revision. The same
138
+ * conditions as the program's reuse, checked before discovery.
139
+ */
140
+ committedIndex(request: CompilationRequest, projectId: string): UnitIndex | undefined;
141
+ /** The committed entry's index, build and pending changes, under {@link committedIndex}'s rule. */
142
+ committed(request: CompilationRequest, projectId: string): CommittedGeneration | undefined;
143
+ /** After discovery: the retention request for `synchronize`, or `undefined` when not retaining. */
144
+ semanticRetention(request: CompilationRequest, projectId: string): SemanticRetentionRequest | undefined;
145
+ /**
146
+ * After `synchronize`: how the program was obtained (`synchronization`, for the report) and what
147
+ * the retention port says happened to the taken program (`outcome`). A `reused` or `patched`
148
+ * program is kept through `retain()`; a `patched-failed` one is kept as the object handed back,
149
+ * since the failed synchronization leaves nothing to retain. A `patched` program is the
150
+ * candidate's only: it is never restored for the taken base.
151
+ */
152
+ synchronized(synchronization: SynchronizationPath | undefined, outcome: SemanticProgramSynchronization | undefined): void;
153
+ /**
154
+ * When the compile ends. Offers the program of a returned candidate for exactly that revision
155
+ * (with `index`, the reverse index of that candidate, when the dry run built one), and restores
156
+ * the taken entry for its unchanged base only if this generation reused its program and the
157
+ * program is still retainable. Every other taken entry is dropped here, which is how the
158
+ * slot's committed entry is invalidated (a consumed or mutated Project must never serve the
159
+ * next generation, whether or not this generation's commit is acknowledged); the slot is told
160
+ * why:
161
+ *
162
+ * - `consumed`: a full synchronize released the program and built a replacement (or
163
+ * synchronize failed);
164
+ * - `mutated`: a query added source files, so `retain()` refuses the program, and the
165
+ * generation offers no candidate entry either (the committed and working entries would share
166
+ * that Project);
167
+ * - `patched`: the program was patched in place for this generation's tree, so it is offered
168
+ * for its candidate only (and dropped when there is none): kept for the taken base as well, a
169
+ * later generation against that base would take a program of another tree as its own;
170
+ * - `ended before synchronize`: its changes were never checked (for example a discovery error);
171
+ * - `not usable (…)`: it was for other compiler options or another base.
172
+ *
173
+ * The in-process slot holds the offer already, so it restores nothing when a candidate was
174
+ * returned; a slot that waits for the acknowledgement restores the committed entry beside its
175
+ * working one.
176
+ */
177
+ finish(retain: SemanticProgramRetention['retain'], promotedRevision: string | undefined, next?: {
178
+ index?: UnitIndex;
179
+ build?: RetainedBuild;
180
+ }, changes?: readonly FileChange[]): void;
181
+ }
@@ -0,0 +1,46 @@
1
+ import type { CompilationRequest, ContentDescriptor, ContentIR, PageArtifact, RebuildReason, ServiceResult } from '../contracts.js';
2
+ import { type Unit } from './common.js';
3
+ import type { CompilationOptions } from './index.js';
4
+ import type { GenerationPlan } from './plan.js';
5
+ /**
6
+ * Scoped semantic invalidation (`NGDOC_SCOPED_SEMANTIC`): in a development generation, units and
7
+ * IRs record a `semantic-closure` per semantic query instead of the whole program's
8
+ * `semantic-reference`, and keep the program files they read as ordinary dependencies. An API edit
9
+ * then re-renders only the IRs whose recorded closure changed, on a FULL-synchronized program as
10
+ * well. Production generations keep the global reference, so their artifacts are unchanged.
11
+ *
12
+ * `verify` also renders every IR that its closure let the generation reuse, publishes the fresh IR
13
+ * and reports `COMPILATION_SCOPED_SEMANTIC_MISMATCH` when the two differ, and runs the recorder in
14
+ * `verify` mode (a node read outside the footprint fails the generation).
15
+ */
16
+ export type ScopedSemanticMode = 'off' | 'on' | 'verify';
17
+ export declare const SCOPED_SEMANTIC_ENV = "NGDOC_SCOPED_SEMANTIC";
18
+ export declare const SCOPED_SEMANTIC_MISMATCH = "COMPILATION_SCOPED_SEMANTIC_MISMATCH";
19
+ /**
20
+ * `NGDOC_SHAPE_CLOSURE=verify`: content reused on a closure that held only by its declaration
21
+ * shapes differs from a fresh render.
22
+ */
23
+ export declare const SHAPE_CLOSURE_MISMATCH = "COMPILATION_SHAPE_CLOSURE_MISMATCH";
24
+ /** The switch as the process sets it: the option first, then `NGDOC_SCOPED_SEMANTIC`. */
25
+ export declare function scopedSemanticSwitch(options: CompilationOptions): ScopedSemanticMode;
26
+ /**
27
+ * The mode of one generation: the switch, for development generations. A one-shot development
28
+ * generation records closures too, so its artifacts equal a long-lived runtime's; with no records
29
+ * to refresh from, it reuses a closure only while the program equals the previous candidate's.
30
+ */
31
+ export declare function scopedSemanticMode(options: CompilationOptions, request: CompilationRequest): ScopedSemanticMode;
32
+ /**
33
+ * The `whyRebuilt` fallback of a rebuilt owner the dependency index cannot explain: the first
34
+ * recorded closure (by key) whose digest changed, appeared or disappeared. It is derived from the
35
+ * two artifacts alone, so every path that rebuilds the owner reports the same reason.
36
+ */
37
+ export declare function closureRebuildReason(previous: PageArtifact, current: Pick<PageArtifact, 'id' | 'dependencies' | 'content'>): RebuildReason | undefined;
38
+ /**
39
+ * `verify`: renders an IR that the generation reuses on the strength of a recorded closure, and
40
+ * compares it with the reused one. Returns the fresh result, with a mismatch warning, when they
41
+ * differ (the caller publishes it); undefined when they are equal or there is nothing to check.
42
+ * `NGDOC_SCOPED_SEMANTIC=verify` checks every such IR; `NGDOC_SHAPE_CLOSURE=verify` the IRs one of
43
+ * whose closures held only by its declaration shapes, and reports them as
44
+ * {@link SHAPE_CLOSURE_MISMATCH}.
45
+ */
46
+ export declare function verifyClosureReuse(plan: GenerationPlan, unit: Unit, descriptor: ContentDescriptor, reused: ContentIR): Promise<ServiceResult<ContentIR> | undefined>;