@angular/compiler-cli 19.0.0-next.0 → 19.0.0-next.10

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 (362) hide show
  1. package/bundles/{chunk-QYV344EV.js → chunk-3Z25BX6N.js} +2 -2
  2. package/bundles/{chunk-TOHNTVMY.js → chunk-5AXLJZ3D.js} +296 -115
  3. package/bundles/chunk-5AXLJZ3D.js.map +6 -0
  4. package/bundles/{chunk-JA5OGHV4.js → chunk-CE344QNW.js} +3 -3
  5. package/bundles/{chunk-QTQ6EDMV.js → chunk-EJZF542V.js} +4 -4
  6. package/bundles/chunk-EJZF542V.js.map +6 -0
  7. package/bundles/{chunk-WYWH4ABE.js → chunk-O2RMLJTP.js} +38 -11
  8. package/bundles/chunk-O2RMLJTP.js.map +6 -0
  9. package/bundles/{chunk-2SSA4Y5F.js → chunk-Q4DA5WRV.js} +429 -150
  10. package/bundles/chunk-Q4DA5WRV.js.map +6 -0
  11. package/bundles/{chunk-LYJKWJUC.js → chunk-RT2QTF73.js} +2 -2
  12. package/bundles/{chunk-3W345P4E.js → chunk-UJ2J6WV4.js} +37 -3
  13. package/bundles/{chunk-3W345P4E.js.map → chunk-UJ2J6WV4.js.map} +3 -3
  14. package/bundles/{chunk-KCKRBU6N.js → chunk-WIYBGC3E.js} +28 -21
  15. package/bundles/chunk-WIYBGC3E.js.map +6 -0
  16. package/bundles/{chunk-ZHNORXPH.js → chunk-WO73PLUB.js} +4 -4
  17. package/bundles/{chunk-ZHNORXPH.js.map → chunk-WO73PLUB.js.map} +1 -1
  18. package/bundles/{chunk-ERN7RQQ7.js → chunk-XSNUHRLJ.js} +2 -2
  19. package/bundles/index.js +12 -10
  20. package/bundles/index.js.map +1 -1
  21. package/bundles/linker/babel/index.js +7 -7
  22. package/bundles/linker/babel/index.js.map +1 -1
  23. package/bundles/linker/index.js +4 -4
  24. package/bundles/ngcc/index.js +1 -1
  25. package/bundles/private/bazel.js +2 -2
  26. package/bundles/private/localize.js +6 -4
  27. package/bundles/private/migrations.js +5 -5
  28. package/bundles/private/tooling.js +6 -6
  29. package/bundles/src/bin/ng_xi18n.js +8 -8
  30. package/bundles/src/bin/ngc.js +8 -8
  31. package/bundles_metadata.json +1 -1
  32. package/linker/babel/index.d.ts +1 -1
  33. package/linker/babel/src/ast/babel_ast_factory.d.ts +3 -3
  34. package/linker/babel/src/ast/babel_ast_host.d.ts +1 -1
  35. package/linker/babel/src/babel_declaration_scope.d.ts +1 -1
  36. package/linker/babel/src/babel_plugin.d.ts +1 -1
  37. package/linker/babel/src/es2015_linker_plugin.d.ts +1 -1
  38. package/linker/babel/src/linker_plugin_options.d.ts +1 -1
  39. package/linker/index.d.ts +1 -1
  40. package/linker/src/ast/ast_host.d.ts +1 -1
  41. package/linker/src/ast/ast_value.d.ts +1 -1
  42. package/linker/src/ast/typescript/typescript_ast_host.d.ts +1 -1
  43. package/linker/src/fatal_linker_error.d.ts +1 -1
  44. package/linker/src/file_linker/declaration_scope.d.ts +1 -1
  45. package/linker/src/file_linker/emit_scopes/emit_scope.d.ts +1 -1
  46. package/linker/src/file_linker/emit_scopes/local_emit_scope.d.ts +1 -1
  47. package/linker/src/file_linker/get_source_file.d.ts +1 -1
  48. package/linker/src/file_linker/linker_environment.d.ts +1 -1
  49. package/linker/src/file_linker/linker_options.d.ts +1 -1
  50. package/linker/src/file_linker/needs_linking.d.ts +1 -1
  51. package/linker/src/file_linker/partial_linkers/partial_class_metadata_async_linker_1.d.ts +1 -1
  52. package/linker/src/file_linker/partial_linkers/partial_class_metadata_linker_1.d.ts +1 -1
  53. package/linker/src/file_linker/partial_linkers/partial_component_linker_1.d.ts +1 -1
  54. package/linker/src/file_linker/partial_linkers/partial_directive_linker_1.d.ts +3 -3
  55. package/linker/src/file_linker/partial_linkers/partial_factory_linker_1.d.ts +1 -1
  56. package/linker/src/file_linker/partial_linkers/partial_injectable_linker_1.d.ts +1 -1
  57. package/linker/src/file_linker/partial_linkers/partial_injector_linker_1.d.ts +1 -1
  58. package/linker/src/file_linker/partial_linkers/partial_linker.d.ts +1 -1
  59. package/linker/src/file_linker/partial_linkers/partial_linker_selector.d.ts +1 -1
  60. package/linker/src/file_linker/partial_linkers/partial_ng_module_linker_1.d.ts +1 -1
  61. package/linker/src/file_linker/partial_linkers/partial_pipe_linker_1.d.ts +3 -3
  62. package/linker/src/file_linker/partial_linkers/util.d.ts +3 -2
  63. package/linker/src/file_linker/translator.d.ts +1 -1
  64. package/linker/src/linker_import_generator.d.ts +1 -1
  65. package/ngcc/index.d.ts +1 -1
  66. package/package.json +4 -4
  67. package/private/babel.d.ts +1 -1
  68. package/private/bazel.d.ts +1 -1
  69. package/private/localize.d.ts +1 -1
  70. package/private/migrations.d.ts +2 -1
  71. package/private/tooling.d.ts +1 -1
  72. package/src/bin/ng_xi18n.d.ts +1 -1
  73. package/src/bin/ngc.d.ts +1 -1
  74. package/src/extract_i18n.d.ts +1 -1
  75. package/src/main.d.ts +1 -1
  76. package/src/ngtsc/annotations/common/index.d.ts +1 -1
  77. package/src/ngtsc/annotations/common/src/api.d.ts +15 -1
  78. package/src/ngtsc/annotations/common/src/debug_info.d.ts +3 -2
  79. package/src/ngtsc/annotations/common/src/di.d.ts +1 -1
  80. package/src/ngtsc/annotations/common/src/diagnostics.d.ts +1 -1
  81. package/src/ngtsc/annotations/common/src/evaluation.d.ts +1 -1
  82. package/src/ngtsc/annotations/common/src/factory.d.ts +1 -1
  83. package/src/ngtsc/annotations/common/src/injectable_registry.d.ts +1 -1
  84. package/src/ngtsc/annotations/common/src/input_transforms.d.ts +1 -1
  85. package/src/ngtsc/annotations/common/src/jit_declaration_registry.d.ts +1 -1
  86. package/src/ngtsc/annotations/common/src/metadata.d.ts +1 -1
  87. package/src/ngtsc/annotations/common/src/references_registry.d.ts +1 -1
  88. package/src/ngtsc/annotations/common/src/schema.d.ts +1 -1
  89. package/src/ngtsc/annotations/common/src/standalone-default-value.d.ts +12 -0
  90. package/src/ngtsc/annotations/common/src/util.d.ts +2 -2
  91. package/src/ngtsc/annotations/component/index.d.ts +1 -1
  92. package/src/ngtsc/annotations/component/src/diagnostics.d.ts +1 -1
  93. package/src/ngtsc/annotations/component/src/handler.d.ts +11 -4
  94. package/src/ngtsc/annotations/component/src/metadata.d.ts +1 -1
  95. package/src/ngtsc/annotations/component/src/resources.d.ts +5 -4
  96. package/src/ngtsc/annotations/component/src/symbol.d.ts +1 -1
  97. package/src/ngtsc/annotations/component/src/util.d.ts +1 -1
  98. package/src/ngtsc/annotations/directive/index.d.ts +1 -1
  99. package/src/ngtsc/annotations/directive/src/handler.d.ts +3 -2
  100. package/src/ngtsc/annotations/directive/src/initializer_function_access.d.ts +1 -1
  101. package/src/ngtsc/annotations/directive/src/initializer_functions.d.ts +1 -1
  102. package/src/ngtsc/annotations/directive/src/input_function.d.ts +1 -1
  103. package/src/ngtsc/annotations/directive/src/input_output_parse_options.d.ts +1 -1
  104. package/src/ngtsc/annotations/directive/src/model_function.d.ts +1 -1
  105. package/src/ngtsc/annotations/directive/src/output_function.d.ts +1 -1
  106. package/src/ngtsc/annotations/directive/src/query_functions.d.ts +1 -1
  107. package/src/ngtsc/annotations/directive/src/shared.d.ts +2 -2
  108. package/src/ngtsc/annotations/directive/src/symbol.d.ts +1 -1
  109. package/src/ngtsc/annotations/index.d.ts +1 -1
  110. package/src/ngtsc/annotations/ng_module/index.d.ts +1 -1
  111. package/src/ngtsc/annotations/ng_module/src/handler.d.ts +1 -1
  112. package/src/ngtsc/annotations/ng_module/src/module_with_providers.d.ts +1 -1
  113. package/src/ngtsc/annotations/src/injectable.d.ts +1 -1
  114. package/src/ngtsc/annotations/src/pipe.d.ts +3 -2
  115. package/src/ngtsc/core/api/index.d.ts +1 -1
  116. package/src/ngtsc/core/api/src/adapter.d.ts +1 -1
  117. package/src/ngtsc/core/api/src/interfaces.d.ts +15 -1
  118. package/src/ngtsc/core/api/src/options.d.ts +1 -1
  119. package/src/ngtsc/core/api/src/public_options.d.ts +12 -1
  120. package/src/ngtsc/core/index.d.ts +1 -1
  121. package/src/ngtsc/core/src/compiler.d.ts +13 -2
  122. package/src/ngtsc/core/src/core_version.d.ts +1 -1
  123. package/src/ngtsc/core/src/feature_detection.d.ts +1 -1
  124. package/src/ngtsc/core/src/host.d.ts +1 -1
  125. package/src/ngtsc/cycles/index.d.ts +1 -1
  126. package/src/ngtsc/cycles/src/analyzer.d.ts +1 -1
  127. package/src/ngtsc/cycles/src/imports.d.ts +1 -1
  128. package/src/ngtsc/diagnostics/index.d.ts +1 -1
  129. package/src/ngtsc/diagnostics/src/docs.d.ts +1 -1
  130. package/src/ngtsc/diagnostics/src/error.d.ts +2 -2
  131. package/src/ngtsc/diagnostics/src/error_code.d.ts +9 -1
  132. package/src/ngtsc/diagnostics/src/error_details_base_url.d.ts +1 -1
  133. package/src/ngtsc/diagnostics/src/extended_template_diagnostic_name.d.ts +3 -2
  134. package/src/ngtsc/diagnostics/src/util.d.ts +1 -1
  135. package/src/ngtsc/docs/index.d.ts +1 -1
  136. package/src/ngtsc/docs/src/class_extractor.d.ts +1 -1
  137. package/src/ngtsc/docs/src/constant_extractor.d.ts +1 -1
  138. package/src/ngtsc/docs/src/decorator_extractor.d.ts +1 -1
  139. package/src/ngtsc/docs/src/entities.d.ts +10 -1
  140. package/src/ngtsc/docs/src/enum_extractor.d.ts +1 -1
  141. package/src/ngtsc/docs/src/extractor.d.ts +5 -2
  142. package/src/ngtsc/docs/src/filters.d.ts +1 -1
  143. package/src/ngtsc/docs/src/function_extractor.d.ts +1 -1
  144. package/src/ngtsc/docs/src/generics_extractor.d.ts +1 -1
  145. package/src/ngtsc/docs/src/import_extractor.d.ts +14 -0
  146. package/src/ngtsc/docs/src/initializer_api_function_extractor.d.ts +1 -1
  147. package/src/ngtsc/docs/src/internal.d.ts +1 -1
  148. package/src/ngtsc/docs/src/jsdoc_extractor.d.ts +1 -1
  149. package/src/ngtsc/docs/src/type_alias_extractor.d.ts +1 -1
  150. package/src/ngtsc/docs/src/type_extractor.d.ts +1 -1
  151. package/src/ngtsc/entry_point/index.d.ts +1 -1
  152. package/src/ngtsc/entry_point/src/generator.d.ts +1 -1
  153. package/src/ngtsc/entry_point/src/logic.d.ts +1 -1
  154. package/src/ngtsc/entry_point/src/private_export_checker.d.ts +1 -1
  155. package/src/ngtsc/entry_point/src/reference_graph.d.ts +1 -1
  156. package/src/ngtsc/file_system/index.d.ts +2 -1
  157. package/src/ngtsc/file_system/src/compiler_host.d.ts +1 -1
  158. package/src/ngtsc/file_system/src/invalid_file_system.d.ts +1 -1
  159. package/src/ngtsc/file_system/src/logical.d.ts +1 -1
  160. package/src/ngtsc/file_system/src/ts_read_directory.d.ts +21 -0
  161. package/src/ngtsc/file_system/src/types.d.ts +1 -1
  162. package/src/ngtsc/file_system/src/util.d.ts +1 -1
  163. package/src/ngtsc/hmr/index.d.ts +9 -0
  164. package/src/ngtsc/hmr/src/extract_locals.d.ts +20 -0
  165. package/src/ngtsc/hmr/src/metadata.d.ts +23 -0
  166. package/src/ngtsc/hmr/src/update_declaration.d.ts +17 -0
  167. package/src/ngtsc/imports/index.d.ts +1 -1
  168. package/src/ngtsc/imports/src/alias.d.ts +1 -1
  169. package/src/ngtsc/imports/src/core.d.ts +7 -1
  170. package/src/ngtsc/imports/src/default.d.ts +1 -1
  171. package/src/ngtsc/imports/src/deferred_symbol_tracker.d.ts +1 -1
  172. package/src/ngtsc/imports/src/emitter.d.ts +1 -1
  173. package/src/ngtsc/imports/src/find_export.d.ts +1 -1
  174. package/src/ngtsc/imports/src/imported_symbols_tracker.d.ts +1 -1
  175. package/src/ngtsc/imports/src/local_compilation_extra_imports_tracker.d.ts +1 -1
  176. package/src/ngtsc/imports/src/patch_alias_reference_resolution.d.ts +1 -1
  177. package/src/ngtsc/imports/src/reexport.d.ts +1 -1
  178. package/src/ngtsc/imports/src/references.d.ts +1 -1
  179. package/src/ngtsc/imports/src/resolver.d.ts +1 -1
  180. package/src/ngtsc/incremental/api.d.ts +1 -1
  181. package/src/ngtsc/incremental/index.d.ts +1 -1
  182. package/src/ngtsc/incremental/semantic_graph/index.d.ts +1 -1
  183. package/src/ngtsc/incremental/semantic_graph/src/graph.d.ts +1 -1
  184. package/src/ngtsc/incremental/semantic_graph/src/util.d.ts +1 -1
  185. package/src/ngtsc/incremental/src/dependency_tracking.d.ts +1 -1
  186. package/src/ngtsc/incremental/src/incremental.d.ts +1 -1
  187. package/src/ngtsc/incremental/src/noop.d.ts +1 -1
  188. package/src/ngtsc/incremental/src/state.d.ts +1 -1
  189. package/src/ngtsc/incremental/src/strategy.d.ts +1 -1
  190. package/src/ngtsc/indexer/index.d.ts +1 -1
  191. package/src/ngtsc/indexer/src/api.d.ts +1 -1
  192. package/src/ngtsc/indexer/src/context.d.ts +1 -1
  193. package/src/ngtsc/indexer/src/template.d.ts +1 -1
  194. package/src/ngtsc/indexer/src/transform.d.ts +1 -1
  195. package/src/ngtsc/logging/index.d.ts +1 -1
  196. package/src/ngtsc/logging/src/console_logger.d.ts +1 -1
  197. package/src/ngtsc/logging/src/logger.d.ts +1 -1
  198. package/src/ngtsc/metadata/index.d.ts +1 -1
  199. package/src/ngtsc/metadata/src/api.d.ts +5 -1
  200. package/src/ngtsc/metadata/src/dts.d.ts +1 -1
  201. package/src/ngtsc/metadata/src/host_directives_resolver.d.ts +1 -1
  202. package/src/ngtsc/metadata/src/inheritance.d.ts +1 -1
  203. package/src/ngtsc/metadata/src/ng_module_index.d.ts +1 -1
  204. package/src/ngtsc/metadata/src/property_mapping.d.ts +1 -1
  205. package/src/ngtsc/metadata/src/providers.d.ts +1 -1
  206. package/src/ngtsc/metadata/src/registry.d.ts +1 -1
  207. package/src/ngtsc/metadata/src/resource_registry.d.ts +1 -1
  208. package/src/ngtsc/metadata/src/util.d.ts +1 -1
  209. package/src/ngtsc/partial_evaluator/index.d.ts +1 -1
  210. package/src/ngtsc/partial_evaluator/src/builtin.d.ts +1 -1
  211. package/src/ngtsc/partial_evaluator/src/diagnostics.d.ts +1 -1
  212. package/src/ngtsc/partial_evaluator/src/dynamic.d.ts +1 -1
  213. package/src/ngtsc/partial_evaluator/src/interface.d.ts +1 -1
  214. package/src/ngtsc/partial_evaluator/src/interpreter.d.ts +1 -1
  215. package/src/ngtsc/partial_evaluator/src/result.d.ts +1 -1
  216. package/src/ngtsc/partial_evaluator/src/synthetic.d.ts +1 -1
  217. package/src/ngtsc/perf/index.d.ts +1 -1
  218. package/src/ngtsc/perf/src/api.d.ts +1 -1
  219. package/src/ngtsc/perf/src/clock.d.ts +1 -1
  220. package/src/ngtsc/perf/src/noop.d.ts +1 -1
  221. package/src/ngtsc/perf/src/recorder.d.ts +1 -1
  222. package/src/ngtsc/program.d.ts +5 -2
  223. package/src/ngtsc/program_driver/index.d.ts +1 -1
  224. package/src/ngtsc/program_driver/src/api.d.ts +1 -1
  225. package/src/ngtsc/program_driver/src/ts_create_program_driver.d.ts +1 -1
  226. package/src/ngtsc/reflection/index.d.ts +1 -1
  227. package/src/ngtsc/reflection/src/host.d.ts +1 -1
  228. package/src/ngtsc/reflection/src/type_to_value.d.ts +1 -1
  229. package/src/ngtsc/reflection/src/typescript.d.ts +1 -1
  230. package/src/ngtsc/reflection/src/util.d.ts +1 -1
  231. package/src/ngtsc/resource/index.d.ts +1 -1
  232. package/src/ngtsc/resource/src/loader.d.ts +1 -1
  233. package/src/ngtsc/scope/index.d.ts +1 -1
  234. package/src/ngtsc/scope/src/api.d.ts +1 -1
  235. package/src/ngtsc/scope/src/component_scope.d.ts +1 -1
  236. package/src/ngtsc/scope/src/dependency.d.ts +1 -1
  237. package/src/ngtsc/scope/src/local.d.ts +1 -1
  238. package/src/ngtsc/scope/src/standalone.d.ts +1 -1
  239. package/src/ngtsc/scope/src/typecheck.d.ts +1 -1
  240. package/src/ngtsc/scope/src/util.d.ts +1 -1
  241. package/src/ngtsc/shims/api.d.ts +1 -1
  242. package/src/ngtsc/shims/index.d.ts +1 -1
  243. package/src/ngtsc/shims/src/adapter.d.ts +1 -1
  244. package/src/ngtsc/shims/src/expando.d.ts +1 -1
  245. package/src/ngtsc/shims/src/reference_tagger.d.ts +1 -1
  246. package/src/ngtsc/shims/src/util.d.ts +1 -1
  247. package/src/ngtsc/sourcemaps/index.d.ts +1 -1
  248. package/src/ngtsc/sourcemaps/src/content_origin.d.ts +1 -1
  249. package/src/ngtsc/sourcemaps/src/raw_source_map.d.ts +1 -1
  250. package/src/ngtsc/sourcemaps/src/segment_marker.d.ts +1 -1
  251. package/src/ngtsc/transform/index.d.ts +1 -1
  252. package/src/ngtsc/transform/jit/index.d.ts +1 -1
  253. package/src/ngtsc/transform/jit/src/downlevel_decorators_transform.d.ts +1 -1
  254. package/src/ngtsc/transform/jit/src/index.d.ts +1 -1
  255. package/src/ngtsc/transform/jit/src/initializer_api_transforms/input_function.d.ts +1 -1
  256. package/src/ngtsc/transform/jit/src/initializer_api_transforms/model_function.d.ts +1 -1
  257. package/src/ngtsc/transform/jit/src/initializer_api_transforms/output_function.d.ts +1 -1
  258. package/src/ngtsc/transform/jit/src/initializer_api_transforms/query_functions.d.ts +1 -1
  259. package/src/ngtsc/transform/jit/src/initializer_api_transforms/transform.d.ts +1 -1
  260. package/src/ngtsc/transform/jit/src/initializer_api_transforms/transform_api.d.ts +1 -1
  261. package/src/ngtsc/transform/src/alias.d.ts +1 -1
  262. package/src/ngtsc/transform/src/api.d.ts +5 -1
  263. package/src/ngtsc/transform/src/compilation.d.ts +2 -1
  264. package/src/ngtsc/transform/src/declaration.d.ts +1 -1
  265. package/src/ngtsc/transform/src/trait.d.ts +1 -1
  266. package/src/ngtsc/transform/src/transform.d.ts +1 -1
  267. package/src/ngtsc/translator/index.d.ts +1 -1
  268. package/src/ngtsc/translator/src/api/ast_factory.d.ts +3 -3
  269. package/src/ngtsc/translator/src/api/import_generator.d.ts +1 -1
  270. package/src/ngtsc/translator/src/context.d.ts +1 -1
  271. package/src/ngtsc/translator/src/import_manager/check_unique_identifier_name.d.ts +1 -1
  272. package/src/ngtsc/translator/src/import_manager/import_manager.d.ts +1 -1
  273. package/src/ngtsc/translator/src/import_manager/import_typescript_transform.d.ts +1 -1
  274. package/src/ngtsc/translator/src/import_manager/reuse_generated_imports.d.ts +1 -1
  275. package/src/ngtsc/translator/src/import_manager/reuse_source_file_imports.d.ts +1 -1
  276. package/src/ngtsc/translator/src/translator.d.ts +1 -1
  277. package/src/ngtsc/translator/src/ts_util.d.ts +1 -1
  278. package/src/ngtsc/translator/src/type_emitter.d.ts +1 -1
  279. package/src/ngtsc/translator/src/type_translator.d.ts +1 -1
  280. package/src/ngtsc/translator/src/typescript_ast_factory.d.ts +3 -3
  281. package/src/ngtsc/translator/src/typescript_translator.d.ts +1 -1
  282. package/src/ngtsc/tsc_plugin.d.ts +1 -1
  283. package/src/ngtsc/typecheck/api/api.d.ts +7 -1
  284. package/src/ngtsc/typecheck/api/checker.d.ts +2 -2
  285. package/src/ngtsc/typecheck/api/completion.d.ts +1 -1
  286. package/src/ngtsc/typecheck/api/context.d.ts +1 -1
  287. package/src/ngtsc/typecheck/api/index.d.ts +1 -1
  288. package/src/ngtsc/typecheck/api/scope.d.ts +1 -1
  289. package/src/ngtsc/typecheck/api/symbols.d.ts +1 -1
  290. package/src/ngtsc/typecheck/diagnostics/index.d.ts +1 -1
  291. package/src/ngtsc/typecheck/diagnostics/src/diagnostic.d.ts +1 -1
  292. package/src/ngtsc/typecheck/diagnostics/src/id.d.ts +1 -1
  293. package/src/ngtsc/typecheck/extended/api/api.d.ts +1 -1
  294. package/src/ngtsc/typecheck/extended/api/extended_template_checker.d.ts +1 -1
  295. package/src/ngtsc/typecheck/extended/api/index.d.ts +1 -1
  296. package/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.d.ts +1 -1
  297. package/src/ngtsc/typecheck/extended/checks/invalid_banana_in_box/index.d.ts +1 -1
  298. package/src/ngtsc/typecheck/extended/checks/missing_control_flow_directive/index.d.ts +1 -1
  299. package/src/ngtsc/typecheck/extended/checks/missing_ngforof_let/index.d.ts +1 -1
  300. package/src/ngtsc/typecheck/extended/checks/nullish_coalescing_not_nullable/index.d.ts +1 -1
  301. package/src/ngtsc/typecheck/extended/checks/optional_chain_not_nullable/index.d.ts +1 -1
  302. package/src/ngtsc/typecheck/extended/checks/skip_hydration_not_static/index.d.ts +1 -1
  303. package/src/ngtsc/typecheck/extended/checks/suffix_not_supported/index.d.ts +1 -1
  304. package/src/ngtsc/typecheck/extended/checks/text_attribute_not_binding/index.d.ts +1 -1
  305. package/src/ngtsc/typecheck/extended/checks/uninvoked_function_in_event_binding/index.d.ts +1 -1
  306. package/src/ngtsc/typecheck/extended/checks/unused_let_declaration/index.d.ts +1 -1
  307. package/src/ngtsc/typecheck/extended/index.d.ts +1 -1
  308. package/src/ngtsc/typecheck/extended/src/extended_template_checker.d.ts +1 -1
  309. package/src/ngtsc/typecheck/index.d.ts +1 -1
  310. package/src/ngtsc/typecheck/src/checker.d.ts +2 -2
  311. package/src/ngtsc/typecheck/src/comments.d.ts +1 -1
  312. package/src/ngtsc/typecheck/src/completion.d.ts +1 -1
  313. package/src/ngtsc/typecheck/src/context.d.ts +1 -1
  314. package/src/ngtsc/typecheck/src/diagnostics.d.ts +1 -1
  315. package/src/ngtsc/typecheck/src/dom.d.ts +1 -1
  316. package/src/ngtsc/typecheck/src/environment.d.ts +1 -1
  317. package/src/ngtsc/typecheck/src/expression.d.ts +1 -1
  318. package/src/ngtsc/typecheck/src/line_mappings.d.ts +1 -1
  319. package/src/ngtsc/typecheck/src/oob.d.ts +1 -1
  320. package/src/ngtsc/typecheck/src/reference_emit_environment.d.ts +1 -1
  321. package/src/ngtsc/typecheck/src/shim.d.ts +1 -1
  322. package/src/ngtsc/typecheck/src/source.d.ts +1 -1
  323. package/src/ngtsc/typecheck/src/symbol_util.d.ts +1 -1
  324. package/src/ngtsc/typecheck/src/tcb_util.d.ts +1 -1
  325. package/src/ngtsc/typecheck/src/template_symbol_builder.d.ts +1 -1
  326. package/src/ngtsc/typecheck/src/ts_util.d.ts +1 -1
  327. package/src/ngtsc/typecheck/src/type_check_block.d.ts +1 -1
  328. package/src/ngtsc/typecheck/src/type_check_file.d.ts +1 -1
  329. package/src/ngtsc/typecheck/src/type_constructor.d.ts +1 -1
  330. package/src/ngtsc/typecheck/src/type_parameter_emitter.d.ts +1 -1
  331. package/src/ngtsc/typecheck/template_semantics/api/api.d.ts +1 -1
  332. package/src/ngtsc/typecheck/template_semantics/src/template_semantics_checker.d.ts +1 -1
  333. package/src/ngtsc/util/src/path.d.ts +9 -0
  334. package/src/ngtsc/util/src/typescript.d.ts +1 -1
  335. package/src/ngtsc/util/src/visitor.d.ts +1 -1
  336. package/src/ngtsc/validation/index.d.ts +1 -1
  337. package/src/ngtsc/validation/src/config.d.ts +12 -0
  338. package/src/ngtsc/validation/src/rules/api.d.ts +1 -1
  339. package/src/ngtsc/validation/src/rules/initializer_api_usage_rule.d.ts +1 -1
  340. package/src/ngtsc/validation/src/rules/unused_standalone_imports_rule.d.ts +29 -0
  341. package/src/ngtsc/validation/src/source_file_validator.d.ts +3 -2
  342. package/src/ngtsc/xi18n/index.d.ts +1 -1
  343. package/src/ngtsc/xi18n/src/context.d.ts +1 -1
  344. package/src/perform_compile.d.ts +2 -2
  345. package/src/perform_watch.d.ts +1 -1
  346. package/src/transformers/api.d.ts +1 -1
  347. package/src/transformers/compiler_host.d.ts +1 -1
  348. package/src/transformers/entry_points.d.ts +1 -1
  349. package/src/transformers/i18n.d.ts +1 -1
  350. package/src/transformers/program.d.ts +1 -1
  351. package/src/transformers/util.d.ts +1 -1
  352. package/src/version.d.ts +1 -1
  353. package/src/version_helpers.d.ts +1 -1
  354. package/bundles/chunk-2SSA4Y5F.js.map +0 -6
  355. package/bundles/chunk-KCKRBU6N.js.map +0 -6
  356. package/bundles/chunk-QTQ6EDMV.js.map +0 -6
  357. package/bundles/chunk-TOHNTVMY.js.map +0 -6
  358. package/bundles/chunk-WYWH4ABE.js.map +0 -6
  359. /package/bundles/{chunk-QYV344EV.js.map → chunk-3Z25BX6N.js.map} +0 -0
  360. /package/bundles/{chunk-JA5OGHV4.js.map → chunk-CE344QNW.js.map} +0 -0
  361. /package/bundles/{chunk-LYJKWJUC.js.map → chunk-RT2QTF73.js.map} +0 -0
  362. /package/bundles/{chunk-ERN7RQQ7.js.map → chunk-XSNUHRLJ.js.map} +0 -0
