@angular/core 18.1.0-next.3 → 18.1.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/esm2022/primitives/event-dispatch/index.mjs +3 -2
  2. package/esm2022/primitives/event-dispatch/src/action_resolver.mjs +3 -3
  3. package/esm2022/primitives/event-dispatch/src/attribute.mjs +16 -52
  4. package/esm2022/primitives/event-dispatch/src/cache.mjs +17 -6
  5. package/esm2022/primitives/event-dispatch/src/char.mjs +1 -16
  6. package/esm2022/primitives/event-dispatch/src/event.mjs +2 -3
  7. package/esm2022/primitives/event-dispatch/src/eventcontract.mjs +6 -67
  8. package/esm2022/primitives/event-dispatch/src/property.mjs +17 -22
  9. package/esm2022/primitives/signals/index.mjs +3 -3
  10. package/esm2022/primitives/signals/src/signal.mjs +4 -1
  11. package/esm2022/src/change_detection/change_detector_ref.mjs +3 -2
  12. package/esm2022/src/change_detection/scheduling/zoneless_scheduling_impl.mjs +2 -2
  13. package/esm2022/src/core_private_export.mjs +3 -1
  14. package/esm2022/src/defer/instructions.mjs +2 -2
  15. package/esm2022/src/di/host_tag_name_token.mjs +4 -1
  16. package/esm2022/src/errors.mjs +1 -1
  17. package/esm2022/src/event_delegation_utils.mjs +40 -22
  18. package/esm2022/src/event_dispatch/event_delegation.mjs +38 -0
  19. package/esm2022/src/hydration/annotate.mjs +29 -18
  20. package/esm2022/src/hydration/error_handling.mjs +3 -1
  21. package/esm2022/src/hydration/event_replay.mjs +6 -5
  22. package/esm2022/src/hydration/i18n.mjs +102 -18
  23. package/esm2022/src/hydration/node_lookup_utils.mjs +12 -6
  24. package/esm2022/src/render3/collect_native_nodes.mjs +6 -1
  25. package/esm2022/src/render3/component_ref.mjs +1 -1
  26. package/esm2022/src/render3/instructions/i18n_icu_container_visitor.mjs +61 -51
  27. package/esm2022/src/render3/instructions/let_declaration.mjs +30 -7
  28. package/esm2022/src/render3/instructions/projection.mjs +14 -11
  29. package/esm2022/src/render3/instructions/shared.mjs +1 -1
  30. package/esm2022/src/render3/interfaces/node.mjs +2 -1
  31. package/esm2022/src/render3/node_assert.mjs +9 -8
  32. package/esm2022/src/render3/node_manipulation.mjs +10 -3
  33. package/esm2022/src/version.mjs +1 -1
  34. package/esm2022/testing/src/logger.mjs +3 -3
  35. package/fesm2022/core.mjs +358 -164
  36. package/fesm2022/core.mjs.map +1 -1
  37. package/fesm2022/primitives/event-dispatch.mjs +54 -243
  38. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  39. package/fesm2022/primitives/signals.mjs +5 -2
  40. package/fesm2022/primitives/signals.mjs.map +1 -1
  41. package/fesm2022/rxjs-interop.mjs +1 -1
  42. package/fesm2022/testing.mjs +1 -1
  43. package/index.d.ts +39 -4
  44. package/package.json +1 -1
  45. package/primitives/event-dispatch/index.d.ts +22 -102
  46. package/primitives/signals/index.d.ts +10 -1
  47. package/rxjs-interop/index.d.ts +1 -1
  48. package/schematics/migrations/invalid-two-way-bindings/bundle.js +31 -11
  49. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +3 -3
  50. package/schematics/ng-generate/control-flow-migration/bundle.js +31 -11
  51. package/schematics/ng-generate/control-flow-migration/bundle.js.map +3 -3
  52. package/schematics/ng-generate/standalone-migration/bundle.js +126 -47
  53. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  54. package/testing/index.d.ts +1 -1
  55. package/esm2022/primitives/event-dispatch/src/dom.mjs +0 -48
@@ -9629,7 +9629,8 @@ function getScopeForView(view, parent) {
9629
9629
  scope.contextVariables.set(identifier, {
9630
9630
  kind: SemanticVariableKind.Identifier,
9631
9631
  name: null,
9632
- identifier
9632
+ identifier,
9633
+ local: false
9633
9634
  });
9634
9635
  }
9635
9636
  for (const op of view.create) {
@@ -9648,7 +9649,8 @@ function getScopeForView(view, parent) {
9648
9649
  variable: {
9649
9650
  kind: SemanticVariableKind.Identifier,
9650
9651
  name: null,
9651
- identifier: op.localRefs[offset].name
9652
+ identifier: op.localRefs[offset].name,
9653
+ local: false
9652
9654
  }
9653
9655
  });
9654
9656
  }
@@ -9660,7 +9662,8 @@ function getScopeForView(view, parent) {
9660
9662
  variable: {
9661
9663
  kind: SemanticVariableKind.Identifier,
9662
9664
  name: null,
9663
- identifier: op.declaredName
9665
+ identifier: op.declaredName,
9666
+ local: false
9664
9667
  }
9665
9668
  });
9666
9669
  break;
@@ -14247,7 +14250,7 @@ var _ControlFlowError = class {
14247
14250
  };
