@angular/compiler 17.1.0-next.2 → 17.1.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 (50) hide show
  1. package/esm2022/src/compiler.mjs +2 -2
  2. package/esm2022/src/compiler_facade_interface.mjs +1 -1
  3. package/esm2022/src/jit_compiler_facade.mjs +46 -17
  4. package/esm2022/src/render3/partial/api.mjs +1 -1
  5. package/esm2022/src/render3/partial/class_metadata.mjs +1 -1
  6. package/esm2022/src/render3/partial/directive.mjs +112 -17
  7. package/esm2022/src/render3/partial/factory.mjs +1 -1
  8. package/esm2022/src/render3/partial/injectable.mjs +1 -1
  9. package/esm2022/src/render3/partial/injector.mjs +1 -1
  10. package/esm2022/src/render3/partial/ng_module.mjs +1 -1
  11. package/esm2022/src/render3/partial/pipe.mjs +1 -1
  12. package/esm2022/src/render3/r3_identifiers.mjs +4 -1
  13. package/esm2022/src/render3/view/api.mjs +1 -1
  14. package/esm2022/src/render3/view/compiler.mjs +43 -16
  15. package/esm2022/src/render3/view/util.mjs +8 -2
  16. package/esm2022/src/template/pipeline/ir/src/enums.mjs +34 -17
  17. package/esm2022/src/template/pipeline/ir/src/expression.mjs +19 -20
  18. package/esm2022/src/template/pipeline/ir/src/ops/create.mjs +37 -11
  19. package/esm2022/src/template/pipeline/ir/src/ops/host.mjs +5 -2
  20. package/esm2022/src/template/pipeline/ir/src/ops/update.mjs +29 -14
  21. package/esm2022/src/template/pipeline/src/emit.mjs +13 -9
  22. package/esm2022/src/template/pipeline/src/ingest.mjs +293 -158
  23. package/esm2022/src/template/pipeline/src/instruction.mjs +18 -14
  24. package/esm2022/src/template/pipeline/src/phases/apply_i18n_expressions.mjs +20 -4
  25. package/esm2022/src/template/pipeline/src/phases/assign_i18n_slot_dependencies.mjs +44 -22
  26. package/esm2022/src/template/pipeline/src/phases/attribute_extraction.mjs +26 -5
  27. package/esm2022/src/template/pipeline/src/phases/binding_specialization.mjs +4 -4
  28. package/esm2022/src/template/pipeline/src/phases/const_collection.mjs +15 -6
  29. package/esm2022/src/template/pipeline/src/phases/convert_i18n_bindings.mjs +52 -0
  30. package/esm2022/src/template/pipeline/src/phases/create_i18n_contexts.mjs +23 -1
  31. package/esm2022/src/template/pipeline/src/phases/extract_i18n_messages.mjs +65 -88
  32. package/esm2022/src/template/pipeline/src/phases/generate_advance.mjs +2 -2
  33. package/esm2022/src/template/pipeline/src/phases/generate_variables.mjs +7 -1
  34. package/esm2022/src/template/pipeline/src/phases/i18n_const_collection.mjs +147 -35
  35. package/esm2022/src/template/pipeline/src/phases/i18n_text_extraction.mjs +5 -3
  36. package/esm2022/src/template/pipeline/src/phases/parse_extracted_styles.mjs +4 -3
  37. package/esm2022/src/template/pipeline/src/phases/phase_remove_content_selectors.mjs +15 -3
  38. package/esm2022/src/template/pipeline/src/phases/propagate_i18n_blocks.mjs +31 -12
  39. package/esm2022/src/template/pipeline/src/phases/reify.mjs +18 -15
  40. package/esm2022/src/template/pipeline/src/phases/remove_unused_i18n_attrs.mjs +33 -0
  41. package/esm2022/src/template/pipeline/src/phases/resolve_i18n_element_placeholders.mjs +175 -31
  42. package/esm2022/src/template/pipeline/src/phases/resolve_i18n_expression_placeholders.mjs +10 -5
  43. package/esm2022/src/template/pipeline/src/phases/resolve_sanitizers.mjs +78 -14
  44. package/esm2022/src/template/pipeline/src/phases/slot_allocation.mjs +3 -1
  45. package/esm2022/src/template/pipeline/src/phases/var_counting.mjs +3 -1
  46. package/esm2022/src/version.mjs +1 -1
  47. package/fesm2022/compiler.mjs +1394 -532
  48. package/fesm2022/compiler.mjs.map +1 -1
  49. package/index.d.ts +39 -6
  50. package/package.json +2 -2
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v17.1.0-next.2
2
+ * @license Angular v17.1.0-next.4
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1178,6 +1178,16 @@ export declare class EmptyExpr extends AST {
1178
1178
  visit(visitor: AstVisitor, context?: any): void;
1179
1179
  }
