@angular/core 18.1.0-next.4 → 18.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) 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 +5 -66
  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/rxjs-interop/src/to_signal.mjs +4 -4
  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 +53 -35
  15. package/esm2022/src/event_delegation_utils.mjs +40 -23
  16. package/esm2022/src/event_dispatch/event_delegation.mjs +38 -0
  17. package/esm2022/src/hydration/annotate.mjs +3 -3
  18. package/esm2022/src/hydration/event_replay.mjs +5 -5
  19. package/esm2022/src/render3/component_ref.mjs +1 -1
  20. package/esm2022/src/render3/debug/framework_injector_profiler.mjs +3 -2
  21. package/esm2022/src/version.mjs +1 -1
  22. package/esm2022/testing/src/logger.mjs +3 -3
  23. package/fesm2022/core.mjs +127 -63
  24. package/fesm2022/core.mjs.map +1 -1
  25. package/fesm2022/primitives/event-dispatch.mjs +53 -242
  26. package/fesm2022/primitives/event-dispatch.mjs.map +1 -1
  27. package/fesm2022/primitives/signals.mjs +5 -2
  28. package/fesm2022/primitives/signals.mjs.map +1 -1
  29. package/fesm2022/rxjs-interop.mjs +4 -4
  30. package/fesm2022/rxjs-interop.mjs.map +1 -1
  31. package/fesm2022/testing.mjs +1 -1
  32. package/index.d.ts +31 -2
  33. package/package.json +1 -1
  34. package/primitives/event-dispatch/index.d.ts +22 -102
  35. package/primitives/signals/index.d.ts +10 -1
  36. package/rxjs-interop/index.d.ts +2 -2
  37. package/schematics/migrations/invalid-two-way-bindings/bundle.js +26 -9
  38. package/schematics/migrations/invalid-two-way-bindings/bundle.js.map +2 -2
  39. package/schematics/ng-generate/control-flow-migration/bundle.js +36 -10
  40. package/schematics/ng-generate/control-flow-migration/bundle.js.map +2 -2
  41. package/schematics/ng-generate/standalone-migration/bundle.js +155 -63
  42. package/schematics/ng-generate/standalone-migration/bundle.js.map +4 -4
  43. package/testing/index.d.ts +1 -1
  44. package/esm2022/primitives/event-dispatch/src/dom.mjs +0 -48
@@ -5692,7 +5692,7 @@ var scopedAtRuleIdentifiers = [
5692
5692
  ];
5693
5693
  var ShadowCss = class {
5694
5694
  constructor() {
5695
- this._animationDeclarationKeyframesRe = /(^|\s+)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
5695
+ this._animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
5696
5696
  }
5697
5697
  shimCssText(cssText, selector, hostSelector = "") {
5698
5698
  const comments = [];
@@ -5735,7 +5735,7 @@ var ShadowCss = class {
5735
5735
  });
5736
5736
  }
5737
5737
  _scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {
5738
- let content = rule.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation(?:\s*):(?:\s*))([^;]+)/g, (_, start, animationDeclarations) => start + animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = "", quotedName, nonQuotedName) => {
5738
+ let content = rule.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g, (_, start, animationDeclarations) => start + animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = "", quotedName, nonQuotedName) => {
5739
5739
  if (quotedName) {
5740
5740
  return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;
5741
5741
  } else {
@@ -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;
@@ -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
  }
@@ -23260,7 +23277,7 @@ function publishFacade(global) {
23260
23277
  }
23261
23278
 
23262
23279
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/version.mjs
23263
- var VERSION2 = new Version("18.1.0-next.4");
23280
+ var VERSION2 = new Version("18.1.0");
23264
23281
 
23265
23282
  // bazel-out/darwin_arm64-fastbuild/bin/packages/compiler/src/i18n/extractor_merger.mjs
23266
23283
  var _VisitorMode;
@@ -23392,8 +23409,17 @@ var ElementToMigrate = class {
23392
23409
  this.forAttrs = forAttrs;
23393
23410
  this.aliasAttrs = aliasAttrs;
23394
23411
  }
23412
+ normalizeConditionString(value) {
23413
+ value = this.insertSemicolon(value, value.indexOf(" else "));
23414
+ value = this.insertSemicolon(value, value.indexOf(" then "));
23415
+ value = this.insertSemicolon(value, value.indexOf(" let "));
23416
+ return value.replace(";;", ";");
23417
+ }
23418
+ insertSemicolon(str, ix) {
23419
+ return ix > -1 ? `${str.slice(0, ix)};${str.slice(ix)}` : str;
23420
+ }
23395
23421
  getCondition() {
23396
- const chunks = this.attr.value.split(";");
23422
+ const chunks = this.normalizeConditionString(this.attr.value).split(";");
23397
23423
  let condition = chunks[0];
23398
23424
  const elseIx = condition.indexOf(" else ");
23399
23425
  const thenIx = condition.indexOf(" then ");