@angular/core 21.0.0-next.2 → 21.0.0-next.4

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 (79) hide show
  1. package/api.d.d.ts +1 -1
  2. package/chrome_dev_tools_performance.d.d.ts +1 -1
  3. package/discovery.d.d.ts +44 -18
  4. package/effect.d.d.ts +1 -1
  5. package/event_dispatcher.d.d.ts +1 -1
  6. package/fesm2022/attribute.mjs +1 -1
  7. package/fesm2022/attribute.mjs.map +1 -1
  8. package/fesm2022/core.mjs +253 -87
  9. package/fesm2022/core.mjs.map +1 -1
  10. package/fesm2022/debug_node.mjs +516 -690
  11. package/fesm2022/debug_node.mjs.map +1 -1
  12. package/fesm2022/effect.mjs +1 -1
  13. package/fesm2022/effect.mjs.map +1 -1
  14. package/fesm2022/not_found.mjs +1 -1
  15. package/fesm2022/not_found.mjs.map +1 -1
  16. package/fesm2022/primitives/di.mjs +1 -1
  17. package/fesm2022/primitives/di.mjs.map +1 -1
  18. package/fesm2022/primitives/event-dispatch.mjs +1 -1
  19. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  20. package/fesm2022/primitives/signals.mjs +2 -2
  21. package/fesm2022/primitives/signals.mjs.map +1 -1
  22. package/fesm2022/resource.mjs +1 -1
  23. package/fesm2022/resource.mjs.map +1 -1
  24. package/fesm2022/root_effect_scheduler.mjs +55 -39
  25. package/fesm2022/root_effect_scheduler.mjs.map +1 -1
  26. package/fesm2022/rxjs-interop.mjs +3 -1
  27. package/fesm2022/rxjs-interop.mjs.map +1 -1
  28. package/fesm2022/signal.mjs +32 -11
  29. package/fesm2022/signal.mjs.map +1 -1
  30. package/fesm2022/testing.mjs +4 -4
  31. package/fesm2022/testing.mjs.map +1 -1
  32. package/fesm2022/weak_ref.mjs +1 -1
  33. package/fesm2022/weak_ref.mjs.map +1 -1
  34. package/graph.d.d.ts +24 -4
  35. package/index.d.ts +16 -135
  36. package/package.json +2 -2
  37. package/primitives/di/index.d.ts +1 -1
  38. package/primitives/event-dispatch/index.d.ts +1 -1
  39. package/primitives/signals/index.d.ts +2 -2
  40. package/rxjs-interop/index.d.ts +3 -1
  41. package/schematics/bundles/add-bootstrap-context-to-server-main.cjs +135 -0
  42. package/schematics/bundles/application-config-core.cjs +6 -6
  43. package/schematics/bundles/{apply_import_manager-B3czqUhF.cjs → apply_import_manager-DroqamMP.cjs} +3 -3
  44. package/schematics/bundles/bootstrap-options-migration.cjs +715 -0
  45. package/schematics/bundles/cleanup-unused-imports.cjs +5 -5
  46. package/schematics/bundles/{compiler_host-B9qvCnmC.cjs → compiler_host-aKaS4KRz.cjs} +2 -2
  47. package/schematics/bundles/control-flow-migration.cjs +4 -4
  48. package/schematics/bundles/{imports-26VeX8i-.cjs → imports-DwPXlGFl.cjs} +27 -1
  49. package/schematics/bundles/{index-B6-f9bil.cjs → index-BI97t1U8.cjs} +130 -34
  50. package/schematics/bundles/{index-DN8W1c8n.cjs → index-DaB-z4lP.cjs} +4 -4
  51. package/schematics/bundles/inject-migration.cjs +5 -5
  52. package/schematics/bundles/leading_space-D9nQ8UQC.cjs +1 -1
  53. package/schematics/bundles/{migrate_ts_type_references-DawXRJzI.cjs → migrate_ts_type_references-DPuwhGod.cjs} +5 -5
  54. package/schematics/bundles/{ng_component_template-DUAg-x1h.cjs → ng_component_template-CytqBs-q.cjs} +3 -3
  55. package/schematics/bundles/{ng_decorators-CtYwz9Lw.cjs → ng_decorators-BI0uV7KI.cjs} +2 -2
  56. package/schematics/bundles/ngclass-to-class-migration.cjs +9 -9
  57. package/schematics/bundles/ngstyle-to-style-migration.cjs +490 -0
  58. package/schematics/bundles/nodes-B16H9JUd.cjs +1 -1
  59. package/schematics/bundles/output-migration.cjs +6 -6
  60. package/schematics/bundles/parse_html-CeQjkdOK.cjs +132 -0
  61. package/schematics/bundles/{project_paths-D64fJzoa.cjs → project_paths-Cz4x-QiT.cjs} +3 -3
  62. package/schematics/bundles/{project_tsconfig_paths-DZ17BWwk.cjs → project_tsconfig_paths-Clg7WX1w.cjs} +170 -198
  63. package/schematics/bundles/property_name-BBwFuqMe.cjs +1 -1
  64. package/schematics/bundles/route-lazy-loading.cjs +48 -4
  65. package/schematics/bundles/router-current-navigation.cjs +6 -6
  66. package/schematics/bundles/router-last-successful-navigation.cjs +6 -6
  67. package/schematics/bundles/self-closing-tags-migration.cjs +8 -8
  68. package/schematics/bundles/signal-input-migration.cjs +17 -9
  69. package/schematics/bundles/signal-queries-migration.cjs +7 -7
  70. package/schematics/bundles/signals.cjs +7 -7
  71. package/schematics/bundles/standalone-migration.cjs +7 -7
  72. package/schematics/bundles/{symbol-VPWguRxr.cjs → symbol-BObKoqes.cjs} +3 -2
  73. package/schematics/collection.json +6 -0
  74. package/schematics/migrations/ngclass-to-class-migration/schema.json +1 -1
  75. package/schematics/migrations/ngstyle-to-style-migration/schema.json +20 -0
  76. package/schematics/migrations.json +10 -0
  77. package/testing/index.d.ts +1 -1
  78. package/weak_ref.d.d.ts +1 -1
  79. package/schematics/bundles/parse_html-C8TYlOyu.cjs +0 -41
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -2851,10 +2851,6 @@ class Identifiers {
2851
2851
  name: 'ɵɵExternalStylesFeature',
2852
2852
  moduleName: CORE,
2853
2853
  };
