@angular/compiler 18.1.0-rc.0 → 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.
- package/esm2022/src/render3/partial/class_metadata.mjs +2 -2
- package/esm2022/src/render3/partial/directive.mjs +1 -1
- package/esm2022/src/render3/partial/factory.mjs +1 -1
- package/esm2022/src/render3/partial/injectable.mjs +1 -1
- package/esm2022/src/render3/partial/injector.mjs +1 -1
- package/esm2022/src/render3/partial/ng_module.mjs +1 -1
- package/esm2022/src/render3/partial/pipe.mjs +1 -1
- package/esm2022/src/shadow_css.mjs +5 -5
- package/esm2022/src/version.mjs +1 -1
- package/fesm2022/compiler.mjs +14 -14
- package/fesm2022/compiler.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/package.json +2 -2
package/fesm2022/compiler.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v18.1.0
|
|
2
|
+
* @license Angular v18.1.0
|
|
3
3
|
* (c) 2010-2024 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7252,8 +7252,8 @@ class ShadowCss {
|
|
|
7252
7252
|
* animation declaration (with possibly multiple animation definitions)
|
|
7253
7253
|
*
|
|
7254
7254
|
* The regular expression can be divided in three parts
|
|
7255
|
-
* - (^|\s
|
|
7256
|
-
*
|
|
7255
|
+
* - (^|\s+|,)
|
|
7256
|
+
* captures how many (if any) leading whitespaces are present or a comma
|
|
7257
7257
|
* - (?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))
|
|
7258
7258
|
* captures two different possible keyframes, ones which are quoted or ones which are valid css
|
|
7259
7259
|
* idents (custom properties excluded)
|
|
@@ -7261,7 +7261,7 @@ class ShadowCss {
|
|
|
7261
7261
|
* simply matches the end of the possible keyframe, valid endings are: a comma, a space, a
|
|
7262
7262
|
* semicolon or the end of the string
|
|
7263
7263
|
*/
|
|
7264
|
-
this._animationDeclarationKeyframesRe = /(^|\s
|
|
7264
|
+
this._animationDeclarationKeyframesRe = /(^|\s+|,)(?:(?:(['"])((?:\\\\|\\\2|(?!\2).)+)\2)|(-?[A-Za-z][\w\-]*))(?=[,\s]|$)/g;
|
|
7265
7265
|
}
|
|
7266
7266
|
/*
|
|
7267
7267
|
* Shim some cssText with the given selector. Returns cssText that can be included in the document
|
|
@@ -7418,7 +7418,7 @@ class ShadowCss {
|
|
|
7418
7418
|
* @returns the updated css rule.
|
|
7419
7419
|
**/
|
|
7420
7420
|
_scopeAnimationRule(rule, scopeSelector, unscopedKeyframesSet) {
|
|
7421
|
-
let content = rule.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation
|
|
7421
|
+
let content = rule.content.replace(/((?:^|\s+|;)(?:-webkit-)?animation\s*:\s*),*([^;]+)/g, (_, start, animationDeclarations) => start +
|
|
7422
7422
|
animationDeclarations.replace(this._animationDeclarationKeyframesRe, (original, leadingSpaces, quote = '', quotedName, nonQuotedName) => {
|
|
7423
7423
|
if (quotedName) {
|
|
7424
7424
|
return `${leadingSpaces}${this._scopeAnimationKeyframe(`${quote}${quotedName}${quote}`, scopeSelector, unscopedKeyframesSet)}`;
|
|
@@ -29521,7 +29521,7 @@ function publishFacade(global) {
|
|
|
29521
29521
|
* @description
|
|
29522
29522
|
* Entry point for all public APIs of the compiler package.
|
|
29523
29523
|
*/
|
|
29524
|
-
const VERSION = new Version('18.1.0
|
|
29524
|
+
const VERSION = new Version('18.1.0');
|
|
29525
29525
|
|
|
29526
29526
|
class CompilerConfig {
|
|
29527
29527
|
constructor({ defaultEncapsulation = ViewEncapsulation.Emulated, preserveWhitespaces, strictInjectionParameters, } = {}) {
|
|
@@ -31159,7 +31159,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
|
|
|
31159
31159
|
function compileDeclareClassMetadata(metadata) {
|
|
31160
31160
|
const definitionMap = new DefinitionMap();
|
|
31161
31161
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
|
|
31162
|
-
definitionMap.set('version', literal('18.1.0
|
|
31162
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31163
31163
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31164
31164
|
definitionMap.set('type', metadata.type);
|
|
31165
31165
|
definitionMap.set('decorators', metadata.decorators);
|
|
@@ -31177,7 +31177,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
|
|
|
31177
31177
|
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
|
|
31178
31178
|
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
|
|
31179
31179
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
|
|
31180
|
-
definitionMap.set('version', literal('18.1.0
|
|
31180
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31181
31181
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31182
31182
|
definitionMap.set('type', metadata.type);
|
|
31183
31183
|
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
|
|
@@ -31272,7 +31272,7 @@ function createDirectiveDefinitionMap(meta) {
|
|
|
31272
31272
|
const definitionMap = new DefinitionMap();
|
|
31273
31273
|
const minVersion = getMinimumVersionForPartialOutput(meta);
|
|
31274
31274
|
definitionMap.set('minVersion', literal(minVersion));
|
|
31275
|
-
definitionMap.set('version', literal('18.1.0
|
|
31275
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31276
31276
|
// e.g. `type: MyDirective`
|
|
31277
31277
|
definitionMap.set('type', meta.type.value);
|
|
31278
31278
|
if (meta.isStandalone) {
|
|
@@ -31694,7 +31694,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
|
|
|
31694
31694
|
function compileDeclareFactoryFunction(meta) {
|
|
31695
31695
|
const definitionMap = new DefinitionMap();
|
|
31696
31696
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
|
|
31697
|
-
definitionMap.set('version', literal('18.1.0
|
|
31697
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31698
31698
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31699
31699
|
definitionMap.set('type', meta.type.value);
|
|
31700
31700
|
definitionMap.set('deps', compileDependencies(meta.deps));
|
|
@@ -31729,7 +31729,7 @@ function compileDeclareInjectableFromMetadata(meta) {
|
|
|
31729
31729
|
function createInjectableDefinitionMap(meta) {
|
|
31730
31730
|
const definitionMap = new DefinitionMap();
|
|
31731
31731
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
|
|
31732
|
-
definitionMap.set('version', literal('18.1.0
|
|
31732
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31733
31733
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31734
31734
|
definitionMap.set('type', meta.type.value);
|
|
31735
31735
|
// Only generate providedIn property if it has a non-null value
|
|
@@ -31780,7 +31780,7 @@ function compileDeclareInjectorFromMetadata(meta) {
|
|
|
31780
31780
|
function createInjectorDefinitionMap(meta) {
|
|
31781
31781
|
const definitionMap = new DefinitionMap();
|
|
31782
31782
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
|
|
31783
|
-
definitionMap.set('version', literal('18.1.0
|
|
31783
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31784
31784
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31785
31785
|
definitionMap.set('type', meta.type.value);
|
|
31786
31786
|
definitionMap.set('providers', meta.providers);
|
|
@@ -31813,7 +31813,7 @@ function createNgModuleDefinitionMap(meta) {
|
|
|
31813
31813
|
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
|
|
31814
31814
|
}
|
|
31815
31815
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
|
|
31816
|
-
definitionMap.set('version', literal('18.1.0
|
|
31816
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31817
31817
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31818
31818
|
definitionMap.set('type', meta.type.value);
|
|
31819
31819
|
// We only generate the keys in the metadata if the arrays contain values.
|
|
@@ -31864,7 +31864,7 @@ function compileDeclarePipeFromMetadata(meta) {
|
|
|
31864
31864
|
function createPipeDefinitionMap(meta) {
|
|
31865
31865
|
const definitionMap = new DefinitionMap();
|
|
31866
31866
|
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
|
|
31867
|
-
definitionMap.set('version', literal('18.1.0
|
|
31867
|
+
definitionMap.set('version', literal('18.1.0'));
|
|
31868
31868
|
definitionMap.set('ngImport', importExpr(Identifiers.core));
|
|
31869
31869
|
// e.g. `type: MyPipe`
|
|
31870
31870
|
definitionMap.set('type', meta.type.value);
|