@@ -20,6 +20,7 @@ import {
20
20
  entityNameToValue,
21
21
  filterToMembersWithDecorator,
22
22
  getDefaultImportDeclaration,
23
+ getProjectRelativePath,
23
24
  getSourceFile,
24
25
  getSourceFileOrNull,
25
26
  getTokenAtPosition,
@@ -45,18 +46,18 @@ import {
45
46
  translateStatement,
46
47
  translateType,
47
48
  typeNodeToValueExpr
48
- } from "./chunk-WYWH4ABE.js";
49
+ } from "./chunk-O2RMLJTP.js";
49
50
  import {
50
51
  PerfCheckpoint,
51
52
  PerfEvent,
52
53
  PerfPhase
53
- } from "./chunk-ERN7RQQ7.js";
54
+ } from "./chunk-XSNUHRLJ.js";
54
55
  import {
55
56
  absoluteFrom,
56
57
  absoluteFromSourceFile,
57
58
  getSourceFileOrError,
58
59
  relative
59
- } from "./chunk-3W345P4E.js";
60
+ } from "./chunk-UJ2J6WV4.js";
60
61
 
61
62
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/util.mjs
62
63
  import { ExternalExpr, ParseLocation, ParseSourceFile, ParseSourceSpan, ReadPropExpr, WrappedNodeExpr } from "@angular/compiler";