2854
- static AnimationsFeature = {
2855
- name: 'ɵɵAnimationsFeature',
2856
- moduleName: CORE,
2857
- };
2858
2854
  static listener = { name: 'ɵɵlistener', moduleName: CORE };
2859
2855
  static getInheritedFactory = {
2860
2856
  name: 'ɵɵgetInheritedFactory',
@@ -2988,7 +2984,7 @@ function getJitStandaloneDefaultForVersion(version) {
2988
2984
  }
2989
2985
 
2990
2986
  // https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit
2991
- const VERSION = 3;
2987
+ const VERSION$1 = 3;
2992
2988
  const JS_B64_PREFIX = '# sourceMappingURL=data:application/json;base64,';
2993
2989
  class SourceMapGenerator {
2994
2990
  file;
@@ -3082,7 +3078,7 @@ class SourceMapGenerator {
3082
3078
  mappings = mappings.slice(0, -1);
3083
3079
  return {
3084
3080
  'file': this.file || '',
3085
- 'version': VERSION,
3081
+ 'version': VERSION$1,
3086
3082
  'sourceRoot': '',
3087
3083
  'sources': sources,
3088
3084
  'sourcesContent': sourcesContent,
@@ -20338,7 +20334,7 @@ const OBJECT = 'object';
20338
20334
  //
20339
20335
  // =================================================================================================
20340
20336
  const SCHEMA = [
20341
- '[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
20337
+ '[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaInvalid,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot' +
20342
20338
  /* added manually to avoid breaking changes */
20343
20339
  ',*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored',
20344
20340
  '[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy',
@@ -30106,184 +30102,9 @@ function makeBindingParser(interpolationConfig = DEFAULT_INTERPOLATION_CONFIG, s
30106
30102
  return new BindingParser(new Parser(new Lexer(), selectorlessEnabled), interpolationConfig, elementRegistry, []);
30107
30103
  }
30108
30104
 
30109
- /*!
30110
- * @license
30111
- * Copyright Google LLC All Rights Reserved.
30112
- *
30113
- * Use of this source code is governed by an MIT-style license that can be
30114
- * found in the LICENSE file at https://angular.dev/license
30115
- */
30116
- /**
30117
- * Visitor that traverses all template and expression AST nodes in a template.
30118
- * Useful for cases where every single node needs to be visited.
30119
- */
30120
- class CombinedRecursiveAstVisitor extends RecursiveAstVisitor {
30121
- visit(node) {
30122
- if (node instanceof ASTWithSource) {
30123
- this.visit(node.ast);
30124
- }
30125
- else {
30126
- node.visit(this);
30127
- }
30128
- }
30129
- visitElement(element) {
30130
- this.visitAllTemplateNodes(element.attributes);
30131
- this.visitAllTemplateNodes(element.inputs);
30132
- this.visitAllTemplateNodes(element.outputs);
30133
- this.visitAllTemplateNodes(element.directives);
30134
- this.visitAllTemplateNodes(element.references);
30135
- this.visitAllTemplateNodes(element.children);
30136
- }
30137
- visitTemplate(template) {
30138
- this.visitAllTemplateNodes(template.attributes);
30139
- this.visitAllTemplateNodes(template.inputs);
30140
- this.visitAllTemplateNodes(template.outputs);
30141
- this.visitAllTemplateNodes(template.directives);
30142
- this.visitAllTemplateNodes(template.templateAttrs);
30143
- this.visitAllTemplateNodes(template.variables);
30144
- this.visitAllTemplateNodes(template.references);
30145
- this.visitAllTemplateNodes(template.children);
30146
- }
30147
- visitContent(content) {
30148
- this.visitAllTemplateNodes(content.children);
30149
- }
30150
- visitBoundAttribute(attribute) {
30151
- this.visit(attribute.value);
30152
- }
30153
- visitBoundEvent(attribute) {
30154
- this.visit(attribute.handler);
30155
- }
30156
- visitBoundText(text) {
30157
- this.visit(text.value);
30158
- }
30159
- visitIcu(icu) {
30160
- Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
30161
- Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
30162
- }
30163
- visitDeferredBlock(deferred) {
30164
- deferred.visitAll(this);
30165
- }
30166
- visitDeferredTrigger(trigger) {
30167
- if (trigger instanceof BoundDeferredTrigger) {
30168
- this.visit(trigger.value);
30169
- }
30170
- }
30171
- visitDeferredBlockPlaceholder(block) {
30172
- this.visitAllTemplateNodes(block.children);
30173
- }
30174
- visitDeferredBlockError(block) {
30175
- this.visitAllTemplateNodes(block.children);
30176
- }
30177
- visitDeferredBlockLoading(block) {
30178
- this.visitAllTemplateNodes(block.children);
30179
- }
30180
- visitSwitchBlock(block) {
30181
- this.visit(block.expression);
30182
- this.visitAllTemplateNodes(block.cases);
30183
- }
30184
- visitSwitchBlockCase(block) {
30185
- block.expression && this.visit(block.expression);
30186
- this.visitAllTemplateNodes(block.children);
30187
- }
30188
- visitForLoopBlock(block) {
30189
- block.item.visit(this);
30190
- this.visitAllTemplateNodes(block.contextVariables);
30191
- this.visit(block.expression);
30192
- this.visitAllTemplateNodes(block.children);
30193
- block.empty?.visit(this);
30194
- }
30195
- visitForLoopBlockEmpty(block) {
30196
- this.visitAllTemplateNodes(block.children);
30197
- }
30198
- visitIfBlock(block) {
30199
- this.visitAllTemplateNodes(block.branches);
30200
- }
30201
- visitIfBlockBranch(block) {
30202
- block.expression && this.visit(block.expression);
30203
- block.expressionAlias?.visit(this);
30204
- this.visitAllTemplateNodes(block.children);
30205
- }
30206
- visitLetDeclaration(decl) {
30207
- this.visit(decl.value);
30208
- }
30209
- visitComponent(component) {
30210
- this.visitAllTemplateNodes(component.attributes);
30211
- this.visitAllTemplateNodes(component.inputs);
30212
- this.visitAllTemplateNodes(component.outputs);
30213
- this.visitAllTemplateNodes(component.directives);
30214
- this.visitAllTemplateNodes(component.references);
30215
- this.visitAllTemplateNodes(component.children);
30216
- }
30217
- visitDirective(directive) {
30218
- this.visitAllTemplateNodes(directive.attributes);
30219
- this.visitAllTemplateNodes(directive.inputs);
30220
- this.visitAllTemplateNodes(directive.outputs);
30221
- this.visitAllTemplateNodes(directive.references);
30222
- }
30223
- visitVariable(variable) { }
30224
- visitReference(reference) { }
30225
- visitTextAttribute(attribute) { }
30226
- visitText(text) { }
30227
- visitUnknownBlock(block) { }
30228
- visitAllTemplateNodes(nodes) {
30229
- for (const node of nodes) {
30230
- this.visit(node);
30231
- }
30232
- }
30233
- }
30234
-
30235
- /*!
30236
- * @license
30237
- * Copyright Google LLC All Rights Reserved.
30238
- *
30239
- * Use of this source code is governed by an MIT-style license that can be
30240
- * found in the LICENSE file at https://angular.dev/license
30241
- */
30242
- const ANIMATE_LEAVE$1 = `animate.leave`;
30243
- /**
30244
- * Analyzes a component's template to determine if it's using animate.enter
30245
- * or animate.leave syntax.
30246
- */
30247
- function analyzeTemplateForAnimations(template) {
30248
- const analyzer = new AnimationsAnalyzer();
30249
- visitAll$1(analyzer, template);
30250
- // The template is considered selectorless only if there
30251
- // are direct references to directives or pipes.
30252
- return analyzer.hasAnimations;
30253
- }
30254
- /**
30255
- * Visitor that traverses all the template nodes and
30256
- * expressions to look for selectorless references.
30257
- */
30258
- class AnimationsAnalyzer extends CombinedRecursiveAstVisitor {
30259
- hasAnimations = false;
30260
- visitElement(element) {
30261
- // check for regular strings
30262
- for (const attr of element.attributes) {
30263
- if (attr.name === ANIMATE_LEAVE$1) {
30264
- this.hasAnimations = true;
30265
- }
30266
- }
30267
- // check for attribute bindings
30268
- for (const input of element.inputs) {
30269
- if (input.name === ANIMATE_LEAVE$1) {
30270
- this.hasAnimations = true;
30271
- }
30272
- }
30273
- // check for event bindings
30274
- for (const output of element.outputs) {
30275
- if (output.name === ANIMATE_LEAVE$1) {
30276
- this.hasAnimations = true;
30277
- }
30278
- }
30279
- super.visitElement(element);
30280
- }
30281
- }
30282
-
30283
30105
  const COMPONENT_VARIABLE = '%COMP%';
30284
30106
  const HOST_ATTR = `_nghost-${COMPONENT_VARIABLE}`;
30285
30107
  const CONTENT_ATTR = `_ngcontent-${COMPONENT_VARIABLE}`;
30286
- const ANIMATE_LEAVE = `animate.leave`;
30287
30108
  function baseDirectiveFields(meta, constantPool, bindingParser) {
30288
30109
  const definitionMap = new DefinitionMap();
30289
30110
  const selectors = parseSelectorToR3Selector(meta.selector);
@@ -30317,11 +30138,6 @@ function baseDirectiveFields(meta, constantPool, bindingParser) {
30317
30138
  }
30318
30139
  return definitionMap;
30319
30140
  }
30320
- function hasAnimationHostBinding(meta) {
30321
- return (meta.host.attributes[ANIMATE_LEAVE] !== undefined ||
30322
- meta.host.properties[ANIMATE_LEAVE] !== undefined ||
30323
- meta.host.listeners[ANIMATE_LEAVE] !== undefined);
30324
- }
30325
30141
  /**
30326
30142
  * Add features to the definition map.
30327
30143
  */
@@ -30356,12 +30172,6 @@ function addFeatures(definitionMap, meta) {
30356
30172
  const externalStyleNodes = meta.externalStyles.map((externalStyle) => literal(externalStyle));
30357
30173
  features.push(importExpr(Identifiers.ExternalStylesFeature).callFn([literalArr(externalStyleNodes)]));
30358
30174
  }
30359
- const template = meta.template;
30360
- if (hasAnimationHostBinding(meta) || (template && template.nodes.length > 0)) {
30361
- if (hasAnimationHostBinding(meta) || analyzeTemplateForAnimations(template.nodes)) {
30362
- features.push(importExpr(Identifiers.AnimationsFeature).callFn([]));
30363
- }
30364
- }
30365
30175
  if (features.length) {
30366
30176
  definitionMap.set('features', literalArr(features));
30367
30177
  }
@@ -30802,6 +30612,132 @@ function compileDeferResolverFunction(meta) {
30802
30612
  return arrowFn([], literalArr(depExpressions));
30803
30613
  }
30804
30614
 
30615
+ /*!
30616
+ * @license
30617
+ * Copyright Google LLC All Rights Reserved.
30618
+ *
30619
+ * Use of this source code is governed by an MIT-style license that can be
30620
+ * found in the LICENSE file at https://angular.dev/license
30621
+ */
30622
+ /**
30623
+ * Visitor that traverses all template and expression AST nodes in a template.
30624
+ * Useful for cases where every single node needs to be visited.
30625
+ */
30626
+ class CombinedRecursiveAstVisitor extends RecursiveAstVisitor {
30627
+ visit(node) {
30628
+ if (node instanceof ASTWithSource) {
30629
+ this.visit(node.ast);
30630
+ }
30631
+ else {
30632
+ node.visit(this);
30633
+ }
30634
+ }
30635
+ visitElement(element) {
30636
+ this.visitAllTemplateNodes(element.attributes);
30637
+ this.visitAllTemplateNodes(element.inputs);
30638
+ this.visitAllTemplateNodes(element.outputs);
30639
+ this.visitAllTemplateNodes(element.directives);
30640
+ this.visitAllTemplateNodes(element.references);
30641
+ this.visitAllTemplateNodes(element.children);
30642
+ }
30643
+ visitTemplate(template) {
30644
+ this.visitAllTemplateNodes(template.attributes);
30645
+ this.visitAllTemplateNodes(template.inputs);
30646
+ this.visitAllTemplateNodes(template.outputs);
30647
+ this.visitAllTemplateNodes(template.directives);
30648
+ this.visitAllTemplateNodes(template.templateAttrs);
30649
+ this.visitAllTemplateNodes(template.variables);
30650
+ this.visitAllTemplateNodes(template.references);
30651
+ this.visitAllTemplateNodes(template.children);
30652
+ }
30653
+ visitContent(content) {
30654
+ this.visitAllTemplateNodes(content.children);
30655
+ }
30656
+ visitBoundAttribute(attribute) {
30657
+ this.visit(attribute.value);
30658
+ }
30659
+ visitBoundEvent(attribute) {
30660
+ this.visit(attribute.handler);
30661
+ }
30662
+ visitBoundText(text) {
30663
+ this.visit(text.value);
30664
+ }
30665
+ visitIcu(icu) {
30666
+ Object.keys(icu.vars).forEach((key) => this.visit(icu.vars[key]));
30667
+ Object.keys(icu.placeholders).forEach((key) => this.visit(icu.placeholders[key]));
30668
+ }
30669
+ visitDeferredBlock(deferred) {
30670
+ deferred.visitAll(this);
30671
+ }
30672
+ visitDeferredTrigger(trigger) {
30673
+ if (trigger instanceof BoundDeferredTrigger) {
30674
+ this.visit(trigger.value);
30675
+ }
30676
+ }
30677
+ visitDeferredBlockPlaceholder(block) {
30678
+ this.visitAllTemplateNodes(block.children);
30679
+ }
30680
+ visitDeferredBlockError(block) {
30681
+ this.visitAllTemplateNodes(block.children);
30682
+ }
30683
+ visitDeferredBlockLoading(block) {
30684
+ this.visitAllTemplateNodes(block.children);
30685
+ }
30686
+ visitSwitchBlock(block) {
30687
+ this.visit(block.expression);
30688
+ this.visitAllTemplateNodes(block.cases);
30689
+ }
30690
+ visitSwitchBlockCase(block) {
30691
+ block.expression && this.visit(block.expression);
30692
+ this.visitAllTemplateNodes(block.children);
30693
+ }
30694
+ visitForLoopBlock(block) {
30695
+ block.item.visit(this);
30696
+ this.visitAllTemplateNodes(block.contextVariables);
30697
+ this.visit(block.expression);
30698
+ this.visitAllTemplateNodes(block.children);
30699
+ block.empty?.visit(this);
30700
+ }
30701
+ visitForLoopBlockEmpty(block) {
30702
+ this.visitAllTemplateNodes(block.children);
30703
+ }
30704
+ visitIfBlock(block) {
30705
+ this.visitAllTemplateNodes(block.branches);
30706
+ }
30707
+ visitIfBlockBranch(block) {
30708
+ block.expression && this.visit(block.expression);
30709
+ block.expressionAlias?.visit(this);
30710
+ this.visitAllTemplateNodes(block.children);
30711
+ }
30712
+ visitLetDeclaration(decl) {
30713
+ this.visit(decl.value);
30714
+ }
30715
+ visitComponent(component) {
30716
+ this.visitAllTemplateNodes(component.attributes);
30717
+ this.visitAllTemplateNodes(component.inputs);
30718
+ this.visitAllTemplateNodes(component.outputs);
30719
+ this.visitAllTemplateNodes(component.directives);
30720
+ this.visitAllTemplateNodes(component.references);
30721
+ this.visitAllTemplateNodes(component.children);
30722
+ }
30723
+ visitDirective(directive) {
30724
+ this.visitAllTemplateNodes(directive.attributes);
30725
+ this.visitAllTemplateNodes(directive.inputs);
30726
+ this.visitAllTemplateNodes(directive.outputs);
30727
+ this.visitAllTemplateNodes(directive.references);
30728
+ }
30729
+ visitVariable(variable) { }
30730
+ visitReference(reference) { }
30731
+ visitTextAttribute(attribute) { }
30732
+ visitText(text) { }
30733
+ visitUnknownBlock(block) { }
30734
+ visitAllTemplateNodes(nodes) {
30735
+ for (const node of nodes) {
30736
+ this.visit(node);
30737
+ }
30738
+ }
30739
+ }
30740
+
30805
30741
  /**
30806
30742
  * Processes `Target`s with a given set of directives and performs a binding operation, which
30807
30743
  * returns an object similar to TypeScript's `ts.TypeChecker` that contains knowledge about the
@@ -32840,7 +32776,7 @@ function isAttrNode(ast) {
32840
32776
  * @description
32841
32777
  * Entry point for all public APIs of the compiler package.
32842
32778
  */
32843
- new Version('21.0.0-next.2');
32779
+ const VERSION = new Version('21.0.0-next.4');
32844
32780
 
32845
32781
  //////////////////////////////////////
32846
32782
  // THIS FILE HAS GLOBAL SIDE EFFECT //
@@ -33388,6 +33324,21 @@ exports.ErrorCode = void 0;
33388
33324
  * ```
33389
33325
  */
33390
33326
  ErrorCode[ErrorCode["UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION"] = 8117] = "UNINVOKED_FUNCTION_IN_TEXT_INTERPOLATION";
33327
+ /**
33328
+ * A required initializer is being invoked in a forbidden context such as a property initializer
33329
+ * or a constructor.
33330
+ *
33331
+ * For example:
33332
+ * ```ts
33333
+ * class MyComponent {
33334
+ * myInput = input.required();
33335
+ * somValue = this.myInput(); // Error
33336
+ *
33337
+ * constructor() {
33338
+ * this.myInput(); // Error
33339
+ * }
33340
+ */
33341
+ ErrorCode[ErrorCode["FORBIDDEN_REQUIRED_INITIALIZER_INVOCATION"] = 8118] = "FORBIDDEN_REQUIRED_INITIALIZER_INVOCATION";
33391
33342
  /**
33392
33343
  * The template type-checking engine would need to generate an inline type check block for a
33393
33344
  * component, but the current type-checking environment doesn't support it.
@@ -33522,6 +33473,18 @@ function isFatalDiagnosticError(err) {
33522
33473
  return err._isFatalDiagnosticError === true;
33523
33474
  }
33524
33475
 
33476
+ /**
33477
+ * Base URL for the error details page.
33478
+ *
33479
+ * Keep the files below in full sync:
33480
+ * - packages/compiler-cli/src/ngtsc/diagnostics/src/error_details_base_url.ts
33481
+ * - packages/core/src/error_details_base_url.ts
33482
+ */
33483
+ const ERROR_DETAILS_PAGE_BASE_URL = (() => {
33484
+ const versionSubDomain = VERSION.major !== '0' ? `v${VERSION.major}.` : '';
33485
+ return `https://${versionSubDomain}angular.dev/errors`;
33486
+ })();
33487
+
33525
33488
  /**
33526
33489
  * Enum holding the name of each extended template diagnostic. The name is used as a user-meaningful
33527
33490
  * value for configuring the diagnostic in the project's options.
@@ -33876,7 +33839,7 @@ class NodeJSPathManipulation {
33876
33839
  // G3-ESM-MARKER: G3 uses CommonJS, but externally everything in ESM.
33877
33840
  // CommonJS/ESM interop for determining the current file name and containing dir.
33878
33841
  const isCommonJS = typeof __filename !== 'undefined';
33879
- const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-DZ17BWwk.cjs', document.baseURI).href));
33842
+ const currentFileUrl = isCommonJS ? null : (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('project_tsconfig_paths-Clg7WX1w.cjs', document.baseURI).href));
33880
33843
  // Note, when this code loads in the browser, `url` may be an empty `{}` due to the Closure shims.
33881
33844
  const currentFileName = isCommonJS
33882
33845
  ? __filename
@@ -47871,11 +47834,17 @@ function getBoundAttributes(directive, node) {
47871
47834
  });
47872
47835
  }
47873
47836
  };
47874
- node.inputs.forEach(processAttribute);
47875
- node.attributes.forEach(processAttribute);
47876
47837
  if (node instanceof Template) {
47838
+ if (node.tagName === 'ng-template') {
47839
+ node.inputs.forEach(processAttribute);
47840
+ node.attributes.forEach(processAttribute);
47841
+ }
47877
47842
  node.templateAttrs.forEach(processAttribute);
47878
47843
  }
47844
+ else {
47845
+ node.inputs.forEach(processAttribute);
47846
+ node.attributes.forEach(processAttribute);
47847
+ }
47879
47848
  return boundInputs;
47880
47849
  }
47881
47850
  /**
@@ -50868,6 +50837,7 @@ exports.Directive = Directive$1;
50868
50837
  exports.DomElementSchemaRegistry = DomElementSchemaRegistry;
50869
50838
  exports.DynamicImportExpr = DynamicImportExpr;
50870
50839
  exports.DynamicValue = DynamicValue;
50840
+ exports.ERROR_DETAILS_PAGE_BASE_URL = ERROR_DETAILS_PAGE_BASE_URL;
50871
50841
  exports.Element = Element;
50872
50842
  exports.Element$1 = Element$1;
50873
50843
  exports.EnumValue = EnumValue;
@@ -50881,6 +50851,7 @@ exports.INPUT_INITIALIZER_FN = INPUT_INITIALIZER_FN;
50881
50851
  exports.Icu = Icu;
50882
50852
  exports.IcuPlaceholder = IcuPlaceholder;
50883
50853
  exports.Identifiers = Identifiers;
50854
+ exports.IfBlock = IfBlock;
50884
50855
  exports.ImplicitReceiver = ImplicitReceiver;
50885
50856
  exports.ImportManager = ImportManager;
50886
50857
  exports.Interpolation = Interpolation$1;
@@ -50927,6 +50898,7 @@ exports.SafePropertyRead = SafePropertyRead;
50927
50898
  exports.SelectorMatcher = SelectorMatcher;
50928
50899
  exports.SelectorlessMatcher = SelectorlessMatcher;
50929
50900
  exports.Serializer = Serializer;
50901
+ exports.SwitchBlock = SwitchBlock;
50930
50902
  exports.Tag = Tag;
50931
50903
  exports.TagPlaceholder = TagPlaceholder;
50932
50904
  exports.Template = Template;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -9,8 +9,8 @@
9
9
  var schematics = require('@angular-devkit/schematics');
10
10
  var fs = require('fs');
11
11
  var p = require('path');
12
- var compiler_host = require('./compiler_host-B9qvCnmC.cjs');
13
- var project_tsconfig_paths = require('./project_tsconfig_paths-DZ17BWwk.cjs');
12
+ var compiler_host = require('./compiler_host-aKaS4KRz.cjs');
13
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Clg7WX1w.cjs');
14
14
  var ts = require('typescript');
15
15
  var property_name = require('./property_name-BBwFuqMe.cjs');
16
16
  require('os');
@@ -208,7 +208,7 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
208
208
  }
209
209
  }
210
210
  }
211
- if (ts.isVariableDeclaration(node)) {
211
+ else if (ts.isVariableDeclaration(node)) {
212
212
  if (isAngularRoutesArray(node, typeChecker)) {
213
213
  const initializer = node.initializer;
214
214
  if (initializer &&
@@ -227,6 +227,33 @@ function findRoutesArrayToMigrate(sourceFile, typeChecker) {
227
227
  }
228
228
  }
229
229
  }
230
+ else if (ts.isExportAssignment(node)) {
231
+ // Handles `export default routes`, `export default [...]` and `export default [...] as Routes`
232
+ let expression = node.expression;
233
+ if (ts.isAsExpression(expression)) {
234
+ expression = expression.expression;
235
+ }
236
+ if (ts.isArrayLiteralExpression(expression)) {
237
+ routesArrays.push({
238
+ routeFilePath: sourceFile.fileName,
239
+ array: expression,
240
+ routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
241
+ });
242
+ }
243
+ else if (ts.isIdentifier(expression)) {
244
+ manageRoutesExportedByDefault(routesArrays, typeChecker, expression, sourceFile);
245
+ }
246
+ }
247
+ else if (ts.isExportDeclaration(node)) {
248
+ // Handles cases like `export { routes as default }`
249
+ if (node.exportClause && ts.isNamedExports(node.exportClause)) {
250
+ for (const specifier of node.exportClause.elements) {
251
+ if (specifier.name.text === 'default') {
252
+ manageRoutesExportedByDefault(routesArrays, typeChecker, specifier.propertyName ?? specifier.name, sourceFile);
253
+ }
254
+ }
255
+ }
256
+ }
230
257
  node.forEachChild(walk);
231
258
  });
232
259
  return routesArrays;
@@ -333,6 +360,23 @@ function createLoadComponentPropertyAssignment(componentImportPath, componentDec
333
360
  // will generate import('./path).then(m => m.componentName)
334
361
  ts.factory.createPropertyAccessExpression(createImportCallExpression(componentImportPath), 'then'), undefined, [createImportThenCallExpression(componentDeclarationName)])));
335
362
  }
363
+ const manageRoutesExportedByDefault = (routesArrays, typeChecker, expression, sourceFile) => {
364
+ const symbol = typeChecker.getSymbolAtLocation(expression);
365
+ if (!symbol?.declarations) {
366
+ return;
367
+ }
368
+ for (const declaration of symbol.declarations) {
369
+ if (ts.isVariableDeclaration(declaration) &&
370
+ declaration.initializer &&
371
+ ts.isArrayLiteralExpression(declaration.initializer)) {
372
+ routesArrays.push({
373
+ routeFilePath: sourceFile.fileName,
374
+ array: declaration.initializer,
375
+ routeFileImports: sourceFile.statements.filter(ts.isImportDeclaration),
376
+ });
377
+ }
378
+ }
379
+ };
336
380
  // import('./path)
337
381
  const createImportCallExpression = (componentImportPath) => ts.factory.createCallExpression(ts.factory.createIdentifier('import'), undefined, [
338
382
  ts.factory.createStringLiteral(componentImportPath, true),
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,13 +8,13 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- require('./project_tsconfig_paths-DZ17BWwk.cjs');
12
- require('./index-B6-f9bil.cjs');
11
+ require('./project_tsconfig_paths-Clg7WX1w.cjs');
12
+ require('./index-BI97t1U8.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D64fJzoa.cjs');
16
- var imports = require('./imports-26VeX8i-.cjs');
17
- var symbol = require('./symbol-VPWguRxr.cjs');
15
+ var project_paths = require('./project_paths-Cz4x-QiT.cjs');
16
+ var imports = require('./imports-DwPXlGFl.cjs');
17
+ var symbol = require('./symbol-BObKoqes.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,13 +8,13 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- require('./project_tsconfig_paths-DZ17BWwk.cjs');
12
- require('./index-B6-f9bil.cjs');
11
+ require('./project_tsconfig_paths-Clg7WX1w.cjs');
12
+ require('./index-BI97t1U8.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D64fJzoa.cjs');
16
- var imports = require('./imports-26VeX8i-.cjs');
17
- var symbol = require('./symbol-VPWguRxr.cjs');
15
+ var project_paths = require('./project_paths-Cz4x-QiT.cjs');
16
+ var imports = require('./imports-DwPXlGFl.cjs');
17
+ var symbol = require('./symbol-BObKoqes.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('fs');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  /**
3
- * @license Angular v21.0.0-next.2
3
+ * @license Angular v21.0.0-next.4
4
4
  * (c) 2010-2025 Google LLC. https://angular.io/
5
5
  * License: MIT
6
6
  */
@@ -8,21 +8,21 @@
8
8
 
9
9
  var ts = require('typescript');
10
10
  require('os');
11
- var project_tsconfig_paths = require('./project_tsconfig_paths-DZ17BWwk.cjs');
12
- require('./index-B6-f9bil.cjs');
11
+ var project_tsconfig_paths = require('./project_tsconfig_paths-Clg7WX1w.cjs');
12
+ require('./index-BI97t1U8.cjs');
13
13
  require('path');
14
14
  require('node:path');
15
- var project_paths = require('./project_paths-D64fJzoa.cjs');
16
- var ng_component_template = require('./ng_component_template-DUAg-x1h.cjs');
17
- var parse_html = require('./parse_html-C8TYlOyu.cjs');
15
+ var project_paths = require('./project_paths-Cz4x-QiT.cjs');
16
+ var ng_component_template = require('./ng_component_template-CytqBs-q.cjs');
17
+ var parse_html = require('./parse_html-CeQjkdOK.cjs');
18
18
  require('@angular-devkit/core');
19
19
  require('node:path/posix');
20
20
  require('fs');
21
21
  require('module');
22
22
  require('url');
23
23
  require('@angular-devkit/schematics');
24
- require('./ng_decorators-CtYwz9Lw.cjs');
25
- require('./imports-26VeX8i-.cjs');
24
+ require('./ng_decorators-BI0uV7KI.cjs');
25
+ require('./imports-DwPXlGFl.cjs');
26
26
  require('./property_name-BBwFuqMe.cjs');
27
27
 
28
28
  function migrateTemplateToSelfClosingTags(template) {