@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,15 @@
1
+ // libs/builder/generator/contracts.ts
2
+ var GENERATOR_SCHEMA_VERSION = 4;
3
+ var OUTPUT_SCHEMA_VERSION = 1;
4
+ function nonPhysicalIdentity(dependency) {
5
+ return dependency.kind === "semantic-closure" ? `semantic-closure:${dependency.scopeId}:${dependency.key}` : `evaluated:${dependency.entryId}`;
6
+ }
7
+ function isDeclarationDescriptor(entry) {
8
+ return entry.descriptorKind === "declaration" || "apiEntryId" in entry;
9
+ }
10
+ export {
11
+ GENERATOR_SCHEMA_VERSION,
12
+ OUTPUT_SCHEMA_VERSION,
13
+ isDeclarationDescriptor,
14
+ nonPhysicalIdentity
15
+ };
@@ -0,0 +1,77 @@
1
+ import { DiscoveryRequest, DiscoveryService, DiscoverySnapshot, EntryDescriptor, GeneratorConfiguration, JsonValue, ServiceResult, TemplateActions, TemplateEvaluationService, TemplateRequest } from '../contracts.js';
2
+ export interface DiscoveryOptions {
3
+ inlineStyleLanguage?: GeneratorConfiguration['inlineStyleLanguage'];
4
+ defaultAnchorHeadings?: GeneratorConfiguration['anchorHeadings'];
5
+ defaultThemes?: GeneratorConfiguration['themes'];
6
+ moduleTimeoutMs?: number;
7
+ /**
8
+ * The time budget of the user code of one markdown template render (default 2 000 ms): the
9
+ * template and the functions of the page it calls. The time spent in the engine's template
10
+ * actions (`NgDocActions`, `NgDocApi`, `JSDoc`) is not counted. It is checked at every action
11
+ * call and when the render ends; a render with no action calls stops at
12
+ * `templateWallTimeoutMs` at the latest (see `TemplateActionMeter`).
13
+ */
14
+ templateTimeoutMs?: number;
15
+ /**
16
+ * The wall-clock cap of one markdown template render, its template actions included (default
17
+ * 30 000 ms, never below `templateTimeoutMs`). V8 terminates the render when it is reached: this
18
+ * is the bound for user code that never calls an action, or that swallows the failure of one.
19
+ */
20
+ templateWallTimeoutMs?: number;
21
+ /** The most template action calls one markdown template render may make (default 10 000). */
22
+ templateActionLimit?: number;
23
+ loaderTimeoutMs?: number;
24
+ /**
25
+ * Build tags of this build or dev server, matched against `onlyForTags` of pages and categories.
26
+ * An entry that declares `onlyForTags` is kept only when it shares at least one tag with this
27
+ * list; otherwise it and everything under it (child categories, pages, API pages) is left out of
28
+ * the discovery snapshot, so it has no route, navigation item, search record, keyword or output.
29
+ * Entries without `onlyForTags` (or with `null` or `''`) are always kept; `[]` is never kept.
30
+ * Absent or empty means no tags.
31
+ *
32
+ * The tags name the build configuration, as the legacy engine's `onlyForTags` check did, so
33
+ * that the usual `development`/`production` configurations work without extra options. The
34
+ * hosts default them accordingly: the Vite plugin (and the Vite builders) to the Vite mode, and
35
+ * the CLI to `development` for `dev`/`watch` and `production` for `generate`.
36
+ */
37
+ tags?: readonly string[];
38
+ }
39
+ /** Narrow JSON-only bridge used by the semantic composition for playground controls. */
40
+ export interface GuideValueReader {
41
+ readGuideValues(entryId: string): ServiceResult<JsonValue>;
42
+ }
43
+ /** Discovery and template evaluation share one replaceable, process-local live scope. */
44
+ export declare class DiscoveryServiceImpl implements DiscoveryService, TemplateEvaluationService, GuideValueReader {
45
+ private readonly options;
46
+ /** Normalized build tags, or the reason the configured value is invalid. */
47
+ private readonly tags;
48
+ private liveEntries;
49
+ private liveDependencies;
50
+ /** The `evaluated` dependency of every described entry of the current snapshot. */
51
+ private liveEvaluated;
52
+ private executableScope?;
53
+ private activeDiscovery?;
54
+ private generation?;
55
+ constructor(options?: DiscoveryOptions);
56
+ discover(request: DiscoveryRequest, signal: AbortSignal): Promise<ServiceResult<DiscoverySnapshot>>;
57
+ render(request: TemplateRequest, actions: TemplateActions): ServiceResult<string>;
58
+ readGuideValues(entryId: string): ServiceResult<JsonValue>;
59
+ dispose(): Promise<void>;
60
+ private resetRuntime;
61
+ }
62
+ /**
63
+ * Explicit composition point for the compiler without a dependency on a builder barrel.
64
+ * @param options
65
+ */
66
+ export declare function createDiscoveryServices(options?: DiscoveryOptions): {
67
+ discovery: DiscoveryService;
68
+ templates: TemplateEvaluationService;
69
+ values: GuideValueReader;
70
+ runtime: DiscoveryServiceImpl;
71
+ };
72
+ /**
73
+ * The `evaluated` digest of every entry of a discovery snapshot: the refresh source of the
74
+ * `evaluated` dependencies a generation recorded against it.
75
+ * @param entries
76
+ */
77
+ export declare function evaluatedDigests(entries: readonly EntryDescriptor[]): Map<string, string>;
@@ -0,0 +1,211 @@
1
+ import type { Dependency, Diagnostic, FileChange, KeywordExport, PageArtifact, RebuildReason, SemanticClosureDependency } from '../contracts.js';
2
+ import { CONFLICTING_CONTENT_DIGEST } from '../kernel/observations.js';
3
+ export { CONFLICTING_CONTENT_DIGEST };
4
+ export interface DependencyIndex {
5
+ affected(changes: FileChange[]): RebuildReason[];
6
+ affectedKeywords(changedKeys: Iterable<string>): RebuildReason[];
7
+ }
8
+ export interface DependencyIndexOptions {
9
+ /**
10
+ * Reports reasons only for these owner IDs. The semantic closure of every artifact is still
11
+ * validated, and each answer equals the unrestricted index's answer filtered to these owners;
12
+ * physical edges are indexed only for the selected owners.
13
+ */
14
+ owners?: Iterable<string>;
15
+ }
16
+ export interface RefreshedDependencies {
17
+ dependencies: Dependency[];
18
+ digest: string;
19
+ diagnostics: Diagnostic[];
20
+ }
21
+ export interface DependencyRefresher {
22
+ refresh(dependencies: Dependency[], keywords: KeywordExport[]): Promise<RefreshedDependencies>;
23
+ }
24
+ export interface DependencyRefresherOptions {
25
+ /** Reports a real filesystem observation. Intended for performance instrumentation. */
26
+ onObserve?: (kind: Extract<Dependency['kind'], 'content' | 'existence' | 'glob'>, identity: string) => void;
27
+ /**
28
+ * The refresh source of `evaluated` dependencies: each entry's digest in the generation's fresh
29
+ * discovery snapshot (`evaluatedDigests`). An entry it does not name refreshes as changed.
30
+ * Without it, every `evaluated` dependency refreshes as changed.
31
+ */
32
+ evaluated?: ReadonlyMap<string, string>;
33
+ /**
34
+ * The refresh source of `semantic-closure` dependencies: the digest recomputed over the current
35
+ * program, or undefined when it cannot be, which refreshes as changed. Without it, every
36
+ * `semantic-closure` dependency refreshes as changed.
37
+ */
38
+ semanticClosure?: (dependency: SemanticClosureDependency) => string | undefined;
39
+ /**
40
+ * The refresh source of `semantic-reference` dependencies where a unit's own semantic closures
41
+ * stand in for the global reference, so that no descriptor carries it: the current digest of the
42
+ * referenced scope. Without it, a reference refreshes as itself (its owner's descriptor carries
43
+ * the current reference).
44
+ */
45
+ semanticReference?: (dependency: SemanticReference) => string | undefined;
46
+ }
47
+ type SemanticReference = Extract<Dependency, {
48
+ kind: 'semantic-reference';
49
+ }>;
50
+ /** Validates the compact semantic definition/reference closure of a complete candidate. */
51
+ export declare function validateSemanticScopes(artifacts: PageArtifact[]): Diagnostic[];
52
+ /**
53
+ * Creates an immutable reverse index for one complete artifact candidate.
54
+ *
55
+ * With `options.owners`, only those owners' physical edges are indexed (and semantic scopes
56
+ * without a selected consumer are skipped); every answer equals the unrestricted answer
57
+ * filtered to the selected owners.
58
+ */
59
+ export declare function createDependencyIndex(artifacts: PageArtifact[], options?: DependencyIndexOptions): DependencyIndex;
60
+ /**
61
+ * The refreshed digest of a non-physical dependency while nothing can recompute it. It is not a
62
+ * sha256 hex digest, so it never equals a recorded one.
63
+ */
64
+ export declare const UNREFRESHED_DIGEST = "unrefreshed";
65
+ /**
66
+ * Creates one dependency refresher for a compile generation.
67
+ *
68
+ * Its physical observations are promises so concurrent and subsequent units see
69
+ * one consistent filesystem snapshot. Semantic digests and keyword bindings stay
70
+ * call-local because their producers can change within the same generation.
71
+ */
72
+ export declare function createDependencyRefresher(options?: DependencyRefresherOptions): DependencyRefresher;
73
+ /** Refreshes against a new filesystem observation set. */
74
+ export declare function refreshDependencies(dependencies: Dependency[], keywords: KeywordExport[]): Promise<RefreshedDependencies>;
75
+ /**
76
+ * A file identity as `stat` (following links) reports it. Any rewrite, rename, retarget or chmod
77
+ * changes `ino`, `size`, `mtimeNs` or `ctimeNs`.
78
+ */
79
+ export interface ObservationStamp {
80
+ dev: bigint;
81
+ ino: bigint;
82
+ size: bigint;
83
+ mtimeNs: bigint;
84
+ ctimeNs: bigint;
85
+ }
86
+ export interface ObservationSweep {
87
+ /** The first observation that no longer holds, or undefined when every observation holds. */
88
+ changed?: {
89
+ path: string;
90
+ kind: 'content' | 'existence';
91
+ };
92
+ /** Content observations checked by stat alone. */
93
+ stamped: number;
94
+ /** Content observations whose bytes were read again (no stamp, a racy stamp or a stat change). */
95
+ rehashed: number;
96
+ /** Existence observations probed. */
97
+ probed: number;
98
+ }
99
+ /** The stat identity of a regular file, or undefined when it is not one (or is gone). */
100
+ export declare function stampOf(file: string): ObservationStamp | undefined;
101
+ export declare function sameStamp(left: ObservationStamp, right: ObservationStamp): boolean;
102
+ /** True when the stamp proves the file was last written well before `sinceNs` (exported for tests). */
103
+ export declare function stampSettledBefore(stamp: ObservationStamp, sinceNs: bigint): boolean;
104
+ /**
105
+ * Stat-validated physical observations.
106
+ *
107
+ * - `record` runs right after an observation that began at `observedAtNs`. A content observation
108
+ * whose file was written at or after that time (within a timestamp-granularity margin), whose
109
+ * file is gone, or whose digest is {@link CONFLICTING_CONTENT_DIGEST} is *unverifiable*: the
110
+ * observer may have used other bytes than the recorded digest describes (an A→B→A write during
111
+ * the observation), so every later sweep reports it as changed. Every other one is stamped.
112
+ * - `sweep` re-verifies: a content observation whose file keeps its stamp holds by `stat` alone;
113
+ * otherwise its bytes are read again and compared with the recorded digest by the caller's
114
+ * digest function (the one that produced the observation), and the new stamp is trusted only
115
+ * if the file was settled before the sweep began. Existence observations are always probed.
116
+ * Glob observations are not swept (see {@link changedObservation}).
117
+ */
118
+ export declare class ObservationStamps {
119
+ private readonly digestOf;
120
+ private readonly stamps;
121
+ private readonly unverifiable;
122
+ constructor(digestOf: (file: string) => string);
123
+ record(dependencies: Iterable<Dependency>, observedAtNs: bigint): void;
124
+ /** Re-verifies content and existence observations; stops at the first one that changed. */
125
+ sweep(dependencies: Iterable<Dependency>): ObservationSweep;
126
+ /** Trusted stamps and unverifiable paths (instrumentation and tests). */
127
+ get counts(): {
128
+ stamped: number;
129
+ unverifiable: number;
130
+ };
131
+ }
132
+ /** One observed directory listing (see {@link DirectoryListings}). */
133
+ /** A directory's entry names as recorded (`null`: it did not exist), as JSON. */
134
+ export interface DirectoryFact {
135
+ path: string;
136
+ entries: string[] | null;
137
+ }
138
+ /**
139
+ * Whether the directory still lists exactly the recorded entries (read, never stat alone).
140
+ */
141
+ export declare function directoryListed(fact: DirectoryFact): boolean;
142
+ export interface DirectorySweep {
143
+ changed?: string;
144
+ /** Listings verified by the directory's stat alone. */
145
+ stamped: number;
146
+ /** Listings read again (no trusted stamp, or the directory's stat changed). */
147
+ relisted: number;
148
+ }
149
+ /**
150
+ * Directory facts a program depended on without reading any file in them: the packages under a type
151
+ * root that automatic type directives enumerate, and the directories that hold (or lead to) the
152
+ * members of an observed glob, where a create that no watcher reported would otherwise stay unseen.
153
+ *
154
+ * A listing is re-verified by the directory's stat while it keeps a stamp recorded when the
155
+ * directory had settled before the observation began; otherwise the directory is read again and
156
+ * its selected entries are compared with the recorded ones (so an atomic save in the directory,
157
+ * which only renames a temporary file, costs one re-read and keeps the program). A strict listing
158
+ * written during the observation is unverifiable, like a content observation.
159
+ */
160
+ export declare class DirectoryListings {
161
+ private readonly listings;
162
+ /**
163
+ * Records a directory's current listing (every entry). `strict`: a directory written during the
164
+ * observation never verifies (the observer may have listed other entries).
165
+ */
166
+ record(directory: string, observedAtNs: bigint, strict?: boolean): void;
167
+ /**
168
+ * Records, for an observed glob, its root and every directory on the way from the root to a
169
+ * member: the member files the glob matched in that directory plus its subdirectories. A
170
+ * directory whose matching files differ from the glob's members already (the tree changed while
171
+ * it was observed) is unverifiable.
172
+ */
173
+ recordGlob(dependency: Extract<Dependency, {
174
+ kind: 'glob';
175
+ }>, observedAtNs: bigint, ignore?: (path: string) => boolean): void;
176
+ /**
177
+ * A new set with this one's whole-directory listings ({@link record}) and none of its glob
178
+ * listings: a program whose root membership is observed again records its globs anew. The
179
+ * listings are shared, so a sweep of either set re-stamps them for both.
180
+ */
181
+ withoutGlobs(): DirectoryListings;
182
+ /**
183
+ * The whole-directory listings ({@link record}) as JSON facts, sorted by path, for a check in
184
+ * another process ({@link directoryListed}); the glob listings are left out, since such a check
185
+ * observes each glob again in full. Undefined when any listing cannot vouch for its directory
186
+ * (the tree changed while it was observed).
187
+ */
188
+ directories(): DirectoryFact[] | undefined;
189
+ sweep(): DirectorySweep;
190
+ get size(): number;
191
+ private stamp;
192
+ }
193
+ /** Wall clock in nanoseconds, the time base of {@link ObservationStamps.record}. */
194
+ export declare function observationClockNs(): bigint;
195
+ /**
196
+ * Returns why a watcher change set may invalidate these observations, or undefined when it
197
+ * provably cannot, judged by paths alone:
198
+ * - a changed path (or its real path) is an observed content or existence path;
199
+ * - a change alters the membership of an observed glob (a matching file appeared or a member
200
+ * disappeared);
201
+ * - a delete of a directory that held glob members;
202
+ * - a create of a directory under a glob root (its files may not have been reported).
203
+ * A create of a path that no longer exists (a temporary file of an atomic save) or of a
204
+ * non-matching file, and a delete of a path that held no member, cannot change membership.
205
+ *
206
+ * Paths are compared under every alias (as reported, and resolved through symlinks, for example
207
+ * `/var` and `/private/var`), for globs on both sides. Content and existence observations are
208
+ * re-verified by {@link ObservationStamps} and directory listings by {@link DirectoryListings}
209
+ * regardless; this check makes an event-reported change rebuild at once.
210
+ */
211
+ export declare function changedObservation(dependencies: Dependency[], changes: FileChange[]): string | undefined;
@@ -0,0 +1,216 @@
1
+ import type { Dependency, EntryDescriptor, FileChange, KeywordExport, PageArtifact } from '../contracts.js';
2
+ /**
3
+ * The reverse index of one committed build, for the targeted rebuild's change classifier and
4
+ * affected closure (`compiler/classify.ts`). Built from the candidate snapshot a generation
5
+ * returned, plus the facts of the same generation the snapshot does not carry (the discovery
6
+ * snapshot and its dependencies, the output templates, the keyword set). It does not depend on the
7
+ * persistent reuse memo, which only exists with `cache: true`: every edge comes from artifacts,
8
+ * descriptors, IR, discovery and keyword exports/uses, so it is complete with the cache off.
9
+ *
10
+ * Edges:
11
+ * - canonical path → the owners (units) that recorded it, at descriptor level (a descriptor's or
12
+ * an IR's own dependency, with those content IDs), unit level (only the unit's describe/entry
13
+ * inputs) or observed level (a guide's markdown file, observed by discovery);
14
+ * - canonical path → the roles of an input that is not a unit's content (a set: a page module or
15
+ * a file its module imports is usually a program input as well): a program input, the
16
+ * configuration and every other evaluated discovery input, a description (entry) module, an
17
+ * input of an entry's evaluated closure, the header template, a structural output template;
18
+ * - discovery, content-level and program globs; every ancestor directory of a recorded path;
19
+ * - keyword key → consumer owners (`usedKeywords`, `keyword` dependencies and the root key of each
20
+ * `key.anchor` / `key#anchor` use, `libs/utils/html/plugins/keywords.plugin.ts`);
21
+ * - owner → exported keys; key → binding digest of the combined keyword set;
22
+ * - entry → its discovery descriptor with markdown digests masked, and those digests, for the
23
+ * fresh-discovery equality check.
24
+ *
25
+ * API scope → owner edges are not built: a program change reaches the units that read the file
26
+ * (the program files a scoped unit keeps as its own dependencies), and the targeted path refreshes
27
+ * every replayed unit's semantic closures against the current program (`compiler/targeted.ts`).
28
+ *
29
+ * Paths are canonical (`canonicalAliases`): absolute, forward slashes, as recorded and resolved
30
+ * through symlinks of their directory (one `realpath` per directory). A lookup matches any alias.
31
+ */
32
+ export type PathLevel = 'descriptor' | 'unit' | 'observed';
33
+ export interface PathHit {
34
+ owner: string;
35
+ level: PathLevel;
36
+ /** Descriptor or IR IDs, for `descriptor` hits. */
37
+ ids: string[];
38
+ }
39
+ export type InputRole = 'program' | 'configuration' | 'entry-module' | 'entry-input' | 'header-template' | 'output-template';
40
+ export interface IndexedOwner {
41
+ id: string;
42
+ entryId: string;
43
+ entryKind: EntryDescriptor['kind'] | 'unknown';
44
+ declarationId?: string;
45
+ descriptors: string[];
46
+ exports: string[];
47
+ }
48
+ export interface UnitIndexInput {
49
+ /** The candidate snapshot's artifacts (the aggregate artifact holds the program inputs). */
50
+ artifacts: PageArtifact[];
51
+ /** The generation's discovery snapshot. */
52
+ entries: EntryDescriptor[];
53
+ configurationDigest: string;
54
+ headerTemplate?: string;
55
+ /** The discovery service's own dependencies (evaluated inputs, markdown, description globs). */
56
+ discovery: Dependency[];
57
+ /** Structural output templates (`templateDependencies`). */
58
+ templates: Dependency[];
59
+ /** The combined keyword set every link read. */
60
+ keywords: KeywordExport[];
61
+ }
62
+ type Glob = Extract<Dependency, {
63
+ kind: 'glob';
64
+ }>;
65
+ /** Absolute, forward slashes; a path already in that form (no `.`, `..` or empty segment) is kept. */
66
+ export declare function normalizePath(file: string): string;
67
+ /** The key a keyword use is resolved under before its anchor (`Key.anchor`, `Key#anchor`). */
68
+ export declare function rootKeyword(used: string): string;
69
+ /** Digest of each key's binding in a combined keyword set (every export of a key, in order). */
70
+ export declare function keywordBindingDigests(keywords: KeywordExport[]): Map<string, string>;
71
+ /**
72
+ * @internal The parent directory of an engine path; a root (`/`, `C:/`) is its own parent. `path.posix`
73
+ * alone gets drive paths wrong: it gives `.` for `C:/` and the drive designator `C:` for
74
+ * `C:/docs`, and Windows resolves `C:` to the drive's current directory, not its root.
75
+ */
76
+ export declare function parentDirectory(file: string): string;
77
+ /** @internal Test ports of {@link createCanonicalAliases}; the real filesystem by default. */
78
+ export interface CanonicalAliasPorts {
79
+ /** Turns a path into its engine spelling; {@link normalizePath} by default. */
80
+ readonly normalize?: (file: string) => string;
81
+ readonly exists?: (file: string) => boolean;
82
+ /** The native realpath of an existing directory. */
83
+ readonly realpath?: (directory: string) => string;
84
+ }
85
+ /**
86
+ * One canonical path helper: the normalized path, and its physical spelling through the realpath of
87
+ * its nearest existing directory. Directory realpaths are cached per helper.
88
+ */
89
+ export declare function createCanonicalAliases(ports?: CanonicalAliasPorts): (file: string) => string[];
90
+ /** The retained discovery facts of one entry, for the fresh-discovery equality check. */
91
+ export interface IndexedEntry {
92
+ kind: EntryDescriptor['kind'];
93
+ /** Canonical JSON of the descriptor with the content digests of its markdown files masked. */
94
+ masked: string;
95
+ /** Markdown path → digest recorded in `entry.dependencies`. */
96
+ markdown: Map<string, string>;
97
+ /** The entry's `evaluated` digest, masked in `masked` (compared on its own). */
98
+ evaluated?: string;
99
+ }
100
+ export declare function indexEntry(entry: EntryDescriptor): IndexedEntry;
101
+ /**
102
+ * What a generation that reused most of its base's build changed, for {@link UnitIndex.overlay}:
103
+ * the owners whose artifact revision changed (their edges are rebuilt from `input.artifacts`), the
104
+ * entries whose discovery descriptor changed (only their markdown digests can, on the targeted
105
+ * path), and the keys whose binding may have changed (`undefined`: every key is digested again).
106
+ */
107
+ export interface UnitIndexDelta {
108
+ replaced: ReadonlySet<string>;
109
+ entries: ReadonlySet<string>;
110
+ keys?: Iterable<string>;
111
+ /**
112
+ * The generation's discovery inputs or program differ from the base's (an entry's closure, its
113
+ * markdown list, the program's files): the roles, the observed markdown owners and the discovery
114
+ * and program globs are built again from `input` instead of being shared with the base.
115
+ */
116
+ inputs?: boolean;
117
+ }
118
+ export declare class UnitIndex {
119
+ readonly owners: Map<string, IndexedOwner>;
120
+ readonly configurationDigest: string;
121
+ readonly entries: Map<string, IndexedEntry>;
122
+ readonly bindings: Map<string, string>;
123
+ /** Paths recorded by at least one owner or input (canonical aliases). */
124
+ private readonly paths;
125
+ /** Roles of each path alias, in the order they were added (see {@link roles}). */
126
+ private readonly roleSets;
127
+ private readonly markdownOwners;
128
+ private readonly ancestors;
129
+ private readonly consumers;
130
+ /** Per owner: the path aliases, consumed keys and content-level globs it added (overlay removal). */
131
+ private readonly ownerPaths;
132
+ private readonly ownerKeys;
133
+ private readonly ownerGlobs;
134
+ /** Discovery globs (no owner). */
135
+ private readonly discoveryGlobs;
136
+ readonly structuralGlobs: Glob[];
137
+ readonly programGlobs: Glob[];
138
+ readonly aliases: (file: string) => string[];
139
+ private readonly normalized;
140
+ /** An overlay shares its base's arrays and sets, so it replaces them instead of changing them. */
141
+ private readonly copying;
142
+ private constructor();
143
+ /**
144
+ * The edges of the generation's inputs that are no unit's content: the observed markdown owners
145
+ * (and, `observed`, their observed-level hits) and the roles of discovery inputs and output
146
+ * templates. A role is added to the path's set; the program roles are added by {@link program}.
147
+ */
148
+ private inputs;
149
+ /** Builds the index of one generation's build (see {@link UnitIndexInput}). */
150
+ static build(input: UnitIndexInput): UnitIndex;
151
+ /**
152
+ * The index of a generation that kept most of `base`'s build: `base`'s edges, with those of the
153
+ * `delta.replaced` owners rebuilt from `input.artifacts`, the changed entries re-indexed and the
154
+ * named keys' bindings digested again. It equals {@link build} of the same input when the
155
+ * generation changed nothing else (the same discovery, program and output templates, which the
156
+ * targeted path proves before it reuses anything), except that ancestors of paths no owner
157
+ * records any more are kept: an event there is classified structural, which only costs a full
158
+ * generation. `base` is not changed.
159
+ */
160
+ static overlay(base: UnitIndex, input: UnitIndexInput, delta: UnitIndexDelta): UnitIndex;
161
+ /** The owners (and levels) that recorded `file`, under any of its aliases. */
162
+ hits(file: string): PathHit[];
163
+ /**
164
+ * The role of a non-content input (`program` included), under any alias: its first discovery or
165
+ * template role, or `program` when it has no other.
166
+ */
167
+ role(file: string): InputRole | undefined;
168
+ /** Every role of a non-content input, under all of its aliases (empty for none). */
169
+ roles(file: string): ReadonlySet<InputRole>;
170
+ /** Owners of `file` when it is a guide's markdown file observed by discovery. */
171
+ markdown(file: string): string[] | undefined;
172
+ /** Whether `file` is a strict ancestor directory of a recorded path. */
173
+ isAncestor(file: string): boolean;
174
+ /** Why `change` alters the membership of a discovery or content-level glob, if it does. */
175
+ structuralGlobChange(change: FileChange): string | undefined;
176
+ /** Why `change` alters the membership of a content-level glob (one a unit recorded), if it does. */
177
+ contentGlobChange(change: FileChange): string | undefined;
178
+ /** Why `change` alters the membership of a program glob (an API scope), if it does. */
179
+ programGlobChange(change: FileChange): string | undefined;
180
+ /** Owners that use any of `keys` (directly, as a `keyword` dependency, or as a root key). */
181
+ consumersOf(keys: Iterable<string>): Set<string>;
182
+ /** Counts (evidence and tests). */
183
+ size(): {
184
+ owners: number;
185
+ paths: number;
186
+ roles: number;
187
+ keys: number;
188
+ ancestors: number;
189
+ };
190
+ /**
191
+ * One unit's edges: its descriptor- and IR-level paths (with those content IDs), its unit-level
192
+ * inputs, its content-level globs, the keys it consumes, and (overlay only, `entry` given) its
193
+ * guide's observed markdown.
194
+ */
195
+ private addOwner;
196
+ /** Removes every edge `id` added (overlay only; the structures were copied first). */
197
+ private removeOwner;
198
+ /**
199
+ * Program inputs are indexed under every alias, like content paths: a file that is both a program
200
+ * input and some unit's content must be semantic whichever spelling a change reports (a symlinked
201
+ * workspace, `/var` and `/private/var`), or it would be taken for content-only. Their ancestors
202
+ * are not indexed (thousands of files, declaration files included; a change that misses them is
203
+ * `unknown`, which rebuilds in full as well). The retained program's own `stale()` stays the
204
+ * authority on program changes.
205
+ */
206
+ private program;
207
+ /** {@link normalizePath}, memoised for this build (dependency paths repeat across units). */
208
+ private canonical;
209
+ private addPath;
210
+ /** Adds a discovery or template role to the path's set (its ancestors are recorded paths). */
211
+ private addRole;
212
+ private roleOf;
213
+ private addAncestors;
214
+ private consume;
215
+ }
216
+ export {};
@@ -0,0 +1,57 @@
1
+ import type { Dependency } from '../contracts.js';
2
+ /**
3
+ * The one digest domain of the engine. Every persisted or compared digest (fingerprints, artifact
4
+ * revisions, dependency digests, closure and evaluated digests, memo and cache keys) is a single
5
+ * `sha256` over a canonical form built here, so two phases that digest the same value always agree,
6
+ * on every machine and locale.
7
+ *
8
+ * - {@link canonicalJson} orders object keys by UTF-16 code units. `localeCompare` depends on ICU and
9
+ * the process locale (and ignores control characters such as `\0`), so it must never order what a
10
+ * digest or a key covers; use {@link compareCodeUnits}.
11
+ * - {@link bytesDigest} is the content digest of a file: the digest of its bytes. Every reader of a
12
+ * file decodes those bytes (UTF-8; TypeScript and esbuild also drop a leading byte order mark),
13
+ * so whatever it compiled is a function of them. A reader that only holds the decoded text uses
14
+ * {@link contentDigest}, which is the same function over the UTF-8 encoding of that text.
15
+ *
16
+ * Output identities that generated files contain (content module ids and revisions, keyword
17
+ * digests, output ids and file digests) keep their own fixed formulas: changing them would change
18
+ * generated files. They still hash through {@link sha256Hex}.
19
+ */
20
+ /** Orders two strings by UTF-16 code units, independent of locale and ICU. */
21
+ export declare function compareCodeUnits(left: string, right: string): number;
22
+ /** The hex sha256 of a string (its UTF-8 encoding) or of bytes. */
23
+ export declare function sha256Hex(value: string | NodeJS.ArrayBufferView): string;
24
+ /**
25
+ * Canonical JSON: the text `JSON.stringify` would produce, with every object's keys in code-unit
26
+ * order. As in JSON, `toJSON` is honoured, object members whose value is `undefined`, a function or
27
+ * a symbol are omitted, such array items (and non-finite numbers) become `null`, and a `bigint`
28
+ * throws. So `canonicalJson(value) === canonicalJson(JSON.parse(JSON.stringify(value)))`. A cycle
29
+ * throws a `TypeError`.
30
+ */
31
+ export declare function canonicalJson(value: unknown): string;
32
+ /**
33
+ * Strict canonical JSON for exact identities: `undefined` stays distinct from an absent member,
34
+ * and anything JSON cannot represent exactly (functions, symbols, non-finite numbers, `-0`, holes,
35
+ * class instances, cycles) has no identity, so the result is `undefined`.
36
+ */
37
+ export declare function canonicalJsonStrict(value: unknown): string | undefined;
38
+ /** The digest of a value: `sha256` of its {@link canonicalJson}. */
39
+ export declare function digestOf(value: unknown): string;
40
+ /** The content digest of a file's bytes. */
41
+ export declare function bytesDigest(bytes: NodeJS.ArrayBufferView): string;
42
+ /**
43
+ * The content digest of decoded text: {@link bytesDigest} of its UTF-8 encoding. It equals the
44
+ * digest of the file the text was read from whenever decoding kept every byte (valid UTF-8 and no
45
+ * byte order mark dropped); otherwise the two differ, which only ever reports the file as changed.
46
+ */
47
+ export declare function contentDigest(text: string): string;
48
+ /**
49
+ * The identity of a dependency: two dependencies with one identity describe the same observation
50
+ * (a file's content or existence, one glob, one keyword, one semantic scope or closure, one
51
+ * entry's evaluated value), so a dependency list holds at most one per identity.
52
+ */
53
+ export declare function dependencyIdentity(dependency: Dependency): string;
54
+ /** A glob's identity: its root and its include and exclude patterns, unambiguously quoted. */
55
+ export declare function globIdentity(glob: Pick<Extract<Dependency, {
56
+ kind: 'glob';
57
+ }>, 'root' | 'include' | 'exclude'>): string;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * The engine's environment switches, registered and parsed in one place, so a switch means the
3
+ * same in the host and in the compiler runtime (which sees the host's environment through the
4
+ * worker).
5
+ *
6
+ * Every switch is on by default. `0`, `false`, `off` or `no` (case-insensitive, trimmed) turn it
7
+ * off; `1`, `true`, `on`, `yes` and an empty value leave it on; switches that accept `verify` also
8
+ * take `verify`, which keeps the optimization on and checks it against the reference path. Any
9
+ * other value is unrecognised: it leaves the switch on, and {@link readFlag} returns it so the
10
+ * reader that reports values (bootstrap) can warn once.
11
+ */
12
+ /** A switch's parsed value. */
13
+ export type FlagValue = 'on' | 'off' | 'verify';
14
+ export interface FlagDefinition {
15
+ readonly name: string;
16
+ readonly description: string;
17
+ readonly default: 'on';
18
+ /** Whether `verify` is a recognised value. */
19
+ readonly verify: boolean;
20
+ }
21
+ export declare const PERSISTENT_WORKER_FLAG = "NGDOC_PERSISTENT_WORKER";
22
+ export declare const PERSISTENT_WORKER_PRIME_FLAG = "NGDOC_PERSISTENT_WORKER_PRIME";
23
+ export declare const DELTA_TRANSPORT_FLAG = "NGDOC_DELTA_TRANSPORT";
24
+ export declare const TARGETED_REBUILD_FLAG = "NGDOC_TARGETED_REBUILD";
25
+ export declare const INCREMENTAL_SKIP_FLAG = "NGDOC_INCREMENTAL_SKIP";
26
+ export declare const SEMANTIC_RECORDER_FLAG = "NGDOC_SEMANTIC_RECORDER";
27
+ export declare const SCOPED_SEMANTIC_FLAG = "NGDOC_SCOPED_SEMANTIC";
28
+ export declare const INCREMENTAL_PROGRAM_FLAG = "NGDOC_INCREMENTAL_PROGRAM";
29
+ export declare const SHAPE_CLOSURE_FLAG = "NGDOC_SHAPE_CLOSURE";
30
+ export declare const ANGULAR_SHARED_PASS_FLAG = "NGDOC_ANGULAR_SHARED_PASS";
31
+ export declare const ANGULAR_STRUCTURAL_PASS_FLAG = "NGDOC_ANGULAR_STRUCTURAL_PASS";
32
+ export declare const VITE_BUILD_HANDOFF_FLAG = "NGDOC_VITE_BUILD_HANDOFF";
33
+ export declare const TRACKED_PROGRAM_REUSE_FLAG = "NGDOC_TRACKED_PROGRAM_REUSE";
34
+ export declare const FAST_START_FLAG = "NGDOC_FAST_START";
35
+ export declare const PARALLEL_WRITES_FLAG = "NGDOC_PARALLEL_WRITES";
36
+ export declare const HIGHLIGHT_CACHE_FLAG = "NGDOC_HIGHLIGHT_CACHE";
37
+ export declare const PARALLEL_RENDER_FLAG = "NGDOC_PARALLEL_RENDER";
38
+ /** The registry, in the order the engine applies the switches. */
39
+ export declare const FLAGS: readonly FlagDefinition[];
40
+ /**
41
+ * The value of the registered switch `name` in `env`. `unrecognised` is the trimmed raw value when
42
+ * it is not one the switch accepts; the value is then the default.
43
+ */
44
+ export declare function readFlag(name: string, env?: Readonly<Record<string, string | undefined>>): {
45
+ value: FlagValue;
46
+ unrecognised?: string;
47
+ };
48
+ /** Whether the registered switch `name` is turned off in `env`. */
49
+ export declare function flagOff(name: string, env?: Readonly<Record<string, string | undefined>>): boolean;