@ng-doc/builder 22.0.0 → 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 (85) hide show
  1. package/engine/builders/helpers/get-playground-metadata.js +7 -1
  2. package/engine/builders/helpers/get-playground-metadata.js.map +1 -1
  3. package/engine/builders/page/demo-assets.builder.js +2 -0
  4. package/engine/builders/page/demo-assets.builder.js.map +1 -1
  5. package/engine/builders/shared/content.builder.js +2 -0
  6. package/engine/builders/shared/content.builder.js.map +1 -1
  7. package/engine/builders/shared/page-wrapper.builder.js +2 -0
  8. package/engine/builders/shared/page-wrapper.builder.js.map +1 -1
  9. package/generator/bootstrap/bin.js +27 -3
  10. package/generator/bootstrap/cli.js +27 -3
  11. package/generator/bootstrap/index.js +17 -3
  12. package/generator/build-metafile.json +529 -221
  13. package/generator/build-provenance.json +6 -4
  14. package/generator/compiler/index.d.ts +20 -0
  15. package/generator/compiler/index.js +1875 -625
  16. package/generator/compiler/plan.d.ts +24 -0
  17. package/generator/content/code-snippet.d.ts +20 -0
  18. package/generator/content/content-compiler.d.ts +5 -1
  19. package/generator/content/format-cache.d.ts +108 -0
  20. package/generator/content/highlight-cache.d.ts +12 -36
  21. package/generator/content/html-pipeline.d.ts +10 -1
  22. package/generator/content/html-pool.d.ts +8 -2
  23. package/generator/content/html-worker.js +622 -39
  24. package/generator/contracts.d.ts +39 -0
  25. package/generator/discovery/index.d.ts +2 -0
  26. package/generator/kernel/flags.d.ts +2 -0
  27. package/generator/outputs/index.d.ts +13 -0
  28. package/generator/semantic/angular.d.ts +21 -1
  29. package/generator/semantic/formatting.d.ts +27 -0
  30. package/generator/semantic/fragments.d.ts +11 -2
  31. package/generator/templates/api/class-declaration.html.nunj +5 -3
  32. package/generator/templates/demo-app.ts.nunj +37 -0
  33. package/generator/templates/demo-routes.ts.nunj +23 -0
  34. package/generator/templates/index.ts.nunj +5 -0
  35. package/generator/templates/page-wrapper.ts.nunj +6 -1
  36. package/generator/templates/page.ts.nunj +9 -2
  37. package/generator/templates/routes.ts.nunj +7 -3
  38. package/generator/templates/symbol/members.html.nunj +6 -4
  39. package/generator/templates/symbol/page.html.nunj +1 -1
  40. package/generator/vite/application-builder.js +6 -1
  41. package/generator/vite/application.d.ts +14 -0
  42. package/generator/vite/demo-application.d.ts +34 -0
  43. package/generator/vite/dev-server-builder.js +6 -1
  44. package/generator/vite/host-updates.d.ts +69 -2
  45. package/generator/vite/index.js +490 -130
  46. package/generator/vite/lifecycle.d.ts +1 -0
  47. package/generator/vite/prerender-entry.js +72 -2
  48. package/generator/vite/prerender-runtime.d.ts +13 -0
  49. package/generator/vite/prerender.d.ts +2 -0
  50. package/helpers/format-cache.d.ts +34 -0
  51. package/helpers/format-cache.js +26 -0
  52. package/helpers/format-cache.js.map +1 -0
  53. package/helpers/format-code.js +9 -2
  54. package/helpers/format-code.js.map +1 -1
  55. package/helpers/to-template-string.d.ts +5 -1
  56. package/helpers/to-template-string.js +7 -2
  57. package/helpers/to-template-string.js.map +1 -1
  58. package/interfaces/code-block-options.d.ts +5 -0
  59. package/interfaces/configuration.d.ts +84 -1
  60. package/package.json +5 -4
  61. package/parsers/parse-code-block-params.d.ts +10 -1
  62. package/parsers/parse-code-block-params.js +29 -3
  63. package/parsers/parse-code-block-params.js.map +1 -1
  64. package/schematics/collection.json +1 -1
  65. package/schematics/migrate-to-vite/analyze.js +46 -3
  66. package/schematics/migrate-to-vite/analyze.js.map +1 -1
  67. package/schematics/migrate-to-vite/setup/workspace.d.ts +5 -0
  68. package/schematics/migrate-to-vite/setup/workspace.js +20 -0
  69. package/schematics/migrate-to-vite/setup/workspace.js.map +1 -1
  70. package/schematics/migrate-to-vite/testing/fixtures.d.ts +12 -0
  71. package/schematics/migrate-to-vite/testing/fixtures.js +27 -0
  72. package/schematics/migrate-to-vite/testing/fixtures.js.map +1 -1
  73. package/schematics/vite-setup/index.d.ts +9 -5
  74. package/schematics/vite-setup/index.js +11 -5
  75. package/schematics/vite-setup/index.js.map +1 -1
  76. package/schematics/vite-setup/schema.json +1 -1
  77. package/templates/api/class-declaration.html.nunj +5 -3
  78. package/templates/demo-app.ts.nunj +37 -0
  79. package/templates/demo-routes.ts.nunj +23 -0
  80. package/templates/index.ts.nunj +5 -0
  81. package/templates/page-wrapper.ts.nunj +6 -1
  82. package/templates/page.ts.nunj +9 -2
  83. package/templates/routes.ts.nunj +7 -3
  84. package/templates/symbol/members.html.nunj +6 -4
  85. package/templates/symbol/page.html.nunj +1 -1
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compilerVersion": "0.0.1",
3
- "toolchainDigest": "a837a4b43736f6b95b5565f442aa62d2f2175fb549d7a44138d2955d465c9ac3",
4
- "sourceDigest": "1841ad43df17a74fa1cd6499a5f1596553cd6f47e4b963e56ced0bd91aa88356",
5
- "lockfileDigest": "65e081894c996e101a7c05e349275c3fd0367a5ad92843c049d452d55b8ca67c",
3
+ "toolchainDigest": "d3b66d41f47865fb003a881897f703f6b49568eefa8f301d410768b97f5647e2",
4
+ "sourceDigest": "1a038ca999385c919ea565f867343af2f42f244061951c14649d551b1082c31d",
5
+ "lockfileDigest": "de382fb15a8f808000ec7fba99c68f6b8329faa07755202f04ac25d0f1c8ef64",
6
6
  "tuple": {
7
7
  "@angular-devkit/architect": "0.2202.1",
8
8
  "@angular-devkit/core": "22.2.1",
@@ -13,7 +13,7 @@
13
13
  "@orama/plugin-parsedoc": "2.0.17",
14
14
  "@parcel/watcher": "2.6.0",
15
15
  "@prettier/sync": "0.5.2",
16
- "@shikijs/rehype": "1.10.3",
16
+ "@shikijs/rehype": "4.5.0",
17
17
  "cosmiconfig": "8.2.0",
18
18
  "cosmiconfig-typescript-loader": "5.0.0",
19
19
  "css-what": "6.1.0",
@@ -43,6 +43,7 @@
43
43
  "rehype-parse": "9.0.0",
44
44
  "rehype-stringify": "10.0.1",
45
45
  "rxjs": "7.8.2",
46
+ "shiki": "4.5.0",
46
47
  "stringify-entities": "4.0.4",
47
48
  "tinyglobby": "0.2.17",
48
49
  "ts-morph": "28.0.0",
@@ -85,6 +86,7 @@
85
86
  "rehype-parse",
86
87
  "rehype-stringify",
87
88
  "rxjs",
89
+ "shiki",
88
90
  "stringify-entities",
89
91
  "tinyglobby",
90
92
  "ts-morph",
@@ -79,6 +79,25 @@ export interface CompilationOptions {
79
79
  * `CONTENT_HIGHLIGHT_CACHE_MISMATCH` when it differs.
80
80
  */
81
81
  highlightCache?: boolean | 'verify';
82
+ /**
83
+ * The cache of formatted code (`content/format-cache.ts`): a generation resolves the Prettier
84
+ * configuration once, and API signatures and demo snippets whose code, parser, configuration and
85
+ * Prettier release were formatted before reuse that result. Development generations with the
86
+ * artifact cache keep it beside the cache; production, `cache: false` and the reference path
87
+ * (`incrementalReuse: false`, which formats every call) keep none. On by default; `false`, like
88
+ * `NGDOC_FORMAT_CACHE=0`, formats every call as before. `verify` (or the environment's `verify`)
89
+ * also resolves and formats every hit again, uses that result and reports
90
+ * `CONTENT_FORMAT_CACHE_MISMATCH` when one differs.
91
+ */
92
+ formatCache?: boolean | 'verify';
93
+ /**
94
+ * Highlighting loads only the Shiki grammars that the languages of code blocks reach, into one
95
+ * highlighter per thread and theme pair, instead of every bundled grammar (which takes seconds);
96
+ * the HTML is the same (`@ng-doc/utils` `processHtml`'s `grammars: 'used'`). Projects with
97
+ * `shiki.langs` load every grammar. On by default; `false`, like `NGDOC_USED_GRAMMARS=0`, loads
98
+ * every grammar.
99
+ */
100
+ usedGrammars?: boolean;
82
101
  /**
83
102
  * Parallel rendering (`content/html-pool.ts`): a large generation runs the HTML pipeline of its
84
103
  * content (highlighting, anchors, keyword links, search records) on render threads, while the
@@ -107,5 +126,6 @@ export interface TargetedCompilationService extends CompilationService {
107
126
  * A compile runs its phases in order (discovery, semantic, setup, describe, plan, render, keywords,
108
127
  * link, assembly, aggregate, validation): each phase records what it emits per unit or globally,
109
128
  * and every exit folds those records into its result (`./fold`).
129
+ * @param options
110
130
  */
111
131
  export declare function createCompilationService(options: CompilationOptions): TargetedCompilationService;