@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
@@ -9424,7 +9424,8 @@ function getScopeForView(view, parent) {
9424
9424
  scope.contextVariables.set(identifier, {
9425
9425
  kind: SemanticVariableKind.Identifier,
9426
9426
  name: null,
9427
- identifier
9427
+ identifier,
9428
+ local: false
9428
9429
  });
9429
9430
  }
9430
9431
  for (const op of view.create) {
@@ -9443,7 +9444,8 @@ function getScopeForView(view, parent) {
9443
9444
  variable: {
9444
9445
  kind: SemanticVariableKind.Identifier,
9445
9446
  name: null,
9446
- identifier: op.localRefs[offset].name
9447
+ identifier: op.localRefs[offset].name,
9448
+ local: false
9447
9449
  }
9448
9450
  });
9449
9451
  }
@@ -9455,7 +9457,8 @@ function getScopeForView(view, parent) {
9455
9457
  variable: {
9456
9458
  kind: SemanticVariableKind.Identifier,
9457
9459
  name: null,
9458
- identifier: op.declaredName
9460
+ identifier: op.declaredName,
9461
+ local: false
9459
9462
  }
9460
9463
  });
9461
9464
  break;
@@ -14085,7 +14088,7 @@ var _ControlFlowError = class {
14085
14088
  };
14086
14089
  var _Tokenizer = class {
14087
14090
  constructor(_file, _getTagDefinition, options) {
14088
- var _a2;
14091
+ var _a2, _b2;
14089
14092
  this._getTagDefinition = _getTagDefinition;
14090
14093
  this._currentTokenStart = null;
14091
14094
  this._currentTokenType = null;
@@ -14107,7 +14110,7 @@ var _Tokenizer = class {
14107
14110
  this._preserveLineEndings = options.preserveLineEndings || false;
14108
14111
  this._i18nNormalizeLineEndingsInICUs = options.i18nNormalizeLineEndingsInICUs || false;
14109
14112
  this._tokenizeBlocks = (_a2 = options.tokenizeBlocks) != null ? _a2 : true;
14110
- this._tokenizeLet = options.tokenizeLet || false;
14113
+ this._tokenizeLet = (_b2 = options.tokenizeLet) != null ? _b2 : true;
14111
14114
  try {
14112
14115
  this._cursor.init();
14113
14116
  } catch (e) {
@@ -14255,7 +14258,7 @@ var _Tokenizer = class {
14255
14258
  const nameCursor = this._cursor.clone();
14256
14259
  let allowDigit = false;
14257
14260
  this._attemptCharCodeUntilFn((code) => {
14258
- if (isAsciiLetter(code) || code === $_ || allowDigit && isDigit(code)) {
14261
+ if (isAsciiLetter(code) || code == $$ || code === $_ || allowDigit && isDigit(code)) {
14259
14262
  allowDigit = true;
14260
14263
  return false;
14261
14264
  }
@@ -17998,11 +18001,22 @@ function resolveNames(job) {
17998
18001
  }
17999
18002
  function processLexicalScope2(unit, ops, savedView) {
18000
18003
  const scope = /* @__PURE__ */ new Map();
18004
+ const localDefinitions = /* @__PURE__ */ new Map();
18001
18005
  for (const op of ops) {
18002
18006
  switch (op.kind) {
18003
18007
  case OpKind.Variable:
18004
18008
  switch (op.variable.kind) {
18005
18009
  case SemanticVariableKind.Identifier:
18010
+ if (op.variable.local) {
18011
+ if (localDefinitions.has(op.variable.identifier)) {
18012
+ continue;
18013
+ }
18014
+ localDefinitions.set(op.variable.identifier, op.xref);
18015
+ } else if (scope.has(op.variable.identifier)) {
18016
+ continue;
18017
+ }
18018
+ scope.set(op.variable.identifier, op.xref);
18019
+ break;
18006
18020
  case SemanticVariableKind.Alias:
18007
18021
  if (scope.has(op.variable.identifier)) {
18008
18022
  continue;
@@ -18029,7 +18043,9 @@ function processLexicalScope2(unit, ops, savedView) {
18029
18043
  }
18030
18044
  transformExpressionsInOp(op, (expr) => {
18031
18045
  if (expr instanceof LexicalReadExpr) {
18032
- if (scope.has(expr.name)) {
18046
+ if (localDefinitions.has(expr.name)) {
18047
+ return new ReadVariableExpr(localDefinitions.get(expr.name));
18048
+ } else if (scope.has(expr.name)) {
18033
18049
  return new ReadVariableExpr(scope.get(expr.name));
18034
18050
  } else {
18035
18051
  return new ReadPropExpr(new ContextExpr(unit.job.root.xref), expr.name);
@@ -18850,7 +18866,8 @@ function generateLocalLetReferences(job) {
18850
18866
  const variable2 = {
18851
18867
  kind: SemanticVariableKind.Identifier,
18852
18868
  name: null,
18853
- identifier: op.declaredName
18869
+ identifier: op.declaredName,
18870
+ local: true
18854
18871
  };
18855
18872
  OpList.replace(op, createVariableOp(job.allocateXrefId(), variable2, new StoreLetExpr(op.target, op.value, op.sourceSpan), VariableFlags.None));
18856
18873
  }
@@ -21605,7 +21622,7 @@ function parseTemplate(template2, templateUrl, options = {}) {
21605
21622
  }, options), {
21606
21623
  tokenizeExpansionForms: true,
21607
21624
  tokenizeBlocks: (_a2 = options.enableBlockSyntax) != null ? _a2 : true,
21608
- tokenizeLet: (_b2 = options.enableLetSyntax) != null ? _b2 : false
21625
+ tokenizeLet: (_b2 = options.enableLetSyntax) != null ? _b2 : true
21609
21626
  }));
21610
21627
  if (!options.alwaysAttemptHtmlToR3AstConversion && parseResult.errors && parseResult.errors.length > 0) {
21611
21628
  const parsedTemplate2 = {
@@ -23072,7 +23089,10 @@ function convertPipeDeclarationToMetadata(pipe2) {
23072
23089
  }
23073
23090
  function parseJitTemplate(template2, typeName, sourceMapUrl, preserveWhitespaces, interpolation, deferBlockDependencies) {
23074
23091
  const interpolationConfig = interpolation ? InterpolationConfig.fromArray(interpolation) : DEFAULT_INTERPOLATION_CONFIG;
23075
- const parsed = parseTemplate(template2, sourceMapUrl, { preserveWhitespaces, interpolationConfig });
23092
+ const parsed = parseTemplate(template2, sourceMapUrl, {
23093
+ preserveWhitespaces,
23094
+ interpolationConfig
23095
+ });
23076
23096
  if (parsed.errors !== null) {
23077
23097
  const errors = parsed.errors.map((err) => err.toString()).join(", ");
23078
23098
  throw new Error(`Errors during JIT compilation of template for ${typeName}: ${errors}`);
@@ -23257,7 +23277,7 @@ function publishFacade(global) {
23257
23277
  }
23258
23278
 
23259
23279
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/version.mjs
23260
- var VERSION2 = new Version("18.1.0-next.3");
23280
+ var VERSION2 = new Version("18.1.0-rc.0");
23261
23281
 
23262
23282
  // bazel-out/k8-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
23263
23283
  var _VisitorMode;