@absolutejs/absolute 0.19.0-beta.214 → 0.19.0-beta.215

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.
@@ -59,11 +59,14 @@ export class ImageComponent {
59
59
  return buildOptimizedUrl(this.src(), currentWidth, this.quality());
60
60
  }, ...(ngDevMode ? [{ debugName: "resolvedSrc" }] : /* istanbul ignore next */ []));
61
61
  this.srcSet = computed(() => this.unoptimized()
62
- ? undefined
63
- : generateSrcSet(this.src(), this.width(), this.sizes(), undefined, this.loader() ?? undefined), ...(ngDevMode ? [{ debugName: "srcSet" }] : /* istanbul ignore next */ []));
64
- this.resolvedSizes = computed(() => this.sizes() ?? (this.fill() ? '100vw' : undefined), ...(ngDevMode ? [{ debugName: "resolvedSizes" }] : /* istanbul ignore next */ []));
62
+ ? null
63
+ : generateSrcSet(this.src(), this.width(), this.sizes(), undefined, this.loader() ?? undefined) ?? null, ...(ngDevMode ? [{ debugName: "srcSet" }] : /* istanbul ignore next */ []));
64
+ this.resolvedSrcSet = computed(() => this.srcSet() ?? null, ...(ngDevMode ? [{ debugName: "resolvedSrcSet" }] : /* istanbul ignore next */ []));
65
+ this.resolvedSizes = computed(() => this.sizes() ?? (this.fill() ? '100vw' : null), ...(ngDevMode ? [{ debugName: "resolvedSizes" }] : /* istanbul ignore next */ []));
66
+ this.resolvedCrossOrigin = computed(() => this.crossOrigin() ?? null, ...(ngDevMode ? [{ debugName: "resolvedCrossOrigin" }] : /* istanbul ignore next */ []));
67
+ this.resolvedReferrerPolicy = computed(() => this.referrerPolicy() ?? null, ...(ngDevMode ? [{ debugName: "resolvedReferrerPolicy" }] : /* istanbul ignore next */ []));
65
68
  this.resolvedLoading = computed(() => this.priority() ? 'eager' : this.loading(), ...(ngDevMode ? [{ debugName: "resolvedLoading" }] : /* istanbul ignore next */ []));
