@absolutejs/absolute 0.19.0-beta.360 → 0.19.0-beta.362
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/dist/{StreamSlot-m5a5fnfq.svelte → StreamSlot-kyee4w0z.svelte} +1 -1
- package/dist/ai/index.js +13 -1
- package/dist/ai/index.js.map +3 -3
- package/dist/angular/browser.js +402 -4
- package/dist/angular/browser.js.map +9 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +15 -0
- package/dist/angular/components/core/streamingSlotRegistry.js +12 -3
- package/dist/angular/components/stream-slot.component.js +1 -1
- package/dist/angular/index.js +12 -2
- package/dist/angular/index.js.map +6 -5
- package/dist/index.js +12 -2
- package/dist/index.js.map +5 -4
- package/dist/react/components/browser/index.js +3 -8
- package/dist/react/components/index.js +6 -37
- package/dist/react/components/index.js.map +5 -5
- package/dist/react/index.js +12 -2
- package/dist/react/index.js.map +5 -4
- package/dist/src/ai/rag/collection.d.ts +9 -0
- package/dist/src/angular/browser.d.ts +3 -0
- package/dist/src/core/streamingSlotRegistrar.d.ts +5 -0
- package/dist/src/core/streamingSlotRegistry.d.ts +0 -1
- package/dist/src/svelte/browser.d.ts +2 -0
- package/dist/svelte/browser.js +8 -2
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/components/StreamSlot.svelte +1 -1
- package/dist/svelte/index.js +13 -3
- package/dist/svelte/index.js.map +5 -4
- package/dist/types/ai.d.ts +16 -1
- package/dist/vue/components/index.js +6 -37
- package/dist/vue/components/index.js.map +5 -5
- package/dist/vue/index.js +47 -37
- package/dist/vue/index.js.map +6 -5
- package/package.json +1 -1
package/dist/angular/browser.js
CHANGED
|
@@ -3129,7 +3129,7 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
3129
3129
|
exports.fromIterable = fromIterable;
|
|
3130
3130
|
function fromAsyncIterable(asyncIterable) {
|
|
3131
3131
|
return new Observable_1.Observable(function(subscriber) {
|
|
3132
|
-
|
|
3132
|
+
process2(asyncIterable, subscriber).catch(function(err) {
|
|
3133
3133
|
return subscriber.error(err);
|
|
3134
3134
|
});
|
|
3135
3135
|
});
|
|
@@ -3139,7 +3139,7 @@ var require_innerFrom = __commonJS((exports) => {
|
|
|
3139
3139
|
return fromAsyncIterable(isReadableStreamLike_1.readableStreamLikeToAsyncGenerator(readableStream));
|
|
3140
3140
|
}
|
|
3141
3141
|
exports.fromReadableStreamLike = fromReadableStreamLike;
|
|
3142
|
-
function
|
|
3142
|
+
function process2(asyncIterable, subscriber) {
|
|
3143
3143
|
var asyncIterable_1, asyncIterable_1_1;
|
|
3144
3144
|
var e_2, _a;
|
|
3145
3145
|
return __awaiter(this, undefined, undefined, function() {
|
|
@@ -9079,6 +9079,171 @@ var require_cjs = __commonJS((exports) => {
|
|
|
9079
9079
|
} });
|
|
9080
9080
|
});
|
|
9081
9081
|
|
|
9082
|
+
// src/utils/imageProcessing.ts
|
|
9083
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
9084
|
+
import { join, resolve } from "path";
|
|
9085
|
+
var DEFAULT_DEVICE_SIZES, DEFAULT_IMAGE_SIZES, DEFAULT_QUALITY = 75, OPTIMIZATION_ENDPOINT = "/_absolute/image", BLUR_DEVIATION = 20, sharpModule = undefined, sharpLoaded = false, sharpWarned = false, snapToSize = (target, sizes) => {
|
|
9086
|
+
for (const size of sizes) {
|
|
9087
|
+
if (size >= target)
|
|
9088
|
+
return size;
|
|
9089
|
+
}
|
|
9090
|
+
return sizes[sizes.length - 1] ?? target;
|
|
9091
|
+
}, matchHostname = (actual, pattern) => {
|
|
9092
|
+
if (pattern === actual)
|
|
9093
|
+
return true;
|
|
9094
|
+
if (pattern.startsWith("*.")) {
|
|
9095
|
+
const suffix = pattern.slice(1);
|
|
9096
|
+
return actual.endsWith(suffix) && actual.length > suffix.length;
|
|
9097
|
+
}
|
|
9098
|
+
return false;
|
|
9099
|
+
}, matchPathname = (actual, pattern) => {
|
|
9100
|
+
if (pattern.endsWith("/**")) {
|
|
9101
|
+
const prefix = pattern.slice(0, -2);
|
|
9102
|
+
return actual.startsWith(prefix);
|
|
9103
|
+
}
|
|
9104
|
+
return actual === pattern;
|
|
9105
|
+
}, MIME_MAP, callSharp = (sharpRef, input3) => {
|
|
9106
|
+
const factory = sharpRef;
|
|
9107
|
+
return factory(input3);
|
|
9108
|
+
}, toBuffer = (input3) => {
|
|
9109
|
+
if (Buffer.isBuffer(input3))
|
|
9110
|
+
return input3;
|
|
9111
|
+
return Buffer.from(input3);
|
|
9112
|
+
}, buildOptimizedUrl = (src, width, quality, basePath = OPTIMIZATION_ENDPOINT) => `${basePath}?url=${encodeURIComponent(src)}&w=${width}&q=${quality}`, formatToMime = (format) => MIME_MAP[format], generateBlurSvg = (base64Thumbnail) => {
|
|
9113
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 320"><filter id="b" color-interpolation-filters="sRGB"><feGaussianBlur stdDeviation="${BLUR_DEVIATION}"/><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1"/></filter><image filter="url(#b)" x="0" y="0" width="100%" height="100%" href="${base64Thumbnail}"/></svg>`;
|
|
9114
|
+
const encoded = encodeURIComponent(svg);
|
|
9115
|
+
return `url("data:image/svg+xml,${encoded}")`;
|
|
9116
|
+
}, generateSrcSet = (src, width, sizes, config, loader) => {
|
|
9117
|
+
const quality = config?.quality ?? DEFAULT_QUALITY;
|
|
9118
|
+
const basePath = config?.path ?? OPTIMIZATION_ENDPOINT;
|
|
9119
|
+
const buildUrl = loader ?? ((params) => buildOptimizedUrl(params.src, params.width, params.quality, basePath));
|
|
9120
|
+
if (sizes) {
|
|
9121
|
+
const allSizes = getAllSizes(config);
|
|
9122
|
+
return allSizes.map((sizeWidth) => `${buildUrl({ quality, src, width: sizeWidth })} ${sizeWidth}w`).join(", ");
|
|
9123
|
+
}
|
|
9124
|
+
if (width) {
|
|
9125
|
+
const allSizes = getAllSizes(config);
|
|
9126
|
+
const w1x = snapToSize(width, allSizes);
|
|
9127
|
+
const w2x = snapToSize(width * 2, allSizes);
|
|
9128
|
+
return `${buildUrl({ quality, src, width: w1x })} 1x, ${buildUrl({ quality, src, width: w2x })} 2x`;
|
|
9129
|
+
}
|
|
9130
|
+
const deviceSizes = config?.deviceSizes ?? DEFAULT_DEVICE_SIZES;
|
|
9131
|
+
return deviceSizes.map((sizeWidth) => `${buildUrl({ quality, src, width: sizeWidth })} ${sizeWidth}w`).join(", ");
|
|
9132
|
+
}, getAllSizes = (config) => {
|
|
9133
|
+
const device = config?.deviceSizes ?? DEFAULT_DEVICE_SIZES;
|
|
9134
|
+
const image = config?.imageSizes ?? DEFAULT_IMAGE_SIZES;
|
|
9135
|
+
return [...device, ...image].sort((left, right) => left - right);
|
|
9136
|
+
}, getCacheDir = (buildDir) => {
|
|
9137
|
+
const dir = join(buildDir, ".cache", "images");
|
|
9138
|
+
if (!existsSync(dir))
|
|
9139
|
+
mkdirSync(dir, { recursive: true });
|
|
9140
|
+
return dir;
|
|
9141
|
+
}, getCacheKey = (url, width, quality, format) => {
|
|
9142
|
+
const hasher = new Bun.CryptoHasher("sha256");
|
|
9143
|
+
hasher.update(`${url}|${width}|${quality}|${format}`);
|
|
9144
|
+
return hasher.digest("hex");
|
|
9145
|
+
}, isCacheStale = (meta) => Date.now() > meta.expireAt, matchRemotePattern = (urlString, patterns) => {
|
|
9146
|
+
let parsed;
|
|
9147
|
+
try {
|
|
9148
|
+
parsed = new URL(urlString);
|
|
9149
|
+
} catch {
|
|
9150
|
+
return false;
|
|
9151
|
+
}
|
|
9152
|
+
return patterns.some((pattern) => {
|
|
9153
|
+
if (pattern.protocol && parsed.protocol !== `${pattern.protocol}:`)
|
|
9154
|
+
return false;
|
|
9155
|
+
if (!matchHostname(parsed.hostname, pattern.hostname))
|
|
9156
|
+
return false;
|
|
9157
|
+
if (pattern.port && parsed.port !== pattern.port)
|
|
9158
|
+
return false;
|
|
9159
|
+
if (pattern.pathname && !matchPathname(parsed.pathname, pattern.pathname))
|
|
9160
|
+
return false;
|
|
9161
|
+
return true;
|
|
9162
|
+
});
|
|
9163
|
+
}, negotiateFormat = (acceptHeader, configuredFormats) => {
|
|
9164
|
+
for (const format of configuredFormats) {
|
|
9165
|
+
const mime = MIME_MAP[format];
|
|
9166
|
+
if (mime && acceptHeader.includes(mime))
|
|
9167
|
+
return format;
|
|
9168
|
+
}
|
|
9169
|
+
if (configuredFormats.includes("webp") && acceptHeader.includes("image/webp")) {
|
|
9170
|
+
return "webp";
|
|
9171
|
+
}
|
|
9172
|
+
return "jpeg";
|
|
9173
|
+
}, AVIF_QUALITY_OFFSET = 20, AVIF_EFFORT = 3, optimizeImage = async (buffer, width, quality, format) => {
|
|
9174
|
+
const sharp = await tryLoadSharp();
|
|
9175
|
+
if (!sharp)
|
|
9176
|
+
return toBuffer(buffer);
|
|
9177
|
+
const pipeline = callSharp(sharp, toBuffer(buffer)).rotate().resize(width, undefined, { withoutEnlargement: true });
|
|
9178
|
+
switch (format) {
|
|
9179
|
+
case "avif":
|
|
9180
|
+
return pipeline.avif({
|
|
9181
|
+
effort: AVIF_EFFORT,
|
|
9182
|
+
quality: Math.max(1, quality - AVIF_QUALITY_OFFSET)
|
|
9183
|
+
}).toBuffer();
|
|
9184
|
+
case "jpeg":
|
|
9185
|
+
return pipeline.jpeg({ mozjpeg: true, quality }).toBuffer();
|
|
9186
|
+
case "png":
|
|
9187
|
+
return pipeline.png({ quality }).toBuffer();
|
|
9188
|
+
case "webp":
|
|
9189
|
+
return pipeline.webp({ quality }).toBuffer();
|
|
9190
|
+
default:
|
|
9191
|
+
return toBuffer(buffer);
|
|
9192
|
+
}
|
|
9193
|
+
}, readFromCache = (cacheDir, cacheKey) => {
|
|
9194
|
+
const metaPath = join(cacheDir, `${cacheKey}.meta`);
|
|
9195
|
+
const dataPath = join(cacheDir, `${cacheKey}.data`);
|
|
9196
|
+
if (!existsSync(metaPath) || !existsSync(dataPath))
|
|
9197
|
+
return null;
|
|
9198
|
+
try {
|
|
9199
|
+
const meta = JSON.parse(readFileSync(metaPath, "utf-8"));
|
|
9200
|
+
const buffer = readFileSync(dataPath);
|
|
9201
|
+
return { buffer, meta };
|
|
9202
|
+
} catch {
|
|
9203
|
+
return null;
|
|
9204
|
+
}
|
|
9205
|
+
}, tryLoadSharp = async () => {
|
|
9206
|
+
if (sharpLoaded)
|
|
9207
|
+
return sharpModule;
|
|
9208
|
+
sharpLoaded = true;
|
|
9209
|
+
try {
|
|
9210
|
+
const sharpPath = resolve(process.cwd(), "node_modules/sharp");
|
|
9211
|
+
const mod = await import(sharpPath);
|
|
9212
|
+
sharpModule = mod.default ?? mod;
|
|
9213
|
+
return sharpModule;
|
|
9214
|
+
} catch {
|
|
9215
|
+
if (sharpWarned)
|
|
9216
|
+
return null;
|
|
9217
|
+
sharpWarned = true;
|
|
9218
|
+
console.warn("[image] sharp not installed \u2014 serving unoptimized images. Install with: bun add sharp");
|
|
9219
|
+
return null;
|
|
9220
|
+
}
|
|
9221
|
+
}, writeToCache = (cacheDir, cacheKey, buffer, meta) => {
|
|
9222
|
+
const metaPath = join(cacheDir, `${cacheKey}.meta`);
|
|
9223
|
+
const dataPath = join(cacheDir, `${cacheKey}.data`);
|
|
9224
|
+
writeFileSync(dataPath, buffer);
|
|
9225
|
+
writeFileSync(metaPath, JSON.stringify(meta));
|
|
9226
|
+
};
|
|
9227
|
+
var init_imageProcessing = __esm(() => {
|
|
9228
|
+
DEFAULT_DEVICE_SIZES = [
|
|
9229
|
+
640,
|
|
9230
|
+
750,
|
|
9231
|
+
828,
|
|
9232
|
+
1080,
|
|
9233
|
+
1200,
|
|
9234
|
+
1920,
|
|
9235
|
+
2048,
|
|
9236
|
+
3840
|
|
9237
|
+
];
|
|
9238
|
+
DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];
|
|
9239
|
+
MIME_MAP = {
|
|
9240
|
+
avif: "image/avif",
|
|
9241
|
+
jpeg: "image/jpeg",
|
|
9242
|
+
png: "image/png",
|
|
9243
|
+
webp: "image/webp"
|
|
9244
|
+
};
|
|
9245
|
+
});
|
|
9246
|
+
|
|
9082
9247
|
// src/angular/Island.browser.ts
|
|
9083
9248
|
import"@angular/compiler";
|
|
9084
9249
|
import {
|
|
@@ -9372,6 +9537,236 @@ Injectable({
|
|
|
9372
9537
|
providedIn: "root"
|
|
9373
9538
|
})(IslandStoreImpl);
|
|
9374
9539
|
var IslandStore = IslandStoreImpl;
|
|
9540
|
+
// src/angular/components/defer-slot.component.ts
|
|
9541
|
+
import { Component as Component3, computed, input as input2 } from "@angular/core";
|
|
9542
|
+
|
|
9543
|
+
// src/angular/components/stream-slot.component.ts
|
|
9544
|
+
import"@angular/compiler";
|
|
9545
|
+
import { Component as Component2, input } from "@angular/core";
|
|
9546
|
+
|
|
9547
|
+
// src/core/streamingSlotRegistrar.ts
|
|
9548
|
+
var registrar = null;
|
|
9549
|
+
var setStreamingSlotRegistrar = (nextRegistrar) => {
|
|
9550
|
+
registrar = nextRegistrar;
|
|
9551
|
+
};
|
|
9552
|
+
var registerStreamingSlot = (slot) => {
|
|
9553
|
+
registrar?.(slot);
|
|
9554
|
+
};
|
|
9555
|
+
|
|
9556
|
+
// src/angular/components/stream-slot.component.ts
|
|
9557
|
+
class StreamSlotComponent {
|
|
9558
|
+
className = input();
|
|
9559
|
+
errorHtml = input();
|
|
9560
|
+
fallbackHtml = input("");
|
|
9561
|
+
id = input.required();
|
|
9562
|
+
resolve = input.required();
|
|
9563
|
+
timeoutMs = input();
|
|
9564
|
+
ngOnInit() {
|
|
9565
|
+
if (typeof window !== "undefined")
|
|
9566
|
+
return;
|
|
9567
|
+
registerStreamingSlot({
|
|
9568
|
+
errorHtml: this.errorHtml(),
|
|
9569
|
+
fallbackHtml: this.fallbackHtml(),
|
|
9570
|
+
id: this.id(),
|
|
9571
|
+
resolve: this.resolve(),
|
|
9572
|
+
timeoutMs: this.timeoutMs()
|
|
9573
|
+
});
|
|
9574
|
+
}
|
|
9575
|
+
}
|
|
9576
|
+
StreamSlotComponent = __legacyDecorateClassTS([
|
|
9577
|
+
Component2({
|
|
9578
|
+
selector: "abs-stream-slot",
|
|
9579
|
+
standalone: true,
|
|
9580
|
+
template: `
|
|
9581
|
+
<div
|
|
9582
|
+
[attr.id]="'slot-' + id()"
|
|
9583
|
+
[attr.class]="className()"
|
|
9584
|
+
data-absolute-slot="true"
|
|
9585
|
+
[innerHTML]="fallbackHtml()"
|
|
9586
|
+
></div>
|
|
9587
|
+
`
|
|
9588
|
+
})
|
|
9589
|
+
], StreamSlotComponent);
|
|
9590
|
+
|
|
9591
|
+
// src/angular/components/defer-slot.component.ts
|
|
9592
|
+
class DeferSlotComponent {
|
|
9593
|
+
className = input2();
|
|
9594
|
+
errorHtml = input2();
|
|
9595
|
+
fallbackHtml = input2("");
|
|
9596
|
+
id = input2.required();
|
|
9597
|
+
promise = input2();
|
|
9598
|
+
resolve = input2();
|
|
9599
|
+
timeoutMs = input2();
|
|
9600
|
+
resolvedResolver = computed(() => {
|
|
9601
|
+
const resolver = this.resolve();
|
|
9602
|
+
if (resolver)
|
|
9603
|
+
return resolver;
|
|
9604
|
+
const promise = this.promise();
|
|
9605
|
+
if (promise)
|
|
9606
|
+
return () => promise;
|
|
9607
|
+
return () => "";
|
|
9608
|
+
});
|
|
9609
|
+
}
|
|
9610
|
+
DeferSlotComponent = __legacyDecorateClassTS([
|
|
9611
|
+
Component3({
|
|
9612
|
+
selector: "abs-defer-slot",
|
|
9613
|
+
standalone: true,
|
|
9614
|
+
template: `
|
|
9615
|
+
<abs-stream-slot
|
|
9616
|
+
[className]="className()"
|
|
9617
|
+
[errorHtml]="errorHtml()"
|
|
9618
|
+
[fallbackHtml]="fallbackHtml()"
|
|
9619
|
+
[id]="id()"
|
|
9620
|
+
[resolve]="resolvedResolver()"
|
|
9621
|
+
[timeoutMs]="timeoutMs()"
|
|
9622
|
+
></abs-stream-slot>
|
|
9623
|
+
`,
|
|
9624
|
+
imports: [StreamSlotComponent]
|
|
9625
|
+
})
|
|
9626
|
+
], DeferSlotComponent);
|
|
9627
|
+
// src/angular/components/image.component.ts
|
|
9628
|
+
init_imageProcessing();
|
|
9629
|
+
import { Component as Component4, computed as computed2, input as input3, signal } from "@angular/core";
|
|
9630
|
+
import { NgStyle } from "@angular/common";
|
|
9631
|
+
var resolveBlurBg = (placeholderValue, blurDataUrl) => {
|
|
9632
|
+
if (typeof placeholderValue === "string" && placeholderValue !== "blur" && placeholderValue.startsWith("data:")) {
|
|
9633
|
+
return generateBlurSvg(placeholderValue);
|
|
9634
|
+
}
|
|
9635
|
+
if (blurDataUrl)
|
|
9636
|
+
return generateBlurSvg(blurDataUrl);
|
|
9637
|
+
return;
|
|
9638
|
+
};
|
|
9639
|
+
|
|
9640
|
+
class ImageComponent {
|
|
9641
|
+
alt = input3.required();
|
|
9642
|
+
blurDataURL = input3();
|
|
9643
|
+
className = input3();
|
|
9644
|
+
crossOrigin = input3();
|
|
9645
|
+
fetchPriority = input3();
|
|
9646
|
+
fill = input3(false);
|
|
9647
|
+
height = input3();
|
|
9648
|
+
loader = input3();
|
|
9649
|
+
loading = input3("lazy");
|
|
9650
|
+
onError = input3();
|
|
9651
|
+
onLoad = input3();
|
|
9652
|
+
overrideSrc = input3();
|
|
9653
|
+
placeholder = input3("empty");
|
|
9654
|
+
priority = input3(false);
|
|
9655
|
+
quality = input3(DEFAULT_QUALITY);
|
|
9656
|
+
referrerPolicy = input3();
|
|
9657
|
+
sizes = input3();
|
|
9658
|
+
src = input3.required();
|
|
9659
|
+
style = input3();
|
|
9660
|
+
unoptimized = input3(false);
|
|
9661
|
+
width = input3();
|
|
9662
|
+
blurRemoved = signal(false);
|
|
9663
|
+
resolvedSrc = computed2(() => {
|
|
9664
|
+
const override = this.overrideSrc();
|
|
9665
|
+
if (override)
|
|
9666
|
+
return override;
|
|
9667
|
+
if (this.unoptimized())
|
|
9668
|
+
return this.src();
|
|
9669
|
+
const loaderFn = this.loader();
|
|
9670
|
+
if (loaderFn)
|
|
9671
|
+
return loaderFn({
|
|
9672
|
+
quality: this.quality(),
|
|
9673
|
+
src: this.src(),
|
|
9674
|
+
width: this.width() ?? 0
|
|
9675
|
+
});
|
|
9676
|
+
const currentWidth = this.width();
|
|
9677
|
+
if (!currentWidth)
|
|
9678
|
+
return buildOptimizedUrl(this.src(), 0, this.quality());
|
|
9679
|
+
return buildOptimizedUrl(this.src(), currentWidth, this.quality());
|
|
9680
|
+
});
|
|
9681
|
+
srcSet = computed2(() => this.unoptimized() ? null : generateSrcSet(this.src(), this.width(), this.sizes(), undefined, this.loader() ?? undefined) ?? null);
|
|
9682
|
+
resolvedSrcSet = computed2(() => this.srcSet() ?? null);
|
|
9683
|
+
resolvedSizes = computed2(() => this.sizes() ?? (this.fill() ? "100vw" : null));
|
|
9684
|
+
resolvedCrossOrigin = computed2(() => this.crossOrigin() ?? null);
|
|
9685
|
+
resolvedReferrerPolicy = computed2(() => this.referrerPolicy() ?? null);
|
|
9686
|
+
resolvedLoading = computed2(() => this.priority() ? "eager" : this.loading());
|
|
9687
|
+
resolvedFetchPriority = computed2(() => this.priority() ? "high" : this.fetchPriority() ?? null);
|
|
9688
|
+
imgStyle = computed2(() => {
|
|
9689
|
+
const base = {
|
|
9690
|
+
...this.style() ?? {},
|
|
9691
|
+
color: "transparent"
|
|
9692
|
+
};
|
|
9693
|
+
const hasBlur = !this.blurRemoved() && (this.placeholder() === "blur" || typeof this.placeholder() === "string" && this.placeholder() !== "empty" && (this.placeholder() ?? "").startsWith("data:"));
|
|
9694
|
+
const blurValue = hasBlur ? resolveBlurBg(this.placeholder(), this.blurDataURL()) : undefined;
|
|
9695
|
+
if (blurValue) {
|
|
9696
|
+
base["background-image"] = blurValue;
|
|
9697
|
+
base["background-position"] = "center";
|
|
9698
|
+
base["background-repeat"] = "no-repeat";
|
|
9699
|
+
base["background-size"] = "cover";
|
|
9700
|
+
}
|
|
9701
|
+
if (this.fill()) {
|
|
9702
|
+
base.height = "100%";
|
|
9703
|
+
base.inset = "0";
|
|
9704
|
+
base["object-fit"] = "cover";
|
|
9705
|
+
base.position = "absolute";
|
|
9706
|
+
base.width = "100%";
|
|
9707
|
+
}
|
|
9708
|
+
return base;
|
|
9709
|
+
});
|
|
9710
|
+
handleLoad(event) {
|
|
9711
|
+
this.blurRemoved.set(true);
|
|
9712
|
+
const callback = this.onLoad();
|
|
9713
|
+
if (callback)
|
|
9714
|
+
callback(event);
|
|
9715
|
+
}
|
|
9716
|
+
handleError(event) {
|
|
9717
|
+
const callback = this.onError();
|
|
9718
|
+
if (callback)
|
|
9719
|
+
callback(event);
|
|
9720
|
+
}
|
|
9721
|
+
}
|
|
9722
|
+
ImageComponent = __legacyDecorateClassTS([
|
|
9723
|
+
Component4({
|
|
9724
|
+
imports: [NgStyle],
|
|
9725
|
+
selector: "abs-image",
|
|
9726
|
+
standalone: true,
|
|
9727
|
+
template: `
|
|
9728
|
+
@if (fill()) {
|
|
9729
|
+
<span
|
|
9730
|
+
style="position:relative;overflow:hidden;display:block;width:100%;height:100%"
|
|
9731
|
+
>
|
|
9732
|
+
<img
|
|
9733
|
+
[alt]="alt()"
|
|
9734
|
+
[src]="resolvedSrc()"
|
|
9735
|
+
[attr.srcset]="resolvedSrcSet()"
|
|
9736
|
+
[attr.sizes]="resolvedSizes()"
|
|
9737
|
+
[loading]="resolvedLoading()"
|
|
9738
|
+
[class]="className()"
|
|
9739
|
+
[ngStyle]="imgStyle()"
|
|
9740
|
+
[attr.crossorigin]="resolvedCrossOrigin()"
|
|
9741
|
+
[attr.referrerpolicy]="resolvedReferrerPolicy()"
|
|
9742
|
+
[attr.fetchpriority]="resolvedFetchPriority()"
|
|
9743
|
+
decoding="async"
|
|
9744
|
+
(load)="handleLoad($event)"
|
|
9745
|
+
(error)="handleError($event)"
|
|
9746
|
+
/>
|
|
9747
|
+
</span>
|
|
9748
|
+
} @else {
|
|
9749
|
+
<img
|
|
9750
|
+
[alt]="alt()"
|
|
9751
|
+
[src]="resolvedSrc()"
|
|
9752
|
+
[attr.srcset]="resolvedSrcSet()"
|
|
9753
|
+
[attr.sizes]="resolvedSizes()"
|
|
9754
|
+
[width]="width()"
|
|
9755
|
+
[height]="height()"
|
|
9756
|
+
[loading]="resolvedLoading()"
|
|
9757
|
+
[class]="className()"
|
|
9758
|
+
[ngStyle]="imgStyle()"
|
|
9759
|
+
[attr.crossorigin]="resolvedCrossOrigin()"
|
|
9760
|
+
[attr.referrerpolicy]="resolvedReferrerPolicy()"
|
|
9761
|
+
[attr.fetchpriority]="resolvedFetchPriority()"
|
|
9762
|
+
decoding="async"
|
|
9763
|
+
(load)="handleLoad($event)"
|
|
9764
|
+
(error)="handleError($event)"
|
|
9765
|
+
/>
|
|
9766
|
+
}
|
|
9767
|
+
`
|
|
9768
|
+
})
|
|
9769
|
+
], ImageComponent);
|
|
9375
9770
|
|
|
9376
9771
|
// src/angular/browser.ts
|
|
9377
9772
|
var renderIsland = async () => {
|
|
@@ -9380,9 +9775,12 @@ var renderIsland = async () => {
|
|
|
9380
9775
|
export {
|
|
9381
9776
|
renderIsland,
|
|
9382
9777
|
createTypedIsland,
|
|
9778
|
+
StreamSlotComponent,
|
|
9383
9779
|
IslandStore,
|
|
9384
|
-
Island
|
|
9780
|
+
Island,
|
|
9781
|
+
ImageComponent,
|
|
9782
|
+
DeferSlotComponent
|
|
9385
9783
|
};
|
|
9386
9784
|
|
|
9387
|
-
//# debugId=
|
|
9785
|
+
//# debugId=A09DA397538F56B864756E2164756E21
|
|
9388
9786
|
//# sourceMappingURL=browser.js.map
|