14248
14251
  var _Tokenizer = class {
14249
14252
  constructor(_file, _getTagDefinition, options) {
14250
- var _a2;
14253
+ var _a2, _b2;
14251
14254
  this._getTagDefinition = _getTagDefinition;
14252
14255
  this._currentTokenStart = null;
14253
14256
  this._currentTokenType = null;
@@ -14269,7 +14272,7 @@ var _Tokenizer = class {
14269
14272
  this._preserveLineEndings = options.preserveLineEndings || false;
14270
14273
  this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;
14271
14274
  this._tokenizeBlocks = (_a2 = options.tokenizeBlocks) != null ? _a2 : true;
14272
- this._tokenizeLet = options.tokenizeLet || false;
14275
+ this._tokenizeLet = (_b2 = options.tokenizeLet) != null ? _b2 : true;
14273
14276
  try {
14274
14277
  this._cursor.init();
14275
14278
  } catch (e) {
@@ -14417,7 +14420,7 @@ var _Tokenizer = class {
14417
14420
  const nameCursor = this._cursor.clone();
14418
14421
  let allowDigit = false;
14419
14422
  this._attemptCharCodeUntilFn((code) => {
14420
- if (isAsciiLetter(code) || code === $_ || allowDigit && isDigit(code)) {
14423
+ if (isAsciiLetter(code) || code == $$ || code === $_ || allowDigit && isDigit(code)) {
14421
14424
  allowDigit = true;
14422
14425
  return false;
14423
14426
  }
@@ -18160,11 +18163,22 @@ function resolveNames(job) {
18160
18163
  }
18161
18164
  function processLexicalScope2(unit, ops, savedView) {
18162
18165
  const scope = /* @__PURE__ */ new Map();
18166
+ const localDefinitions = /* @__PURE__ */ new Map();
18163
18167
  for (const op of ops) {
18164
18168
  switch (op.kind) {
18165
18169
  case OpKind.Variable:
18166
18170
  switch (op.variable.kind) {
18167
18171
  case SemanticVariableKind.Identifier:
18172
+ if (op.variable.local) {
18173
+ if (localDefinitions.has(op.variable.identifier)) {
18174
+ continue;
18175
+ }
18176
+ localDefinitions.set(op.variable.identifier, op.xref);
18177
+ } else if (scope.has(op.variable.identifier)) {
18178
+ continue;
18179
+ }
18180
+ scope.set(op.variable.identifier, op.xref);
18181
+ break;
18168
18182
  case SemanticVariableKind.Alias:
18169
18183
  if (scope.has(op.variable.identifier)) {
18170
18184
  continue;
@@ -18191,7 +18205,9 @@ function processLexicalScope2(unit, ops, savedView) {
18191
18205
  }
18192
18206
  transformExpressionsInOp(op, (expr) => {
18193
18207
  if (expr instanceof LexicalReadExpr) {
18194
- if (scope.has(expr.name)) {
18208
+ if (localDefinitions.has(expr.name)) {
18209
+ return new ReadVariableExpr(localDefinitions.get(expr.name));
18210
+ } else if (scope.has(expr.name)) {
18195
18211
  return new ReadVariableExpr(scope.get(expr.name));
18196
18212
  } else {
18197
18213
  return new ReadPropExpr(new ContextExpr(unit.job.root.xref), expr.name);
@@ -19012,7 +19028,8 @@ function generateLocalLetReferences(job) {
19012
19028
  const variable2 = {
19013
19029
  kind: SemanticVariableKind.Identifier,
19014
19030
  name: null,
19015
- identifier: op.declaredName
19031
+ identifier: op.declaredName,
19032
+ local: true
19016
19033
  };
19017
19034
  OpList.replace(op, createVariableOp(job.allocateXrefId(), variable2, new StoreLetExpr(op.target, op.value, op.sourceSpan), VariableFlags.None));
19018
19035
  }
@@ -21767,7 +21784,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
21767
21784
  }, options), {
21768
21785
  tokenizeExpansionForms: true,
21769
21786
  tokenizeBlocks: (_a2 = options.enableBlockSyntax) != null ? _a2 : true,
21770
- tokenizeLet: (_b2 = options.enableLetSyntax) != null ? _b2 : false
21787
+ tokenizeLet: (_b2 = options.enableLetSyntax) != null ? _b2 : true
21771
21788
  }));
21772
21789
  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
21773
21790
  const parsedTemplate2 = {
@@ -23234,7 +23251,10 @@ function convertPipeDeclarationToMetadata(pipe2) {
23234
23251
  }
23235
23252
  function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation, deferBlockDependencies) {
23236
23253
  const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
23237
- const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig });
23254
+ const parsed = parseTemplate(template2, sourceMapUrl, {
23255
+ preserveWhitespaces,
23256
+ interpolationConfig
23257
+ });
23238
23258
  if (parsed.errors !== null) {
23239
23259
  const errors = parsed.errors.map((err) => err.toString()).join(", ");
23240
23260
  throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);
@@ -23419,7 +23439,7 @@ function publishFacade(global) {
23419
23439
  }
23420
23440
 
23421
23441
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
23422
- var VERSION2 = new Version("18.1.0-next.3");
23442
+ var VERSION2 = new Version("18.1.0-rc.0");
23423
23443
 
23424
23444
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
23425
23445
  var _VisitorMode;