66
- this.resolvedFetchPriority = computed(() => this.priority() ? 'high' : this.fetchPriority(), ...(ngDevMode ? [{ debugName: "resolvedFetchPriority" }] : /* istanbul ignore next */ []));
69
+ this.resolvedFetchPriority = computed(() => this.priority() ? 'high' : (this.fetchPriority() ?? null), ...(ngDevMode ? [{ debugName: "resolvedFetchPriority" }] : /* istanbul ignore next */ []));
67
70
  this.imgStyle = computed(() => {
68
71
  const base = {
69
72
  ...(this.style() ?? {}),
@@ -107,16 +110,6 @@ export class ImageComponent {
107
110
  }
108
111
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.6", ngImport: i0, type: ImageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
109
112
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.6", type: ImageComponent, isStandalone: true, selector: "abs-image", inputs: { alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: true, transformFunction: null }, blurDataURL: { classPropertyName: "blurDataURL", publicName: "blurDataURL", isSignal: true, isRequired: false, transformFunction: null }, className: { classPropertyName: "className", publicName: "className", isSignal: true, isRequired: false, transformFunction: null }, crossOrigin: { classPropertyName: "crossOrigin", publicName: "crossOrigin", isSignal: true, isRequired: false, transformFunction: null }, fetchPriority: { classPropertyName: "fetchPriority", publicName: "fetchPriority", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, loader: { classPropertyName: "loader", publicName: "loader", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, onError: { classPropertyName: "onError", publicName: "onError", isSignal: true, isRequired: false, transformFunction: null }, onLoad: { classPropertyName: "onLoad", publicName: "onLoad", isSignal: true, isRequired: false, transformFunction: null }, overrideSrc: { classPropertyName: "overrideSrc", publicName: "overrideSrc", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, priority: { classPropertyName: "priority", publicName: "priority", isSignal: true, isRequired: false, transformFunction: null }, quality: { classPropertyName: "quality", publicName: "quality", isSignal: true, isRequired: false, transformFunction: null }, referrerPolicy: { classPropertyName: "referrerPolicy", publicName: "referrerPolicy", isSignal: true, isRequired: false, transformFunction: null }, sizes: { classPropertyName: "sizes", publicName: "sizes", isSignal: true, isRequired: false, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null }, unoptimized: { classPropertyName: "unoptimized", publicName: "unoptimized", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
110
- @if (priority()) {
111
- <link
112
- rel="preload"
113
- as="image"
114
- [attr.href]="resolvedSrc()"
115
- [attr.imagesrcset]="srcSet()"
116
- [attr.imagesizes]="resolvedSizes()"
117
- [attr.crossorigin]="crossOrigin()"
118
- />
119
- }
120
113
  @if (fill()) {
121
114
  <span
122
115
  style="position:relative;overflow:hidden;display:block;width:100%;height:100%"
@@ -124,13 +117,13 @@ export class ImageComponent {
124
117
  <img
125
118
  [alt]="alt()"
126
119
  [src]="resolvedSrc()"
127
- [attr.srcset]="srcSet()"
120
+ [attr.srcset]="resolvedSrcSet()"
128
121
  [attr.sizes]="resolvedSizes()"
129
122
  [loading]="resolvedLoading()"
130
123
  [class]="className()"
131
124
  [ngStyle]="imgStyle()"
132
- [attr.crossorigin]="crossOrigin()"
133
- [attr.referrerpolicy]="referrerPolicy()"
125
+ [attr.crossorigin]="resolvedCrossOrigin()"
126
+ [attr.referrerpolicy]="resolvedReferrerPolicy()"
134
127
  [attr.fetchpriority]="resolvedFetchPriority()"
135
128
  decoding="async"
136
129
  (load)="handleLoad($event)"
@@ -141,15 +134,15 @@ export class ImageComponent {
141
134
  <img
142
135
  [alt]="alt()"
143
136
  [src]="resolvedSrc()"
144
- [attr.srcset]="srcSet()"
137
+ [attr.srcset]="resolvedSrcSet()"
145
138
  [attr.sizes]="resolvedSizes()"
146
139
  [width]="width()"
147
140
  [height]="height()"
148
141
  [loading]="resolvedLoading()"
149
142
  [class]="className()"
150
143
  [ngStyle]="imgStyle()"
151
- [attr.crossorigin]="crossOrigin()"
152
- [attr.referrerpolicy]="referrerPolicy()"
144
+ [attr.crossorigin]="resolvedCrossOrigin()"
145
+ [attr.referrerpolicy]="resolvedReferrerPolicy()"
153
146
  [attr.fetchpriority]="resolvedFetchPriority()"
154
147
  decoding="async"
155
148
  (load)="handleLoad($event)"
@@ -165,16 +158,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
165
158
  selector: 'abs-image',
166
159
  standalone: true,
167
160
  template: `
168
- @if (priority()) {
169
- <link
170
- rel="preload"
171
- as="image"
172
- [attr.href]="resolvedSrc()"
173
- [attr.imagesrcset]="srcSet()"
174
- [attr.imagesizes]="resolvedSizes()"
175
- [attr.crossorigin]="crossOrigin()"
176
- />
177
- }
178
161
  @if (fill()) {
179
162
  <span
180
163
  style="position:relative;overflow:hidden;display:block;width:100%;height:100%"
@@ -182,13 +165,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
182
165
  <img
183
166
  [alt]="alt()"
184
167
  [src]="resolvedSrc()"
185
- [attr.srcset]="srcSet()"
168
+ [attr.srcset]="resolvedSrcSet()"
186
169
  [attr.sizes]="resolvedSizes()"
187
170
  [loading]="resolvedLoading()"
188
171
  [class]="className()"
189
172
  [ngStyle]="imgStyle()"
190
- [attr.crossorigin]="crossOrigin()"
191
- [attr.referrerpolicy]="referrerPolicy()"
173
+ [attr.crossorigin]="resolvedCrossOrigin()"
174
+ [attr.referrerpolicy]="resolvedReferrerPolicy()"
192
175
  [attr.fetchpriority]="resolvedFetchPriority()"
193
176
  decoding="async"
194
177
  (load)="handleLoad($event)"
@@ -199,15 +182,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.6", ngImpor
199
182
  <img
200
183
  [alt]="alt()"
201
184
  [src]="resolvedSrc()"
202
- [attr.srcset]="srcSet()"
185
+ [attr.srcset]="resolvedSrcSet()"
203
186
  [attr.sizes]="resolvedSizes()"
204
187
  [width]="width()"
205
188
  [height]="height()"
206
189
  [loading]="resolvedLoading()"
207
190
  [class]="className()"
208
191
  [ngStyle]="imgStyle()"
209
- [attr.crossorigin]="crossOrigin()"
210
- [attr.referrerpolicy]="referrerPolicy()"
192
+ [attr.crossorigin]="resolvedCrossOrigin()"
193
+ [attr.referrerpolicy]="resolvedReferrerPolicy()"
211
194
  [attr.fetchpriority]="resolvedFetchPriority()"
212
195
  decoding="async"
213
196
  (load)="handleLoad($event)"
@@ -26,10 +26,13 @@ export declare class ImageComponent {
26
26
  readonly width: import("@angular/core").InputSignal<number | undefined>;
27
27
  private readonly blurRemoved;
28
28
  readonly resolvedSrc: import("@angular/core").Signal<string>;
29
- readonly srcSet: import("@angular/core").Signal<string | undefined>;
30
- readonly resolvedSizes: import("@angular/core").Signal<string | undefined>;
29
+ readonly srcSet: import("@angular/core").Signal<string | null>;
30
+ readonly resolvedSrcSet: import("@angular/core").Signal<string | null>;
31
+ readonly resolvedSizes: import("@angular/core").Signal<string | null>;
32
+ readonly resolvedCrossOrigin: import("@angular/core").Signal<"" | "anonymous" | "use-credentials" | null>;
33
+ readonly resolvedReferrerPolicy: import("@angular/core").Signal<string | null>;
31
34
  readonly resolvedLoading: import("@angular/core").Signal<"lazy" | "eager">;
32
- readonly resolvedFetchPriority: import("@angular/core").Signal<"high" | "low" | "auto" | undefined>;
35
+ readonly resolvedFetchPriority: import("@angular/core").Signal<"high" | "low" | "auto" | null>;
33
36
  readonly imgStyle: import("@angular/core").Signal<Record<string, string | number>>;
34
37
  handleLoad(event: Event): void;
35
38
  handleError(event: Event): void;
package/package.json CHANGED
@@ -218,5 +218,5 @@
218
218
  "typecheck": "bun run src/cli/index.ts typecheck --config example/absolute.config.ts"
219
219
  },
220
220
  "types": "./dist/src/index.d.ts",
221
- "version": "0.19.0-beta.214"
221
+ "version": "0.19.0-beta.215"
222
222
  }