@angular/common 19.2.6 → 19.2.8

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.2.6
2
+ * @license Angular v19.2.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v19.2.6
2
+ * @license Angular v19.2.8
3
3
  * (c) 2010-2025 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -36,7 +36,7 @@ function registerLocaleData(data, localeId, extraData) {
36
36
  /**
37
37
  * @publicApi
38
38
  */
39
- const VERSION = new Version('19.2.6');
39
+ const VERSION = new Version('19.2.8');
40
40
 
41
41
  /**
42
42
  * Defines a scroll position manager. Implemented by `BrowserViewportScroller`.
@@ -646,10 +646,10 @@ class LCPImageObserver {
646
646
  this.observer.disconnect();
647
647
  this.images.clear();
648
648
  }
649
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
650
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
649
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: LCPImageObserver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
650
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: LCPImageObserver, providedIn: 'root' });
651
651
  }
652
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LCPImageObserver, decorators: [{
652
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: LCPImageObserver, decorators: [{
653
653
  type: Injectable,
654
654
  args: [{ providedIn: 'root' }]
655
655
  }], ctorParameters: () => [] });
@@ -756,9 +756,8 @@ class PreconnectLinkChecker {
756
756
  }
757
757
  queryPreconnectLinks() {
758
758
  const preconnectUrls = new Set();
759
- const selector = 'link[rel=preconnect]';
760
- const links = Array.from(this.document.querySelectorAll(selector));
761
- for (let link of links) {
759
+ const links = this.document.querySelectorAll('link[rel=preconnect]');
760
+ for (const link of links) {
762
761
  const url = getUrl(link.href, this.window);
763
762
  preconnectUrls.add(url.origin);
764
763
  }
@@ -768,10 +767,10 @@ class PreconnectLinkChecker {
768
767
  this.preconnectLinks?.clear();
769
768
  this.alreadySeen.clear();
770
769
  }
771
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
772
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
770
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreconnectLinkChecker, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
771
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreconnectLinkChecker, providedIn: 'root' });
773
772
  }
774
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreconnectLinkChecker, decorators: [{
775
774
  type: Injectable,
776
775
  args: [{ providedIn: 'root' }]
777
776
  }], ctorParameters: () => [] });
@@ -815,6 +814,7 @@ const PRELOADED_IMAGES = new InjectionToken(typeof ngDevMode === 'undefined' ||
815
814
  class PreloadLinkCreator {
816
815
  preloadedImages = inject(PRELOADED_IMAGES);
817
816
  document = inject(DOCUMENT);
817
+ errorShown = false;
818
818
  /**
819
819
  * @description Add a preload `<link>` to the `<head>` of the `index.html` that is served from the
820
820
  * server while using Angular Universal and SSR to kick off image loads for high priority images.
@@ -832,14 +832,14 @@ class PreloadLinkCreator {
832
832
  * @param sizes The value of the `sizes` attribute passed in to the `<img>` tag
833
833
  */
834
834
  createPreloadLinkTag(renderer, src, srcset, sizes) {
835
- if (ngDevMode) {
836
- if (this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
837
- throw new _RuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, ngDevMode &&
838
- `The \`NgOptimizedImage\` directive has detected that more than ` +
839
- `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
840
- `This might negatively affect an overall performance of the page. ` +
841
- `To fix this, remove the "priority" attribute from images with less priority.`);
842
- }
835
+ if (ngDevMode &&
836
+ !this.errorShown &&
837
+ this.preloadedImages.size >= DEFAULT_PRELOADED_IMAGES_LIMIT) {
838
+ this.errorShown = true;
839
+ console.warn(_formatRuntimeError(2961 /* RuntimeErrorCode.TOO_MANY_PRELOADED_IMAGES */, `The \`NgOptimizedImage\` directive has detected that more than ` +
840
+ `${DEFAULT_PRELOADED_IMAGES_LIMIT} images were marked as priority. ` +
841
+ `This might negatively affect an overall performance of the page. ` +
842
+ `To fix this, remove the "priority" attribute from images with less priority.`));
843
843
  }
844
844
  if (this.preloadedImages.has(src)) {
845
845
  return;
@@ -858,10 +858,10 @@ class PreloadLinkCreator {
858
858
  }
859
859
  renderer.appendChild(this.document.head, preload);
860
860
  }
861
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
862
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
861
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreloadLinkCreator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
862
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreloadLinkCreator, providedIn: 'root' });
863
863
  }
864
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PreloadLinkCreator, decorators: [{
864
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: PreloadLinkCreator, decorators: [{
865
865
  type: Injectable,
866
866
  args: [{ providedIn: 'root' }]
867
867
  }] });
@@ -1433,10 +1433,10 @@ class NgOptimizedImage {
1433
1433
  setHostAttribute(name, value) {
1434
1434
  this.renderer.setAttribute(this.imgElement, name, value);
1435
1435
  }
1436
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1437
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.6", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 });
1436
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgOptimizedImage, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1437
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.8", type: NgOptimizedImage, isStandalone: true, selector: "img[ngSrc]", inputs: { ngSrc: ["ngSrc", "ngSrc", unwrapSafeUrl], ngSrcset: "ngSrcset", sizes: "sizes", width: ["width", "width", numberAttribute], height: ["height", "height", numberAttribute], loading: "loading", priority: ["priority", "priority", booleanAttribute], loaderParams: "loaderParams", disableOptimizedSrcset: ["disableOptimizedSrcset", "disableOptimizedSrcset", booleanAttribute], fill: ["fill", "fill", booleanAttribute], placeholder: ["placeholder", "placeholder", booleanOrUrlAttribute], placeholderConfig: "placeholderConfig", src: "src", srcset: "srcset" }, host: { properties: { "style.position": "fill ? \"absolute\" : null", "style.width": "fill ? \"100%\" : null", "style.height": "fill ? \"100%\" : null", "style.inset": "fill ? \"0\" : null", "style.background-size": "placeholder ? \"cover\" : null", "style.background-position": "placeholder ? \"50% 50%\" : null", "style.background-repeat": "placeholder ? \"no-repeat\" : null", "style.background-image": "placeholder ? generatePlaceholder(placeholder) : null", "style.filter": "placeholder && shouldBlurPlaceholder(placeholderConfig) ? \"blur(15px)\" : null" } }, usesOnChanges: true, ngImport: i0 });
1438
1438
  }
1439
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NgOptimizedImage, decorators: [{
1439
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgOptimizedImage, decorators: [{
1440
1440
  type: Directive,
1441
1441
  args: [{
1442
1442
  selector: 'img[ngSrc]',