@@ -263,7 +264,7 @@ function createSourceSpan(node) {
263
264
  const parseSf = new ParseSourceFile(sf.getFullText(), sf.fileName);
264
265
  return new ParseSourceSpan(new ParseLocation(parseSf, startOffset, startLine + 1, startCol + 1), new ParseLocation(parseSf, endOffset, endLine + 1, endCol + 1));
265
266
  }
266
- function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null) {
267
+ function compileResults(fac, def, metadataStmt, propName, additionalFields, deferrableImports, debugInfo = null, hmrInitializer = null) {
267
268
  const statements = def.statements;
268
269
  if (metadataStmt !== null) {
269
270
  statements.push(metadataStmt);
@@ -271,6 +272,9 @@ function compileResults(fac, def, metadataStmt, propName, additionalFields, defe
271
272
  if (debugInfo !== null) {
272
273
  statements.push(debugInfo);
273
274
  }
275
+ if (hmrInitializer !== null) {
276
+ statements.push(hmrInitializer);
277
+ }
274
278
  const results = [
275
279
  fac,
276
280
  {
@@ -950,11 +954,11 @@ var StaticInterpreter = class {
950
954
  }
951
955
  }
952
956
  visitBindingElement(node, context) {
953
- const path2 = [];
957
+ const path = [];
954
958
  let closestDeclaration = node;
955
959
  while (ts2.isBindingElement(closestDeclaration) || ts2.isArrayBindingPattern(closestDeclaration) || ts2.isObjectBindingPattern(closestDeclaration)) {
956
960
  if (ts2.isBindingElement(closestDeclaration)) {
957
- path2.unshift(closestDeclaration);
961
+ path.unshift(closestDeclaration);
958
962
  }
959
963
  closestDeclaration = closestDeclaration.parent;
960
964
  }
@@ -962,7 +966,7 @@ var StaticInterpreter = class {
962
966
  return DynamicValue.fromUnknown(node);
963
967
  }
964
968
  let value = this.visit(closestDeclaration.initializer, context);
965
- for (const element of path2) {
969
+ for (const element of path) {
966
970
  let key;
967
971
  if (ts2.isArrayBindingPattern(element.parent)) {
968
972
  key = element.parent.elements.indexOf(element);
@@ -1787,6 +1791,7 @@ var DtsMetadataReader = class {
1787
1791
  isSignal,
1788
1792
  inputFieldNamesFromMetadataArray: null,
1789
1793
  imports: null,
1794
+ rawImports: null,
1790
1795
  deferredImports: null,
1791
1796
  schemas: null,
1792
1797
  decorator: null,
@@ -2044,12 +2049,12 @@ var ResourceRegistry = class {
2044
2049
  }
2045
2050
  }
2046
2051
  registerTemplate(templateResource, component) {
2047
- const { path: path2 } = templateResource;
2048
- if (path2 !== null) {
2049
- if (!this.externalTemplateToComponentsMap.has(path2)) {
2050
- this.externalTemplateToComponentsMap.set(path2, /* @__PURE__ */ new Set());
2052
+ const { path } = templateResource;
2053
+ if (path !== null) {
2054
+ if (!this.externalTemplateToComponentsMap.has(path)) {
2055
+ this.externalTemplateToComponentsMap.set(path, /* @__PURE__ */ new Set());
2051
2056
  }
2052
- this.externalTemplateToComponentsMap.get(path2).add(component);
2057
+ this.externalTemplateToComponentsMap.get(path).add(component);
2053
2058
  }
2054
2059
  this.componentToTemplateMap.set(component, templateResource);
2055
2060
  }
@@ -2060,15 +2065,15 @@ var ResourceRegistry = class {
2060
2065
  return this.componentToTemplateMap.get(component);
2061
2066
  }
2062
2067
  registerStyle(styleResource, component) {
2063
- const { path: path2 } = styleResource;
2068
+ const { path } = styleResource;
2064
2069
  if (!this.componentToStylesMap.has(component)) {
2065
2070
  this.componentToStylesMap.set(component, /* @__PURE__ */ new Set());
2066
2071
  }
2067
- if (path2 !== null) {
2068
- if (!this.externalStyleToComponentsMap.has(path2)) {
2069
- this.externalStyleToComponentsMap.set(path2, /* @__PURE__ */ new Set());
2072
+ if (path !== null) {
2073
+ if (!this.externalStyleToComponentsMap.has(path)) {
2074
+ this.externalStyleToComponentsMap.set(path, /* @__PURE__ */ new Set());
2070
2075
  }
2071
- this.externalStyleToComponentsMap.get(path2).add(component);
2076
+ this.externalStyleToComponentsMap.get(path).add(component);
2072
2077
  }
2073
2078
  this.componentToStylesMap.get(component).add(styleResource);
2074
2079
  }
@@ -2710,6 +2715,19 @@ var TraitCompiler = class {
2710
2715
  this.dtsTransforms.getIvyDeclarationTransform(original.getSourceFile()).addFields(original, res);
2711
2716
  return res.length > 0 ? res : null;
2712
2717
  }
2718
+ compileHmrUpdateCallback(clazz) {
2719
+ const original = ts8.getOriginalNode(clazz);
2720
+ if (!this.reflector.isClass(clazz) || !this.reflector.isClass(original) || !this.classes.has(original)) {
2721
+ return null;
2722
+ }
2723
+ const record = this.classes.get(original);
2724
+ for (const trait of record.traits) {
2725
+ if (trait.state === TraitState.Resolved && trait.handler.compileHmrUpdateDeclaration !== void 0 && !containsErrors(trait.analysisDiagnostics) && !containsErrors(trait.resolveDiagnostics)) {
2726
+ return trait.handler.compileHmrUpdateDeclaration(clazz, trait.analysis, trait.resolution);
2727
+ }
2728
+ }
2729
+ return null;
2730
+ }
2713
2731
  decoratorsFor(node) {
2714
2732
  const original = ts8.getOriginalNode(node);
2715
2733
  if (!this.reflector.isClass(original) || !this.classes.has(original)) {
@@ -3603,13 +3621,12 @@ function removeIdentifierReferences(node, names) {
3603
3621
 
3604
3622
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/debug_info.mjs
3605
3623
  import { literal as literal2, WrappedNodeExpr as WrappedNodeExpr4 } from "@angular/compiler";
3606
- import * as path from "path";
3607
- function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRendering) {
3624
+ function extractClassDebugInfo(clazz, reflection, compilerHost, rootDirs, forbidOrphanRendering) {
3608
3625
  if (!reflection.isClass(clazz)) {
3609
3626
  return null;
3610
3627
  }
3611
3628
  const srcFile = clazz.getSourceFile();
3612
- const srcFileMaybeRelativePath = computeRelativePathIfPossible(srcFile.fileName, rootDirs);
3629
+ const srcFileMaybeRelativePath = getProjectRelativePath(srcFile, rootDirs, compilerHost);
3613
3630
  return {
3614
3631
  type: new WrappedNodeExpr4(clazz.name),
3615
3632
  className: literal2(clazz.name.getText()),
@@ -3618,15 +3635,6 @@ function extractClassDebugInfo(clazz, reflection, rootDirs, forbidOrphanRenderin
3618
3635
  forbidOrphanRendering
3619
3636
  };
3620
3637
  }
3621
- function computeRelativePathIfPossible(filePath, rootDirs) {
3622
- for (const rootDir of rootDirs) {
3623
- const rel = path.relative(rootDir, filePath);
3624
- if (!rel.startsWith("..")) {
3625
- return rel;
3626
- }
3627
- }
3628
- return null;
3629
- }
3630
3638
 
3631
3639
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/references_registry.mjs
3632
3640
  var NoopReferencesRegistry = class {
@@ -3690,8 +3698,8 @@ var JitDeclarationRegistry = class {
3690
3698
  };
3691
3699
 
3692
3700
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
3693
- import { compileClassDebugInfo, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as o2, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
3694
- import ts45 from "typescript";
3701
+ import { compileClassDebugInfo, compileHmrInitializer, compileComponentClassMetadata, compileComponentDeclareClassMetadata, compileComponentFromMetadata, compileDeclareComponentFromMetadata, compileDeferResolverFunction, ConstantPool as ConstantPool2, CssSelector as CssSelector4, DEFAULT_INTERPOLATION_CONFIG as DEFAULT_INTERPOLATION_CONFIG2, DomElementSchemaRegistry as DomElementSchemaRegistry3, ExternalExpr as ExternalExpr8, FactoryTarget as FactoryTarget3, makeBindingParser as makeBindingParser2, outputAst as o4, R3TargetBinder, R3TemplateDependencyKind, SelectorMatcher as SelectorMatcher3, ViewEncapsulation as ViewEncapsulation2 } from "@angular/compiler";
3702
+ import ts47 from "typescript";
3695
3703
 
3696
3704
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/incremental/semantic_graph/src/api.mjs
3697
3705
  import ts15 from "typescript";
@@ -3740,11 +3748,11 @@ var SemanticDepGraph = class {
3740
3748
  }
3741
3749
  return previousSymbol;
3742
3750
  }
3743
- getSymbolByName(path2, identifier) {
3744
- if (!this.files.has(path2)) {
3751
+ getSymbolByName(path, identifier) {
3752
+ if (!this.files.has(path)) {
3745
3753
  return null;
3746
3754
  }
3747
- const file = this.files.get(path2);
3755
+ const file = this.files.get(path);
3748
3756
  if (!file.has(identifier)) {
3749
3757
  return null;
3750
3758
  }
@@ -4792,6 +4800,9 @@ function parseDescendantsOption(value) {
4792
4800
  throw new FatalDiagnosticError(ErrorCode.VALUE_HAS_WRONG_TYPE, value, `Expected "descendants" option to be a boolean literal.`);
4793
4801
  }
4794
4802
 
4803
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/common/src/standalone-default-value.mjs
4804
+ var NG_STANDALONE_DEFAULT_VALUE = true;
4805
+
4795
4806
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.mjs
4796
4807
  var EMPTY_OBJECT = {};
4797
4808
  var queryDecoratorNames = [
@@ -4801,7 +4812,7 @@ var queryDecoratorNames = [
4801
4812
  "ContentChildren"
4802
4813
  ];
4803
4814
  var QUERY_TYPES = new Set(queryDecoratorNames);
4804
- function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector) {
4815
+ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, evaluator, refEmitter, referencesRegistry, isCore, annotateForClosureCompiler, compilationMode, defaultSelector, strictStandalone) {
4805
4816
  let directive;
4806
4817
  if (decorator.args === null || decorator.args.length === 0) {
4807
4818
  directive = /* @__PURE__ */ new Map();
@@ -4868,7 +4879,7 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
4868
4879
  const rawCtorDeps = getConstructorDependencies(clazz, reflector, isCore);
4869
4880
  const ctorDeps = selector !== null ? validateConstructorDependencies(clazz, rawCtorDeps) : unwrapConstructorDependencies(rawCtorDeps);
4870
4881
  const isStructural = ctorDeps !== null && ctorDeps !== "invalid" && ctorDeps.some((dep) => dep.token instanceof ExternalExpr4 && dep.token.value.moduleName === "@angular/core" && dep.token.value.name === "TemplateRef");
4871
- let isStandalone = false;
4882
+ let isStandalone = NG_STANDALONE_DEFAULT_VALUE;
4872
4883
  if (directive.has("standalone")) {
4873
4884
  const expr = directive.get("standalone");
4874
4885
  const resolved = evaluator.evaluate(expr);
@@ -4876,6 +4887,9 @@ function extractDirectiveMetadata(clazz, decorator, reflector, importTracker, ev
4876
4887
  throw createValueHasWrongTypeError(expr, resolved, `standalone flag must be a boolean`);
4877
4888
  }
4878
4889
  isStandalone = resolved;
4890
+ if (!isStandalone && strictStandalone) {
4891
+ throw new FatalDiagnosticError(ErrorCode.NON_STANDALONE_NOT_ALLOWED, expr, `Only standalone components/directives are allowed when 'strictStandalone' is enabled.`);
4892
+ }
4879
4893
  }
4880
4894
  let isSignal = false;
4881
4895
  if (directive.has("signals")) {
@@ -5696,7 +5710,7 @@ var LIFECYCLE_HOOKS = /* @__PURE__ */ new Set([
5696
5710
  "ngAfterContentChecked"
5697
5711
  ]);
5698
5712
  var DirectiveDecoratorHandler = class {
5699
- constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode, jitDeclarationRegistry) {
5713
+ constructor(reflector, evaluator, metaRegistry, scopeRegistry, metaReader, injectableRegistry, refEmitter, referencesRegistry, isCore, strictCtorDeps, semanticDepGraphUpdater, annotateForClosureCompiler, perf, importTracker, includeClassMetadata, compilationMode, jitDeclarationRegistry, strictStandalone) {
5700
5714
  this.reflector = reflector;
5701
5715
  this.evaluator = evaluator;
5702
5716
  this.metaRegistry = metaRegistry;
@@ -5714,6 +5728,7 @@ var DirectiveDecoratorHandler = class {
5714
5728
  this.includeClassMetadata = includeClassMetadata;
5715
5729
  this.compilationMode = compilationMode;
5716
5730
  this.jitDeclarationRegistry = jitDeclarationRegistry;
5731
+ this.strictStandalone = strictStandalone;
5717
5732
  this.precedence = HandlerPrecedence.PRIMARY;
5718
5733
  this.name = "DirectiveDecoratorHandler";
5719
5734
  }
@@ -5746,7 +5761,8 @@ var DirectiveDecoratorHandler = class {
5746
5761
  this.isCore,
5747
5762
  this.annotateForClosureCompiler,
5748
5763
  this.compilationMode,
5749
- null
5764
+ null,
5765
+ this.strictStandalone
5750
5766
  );
5751
5767
  if (directiveResult.jitForced) {
5752
5768
  this.jitDeclarationRegistry.jitDeclarations.add(node);
@@ -5802,6 +5818,7 @@ var DirectiveDecoratorHandler = class {
5802
5818
  isStandalone: analysis.meta.isStandalone,
5803
5819
  isSignal: analysis.meta.isSignal,
5804
5820
  imports: null,
5821
+ rawImports: null,
5805
5822
  deferredImports: null,
5806
5823
  schemas: null,
5807
5824
  ngContentSelectors: null,
@@ -6568,9 +6585,9 @@ function isSyntheticReference(ref) {
6568
6585
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/diagnostics.mjs
6569
6586
  function makeCyclicImportInfo(ref, type, cycle) {
6570
6587
  const name = ref.debugName || "(unknown)";
6571
- const path2 = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
6588
+ const path = cycle.getPath().map((sf) => sf.fileName).join(" -> ");
6572
6589
  const message = `The ${type} '${name}' is used in the template but importing it would create a cycle: `;
6573
- return makeRelatedInformation(ref.node, message + path2);
6590
+ return makeRelatedInformation(ref.node, message + path);
6574
6591
  }
6575
6592
  function checkCustomElementSelectorForErrors(selector) {
6576
6593
  if (selector.includes(".") || selector.includes("[") && selector.includes("]")) {
@@ -6674,12 +6691,14 @@ function parseExtractedTemplate(template, sourceStr, sourceParseRange, escapedSt
6674
6691
  };
6675
6692
  const parsedTemplate = parseTemplate(sourceStr, sourceMapUrl != null ? sourceMapUrl : "", {
6676
6693
  ...commonParseOptions,
6677
- preserveWhitespaces: template.preserveWhitespaces
6694
+ preserveWhitespaces: template.preserveWhitespaces,
6695
+ preserveSignificantWhitespace: options.preserveSignificantWhitespace
6678
6696
  });
6679
6697
  const { nodes: diagNodes } = parseTemplate(sourceStr, sourceMapUrl != null ? sourceMapUrl : "", {
6680
6698
  ...commonParseOptions,
6681
6699
  preserveWhitespaces: true,
6682
6700
  preserveLineEndings: true,
6701
+ preserveSignificantWhitespace: true,
6683
6702
  leadingTriviaChars: []
6684
6703
  });
6685
6704
  return {
@@ -6753,7 +6772,8 @@ function preloadAndParseTemplate(evaluator, resourceLoader, depTracker, preanaly
6753
6772
  const resourceUrl = resourceLoader.resolve(templateUrl, containingFile);
6754
6773
  const templatePromise = resourceLoader.preload(resourceUrl, {
6755
6774
  type: "template",
6756
- containingFile
6775
+ containingFile,
6776
+ className: node.name.text
6757
6777
  });
6758
6778
  if (templatePromise !== void 0) {
6759
6779
  return templatePromise.then(() => {
@@ -6855,7 +6875,7 @@ function extractComponentStyleUrls(evaluator, component) {
6855
6875
  {
6856
6876
  url: styleUrl,
6857
6877
  source: 2,
6858
- nodeForError: styleUrlExpr
6878
+ expression: styleUrlExpr
6859
6879
  }
6860
6880
  ];
6861
6881
  }
@@ -6875,7 +6895,7 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6875
6895
  styleUrls.push({
6876
6896
  url: styleUrl,
6877
6897
  source: 2,
6878
- nodeForError: styleUrlExpr
6898
+ expression: styleUrlExpr
6879
6899
  });
6880
6900
  }
6881
6901
  }
@@ -6888,32 +6908,17 @@ function extractStyleUrlsFromExpression(evaluator, styleUrlsExpr) {
6888
6908
  styleUrls.push({
6889
6909
  url: styleUrl,
6890
6910
  source: 2,
6891
- nodeForError: styleUrlsExpr
6911
+ expression: styleUrlsExpr
6892
6912
  });
6893
6913
  }
6894
6914
  }
6895
6915
  return styleUrls;
6896
6916
  }
6897
- function extractStyleResources(resourceLoader, component, containingFile) {
6917
+ function extractInlineStyleResources(component) {
6898
6918
  const styles = /* @__PURE__ */ new Set();
6899
6919
  function stringLiteralElements(array) {
6900
6920
  return array.elements.filter((e) => ts25.isStringLiteralLike(e));
6901
6921
  }
6902
- const styleUrlExpr = component.get("styleUrl");
6903
- const styleUrlsExpr = component.get("styleUrls");
6904
- if (styleUrlsExpr !== void 0 && ts25.isArrayLiteralExpression(styleUrlsExpr)) {
6905
- for (const expression of stringLiteralElements(styleUrlsExpr)) {
6906
- const resource = stringLiteralUrlToResource(resourceLoader, expression, containingFile);
6907
- if (resource !== null) {
6908
- styles.add(resource);
6909
- }
6910
- }
6911
- } else if (styleUrlExpr !== void 0 && ts25.isStringLiteralLike(styleUrlExpr)) {
6912
- const resource = stringLiteralUrlToResource(resourceLoader, styleUrlExpr, containingFile);
6913
- if (resource !== null) {
6914
- styles.add(resource);
6915
- }
6916
- }
6917
6922
  const stylesExpr = component.get("styles");
6918
6923
  if (stylesExpr !== void 0) {
6919
6924
  if (ts25.isArrayLiteralExpression(stylesExpr)) {
@@ -6926,23 +6931,15 @@ function extractStyleResources(resourceLoader, component, containingFile) {
6926
6931
  }
6927
6932
  return styles;
6928
6933
  }
6929
- function stringLiteralUrlToResource(resourceLoader, expression, containingFile) {
6930
- try {
6931
- const resourceUrl = resourceLoader.resolve(expression.text, containingFile);
6932
- return { path: absoluteFrom(resourceUrl), expression };
6933
- } catch {
6934
- return null;
6935
- }
6936
- }
6937
6934
  function _extractTemplateStyleUrls(template) {
6938
6935
  if (template.styleUrls === null) {
6939
6936
  return [];
6940
6937
  }
6941
- const nodeForError = getTemplateDeclarationNodeForError(template.declaration);
6938
+ const expression = getTemplateDeclarationNodeForError(template.declaration);
6942
6939
  return template.styleUrls.map((url) => ({
6943
6940
  url,
6944
6941
  source: 1,
6945
- nodeForError
6942
+ expression
6946
6943
  }));
6947
6944
  }
6948
6945
 
@@ -9829,6 +9826,12 @@ var AstTranslator = class {
9829
9826
  addParseSpanInfo(node, ast.sourceSpan);
9830
9827
  return node;
9831
9828
  }
9829
+ visitTypeofExpresion(ast) {
9830
+ const expression = wrapForDiagnostics(this.translate(ast.expression));
9831
+ const node = ts40.factory.createTypeOfExpression(expression);
9832
+ addParseSpanInfo(node, ast.sourceSpan);
9833
+ return node;
9834
+ }
9832
9835
  visitPropertyRead(ast) {
9833
9836
  const receiver = wrapForDiagnostics(this.translate(ast.receiver));
9834
9837
  const name = ts40.factory.createPropertyAccessExpression(receiver, ast.name);
@@ -9979,6 +9982,9 @@ var _VeSafeLhsInferenceBugDetector = class {
9979
9982
  visitPrefixNot(ast) {
9980
9983
  return ast.expression.visit(this);
9981
9984
  }
9985
+ visitTypeofExpresion(ast) {
9986
+ return ast.expression.visit(this);
9987
+ }
9982
9988
  visitNonNullAssert(ast) {
9983
9989
  return ast.expression.visit(this);
9984
9990
  }
@@ -11266,6 +11272,9 @@ var _Scope = class {
11266
11272
  appendDeferredBlock(block) {
11267
11273
  this.appendDeferredTriggers(block, block.triggers);
11268
11274
  this.appendDeferredTriggers(block, block.prefetchTriggers);
11275
+ if (block.hydrateTriggers.when) {
11276
+ this.opQueue.push(new TcbExpressionOp(this.tcb, this, block.hydrateTriggers.when.value));
11277
+ }
11269
11278
  this.appendChildren(block);
11270
11279
  if (block.placeholder !== null) {
11271
11280
  this.appendChildren(block.placeholder);
@@ -11336,7 +11345,7 @@ var TcbExpressionTranslator = class {
11336
11345
  return astToTypescript(ast, (ast2) => this.resolve(ast2), this.tcb.env.config);
11337
11346
  }
11338
11347
  resolve(ast) {
11339
- if (ast instanceof PropertyRead3 && ast.receiver instanceof ImplicitReceiver2) {
11348
+ if (ast instanceof PropertyRead3 && ast.receiver instanceof ImplicitReceiver2 && !(ast.receiver instanceof ThisReceiver)) {
11340
11349
  const target = this.tcb.boundTarget.getExpressionTarget(ast);
11341
11350
  const targetExpression = target === null ? null : this.getTargetNodeExpression(target, ast);
11342
11351
  if (target instanceof TmplAstLetDeclaration2 && !this.isValidLetDeclarationAccess(target, ast)) {
@@ -11986,7 +11995,7 @@ var TemplateSourceManager = class {
11986
11995
  };
11987
11996
 
11988
11997
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/typecheck/src/template_symbol_builder.mjs
11989
- import { AST, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers5, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
11998
+ import { AST, ASTWithName, ASTWithSource as ASTWithSource2, BindingPipe as BindingPipe2, PropertyRead as PropertyRead4, PropertyWrite as PropertyWrite3, R3Identifiers as R3Identifiers5, SafePropertyRead as SafePropertyRead4, TmplAstBoundAttribute as TmplAstBoundAttribute2, TmplAstBoundEvent, TmplAstElement as TmplAstElement3, TmplAstLetDeclaration as TmplAstLetDeclaration3, TmplAstReference as TmplAstReference3, TmplAstTemplate as TmplAstTemplate2, TmplAstTextAttribute as TmplAstTextAttribute3, TmplAstVariable as TmplAstVariable2 } from "@angular/compiler";
11990
11999
  import ts44 from "typescript";
11991
12000
  var SymbolBuilder = class {
11992
12001
  constructor(tcbPath, tcbIsShim, typeCheckBlock, templateData, componentScopeReader, getTypeChecker) {
@@ -12466,7 +12475,7 @@ var SymbolBuilder = class {
12466
12475
  return this.getSymbol(expressionTarget);
12467
12476
  }
12468
12477
  let withSpan = expression.sourceSpan;
12469
- if (expression instanceof PropertyWrite3) {
12478
+ if (expression instanceof PropertyWrite3 || expression instanceof ASTWithName && !(expression instanceof SafePropertyRead4)) {
12470
12479
  withSpan = expression.nameSpan;
12471
12480
  }
12472
12481
  let node = null;
@@ -12508,6 +12517,8 @@ var SymbolBuilder = class {
12508
12517
  let tsSymbol;
12509
12518
  if (ts44.isPropertyAccessExpression(node)) {
12510
12519
  tsSymbol = this.getTypeChecker().getSymbolAtLocation(node.name);
12520
+ } else if (ts44.isCallExpression(node)) {
12521
+ tsSymbol = this.getTypeChecker().getSymbolAtLocation(node.expression);
12511
12522
  } else {
12512
12523
  tsSymbol = this.getTypeChecker().getSymbolAtLocation(node);
12513
12524
  }
@@ -12584,7 +12595,7 @@ var TemplateTypeCheckerImpl = class {
12584
12595
  this.elementTagCache = /* @__PURE__ */ new Map();
12585
12596
  this.isComplete = false;
12586
12597
  }
12587
- getTemplate(component) {
12598
+ getTemplate(component, optimizeFor) {
12588
12599
  const { data } = this.getLatestComponentState(component);
12589
12600
  if (data === null) {
12590
12601
  return null;
@@ -12599,8 +12610,15 @@ var TemplateTypeCheckerImpl = class {
12599
12610
  var _a;
12600
12611
  return ((_a = this.getLatestComponentState(component).data) == null ? void 0 : _a.boundTarget.getUsedPipes()) || null;
12601
12612
  }
12602
- getLatestComponentState(component) {
12603
- this.ensureShimForComponent(component);
12613
+ getLatestComponentState(component, optimizeFor = OptimizeFor.SingleFile) {
12614
+ switch (optimizeFor) {
12615
+ case OptimizeFor.WholeProgram:
12616
+ this.ensureAllShimsForAllFiles();
12617
+ break;
12618
+ case OptimizeFor.SingleFile:
12619
+ this.ensureShimForComponent(component);
12620
+ break;
12621
+ }
12604
12622
  const sf = component.getSourceFile();
12605
12623
  const sfPath = absoluteFromSourceFile(sf);
12606
12624
  const shimPath = TypeCheckShimGenerator.shimFor(sfPath);
@@ -12894,16 +12912,16 @@ var TemplateTypeCheckerImpl = class {
12894
12912
  this.perf.memory(PerfCheckpoint.TtcUpdateProgram);
12895
12913
  });
12896
12914
  }
12897
- getFileData(path2) {
12898
- if (!this.state.has(path2)) {
12899
- this.state.set(path2, {
12915
+ getFileData(path) {
12916
+ if (!this.state.has(path)) {
12917
+ this.state.set(path, {
12900
12918
  hasInlines: false,
12901
12919
  sourceManager: new TemplateSourceManager(),
12902
12920
  isComplete: false,
12903
12921
  shimData: /* @__PURE__ */ new Map()
12904
12922
  });
12905
12923
  }
12906
- return this.state.get(path2);
12924
+ return this.state.get(path);
12907
12925
  }
12908
12926
  getSymbolOfNode(node, component) {
12909
12927
  const builder = this.getOrCreateSymbolBuilder(component);
@@ -13258,18 +13276,190 @@ var SingleShimTypeCheckingHost = class extends SingleFileTypeCheckingHost {
13258
13276
  }
13259
13277
  };
13260
13278
 
13279
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13280
+ import { outputAst as o3 } from "@angular/compiler";
13281
+
13282
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/extract_locals.mjs
13283
+ import { outputAst as o2 } from "@angular/compiler";
13284
+ import ts45 from "typescript";
13285
+ function extractHmrLocals(node, definition, factory, classMetadata, debugInfo) {
13286
+ var _a;
13287
+ const name = ts45.isClassDeclaration(node) && node.name ? node.name.text : null;
13288
+ const visitor = new PotentialTopLevelReadsVisitor();
13289
+ const sourceFile = node.getSourceFile();
13290
+ definition.expression.visitExpression(visitor, null);
13291
+ definition.statements.forEach((statement) => statement.visitStatement(visitor, null));
13292
+ (_a = factory.initializer) == null ? void 0 : _a.visitExpression(visitor, null);
13293
+ factory.statements.forEach((statement) => statement.visitStatement(visitor, null));
13294
+ classMetadata == null ? void 0 : classMetadata.visitStatement(visitor, null);
13295
+ debugInfo == null ? void 0 : debugInfo.visitStatement(visitor, null);
13296
+ const availableTopLevel = getTopLevelDeclarationNames(sourceFile);
13297
+ return Array.from(visitor.allReads).filter((r) => r !== name && availableTopLevel.has(r));
13298
+ }
13299
+ function getTopLevelDeclarationNames(sourceFile) {
13300
+ var _a;
13301
+ const results = /* @__PURE__ */ new Set();
13302
+ for (const node of sourceFile.statements) {
13303
+ if (ts45.isClassDeclaration(node) || ts45.isFunctionDeclaration(node) || ts45.isEnumDeclaration(node) && !((_a = node.modifiers) == null ? void 0 : _a.some((m) => m.kind === ts45.SyntaxKind.ConstKeyword))) {
13304
+ if (node.name) {
13305
+ results.add(node.name.text);
13306
+ }
13307
+ continue;
13308
+ }
13309
+ if (ts45.isVariableStatement(node)) {
13310
+ for (const decl of node.declarationList.declarations) {
13311
+ trackBindingName(decl.name, results);
13312
+ }
13313
+ continue;
13314
+ }
13315
+ if (ts45.isImportDeclaration(node) && node.importClause) {
13316
+ const importClause = node.importClause;
13317
+ if (importClause.isTypeOnly) {
13318
+ continue;
13319
+ }
13320
+ if (importClause.name) {
13321
+ results.add(importClause.name.text);
13322
+ }
13323
+ if (importClause.namedBindings) {
13324
+ const namedBindings = importClause.namedBindings;
13325
+ if (ts45.isNamespaceImport(namedBindings)) {
13326
+ results.add(namedBindings.name.text);
13327
+ } else {
13328
+ namedBindings.elements.forEach((el) => {
13329
+ if (!el.isTypeOnly) {
13330
+ results.add(el.name.text);
13331
+ }
13332
+ });
13333
+ }
13334
+ }
13335
+ continue;
13336
+ }
13337
+ }
13338
+ return results;
13339
+ }
13340
+ function trackBindingName(node, results) {
13341
+ if (ts45.isIdentifier(node)) {
13342
+ results.add(node.text);
13343
+ } else {
13344
+ for (const el of node.elements) {
13345
+ if (!ts45.isOmittedExpression(el)) {
13346
+ trackBindingName(el.name, results);
13347
+ }
13348
+ }
13349
+ }
13350
+ }
13351
+ var PotentialTopLevelReadsVisitor = class extends o2.RecursiveAstVisitor {
13352
+ constructor() {
13353
+ super(...arguments);
13354
+ this.allReads = /* @__PURE__ */ new Set();
13355
+ this.addAllTopLevelIdentifiers = (node) => {
13356
+ if (ts45.isIdentifier(node) && this.isTopLevelIdentifierReference(node)) {
13357
+ this.allReads.add(node.text);
13358
+ } else {
13359
+ ts45.forEachChild(node, this.addAllTopLevelIdentifiers);
13360
+ }
13361
+ };
13362
+ }
13363
+ visitReadVarExpr(ast, context) {
13364
+ this.allReads.add(ast.name);
13365
+ super.visitReadVarExpr(ast, context);
13366
+ }
13367
+ visitWrappedNodeExpr(ast, context) {
13368
+ if (this.isTypeScriptNode(ast.node)) {
13369
+ this.addAllTopLevelIdentifiers(ast.node);
13370
+ }
13371
+ super.visitWrappedNodeExpr(ast, context);
13372
+ }
13373
+ isTopLevelIdentifierReference(node) {
13374
+ const parent = node.parent;
13375
+ if (!parent) {
13376
+ return false;
13377
+ }
13378
+ if (ts45.isSourceFile(parent) || ts45.isExpressionStatement(parent) && parent.expression === node) {
13379
+ return true;
13380
+ }
13381
+ if (ts45.isCallExpression(parent)) {
13382
+ return parent.expression === node || parent.arguments.includes(node);
13383
+ }
13384
+ if (ts45.isPropertyAccessExpression(parent)) {
13385
+ return parent.expression === node;
13386
+ }
13387
+ if (ts45.isArrayLiteralExpression(parent)) {
13388
+ return parent.elements.includes(node);
13389
+ }
13390
+ if (ts45.isPropertyAssignment(parent)) {
13391
+ return parent.initializer === node;
13392
+ }
13393
+ if (ts45.isClassDeclaration(parent)) {
13394
+ return parent.name === node;
13395
+ }
13396
+ return false;
13397
+ }
13398
+ isTypeScriptNode(value) {
13399
+ return !!value && typeof value.kind === "number";
13400
+ }
13401
+ };
13402
+
13403
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/metadata.mjs
13404
+ function extractHmrMetatadata(clazz, reflection, compilerHost, rootDirs, definition, factory, classMetadata, debugInfo) {
13405
+ if (!reflection.isClass(clazz)) {
13406
+ return null;
13407
+ }
13408
+ const sourceFile = clazz.getSourceFile();
13409
+ const filePath = getProjectRelativePath(sourceFile, rootDirs, compilerHost) || compilerHost.getCanonicalFileName(sourceFile.fileName);
13410
+ const meta = {
13411
+ type: new o3.WrappedNodeExpr(clazz.name),
13412
+ className: clazz.name.text,
13413
+ filePath,
13414
+ locals: extractHmrLocals(clazz, definition, factory, classMetadata, debugInfo),
13415
+ coreName: "__ngCore__"
13416
+ };
13417
+ return meta;
13418
+ }
13419
+
13420
+ // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/hmr/src/update_declaration.mjs
13421
+ import { compileHmrUpdateCallback } from "@angular/compiler";
13422
+ import ts46 from "typescript";
13423
+ function getHmrUpdateDeclaration(compilationResults, constantStatements, meta, sourceFile) {
13424
+ const importRewriter = new HmrModuleImportRewriter(meta.coreName);
13425
+ const importManager = new ImportManager({
13426
+ ...presetImportManagerForceNamespaceImports,
13427
+ rewriter: importRewriter
13428
+ });
13429
+ const callback = compileHmrUpdateCallback(compilationResults, constantStatements, meta);
13430
+ const node = translateStatement(sourceFile, callback, importManager);
13431
+ return ts46.factory.updateFunctionDeclaration(node, [
13432
+ ts46.factory.createToken(ts46.SyntaxKind.ExportKeyword),
13433
+ ts46.factory.createToken(ts46.SyntaxKind.DefaultKeyword)
13434
+ ], node.asteriskToken, node.name, node.typeParameters, node.parameters, node.type, node.body);
13435
+ }
13436
+ var HmrModuleImportRewriter = class {
13437
+ constructor(coreName) {
13438
+ this.coreName = coreName;
13439
+ }
13440
+ rewriteNamespaceImportIdentifier(specifier, moduleName) {
13441
+ return moduleName === "@angular/core" ? this.coreName : specifier;
13442
+ }
13443
+ rewriteSymbol(symbol) {
13444
+ return symbol;
13445
+ }
13446
+ rewriteSpecifier(specifier) {
13447
+ return specifier;
13448
+ }
13449
+ };
13450
+
13261
13451
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/component/src/handler.mjs
13262
13452
  var EMPTY_ARRAY2 = [];
13263
13453
  var isUsedDirective = (decl) => decl.kind === R3TemplateDependencyKind.Directive;
13264
13454
  var isUsedPipe = (decl) => decl.kind === R3TemplateDependencyKind.Pipe;
13265
13455
  var ComponentDecoratorHandler = class {
13266
- constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, dtsScopeReader, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, importTracker, includeClassMetadata, compilationMode, deferredSymbolTracker, forbidOrphanRendering, enableBlockSyntax, enableLetSyntax, localCompilationExtraImportsTracker, jitDeclarationRegistry) {
13456
+ constructor(reflector, evaluator, metaRegistry, metaReader, scopeReader, compilerHost, scopeRegistry, typeCheckScopeRegistry, resourceRegistry, isCore, strictCtorDeps, resourceLoader, rootDirs, defaultPreserveWhitespaces, i18nUseExternalIds, enableI18nLegacyMessageIdFormat, usePoisonedData, i18nNormalizeLineEndingsInICUs, moduleResolver, cycleAnalyzer, cycleHandlingStrategy, refEmitter, referencesRegistry, depTracker, injectableRegistry, semanticDepGraphUpdater, annotateForClosureCompiler, perf, hostDirectivesResolver, importTracker, includeClassMetadata, compilationMode, deferredSymbolTracker, forbidOrphanRendering, enableBlockSyntax, enableLetSyntax, externalRuntimeStyles, localCompilationExtraImportsTracker, jitDeclarationRegistry, i18nPreserveSignificantWhitespace, strictStandalone, enableHmr) {
13267
13457
  this.reflector = reflector;
13268
13458
  this.evaluator = evaluator;
13269
13459
  this.metaRegistry = metaRegistry;
13270
13460
  this.metaReader = metaReader;
13271
13461
  this.scopeReader = scopeReader;
13272
- this.dtsScopeReader = dtsScopeReader;
13462
+ this.compilerHost = compilerHost;
13273
13463
  this.scopeRegistry = scopeRegistry;
13274
13464
  this.typeCheckScopeRegistry = typeCheckScopeRegistry;
13275
13465
  this.resourceRegistry = resourceRegistry;
@@ -13300,8 +13490,12 @@ var ComponentDecoratorHandler = class {
13300
13490
  this.forbidOrphanRendering = forbidOrphanRendering;
13301
13491
  this.enableBlockSyntax = enableBlockSyntax;
13302
13492
  this.enableLetSyntax = enableLetSyntax;
13493
+ this.externalRuntimeStyles = externalRuntimeStyles;
13303
13494
  this.localCompilationExtraImportsTracker = localCompilationExtraImportsTracker;
13304
13495
  this.jitDeclarationRegistry = jitDeclarationRegistry;
13496
+ this.i18nPreserveSignificantWhitespace = i18nPreserveSignificantWhitespace;
13497
+ this.strictStandalone = strictStandalone;
13498
+ this.enableHmr = enableHmr;
13305
13499
  this.literalCache = /* @__PURE__ */ new Map();
13306
13500
  this.elementSchemaRegistry = new DomElementSchemaRegistry3();
13307
13501
  this.preanalyzeTemplateCache = /* @__PURE__ */ new Map();
@@ -13313,8 +13507,10 @@ var ComponentDecoratorHandler = class {
13313
13507
  i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
13314
13508
  usePoisonedData: this.usePoisonedData,
13315
13509
  enableBlockSyntax: this.enableBlockSyntax,
13316
- enableLetSyntax: this.enableLetSyntax
13510
+ enableLetSyntax: this.enableLetSyntax,
13511
+ preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
13317
13512
  };
13513
+ this.canDeferDeps = !enableHmr;
13318
13514
  }
13319
13515
  detect(node, decorators) {
13320
13516
  if (!decorators) {
@@ -13341,36 +13537,63 @@ var ComponentDecoratorHandler = class {
13341
13537
  const resolveStyleUrl = (styleUrl) => {
13342
13538
  try {
13343
13539
  const resourceUrl = this.resourceLoader.resolve(styleUrl, containingFile);
13344
- return this.resourceLoader.preload(resourceUrl, { type: "style", containingFile });
13540
+ return this.resourceLoader.preload(resourceUrl, {
13541
+ type: "style",
13542
+ containingFile,
13543
+ className: node.name.text
13544
+ });
13345
13545
  } catch {
13346
13546
  return void 0;
13347
13547
  }
13348
13548
  };
13349
13549
  const templateAndTemplateStyleResources = preloadAndParseTemplate(this.evaluator, this.resourceLoader, this.depTracker, this.preanalyzeTemplateCache, node, decorator, component, containingFile, this.defaultPreserveWhitespaces, this.extractTemplateOptions, this.compilationMode).then((template) => {
13350
13550
  if (template === null) {
13351
- return void 0;
13551
+ return { templateStyles: [], templateStyleUrls: [] };
13552
+ }
13553
+ let templateUrl;
13554
+ if (template.sourceMapping.type === "external") {
13555
+ templateUrl = template.sourceMapping.templateUrl;
13352
13556
  }
13353
- return Promise.all(template.styleUrls.map((styleUrl) => resolveStyleUrl(styleUrl))).then(() => void 0);
13557
+ return {
13558
+ templateUrl,
13559
+ templateStyles: template.styles,
13560
+ templateStyleUrls: template.styleUrls
13561
+ };
13354
13562
  });
13355
13563
  const componentStyleUrls = extractComponentStyleUrls(this.evaluator, component);
13356
- let inlineStyles;
13357
- if (component.has("styles")) {
13358
- const litStyles = parseDirectiveStyles(component, this.evaluator, this.compilationMode);
13359
- if (litStyles === null) {
13360
- this.preanalyzeStylesCache.set(node, null);
13361
- } else {
13362
- inlineStyles = Promise.all(litStyles.map((style) => this.resourceLoader.preprocessInline(style, { type: "style", containingFile }))).then((styles) => {
13363
- this.preanalyzeStylesCache.set(node, styles);
13364
- });
13564
+ return templateAndTemplateStyleResources.then(async (templateInfo) => {
13565
+ let styles = null;
13566
+ let orderOffset = 0;
13567
+ const rawStyles = parseDirectiveStyles(component, this.evaluator, this.compilationMode);
13568
+ if (rawStyles == null ? void 0 : rawStyles.length) {
13569
+ styles = await Promise.all(rawStyles.map((style) => this.resourceLoader.preprocessInline(style, {
13570
+ type: "style",
13571
+ containingFile,
13572
+ order: orderOffset++,
13573
+ className: node.name.text
13574
+ })));
13575
+ }
13576
+ if (templateInfo.templateStyles) {
13577
+ styles != null ? styles : styles = [];
13578
+ styles.push(...await Promise.all(templateInfo.templateStyles.map((style) => {
13579
+ var _a;
13580
+ return this.resourceLoader.preprocessInline(style, {
13581
+ type: "style",
13582
+ containingFile: (_a = templateInfo.templateUrl) != null ? _a : containingFile,
13583
+ order: orderOffset++,
13584
+ className: node.name.text
13585
+ });
13586
+ })));
13365
13587
  }
13366
- } else {
13367
- this.preanalyzeStylesCache.set(node, null);
13368
- }
13369
- return Promise.all([
13370
- templateAndTemplateStyleResources,
13371
- inlineStyles,
13372
- ...componentStyleUrls.map((styleUrl) => resolveStyleUrl(styleUrl.url))
13373
- ]).then(() => void 0);
13588
+ this.preanalyzeStylesCache.set(node, styles);
13589
+ if (this.externalRuntimeStyles) {
13590
+ return;
13591
+ }
13592
+ await Promise.all([
13593
+ ...componentStyleUrls.map((styleUrl) => resolveStyleUrl(styleUrl.url)),
13594
+ ...templateInfo.templateStyleUrls.map((url) => resolveStyleUrl(url))
13595
+ ]);
13596
+ });
13374
13597
  }
13375
13598
  analyze(node, decorator) {
13376
13599
  var _a, _b, _c, _d, _e;
@@ -13379,7 +13602,7 @@ var ComponentDecoratorHandler = class {
13379
13602
  this.literalCache.delete(decorator);
13380
13603
  let diagnostics;
13381
13604
  let isPoisoned = false;
13382
- const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName());
13605
+ const directiveResult = extractDirectiveMetadata(node, decorator, this.reflector, this.importTracker, this.evaluator, this.refEmitter, this.referencesRegistry, this.isCore, this.annotateForClosureCompiler, this.compilationMode, this.elementSchemaRegistry.getDefaultComponentElementName(), this.strictStandalone);
13383
13606
  if (directiveResult.jitForced) {
13384
13607
  this.jitDeclarationRegistry.jitDeclarations.add(node);
13385
13608
  return {};
@@ -13390,13 +13613,13 @@ var ComponentDecoratorHandler = class {
13390
13613
  if (this.compilationMode !== CompilationMode.LOCAL) {
13391
13614
  changeDetection = resolveEnumValue(this.evaluator, component, "changeDetection", "ChangeDetectionStrategy");
13392
13615
  } else if (component.has("changeDetection")) {
13393
- changeDetection = new o2.WrappedNodeExpr(component.get("changeDetection"));
13616
+ changeDetection = new o4.WrappedNodeExpr(component.get("changeDetection"));
13394
13617
  }
13395
13618
  let animations = null;
13396
13619
  let animationTriggerNames = null;
13397
13620
  if (component.has("animations")) {
13398
13621
  const animationExpression = component.get("animations");
13399
- animations = new o2.WrappedNodeExpr(animationExpression);
13622
+ animations = new o4.WrappedNodeExpr(animationExpression);
13400
13623
  const animationsValue = this.evaluator.evaluate(animationExpression, animationTriggerResolver);
13401
13624
  animationTriggerNames = { includesDynamicAnimations: false, staticTriggerNames: [] };
13402
13625
  collectAnimationNames(animationsValue, animationTriggerNames);
@@ -13415,7 +13638,7 @@ var ComponentDecoratorHandler = class {
13415
13638
  if (component.has("viewProviders")) {
13416
13639
  const viewProviders = component.get("viewProviders");
13417
13640
  viewProvidersRequiringFactory = resolveProvidersRequiringFactory(viewProviders, this.reflector, this.evaluator);
13418
- wrappedViewProviders = new o2.WrappedNodeExpr(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(viewProviders) : viewProviders);
13641
+ wrappedViewProviders = new o4.WrappedNodeExpr(this.annotateForClosureCompiler ? wrapFunctionExpressionsInParens(viewProviders) : viewProviders);
13419
13642
  }
13420
13643
  if (component.has("providers")) {
13421
13644
  providersRequiringFactory = resolveProvidersRequiringFactory(component.get("providers"), this.reflector, this.evaluator);
@@ -13486,7 +13709,8 @@ var ComponentDecoratorHandler = class {
13486
13709
  i18nNormalizeLineEndingsInICUs: this.i18nNormalizeLineEndingsInICUs,
13487
13710
  usePoisonedData: this.usePoisonedData,
13488
13711
  enableBlockSyntax: this.enableBlockSyntax,
13489
- enableLetSyntax: this.enableLetSyntax
13712
+ enableLetSyntax: this.enableLetSyntax,
13713
+ preserveSignificantWhitespace: this.i18nPreserveSignificantWhitespace
13490
13714
  }, this.compilationMode);
13491
13715
  if (this.compilationMode === CompilationMode.LOCAL && template.errors && template.errors.length > 0) {
13492
13716
  if (diagnostics === void 0) {
@@ -13504,7 +13728,8 @@ var ComponentDecoratorHandler = class {
13504
13728
  expression: template.sourceMapping.node
13505
13729
  };
13506
13730
  let styles = [];
13507
- const styleResources = extractStyleResources(this.resourceLoader, component, containingFile);
13731
+ const externalStyles = [];
13732
+ const styleResources = extractInlineStyleResources(component);
13508
13733
  const styleUrls = [
13509
13734
  ...extractComponentStyleUrls(this.evaluator, component),
13510
13735
  ..._extractTemplateStyleUrls(template)
@@ -13512,6 +13737,16 @@ var ComponentDecoratorHandler = class {
13512
13737
  for (const styleUrl of styleUrls) {
13513
13738
  try {
13514
13739
  const resourceUrl = this.resourceLoader.resolve(styleUrl.url, containingFile);
13740
+ if (this.externalRuntimeStyles) {
13741
+ externalStyles.push(resourceUrl);
13742
+ continue;
13743
+ }
13744
+ if (styleUrl.source === 2 && ts47.isStringLiteralLike(styleUrl.expression)) {
13745
+ styleResources.add({
13746
+ path: absoluteFrom(resourceUrl),
13747
+ expression: styleUrl.expression
13748
+ });
13749
+ }
13515
13750
  const resourceStr = this.resourceLoader.load(resourceUrl);
13516
13751
  styles.push(resourceStr);
13517
13752
  if (this.depTracker !== null) {
@@ -13525,7 +13760,7 @@ var ComponentDecoratorHandler = class {
13525
13760
  diagnostics = [];
13526
13761
  }
13527
13762
  const resourceType = styleUrl.source === 2 ? 2 : 1;
13528
- diagnostics.push(makeResourceNotFoundError(styleUrl.url, styleUrl.nodeForError, resourceType).toDiagnostic());
13763
+ diagnostics.push(makeResourceNotFoundError(styleUrl.url, styleUrl.expression, resourceType).toDiagnostic());
13529
13764
  }
13530
13765
  }
13531
13766
  if (encapsulation === ViewEncapsulation2.ShadowDom && metadata.selector !== null) {
@@ -13541,8 +13776,12 @@ var ComponentDecoratorHandler = class {
13541
13776
  if (this.preanalyzeStylesCache.has(node)) {
13542
13777
  inlineStyles = this.preanalyzeStylesCache.get(node);
13543
13778
  this.preanalyzeStylesCache.delete(node);
13544
- if (inlineStyles !== null) {
13545
- styles.push(...inlineStyles);
13779
+ if (inlineStyles == null ? void 0 : inlineStyles.length) {
13780
+ if (this.externalRuntimeStyles) {
13781
+ externalStyles.push(...inlineStyles);
13782
+ } else {
13783
+ styles.push(...inlineStyles);
13784
+ }
13546
13785
  }
13547
13786
  } else {
13548
13787
  if (this.resourceLoader.canPreprocess) {
@@ -13555,9 +13794,9 @@ var ComponentDecoratorHandler = class {
13555
13794
  styles.push(...litStyles);
13556
13795
  }
13557
13796
  }
13558
- }
13559
- if (template.styles.length > 0) {
13560
- styles.push(...template.styles);
13797
+ if (template.styles.length > 0) {
13798
+ styles.push(...template.styles);
13799
+ }
13561
13800
  }
13562
13801
  let explicitlyDeferredTypes = null;
13563
13802
  if (metadata.isStandalone && rawDeferredImports !== null) {
@@ -13587,17 +13826,19 @@ var ComponentDecoratorHandler = class {
13587
13826
  changeDetection,
13588
13827
  interpolation: (_d = template.interpolationConfig) != null ? _d : DEFAULT_INTERPOLATION_CONFIG2,
13589
13828
  styles,
13829
+ externalStyles,
13590
13830
  animations,
13591
13831
  viewProviders: wrappedViewProviders,
13592
13832
  i18nUseExternalIds: this.i18nUseExternalIds,
13593
13833
  relativeContextFilePath,
13594
- rawImports: rawImports !== null ? new o2.WrappedNodeExpr(rawImports) : void 0
13834
+ rawImports: rawImports !== null ? new o4.WrappedNodeExpr(rawImports) : void 0
13595
13835
  },
13596
13836
  typeCheckMeta: extractDirectiveTypeCheckMeta(node, inputs, this.reflector),
13597
13837
  classMetadata: this.includeClassMetadata ? extractClassMetadata(node, this.reflector, this.isCore, this.annotateForClosureCompiler, (dec) => transformDecoratorResources(dec, component, styles, template)) : null,
13598
13838
  classDebugInfo: extractClassDebugInfo(
13599
13839
  node,
13600
13840
  this.reflector,
13841
+ this.compilerHost,
13601
13842
  this.rootDirs,
13602
13843
  this.forbidOrphanRendering
13603
13844
  ),
@@ -13651,6 +13892,7 @@ var ComponentDecoratorHandler = class {
13651
13892
  isStandalone: analysis.meta.isStandalone,
13652
13893
  isSignal: analysis.meta.isSignal,
13653
13894
  imports: analysis.resolvedImports,
13895
+ rawImports: analysis.rawImports,
13654
13896
  deferredImports: analysis.resolvedDeferredImports,
13655
13897
  animationTriggerNames: analysis.animationTriggerNames,
13656
13898
  schemas: analysis.schemas,
@@ -13701,7 +13943,7 @@ var ComponentDecoratorHandler = class {
13701
13943
  }
13702
13944
  typeCheck(ctx, node, meta) {
13703
13945
  var _a;
13704
- if (this.typeCheckScopeRegistry === null || !ts45.isClassDeclaration(node)) {
13946
+ if (this.typeCheckScopeRegistry === null || !ts47.isClassDeclaration(node)) {
13705
13947
  return;
13706
13948
  }
13707
13949
  if (meta.isPoisoned && !this.usePoisonedData) {
@@ -13938,11 +14180,11 @@ var ComponentDecoratorHandler = class {
13938
14180
  const importDiagnostics = validateStandaloneImports(analysis.resolvedDeferredImports, analysis.rawDeferredImports, this.metaReader, this.scopeReader, true);
13939
14181
  diagnostics.push(...importDiagnostics);
13940
14182
  }
13941
- if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o2.WrappedNodeExpr) {
14183
+ if (analysis.providersRequiringFactory !== null && analysis.meta.providers instanceof o4.WrappedNodeExpr) {
13942
14184
  const providerDiagnostics = getProviderDiagnostics(analysis.providersRequiringFactory, analysis.meta.providers.node, this.injectableRegistry);
13943
14185
  diagnostics.push(...providerDiagnostics);
13944
14186
  }
13945
- if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o2.WrappedNodeExpr) {
14187
+ if (analysis.viewProvidersRequiringFactory !== null && analysis.meta.viewProviders instanceof o4.WrappedNodeExpr) {
13946
14188
  const viewProviderDiagnostics = getProviderDiagnostics(analysis.viewProvidersRequiringFactory, analysis.meta.viewProviders.node, this.injectableRegistry);
13947
14189
  diagnostics.push(...viewProviderDiagnostics);
13948
14190
  }
@@ -13995,20 +14237,24 @@ var ComponentDecoratorHandler = class {
13995
14237
  if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
13996
14238
  return [];
13997
14239
  }
13998
- const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
14240
+ const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
13999
14241
  const meta = {
14000
14242
  ...analysis.meta,
14001
14243
  ...resolution,
14002
14244
  defer: this.compileDeferBlocks(resolution)
14003
14245
  };
14004
14246
  const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
14005
- removeDeferrableTypesFromComponentDecorator(analysis, perComponentDeferredDeps);
14247
+ if (perComponentDeferredDeps !== null) {
14248
+ removeDeferrableTypesFromComponentDecorator(analysis, perComponentDeferredDeps);
14249
+ }
14006
14250
  const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
14007
14251
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
14008
14252
  const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
14009
14253
  const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
14010
- const deferrableImports = this.deferredSymbolTracker.getDeferrableImportDecls();
14011
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo);
14254
+ const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
14255
+ const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
14256
+ const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
14257
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
14012
14258
  }
14013
14259
  compilePartial(node, analysis, resolution) {
14014
14260
  if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
@@ -14018,9 +14264,9 @@ var ComponentDecoratorHandler = class {
14018
14264
  content: analysis.template.content,
14019
14265
  sourceUrl: analysis.template.declaration.resolvedTemplateUrl,
14020
14266
  isInline: analysis.template.declaration.isInline,
14021
- inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new o2.WrappedNodeExpr(analysis.template.sourceMapping.node) : null
14267
+ inlineTemplateLiteralExpression: analysis.template.sourceMapping.type === "direct" ? new o4.WrappedNodeExpr(analysis.template.sourceMapping.node) : null
14022
14268
  };
14023
- const perComponentDeferredDeps = this.resolveAllDeferredDependencies(resolution);
14269
+ const perComponentDeferredDeps = this.canDeferDeps ? this.resolveAllDeferredDependencies(resolution) : null;
14024
14270
  const meta = {
14025
14271
  ...analysis.meta,
14026
14272
  ...resolution,
@@ -14030,26 +14276,48 @@ var ComponentDecoratorHandler = class {
14030
14276
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
14031
14277
  const def = compileDeclareComponentFromMetadata(meta, analysis.template, templateInfo);
14032
14278
  const classMetadata = analysis.classMetadata !== null ? compileComponentDeclareClassMetadata(analysis.classMetadata, perComponentDeferredDeps).toStmt() : null;
14033
- const deferrableImports = this.deferredSymbolTracker.getDeferrableImportDecls();
14034
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports);
14279
+ const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, null) : null;
14280
+ const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
14281
+ const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
14282
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, null, hmrInitializer);
14035
14283
  }
14036
14284
  compileLocal(node, analysis, resolution, pool) {
14037
- const deferrableTypes = analysis.explicitlyDeferredTypes;
14285
+ const deferrableTypes = this.canDeferDeps ? analysis.explicitlyDeferredTypes : null;
14038
14286
  const meta = {
14039
14287
  ...analysis.meta,
14040
14288
  ...resolution,
14041
14289
  defer: this.compileDeferBlocks(resolution)
14042
14290
  };
14043
- if (analysis.explicitlyDeferredTypes !== null) {
14044
- removeDeferrableTypesFromComponentDecorator(analysis, analysis.explicitlyDeferredTypes);
14291
+ if (deferrableTypes !== null) {
14292
+ removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes);
14045
14293
  }
14046
14294
  const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
14047
14295
  const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
14048
14296
  const inputTransformFields = compileInputTransformFields(analysis.inputs);
14049
14297
  const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, deferrableTypes).toStmt() : null;
14050
14298
  const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
14051
- const deferrableImports = this.deferredSymbolTracker.getDeferrableImportDecls();
14052
- return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo);
14299
+ const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
14300
+ const hmrInitializer = hmrMeta ? compileHmrInitializer(hmrMeta).toStmt() : null;
14301
+ const deferrableImports = this.canDeferDeps ? this.deferredSymbolTracker.getDeferrableImportDecls() : null;
14302
+ return compileResults(fac, def, classMetadata, "\u0275cmp", inputTransformFields, deferrableImports, debugInfo, hmrInitializer);
14303
+ }
14304
+ compileHmrUpdateDeclaration(node, analysis, resolution) {
14305
+ if (analysis.template.errors !== null && analysis.template.errors.length > 0) {
14306
+ return null;
14307
+ }
14308
+ const pool = new ConstantPool2();
14309
+ const meta = {
14310
+ ...analysis.meta,
14311
+ ...resolution,
14312
+ defer: this.compileDeferBlocks(resolution)
14313
+ };
14314
+ const fac = compileNgFactoryDefField(toFactoryMetadata(meta, FactoryTarget3.Component));
14315
+ const def = compileComponentFromMetadata(meta, pool, makeBindingParser2());
14316
+ const classMetadata = analysis.classMetadata !== null ? compileComponentClassMetadata(analysis.classMetadata, null).toStmt() : null;
14317
+ const debugInfo = analysis.classDebugInfo !== null ? compileClassDebugInfo(analysis.classDebugInfo).toStmt() : null;
14318
+ const hmrMeta = this.enableHmr ? extractHmrMetatadata(node, this.reflector, this.compilerHost, this.rootDirs, def, fac, classMetadata, debugInfo) : null;
14319
+ const res = compileResults(fac, def, classMetadata, "\u0275cmp", null, null, debugInfo, null);
14320
+ return hmrMeta === null || res.length === 0 ? null : getHmrUpdateDeclaration(res, pool.statements, hmrMeta, node.getSourceFile());
14053
14321
  }
14054
14322
  locateDeferBlocksWithoutScope(template) {
14055
14323
  const deferBlocks = /* @__PURE__ */ new Map();
@@ -14079,12 +14347,12 @@ var ComponentDecoratorHandler = class {
14079
14347
  }
14080
14348
  collectExplicitlyDeferredSymbols(rawDeferredImports) {
14081
14349
  const deferredTypes = /* @__PURE__ */ new Map();
14082
- if (!ts45.isArrayLiteralExpression(rawDeferredImports)) {
14350
+ if (!ts47.isArrayLiteralExpression(rawDeferredImports)) {
14083
14351
  return deferredTypes;
14084
14352
  }
14085
14353
  for (const element of rawDeferredImports.elements) {
14086
14354
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
14087
- if (!ts45.isIdentifier(node)) {
14355
+ if (!ts47.isIdentifier(node)) {
14088
14356
  continue;
14089
14357
  }
14090
14358
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -14151,12 +14419,12 @@ var ComponentDecoratorHandler = class {
14151
14419
  }
14152
14420
  }
14153
14421
  registerDeferrableCandidates(componentClassDecl, importsExpr, isDeferredImport, allDeferredDecls, eagerlyUsedDecls, resolutionData) {
14154
- if (!ts45.isArrayLiteralExpression(importsExpr)) {
14422
+ if (!ts47.isArrayLiteralExpression(importsExpr)) {
14155
14423
  return;
14156
14424
  }
14157
14425
  for (const element of importsExpr.elements) {
14158
14426
  const node = tryUnwrapForwardRef(element, this.reflector) || element;
14159
- if (!ts45.isIdentifier(node)) {
14427
+ if (!ts47.isIdentifier(node)) {
14160
14428
  continue;
14161
14429
  }
14162
14430
  const imp = this.reflector.getImportOfIdentifier(node);
@@ -14240,7 +14508,7 @@ function removeDeferrableTypesFromComponentDecorator(analysis, deferrableTypes)
14240
14508
  if (analysis.classMetadata) {
14241
14509
  const deferrableSymbols = new Set(deferrableTypes.map((t) => t.symbolName));
14242
14510
  const rewrittenDecoratorsNode = removeIdentifierReferences(analysis.classMetadata.decorators.node, deferrableSymbols);
14243
- analysis.classMetadata.decorators = new o2.WrappedNodeExpr(rewrittenDecoratorsNode);
14511
+ analysis.classMetadata.decorators = new o4.WrappedNodeExpr(rewrittenDecoratorsNode);
14244
14512
  }
14245
14513
  }
14246
14514
  function validateNoImportOverlap(eagerDeps, deferredDeps, rawDeferredImports) {
@@ -14290,7 +14558,7 @@ function isDefaultImport(node) {
14290
14558
 
14291
14559
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/injectable.mjs
14292
14560
  import { compileClassMetadata as compileClassMetadata3, compileDeclareClassMetadata as compileDeclareClassMetadata3, compileDeclareInjectableFromMetadata, compileInjectable, createMayBeForwardRefExpression as createMayBeForwardRefExpression3, FactoryTarget as FactoryTarget4, LiteralExpr as LiteralExpr3, WrappedNodeExpr as WrappedNodeExpr10 } from "@angular/compiler";
14293
- import ts46 from "typescript";
14561
+ import ts48 from "typescript";
14294
14562
  var InjectableDecoratorHandler = class {
14295
14563
  constructor(reflector, evaluator, isCore, strictCtorDeps, injectableRegistry, perf, includeClassMetadata, compilationMode, errorOnDuplicateProv = true) {
14296
14564
  this.reflector = reflector;
@@ -14410,7 +14678,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
14410
14678
  };
14411
14679
  } else if (decorator.args.length === 1) {
14412
14680
  const metaNode = decorator.args[0];
14413
- if (!ts46.isObjectLiteralExpression(metaNode)) {
14681
+ if (!ts48.isObjectLiteralExpression(metaNode)) {
14414
14682
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, metaNode, `@Injectable argument must be an object literal`);
14415
14683
  }
14416
14684
  const meta = reflectObjectLiteral(metaNode);
@@ -14418,7 +14686,7 @@ function extractInjectableMetadata(clazz, decorator, reflector) {
14418
14686
  let deps = void 0;
14419
14687
  if ((meta.has("useClass") || meta.has("useFactory")) && meta.has("deps")) {
14420
14688
  const depsExpr = meta.get("deps");
14421
- if (!ts46.isArrayLiteralExpression(depsExpr)) {
14689
+ if (!ts48.isArrayLiteralExpression(depsExpr)) {
14422
14690
  throw new FatalDiagnosticError(ErrorCode.VALUE_NOT_LITERAL, depsExpr, `@Injectable deps metadata must be an inline array`);
14423
14691
  }
14424
14692
  deps = depsExpr.elements.map((dep) => getDep(dep, reflector));
@@ -14503,12 +14771,12 @@ function getDep(dep, reflector) {
14503
14771
  }
14504
14772
  return true;
14505
14773
  }
14506
- if (ts46.isArrayLiteralExpression(dep)) {
14774
+ if (ts48.isArrayLiteralExpression(dep)) {
14507
14775
  dep.elements.forEach((el) => {
14508
14776
  let isDecorator = false;
14509
- if (ts46.isIdentifier(el)) {
14777
+ if (ts48.isIdentifier(el)) {
14510
14778
  isDecorator = maybeUpdateDecorator(el, reflector);
14511
- } else if (ts46.isNewExpression(el) && ts46.isIdentifier(el.expression)) {
14779
+ } else if (ts48.isNewExpression(el) && ts48.isIdentifier(el.expression)) {
14512
14780
  const token = el.arguments && el.arguments.length > 0 && el.arguments[0] || void 0;
14513
14781
  isDecorator = maybeUpdateDecorator(el.expression, reflector, token);
14514
14782
  }
@@ -14522,7 +14790,7 @@ function getDep(dep, reflector) {
14522
14790
 
14523
14791
  // bazel-out/k8-fastbuild/bin/packages/compiler-cli/src/ngtsc/annotations/src/pipe.mjs
14524
14792
  import { compileClassMetadata as compileClassMetadata4, compileDeclareClassMetadata as compileDeclareClassMetadata4, compileDeclarePipeFromMetadata, compilePipeFromMetadata, FactoryTarget as FactoryTarget5 } from "@angular/compiler";
14525
- import ts47 from "typescript";
14793
+ import ts49 from "typescript";
14526
14794
  var PipeSymbol = class extends SemanticSymbol {
14527
14795
  constructor(decl, name) {
14528
14796
  super(decl);
@@ -14539,7 +14807,7 @@ var PipeSymbol = class extends SemanticSymbol {
14539
14807
  }
14540
14808
  };
14541
14809
  var PipeDecoratorHandler = class {
14542
- constructor(reflector, evaluator, metaRegistry, scopeRegistry, injectableRegistry, isCore, perf, includeClassMetadata, compilationMode, generateExtraImportsInLocalMode) {
14810
+ constructor(reflector, evaluator, metaRegistry, scopeRegistry, injectableRegistry, isCore, perf, includeClassMetadata, compilationMode, generateExtraImportsInLocalMode, strictStandalone) {
14543
14811
  this.reflector = reflector;
14544
14812
  this.evaluator = evaluator;
14545
14813
  this.metaRegistry = metaRegistry;
@@ -14550,6 +14818,7 @@ var PipeDecoratorHandler = class {
14550
14818
  this.includeClassMetadata = includeClassMetadata;
14551
14819
  this.compilationMode = compilationMode;
14552
14820
  this.generateExtraImportsInLocalMode = generateExtraImportsInLocalMode;
14821
+ this.strictStandalone = strictStandalone;
14553
14822
  this.precedence = HandlerPrecedence.PRIMARY;
14554
14823
  this.name = "PipeDecoratorHandler";
14555
14824
  }
@@ -14580,7 +14849,7 @@ var PipeDecoratorHandler = class {
14580
14849
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARITY_WRONG, decorator.node, "@Pipe must have exactly one argument");
14581
14850
  }
14582
14851
  const meta = unwrapExpression(decorator.args[0]);
14583
- if (!ts47.isObjectLiteralExpression(meta)) {
14852
+ if (!ts49.isObjectLiteralExpression(meta)) {
14584
14853
  throw new FatalDiagnosticError(ErrorCode.DECORATOR_ARG_NOT_LITERAL, meta, "@Pipe must have a literal argument");
14585
14854
  }
14586
14855
  const pipe = reflectObjectLiteral(meta);
@@ -14601,7 +14870,7 @@ var PipeDecoratorHandler = class {
14601
14870
  }
14602
14871
  pure = pureValue;
14603
14872
  }
14604
- let isStandalone = false;
14873
+ let isStandalone = NG_STANDALONE_DEFAULT_VALUE;
14605
14874
  if (pipe.has("standalone")) {
14606
14875
  const expr = pipe.get("standalone");
14607
14876
  const resolved = this.evaluator.evaluate(expr);
@@ -14609,6 +14878,9 @@ var PipeDecoratorHandler = class {
14609
14878
  throw createValueHasWrongTypeError(expr, resolved, `standalone flag must be a boolean`);
14610
14879
  }
14611
14880
  isStandalone = resolved;
14881
+ if (!isStandalone && this.strictStandalone) {
14882
+ throw new FatalDiagnosticError(ErrorCode.NON_STANDALONE_NOT_ALLOWED, expr, `Only standalone pipes are allowed when 'strictStandalone' is enabled.`);
14883
+ }
14612
14884
  }
14613
14885
  return {
14614
14886
  analysis: {
@@ -14741,7 +15013,14 @@ export {
14741
15013
  * Copyright Google LLC All Rights Reserved.
14742
15014
  *
14743
15015
  * Use of this source code is governed by an MIT-style license that can be
14744
- * found in the LICENSE file at https://angular.io/license
15016
+ * found in the LICENSE file at https://angular.dev/license
15017
+ */
15018
+ /**
15019
+ * @license
15020
+ * Copyright Google LLC All Rights Reserved.
15021
+ *
15022
+ * Use of this source code is governed by an MIT-style license that can be
15023
+ * found in the LICENSE file at https://angular.dev/license
14745
15024
  */
14746
15025
  /**
14747
15026
  * @license
@@ -14750,4 +15029,4 @@ export {
14750
15029
  * Use of this source code is governed by an MIT-style license that can be
14751
15030
  * found in the LICENSE file at https://angular.io/license
14752
15031
  */
14753
- //# sourceMappingURL=chunk-2SSA4Y5F.js.map
15032
+ //# sourceMappingURL=chunk-Q4DA5WRV.js.map