1180
1180
 
1181
+ /**
1182
+ * Encapsulates a CSS stylesheet with emulated view encapsulation.
1183
+ * This allows a stylesheet to be used with an Angular component that
1184
+ * is using the `ViewEncapsulation.Emulated` mode.
1185
+ *
1186
+ * @param style The content of a CSS stylesheet.
1187
+ * @returns The encapsulated content for the style.
1188
+ */
1189
+ export declare function encapsulateStyle(style: string): string;
1190
+
1181
1191
  declare interface EncodedEntityToken extends TokenBase {
1182
1192
  type: LexerTokenType.ENCODED_ENTITY;
1183
1193
  parts: [decoded: string, encoded: string];
@@ -1741,6 +1751,12 @@ export declare class LeadingComment {
1741
1751
 
1742
1752
  export declare function leadingComment(text: string, multiline?: boolean, trailingNewline?: boolean): LeadingComment;
1743
1753
 
1754
+ export declare type LegacyInputPartialMapping = string | [
1755
+ bindingPropertyName: string,
1756
+ classPropertyName: string,
1757
+ transformFunction?: outputAst.Expression
1758
+ ];
1759
+
1744
1760
  export declare class Lexer {
1745
1761
  tokenize(text: string): Token[];
1746
1762
  }
@@ -3236,11 +3252,13 @@ export declare interface R3DeclareDirectiveMetadata extends R3PartialDeclaration
3236
3252
  * binding property name and class property name if the names are different.
3237
3253
  */
3238
3254
  inputs?: {
3239
- [classPropertyName: string]: string | [
3240
- bindingPropertyName: string,
3241
- classPropertyName: string,
3242
- transformFunction?: outputAst.Expression
3243
- ];
3255
+ [fieldName: string]: {
3256
+ classPropertyName: string;
3257
+ publicName: string;
3258
+ isSignal: boolean;
3259
+ isRequired: boolean;
3260
+ transformFunction: outputAst.Expression | null;
3261
+ } | LegacyInputPartialMapping;
3244
3262
  };
3245
3263
  /**
3246
3264
  * A mapping of outputs from class property names to binding property names.
@@ -3975,6 +3993,14 @@ export declare class R3Identifiers {
3975
3993
  static trustConstantHtml: outputAst.ExternalReference;
3976
3994
  static trustConstantResourceUrl: outputAst.ExternalReference;
3977
3995
  static validateIframeAttribute: outputAst.ExternalReference;
3996
+ static InputSignalBrandWriteType: {
3997
+ name: string;
3998
+ moduleName: string;
3999
+ };
4000
+ static UnwrapDirectiveSignalInputs: {
4001
+ name: string;
4002
+ moduleName: string;
4003
+ };
3978
4004
  }
3979
4005
 
3980
4006
  export declare interface R3InjectableMetadata {
@@ -4003,6 +4029,13 @@ export declare interface R3InputMetadata {
4003
4029
  classPropertyName: string;
4004
4030
  bindingPropertyName: string;
4005
4031
  required: boolean;
4032
+ isSignal: boolean;
4033
+ /**
4034
+ * Transform function for the input.
4035
+ *
4036
+ * Null if there is no transform, or if this is a signal input.
4037
+ * Signal inputs capture their transform as part of the `InputSignal`.
4038
+ */
4006
4039
  transformFunction: outputAst.Expression | null;
4007
4040
  }
4008
4041
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/compiler",
3
- "version": "17.1.0-next.2",
3
+ "version": "17.1.0-next.4",
4
4
  "description": "Angular - the compiler library",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "tslib": "^2.3.0"
12
12
  },
13
13
  "peerDependencies": {
14
- "@angular/core": "17.1.0-next.2"
14
+ "@angular/core": "17.1.0-next.4"
15
15
  },
16
16
  "peerDependenciesMeta": {
17
17
  "@angular/core": {