@absolutejs/absolute 0.19.0-beta.375 → 0.19.0-beta.377
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/angular/browser.js +11 -13
- package/dist/angular/browser.js.map +4 -4
- package/dist/angular/index.js +56 -56
- package/dist/angular/index.js.map +5 -5
- package/dist/core/streamingSlotRegistrar.js +96 -0
- package/dist/core/streamingSlotRegistrar.js.map +10 -0
- package/dist/core/streamingSlotRegistry.js +140 -0
- package/dist/core/streamingSlotRegistry.js.map +11 -0
- package/dist/index.js +56 -56
- package/dist/index.js.map +5 -5
- package/dist/react/components/browser/index.js +10 -77
- package/dist/react/components/index.js +11 -11
- package/dist/react/components/index.js.map +4 -4
- package/dist/react/index.js +56 -56
- package/dist/react/index.js.map +5 -5
- package/dist/src/react/components/StreamSlot.browser.d.ts +10 -0
- package/dist/src/react/components/SuspenseSlot.browser.d.ts +22 -0
- package/dist/src/react/components/browser/index.d.ts +5 -0
- package/dist/src/svelte/browser.d.ts +0 -3
- package/dist/src/svelte/index.d.ts +0 -3
- package/dist/svelte/browser.js +2 -11
- package/dist/svelte/browser.js.map +3 -3
- package/dist/svelte/index.js +57 -66
- package/dist/svelte/index.js.map +6 -6
- package/dist/vue/components/index.js +7 -9
- package/dist/vue/components/index.js.map +4 -4
- package/dist/vue/index.js +52 -54
- package/dist/vue/index.js.map +5 -5
- package/package.json +5 -1
- package/dist/AwaitSlot-yd9jtwpr.svelte +0 -39
- package/dist/Island-hn6g4vxm.svelte +0 -71
- package/dist/StreamSlot-kyee4w0z.svelte +0 -35
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined")
|
|
5
|
-
return require.apply(this, arguments);
|
|
6
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
7
|
-
});
|
|
8
|
-
|
|
9
1
|
// src/react/components/Head.tsx
|
|
10
2
|
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
11
3
|
var RobotsContent = ({ robots }) => {
|
|
@@ -404,55 +396,10 @@ var JsonLd = ({
|
|
|
404
396
|
type: "application/ld+json"
|
|
405
397
|
}, undefined, false, undefined, this);
|
|
406
398
|
};
|
|
407
|
-
// src/
|
|
408
|
-
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
409
|
-
var getRegistrarGlobal = () => globalThis;
|
|
410
|
-
var registerStreamingSlot = (slot) => {
|
|
411
|
-
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
|
|
412
|
-
};
|
|
413
|
-
|
|
414
|
-
// src/react/components/SuspenseSlot.tsx
|
|
399
|
+
// src/react/components/SuspenseSlot.browser.tsx
|
|
415
400
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
416
401
|
var isLegacyProps = (props) => ("fallbackHtml" in props) || ("errorHtml" in props);
|
|
417
|
-
var renderReactNodeToHtml = async (node) => {
|
|
418
|
-
const { Fragment: Fragment3 } = await import("react");
|
|
419
|
-
const { renderToStaticMarkup } = await import("react-dom/server");
|
|
420
|
-
return renderToStaticMarkup(/* @__PURE__ */ jsxDEV4(Fragment3, {
|
|
421
|
-
children: node
|
|
422
|
-
}, undefined, false, undefined, this));
|
|
423
|
-
};
|
|
424
402
|
var SuspenseSlot = (props) => {
|
|
425
|
-
if (typeof window === "undefined") {
|
|
426
|
-
if (isLegacyProps(props)) {
|
|
427
|
-
registerStreamingSlot({
|
|
428
|
-
errorHtml: props.errorHtml,
|
|
429
|
-
fallbackHtml: props.fallbackHtml,
|
|
430
|
-
id: props.id,
|
|
431
|
-
resolve: props.resolve,
|
|
432
|
-
timeoutMs: props.timeoutMs
|
|
433
|
-
});
|
|
434
|
-
} else {
|
|
435
|
-
registerStreamingSlot({
|
|
436
|
-
id: props.id,
|
|
437
|
-
resolve: async () => {
|
|
438
|
-
try {
|
|
439
|
-
const resolvedValue = props.resolve !== undefined ? await props.resolve() : props.promise !== undefined ? await props.promise : undefined;
|
|
440
|
-
const content = typeof props.children === "function" ? props.children(resolvedValue) : props.children ?? resolvedValue;
|
|
441
|
-
return renderReactNodeToHtml(content ?? null);
|
|
442
|
-
} catch (error) {
|
|
443
|
-
if (typeof props.errorFallback === "function") {
|
|
444
|
-
return renderReactNodeToHtml(props.errorFallback(error));
|
|
445
|
-
}
|
|
446
|
-
if (props.errorFallback !== undefined) {
|
|
447
|
-
return renderReactNodeToHtml(props.errorFallback);
|
|
448
|
-
}
|
|
449
|
-
throw error;
|
|
450
|
-
}
|
|
451
|
-
},
|
|
452
|
-
timeoutMs: props.timeoutMs
|
|
453
|
-
});
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
403
|
if (isLegacyProps(props)) {
|
|
457
404
|
return /* @__PURE__ */ jsxDEV4("div", {
|
|
458
405
|
className: props.className,
|
|
@@ -470,33 +417,19 @@ var SuspenseSlot = (props) => {
|
|
|
470
417
|
children: props.fallback ?? null
|
|
471
418
|
}, undefined, false, undefined, this);
|
|
472
419
|
};
|
|
473
|
-
// src/react/components/StreamSlot.tsx
|
|
420
|
+
// src/react/components/StreamSlot.browser.tsx
|
|
474
421
|
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
475
422
|
var StreamSlot = ({
|
|
476
423
|
className,
|
|
477
|
-
errorHtml,
|
|
478
424
|
fallbackHtml = "",
|
|
479
|
-
id
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
id,
|
|
488
|
-
resolve,
|
|
489
|
-
timeoutMs
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
|
-
return /* @__PURE__ */ jsxDEV5("div", {
|
|
493
|
-
className,
|
|
494
|
-
dangerouslySetInnerHTML: { __html: fallbackHtml },
|
|
495
|
-
"data-absolute-slot": "true",
|
|
496
|
-
id: `slot-${id}`,
|
|
497
|
-
suppressHydrationWarning: true
|
|
498
|
-
}, undefined, false, undefined, this);
|
|
499
|
-
};
|
|
425
|
+
id
|
|
426
|
+
}) => /* @__PURE__ */ jsxDEV5("div", {
|
|
427
|
+
className,
|
|
428
|
+
dangerouslySetInnerHTML: { __html: fallbackHtml },
|
|
429
|
+
"data-absolute-slot": "true",
|
|
430
|
+
id: `slot-${id}`,
|
|
431
|
+
suppressHydrationWarning: true
|
|
432
|
+
}, undefined, false, undefined, this);
|
|
500
433
|
export {
|
|
501
434
|
SuspenseSlot,
|
|
502
435
|
StreamSlot,
|
|
@@ -78,6 +78,16 @@ var __legacyMetadataTS = (k, v) => {
|
|
|
78
78
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
79
79
|
var __require = import.meta.require;
|
|
80
80
|
|
|
81
|
+
// src/core/streamingSlotRegistrar.ts
|
|
82
|
+
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
83
|
+
var getRegistrarGlobal = () => globalThis;
|
|
84
|
+
var setStreamingSlotRegistrar = (nextRegistrar) => {
|
|
85
|
+
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
|
|
86
|
+
};
|
|
87
|
+
var registerStreamingSlot = (slot) => {
|
|
88
|
+
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
|
|
89
|
+
};
|
|
90
|
+
|
|
81
91
|
// src/react/components/Head.tsx
|
|
82
92
|
import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
|
|
83
93
|
var RobotsContent = ({ robots }) => {
|
|
@@ -476,16 +486,6 @@ var JsonLd = ({
|
|
|
476
486
|
type: "application/ld+json"
|
|
477
487
|
}, undefined, false, undefined, this);
|
|
478
488
|
};
|
|
479
|
-
// src/core/streamingSlotRegistrar.ts
|
|
480
|
-
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
481
|
-
var getRegistrarGlobal = () => globalThis;
|
|
482
|
-
var setStreamingSlotRegistrar = (nextRegistrar) => {
|
|
483
|
-
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
|
|
484
|
-
};
|
|
485
|
-
var registerStreamingSlot = (slot) => {
|
|
486
|
-
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
489
|
// src/react/components/SuspenseSlot.tsx
|
|
490
490
|
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
491
491
|
var isLegacyProps = (props) => ("fallbackHtml" in props) || ("errorHtml" in props);
|
|
@@ -580,5 +580,5 @@ export {
|
|
|
580
580
|
Head
|
|
581
581
|
};
|
|
582
582
|
|
|
583
|
-
//# debugId=
|
|
583
|
+
//# debugId=06D78941D715759C64756E2164756E21
|
|
584
584
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/react/components/Head.tsx", "../src/utils/imageClient.ts", "../src/react/components/Image.tsx", "../src/react/components/JsonLd.tsx", "../src/
|
|
3
|
+
"sources": ["../src/core/streamingSlotRegistrar.ts", "../src/react/components/Head.tsx", "../src/utils/imageClient.ts", "../src/react/components/Image.tsx", "../src/react/components/JsonLd.tsx", "../src/react/components/SuspenseSlot.tsx", "../src/react/components/StreamSlot.tsx"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\ntype StreamingSlotRegistrarGlobal = typeof globalThis & {\n\t[STREAMING_SLOT_REGISTRAR_KEY]?: StreamingSlotRegistrar | null;\n};\n\nconst getRegistrarGlobal = () => globalThis as StreamingSlotRegistrarGlobal;\n\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tgetRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;\n};\n\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);\n};\n",
|
|
5
6
|
"import type {\n\tMetadata,\n\tMetaTag,\n\tOpenGraph,\n\tTwitterCard,\n\tRobotsDirective\n} from '../../../types/metadata';\n\nconst RobotsContent = ({ robots }: { robots: RobotsDirective }) => {\n\tconst directives: string[] = [];\n\tif (robots.index === false) directives.push('noindex');\n\tif (robots.index === true) directives.push('index');\n\tif (robots.follow === false) directives.push('nofollow');\n\tif (robots.follow === true) directives.push('follow');\n\tif (robots.noarchive) directives.push('noarchive');\n\tif (robots.nosnippet) directives.push('nosnippet');\n\tif (robots.noimageindex) directives.push('noimageindex');\n\tif (robots.maxSnippet !== undefined)\n\t\tdirectives.push(`max-snippet:${robots.maxSnippet}`);\n\tif (robots.maxImagePreview)\n\t\tdirectives.push(`max-image-preview:${robots.maxImagePreview}`);\n\tif (robots.maxVideoPreview !== undefined)\n\t\tdirectives.push(`max-video-preview:${robots.maxVideoPreview}`);\n\n\tconst content = directives.join(', ');\n\n\treturn content ? <meta content={content} name=\"robots\" /> : null;\n};\n\nconst OpenGraphTags = ({\n\topenGraph,\n\ttitle,\n\tdescription\n}: {\n\topenGraph: OpenGraph;\n\ttitle: string;\n\tdescription: string;\n}) => (\n\t<>\n\t\t<meta content={openGraph.title ?? title} property=\"og:title\" />\n\t\t<meta\n\t\t\tcontent={openGraph.description ?? description}\n\t\t\tproperty=\"og:description\"\n\t\t/>\n\t\t{openGraph.url && <meta content={openGraph.url} property=\"og:url\" />}\n\t\t{openGraph.image && (\n\t\t\t<meta content={openGraph.image} property=\"og:image\" />\n\t\t)}\n\t\t{openGraph.imageAlt && (\n\t\t\t<meta content={openGraph.imageAlt} property=\"og:image:alt\" />\n\t\t)}\n\t\t{openGraph.imageWidth && (\n\t\t\t<meta\n\t\t\t\tcontent={String(openGraph.imageWidth)}\n\t\t\t\tproperty=\"og:image:width\"\n\t\t\t/>\n\t\t)}\n\t\t{openGraph.imageHeight && (\n\t\t\t<meta\n\t\t\t\tcontent={String(openGraph.imageHeight)}\n\t\t\t\tproperty=\"og:image:height\"\n\t\t\t/>\n\t\t)}\n\t\t{openGraph.type && <meta content={openGraph.type} property=\"og:type\" />}\n\t\t{openGraph.siteName && (\n\t\t\t<meta content={openGraph.siteName} property=\"og:site_name\" />\n\t\t)}\n\t\t{openGraph.locale && (\n\t\t\t<meta content={openGraph.locale} property=\"og:locale\" />\n\t\t)}\n\t</>\n);\n\nconst TwitterTags = ({\n\ttwitter,\n\ttitle,\n\tdescription\n}: {\n\ttwitter: TwitterCard;\n\ttitle: string;\n\tdescription: string;\n}) => (\n\t<>\n\t\t{twitter.card && <meta content={twitter.card} name=\"twitter:card\" />}\n\t\t<meta content={twitter.title ?? title} name=\"twitter:title\" />\n\t\t<meta\n\t\t\tcontent={twitter.description ?? description}\n\t\t\tname=\"twitter:description\"\n\t\t/>\n\t\t{twitter.image && <meta content={twitter.image} name=\"twitter:image\" />}\n\t\t{twitter.imageAlt && (\n\t\t\t<meta content={twitter.imageAlt} name=\"twitter:image:alt\" />\n\t\t)}\n\t\t{twitter.site && <meta content={twitter.site} name=\"twitter:site\" />}\n\t\t{twitter.creator && (\n\t\t\t<meta content={twitter.creator} name=\"twitter:creator\" />\n\t\t)}\n\t</>\n);\n\nconst CustomMetaTag = ({ tag }: { tag: MetaTag }) => {\n\tif (tag.property)\n\t\treturn <meta content={tag.content} property={tag.property} />;\n\n\tif (tag.httpEquiv)\n\t\treturn <meta content={tag.content} httpEquiv={tag.httpEquiv} />;\n\n\treturn <meta content={tag.content} name={tag.name} />;\n};\n\nexport const Head = ({\n\ttitle = 'AbsoluteJS',\n\tdescription = 'A page created using AbsoluteJS',\n\ticon = '/assets/ico/favicon.ico',\n\tfont,\n\tcssPath,\n\tcanonical,\n\topenGraph,\n\ttwitter,\n\trobots,\n\tmeta\n}: Metadata = {}) => (\n\t<head suppressHydrationWarning>\n\t\t<meta charSet=\"utf-8\" />\n\t\t<title>{title}</title>\n\t\t<meta content={description} name=\"description\" />\n\t\t<meta content=\"width=device-width, initial-scale=1\" name=\"viewport\" />\n\t\t<link href={icon} rel=\"icon\" />\n\t\t{canonical && <link href={canonical} rel=\"canonical\" />}\n\t\t{openGraph && (\n\t\t\t<OpenGraphTags\n\t\t\t\tdescription={description}\n\t\t\t\topenGraph={openGraph}\n\t\t\t\ttitle={title}\n\t\t\t/>\n\t\t)}\n\t\t{twitter && (\n\t\t\t<TwitterTags\n\t\t\t\tdescription={description}\n\t\t\t\ttitle={title}\n\t\t\t\ttwitter={twitter}\n\t\t\t/>\n\t\t)}\n\t\t{robots && <RobotsContent robots={robots} />}\n\t\t{meta?.map((tag, i) => <CustomMetaTag key={i} tag={tag} />)}\n\t\t{font && (\n\t\t\t<>\n\t\t\t\t<link href=\"https://fonts.googleapis.com\" rel=\"preconnect\" />\n\t\t\t\t<link\n\t\t\t\t\tcrossOrigin=\"anonymous\"\n\t\t\t\t\thref=\"https://fonts.gstatic.com\"\n\t\t\t\t\trel=\"preconnect\"\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t/>\n\t\t\t\t<link\n\t\t\t\t\thref={`https://fonts.googleapis.com/css2?family=${font}:wght@100..900&display=swap`}\n\t\t\t\t\trel=\"stylesheet\"\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t/>\n\t\t\t</>\n\t\t)}\n\t\t{cssPath &&\n\t\t\t[cssPath]\n\t\t\t\t.flat()\n\t\t\t\t.map((path) => (\n\t\t\t\t\t<link\n\t\t\t\t\t\thref={path}\n\t\t\t\t\t\tkey={path}\n\t\t\t\t\t\trel=\"stylesheet\"\n\t\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\t\ttype=\"text/css\"\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t</head>\n);\n",
|
|
6
7
|
"/**\n * Client-safe image utilities — no node:fs, no Sharp, no Bun APIs.\n * These can be imported in both server and client (browser) contexts.\n */\n\nexport type { ImageProps } from '../../types/image';\n\n/* eslint-disable no-magic-numbers */\nexport const DEFAULT_DEVICE_SIZES = [\n\t640, 750, 828, 1080, 1200, 1920, 2048, 3840\n];\n\nexport const DEFAULT_IMAGE_SIZES = [16, 32, 48, 64, 96, 128, 256, 384];\n\nexport const DEFAULT_QUALITY = 75;\n/* eslint-enable no-magic-numbers */\n\nexport const OPTIMIZATION_ENDPOINT = '/_absolute/image';\n\nexport const buildOptimizedUrl = (\n\tsrc: string,\n\twidth: number,\n\tquality: number,\n\tbasePath = OPTIMIZATION_ENDPOINT\n) => `${basePath}?url=${encodeURIComponent(src)}&w=${width}&q=${quality}`;\n\nexport const getAllSizes = (deviceSizes?: number[], imageSizes?: number[]) => {\n\tconst device = deviceSizes ?? DEFAULT_DEVICE_SIZES;\n\n\tconst image = imageSizes ?? DEFAULT_IMAGE_SIZES;\n\n\treturn [...device, ...image].sort((left, right) => left - right);\n};\n\n/** Snap a target width UP to the nearest configured size */\nconst snapToSize = (target: number, sizes: number[]) => {\n\tfor (const size of sizes) {\n\t\tif (size >= target) return size;\n\t}\n\n\treturn sizes[sizes.length - 1] ?? target;\n};\n\nexport const generateBlurSvg = (base64Thumbnail: string) => {\n\tconst svg = `<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 320\"><filter id=\"b\" color-interpolation-filters=\"sRGB\"><feGaussianBlur stdDeviation=\"20\"/><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>`;\n\n\tconst encoded = encodeURIComponent(svg);\n\n\treturn `url(\"data:image/svg+xml,${encoded}\")`;\n};\nexport const generateSrcSet = (\n\tsrc: string,\n\twidth: number | undefined,\n\tsizes: string | undefined,\n\tdeviceSizes?: number[],\n\timageSizes?: number[]\n) => {\n\tconst quality = DEFAULT_QUALITY;\n\n\tif (sizes) {\n\t\tconst allSizes = getAllSizes(deviceSizes, imageSizes);\n\n\t\treturn allSizes\n\t\t\t.map(\n\t\t\t\t(sizeWidth) =>\n\t\t\t\t\t`${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`\n\t\t\t)\n\t\t\t.join(', ');\n\t}\n\n\tif (width) {\n\t\tconst allSizes = getAllSizes(deviceSizes, imageSizes);\n\n\t\tconst w1x = snapToSize(width, allSizes);\n\n\t\tconst w2x = snapToSize(width * 2, allSizes);\n\n\t\treturn `${buildOptimizedUrl(src, w1x, quality)} 1x, ${buildOptimizedUrl(src, w2x, quality)} 2x`;\n\t}\n\n\tconst devSizes = deviceSizes ?? DEFAULT_DEVICE_SIZES;\n\n\treturn devSizes\n\t\t.map(\n\t\t\t(sizeWidth) =>\n\t\t\t\t`${buildOptimizedUrl(src, sizeWidth, quality)} ${sizeWidth}w`\n\t\t)\n\t\t.join(', ');\n};\n",
|
|
7
8
|
"import type { ImageProps } from '../../../types/image';\nimport {\n\tDEFAULT_QUALITY,\n\tbuildOptimizedUrl,\n\tgenerateBlurSvg,\n\tgenerateSrcSet\n} from '../../utils/imageClient';\n\nconst resolveSource = (\n\tsrc: string,\n\toverrideSrc: ImageProps['overrideSrc'],\n\tunoptimized: ImageProps['unoptimized'],\n\tloader: ImageProps['loader'],\n\twidth: ImageProps['width'],\n\tquality: number\n) => {\n\tif (overrideSrc) return overrideSrc;\n\tif (unoptimized) return src;\n\tif (loader) return loader({ quality, src, width: width ?? 0 });\n\tif (!width) return buildOptimizedUrl(src, 0, quality);\n\n\treturn buildOptimizedUrl(src, width, quality);\n};\n\nconst resolveBlurBackground = (\n\thasBlur: boolean,\n\tplaceholder: ImageProps['placeholder'],\n\tblurDataURL: ImageProps['blurDataURL']\n) => {\n\tif (!hasBlur) return undefined;\n\n\tif (\n\t\ttypeof placeholder === 'string' &&\n\t\tplaceholder !== 'blur' &&\n\t\tplaceholder.startsWith('data:')\n\t) {\n\t\treturn generateBlurSvg(placeholder);\n\t}\n\n\tif (blurDataURL) return generateBlurSvg(blurDataURL);\n\n\treturn undefined;\n};\n\nexport const Image = ({\n\talt,\n\tblurDataURL,\n\tclassName,\n\tcrossOrigin,\n\tfetchPriority,\n\tfill,\n\theight,\n\tloader,\n\tloading,\n\tonError,\n\tonLoad,\n\toverrideSrc,\n\tplaceholder,\n\tpriority,\n\tquality = DEFAULT_QUALITY,\n\treferrerPolicy,\n\tsizes,\n\tsrc,\n\tstyle,\n\tunoptimized,\n\twidth\n}: ImageProps) => {\n\t// ── Resolve src ─────────────────────────────────────────────\n\tconst resolvedSrc = resolveSource(\n\t\tsrc,\n\t\toverrideSrc,\n\t\tunoptimized,\n\t\tloader,\n\t\twidth,\n\t\tquality\n\t);\n\n\t// ── srcSet ──────────────────────────────────────────────────\n\tconst srcSet = unoptimized\n\t\t? undefined\n\t\t: generateSrcSet(src, width, sizes);\n\n\t// ── Sizes ───────────────────────────────────────────────────\n\tconst resolvedSizes = sizes ?? (fill ? '100vw' : undefined);\n\n\t// ── Loading behavior ────────────────────────────────────────\n\tconst resolvedLoading = priority ? 'eager' : (loading ?? 'lazy');\n\tconst resolvedFetchPriority = priority ? 'high' : fetchPriority;\n\n\t// ── Blur placeholder ────────────────────────────────────────\n\tconst hasBlur =\n\t\tplaceholder === 'blur' ||\n\t\t(typeof placeholder === 'string' &&\n\t\t\tplaceholder !== 'empty' &&\n\t\t\tplaceholder.startsWith('data:'));\n\n\tconst blurBackground = resolveBlurBackground(\n\t\thasBlur,\n\t\tplaceholder,\n\t\tblurDataURL\n\t);\n\n\t// ── Styles ──────────────────────────────────────────────────\n\tconst imgStyle: Record<string, string | number> = {\n\t\t...(style ?? {}),\n\t\t...(blurBackground\n\t\t\t? {\n\t\t\t\t\tbackgroundImage: blurBackground,\n\t\t\t\t\tbackgroundPosition: 'center',\n\t\t\t\t\tbackgroundRepeat: 'no-repeat',\n\t\t\t\t\tbackgroundSize: 'cover'\n\t\t\t\t}\n\t\t\t: {}),\n\t\t...(fill\n\t\t\t? {\n\t\t\t\t\tcolor: 'transparent',\n\t\t\t\t\theight: '100%',\n\t\t\t\t\tinset: 0,\n\t\t\t\t\tobjectFit: 'cover',\n\t\t\t\t\tposition: 'absolute',\n\t\t\t\t\twidth: '100%'\n\t\t\t\t}\n\t\t\t: { color: 'transparent' })\n\t};\n\n\t// ── Preload link for priority images ────────────────────────\n\tconst preloadLink = priority ? (\n\t\t<link\n\t\t\tas=\"image\"\n\t\t\tcrossOrigin={crossOrigin}\n\t\t\thref={resolvedSrc}\n\t\t\timageSizes={resolvedSizes}\n\t\t\timageSrcSet={srcSet}\n\t\t\trel=\"preload\"\n\t\t/>\n\t) : null;\n\n\t// ── Fill mode wrapper ───────────────────────────────────────\n\tconst imgElement = (\n\t\t<img\n\t\t\talt={alt}\n\t\t\tclassName={className}\n\t\t\tcrossOrigin={crossOrigin}\n\t\t\tdecoding=\"async\"\n\t\t\tfetchPriority={resolvedFetchPriority}\n\t\t\theight={fill ? undefined : height}\n\t\t\tloading={resolvedLoading}\n\t\t\tonError={\n\t\t\t\tonError ? (event) => onError(event.nativeEvent) : undefined\n\t\t\t}\n\t\t\tonLoad={(event) => {\n\t\t\t\tconst { target } = event;\n\n\t\t\t\tif (blurBackground && target instanceof HTMLImageElement) {\n\t\t\t\t\ttarget.style.backgroundImage = 'none';\n\t\t\t\t}\n\n\t\t\t\tif (onLoad) onLoad(event.nativeEvent);\n\t\t\t}}\n\t\t\treferrerPolicy={referrerPolicy}\n\t\t\tsizes={resolvedSizes}\n\t\t\tsrc={resolvedSrc}\n\t\t\tsrcSet={srcSet}\n\t\t\tstyle={imgStyle}\n\t\t\twidth={fill ? undefined : width}\n\t\t/>\n\t);\n\n\tif (fill) {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t{preloadLink}\n\t\t\t\t<span\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\tdisplay: 'block',\n\t\t\t\t\t\theight: '100%',\n\t\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\t\tposition: 'relative',\n\t\t\t\t\t\twidth: '100%'\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t{imgElement}\n\t\t\t\t</span>\n\t\t\t</>\n\t\t);\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{preloadLink}\n\t\t\t{imgElement}\n\t\t</>\n\t);\n};\n",
|
|
8
9
|
"import type { JsonLdSchema, WithContext } from '../../../types/jsonLd';\n\nexport const JsonLd = ({\n\tschema\n}: {\n\tschema: JsonLdSchema | JsonLdSchema[];\n}) => {\n\tconst schemaOrgContext = 'https://schema.org';\n\tconst data: WithContext<JsonLdSchema> | WithContext<JsonLdSchema>[] =\n\t\tArray.isArray(schema)\n\t\t\t? schema.map((s) => ({\n\t\t\t\t\t'@context': schemaOrgContext,\n\t\t\t\t\t...s\n\t\t\t\t}))\n\t\t\t: { '@context': schemaOrgContext, ...schema };\n\n\treturn (\n\t\t<script\n\t\t\tdangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}\n\t\t\ttype=\"application/ld+json\"\n\t\t/>\n\t);\n};\n",
|
|
9
|
-
"import type { StreamingSlot } from '../utils/streamingSlots';\n\ntype StreamingSlotRegistrar = (slot: StreamingSlot) => void;\n\nconst STREAMING_SLOT_REGISTRAR_KEY = Symbol.for(\n\t'absolutejs.streamingSlotRegistrar'\n);\ntype StreamingSlotRegistrarGlobal = typeof globalThis & {\n\t[STREAMING_SLOT_REGISTRAR_KEY]?: StreamingSlotRegistrar | null;\n};\n\nconst getRegistrarGlobal = () => globalThis as StreamingSlotRegistrarGlobal;\n\nexport const setStreamingSlotRegistrar = (\n\tnextRegistrar: StreamingSlotRegistrar | null\n) => {\n\tgetRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;\n};\n\nexport const registerStreamingSlot = (slot: StreamingSlot) => {\n\tgetRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);\n};\n",
|
|
10
10
|
"import type { ReactNode } from 'react';\nimport { registerStreamingSlot } from '../../core/streamingSlotRegistrar';\n\ntype LegacySuspenseSlotProps = {\n\tclassName?: string;\n\terrorHtml?: string;\n\tfallbackHtml?: string;\n\tid: string;\n\tresolve: () => Promise<string> | string;\n\ttimeoutMs?: number;\n};\n\ntype FrameworkSuspenseSlotProps<T = unknown> = {\n\tchildren?: ReactNode | ((value: T) => ReactNode);\n\tclassName?: string;\n\terrorFallback?: ReactNode | ((error: unknown) => ReactNode);\n\tid: string;\n\tpromise?: Promise<T>;\n\tresolve?: () => Promise<T | ReactNode> | T | ReactNode;\n\tfallback?: ReactNode;\n\ttimeoutMs?: number;\n};\n\ntype SuspenseSlotProps<T = unknown> =\n\t| LegacySuspenseSlotProps\n\t| FrameworkSuspenseSlotProps<T>;\n\nconst isLegacyProps = <T,>(\n\tprops: SuspenseSlotProps<T>\n): props is LegacySuspenseSlotProps =>\n\t'fallbackHtml' in props || 'errorHtml' in props;\n\nconst renderReactNodeToHtml = async (node: ReactNode) => {\n\tconst { Fragment } = await import('react');\n\tconst { renderToStaticMarkup } = await import('react-dom/server');\n\n\treturn renderToStaticMarkup(<Fragment>{node}</Fragment>);\n};\n\nexport const SuspenseSlot = <T,>(props: SuspenseSlotProps<T>) => {\n\tif (typeof window === 'undefined') {\n\t\tif (isLegacyProps(props)) {\n\t\t\tregisterStreamingSlot({\n\t\t\t\terrorHtml: props.errorHtml,\n\t\t\t\tfallbackHtml: props.fallbackHtml,\n\t\t\t\tid: props.id,\n\t\t\t\tresolve: props.resolve,\n\t\t\t\ttimeoutMs: props.timeoutMs\n\t\t\t});\n\t\t} else {\n\t\t\tregisterStreamingSlot({\n\t\t\t\tid: props.id,\n\t\t\t\tresolve: async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst resolvedValue =\n\t\t\t\t\t\t\tprops.resolve !== undefined\n\t\t\t\t\t\t\t\t? await props.resolve()\n\t\t\t\t\t\t\t\t: props.promise !== undefined\n\t\t\t\t\t\t\t\t\t? await props.promise\n\t\t\t\t\t\t\t\t\t: undefined;\n\t\t\t\t\t\tconst content =\n\t\t\t\t\t\t\ttypeof props.children === 'function'\n\t\t\t\t\t\t\t\t? props.children(resolvedValue as T)\n\t\t\t\t\t\t\t\t: props.children ?? (resolvedValue as ReactNode);\n\n\t\t\t\t\t\treturn renderReactNodeToHtml(content ?? null);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tif (typeof props.errorFallback === 'function') {\n\t\t\t\t\t\t\treturn renderReactNodeToHtml(\n\t\t\t\t\t\t\t\tprops.errorFallback(error)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (props.errorFallback !== undefined) {\n\t\t\t\t\t\t\treturn renderReactNodeToHtml(props.errorFallback);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthrow error;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\ttimeoutMs: props.timeoutMs\n\t\t\t});\n\t\t}\n\t}\n\n\tif (isLegacyProps(props)) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={props.className}\n\t\t\t\tdangerouslySetInnerHTML={{ __html: props.fallbackHtml ?? '' }}\n\t\t\t\tdata-absolute-slot=\"true\"\n\t\t\t\tid={`slot-${props.id}`}\n\t\t\t\tsuppressHydrationWarning\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={props.className}\n\t\t\tdata-absolute-slot=\"true\"\n\t\t\tid={`slot-${props.id}`}\n\t\t\tsuppressHydrationWarning\n\t\t>\n\t\t\t{props.fallback ?? null}\n\t\t</div>\n\t);\n};\n",
|
|
11
11
|
"import { registerStreamingSlot } from '../../core/streamingSlotRegistrar';\n\ntype StreamSlotProps = {\n\tclassName?: string;\n\terrorHtml?: string;\n\tfallbackHtml?: string;\n\tid: string;\n\tresolve: () => Promise<string> | string;\n\ttimeoutMs?: number;\n};\n\nexport const StreamSlot = ({\n\tclassName,\n\terrorHtml,\n\tfallbackHtml = '',\n\tid,\n\tresolve,\n\ttimeoutMs\n}: StreamSlotProps) => {\n\tif (typeof window === 'undefined') {\n\t\tregisterStreamingSlot({\n\t\t\terrorHtml,\n\t\t\tfallbackHtml,\n\t\t\tid,\n\t\t\tresolve,\n\t\t\ttimeoutMs\n\t\t});\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={className}\n\t\t\tdangerouslySetInnerHTML={{ __html: fallbackHtml }}\n\t\t\tdata-absolute-slot=\"true\"\n\t\t\tid={`slot-${id}`}\n\t\t\tsuppressHydrationWarning\n\t\t/>\n\t);\n};\n"
|
|
12
12
|
],
|
|
13
|
-
"mappings": "
|
|
14
|
-
"debugId": "
|
|
13
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAM,+BAA+B,OAAO,IAC3C,mCACD;AAKA,IAAM,qBAAqB,MAAM;AAE1B,IAAM,4BAA4B,CACxC,kBACI;AAAA,EACJ,mBAAmB,EAAE,gCAAgC;AAAA;AAG/C,IAAM,wBAAwB,CAAC,SAAwB;AAAA,EAC7D,mBAAmB,EAAE,gCAAgC,IAAI;AAAA;;;;ACZ1D,IAAM,gBAAgB,GAAG,aAA0C;AAAA,EAClE,MAAM,aAAuB,CAAC;AAAA,EAC9B,IAAI,OAAO,UAAU;AAAA,IAAO,WAAW,KAAK,SAAS;AAAA,EACrD,IAAI,OAAO,UAAU;AAAA,IAAM,WAAW,KAAK,OAAO;AAAA,EAClD,IAAI,OAAO,WAAW;AAAA,I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164756E21",
|
|
15
15
|
"names": []
|
|
16
16
|
}
|
package/dist/react/index.js
CHANGED
|
@@ -1637,6 +1637,61 @@ var init_renderIslandMarkup = __esm(() => {
|
|
|
1637
1637
|
resolvedServerBuildComponentCache = new Map;
|
|
1638
1638
|
});
|
|
1639
1639
|
|
|
1640
|
+
// src/core/streamingSlotRegistrar.ts
|
|
1641
|
+
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
1642
|
+
var getRegistrarGlobal = () => globalThis;
|
|
1643
|
+
var setStreamingSlotRegistrar = (nextRegistrar) => {
|
|
1644
|
+
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
|
|
1645
|
+
};
|
|
1646
|
+
var registerStreamingSlot = (slot) => {
|
|
1647
|
+
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
|
|
1648
|
+
};
|
|
1649
|
+
|
|
1650
|
+
// src/core/streamingSlotRegistry.ts
|
|
1651
|
+
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
1652
|
+
var getStorageGlobal = () => globalThis;
|
|
1653
|
+
var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
|
|
1654
|
+
var ensureAsyncLocalStorage = async () => {
|
|
1655
|
+
const storageGlobal = getStorageGlobal();
|
|
1656
|
+
if (typeof storageGlobal[STREAMING_SLOT_STORAGE_KEY] !== "undefined") {
|
|
1657
|
+
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
1658
|
+
}
|
|
1659
|
+
if (!isServerRuntime()) {
|
|
1660
|
+
storageGlobal[STREAMING_SLOT_STORAGE_KEY] = null;
|
|
1661
|
+
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
1662
|
+
}
|
|
1663
|
+
const mod = await import("async_hooks");
|
|
1664
|
+
storageGlobal[STREAMING_SLOT_STORAGE_KEY] = new mod.AsyncLocalStorage;
|
|
1665
|
+
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
1666
|
+
};
|
|
1667
|
+
var registerStreamingSlot2 = (slot) => {
|
|
1668
|
+
const storage = getStorageGlobal()[STREAMING_SLOT_STORAGE_KEY];
|
|
1669
|
+
if (!storage)
|
|
1670
|
+
return;
|
|
1671
|
+
const store = storage.getStore();
|
|
1672
|
+
if (!store)
|
|
1673
|
+
return;
|
|
1674
|
+
store.set(slot.id, slot);
|
|
1675
|
+
};
|
|
1676
|
+
setStreamingSlotRegistrar(registerStreamingSlot2);
|
|
1677
|
+
var runWithStreamingSlotRegistry = async (task) => {
|
|
1678
|
+
const storage = await ensureAsyncLocalStorage();
|
|
1679
|
+
if (!storage) {
|
|
1680
|
+
return {
|
|
1681
|
+
result: await task(),
|
|
1682
|
+
slots: []
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1685
|
+
return storage.run(new Map, async () => {
|
|
1686
|
+
const result = await task();
|
|
1687
|
+
const store = storage.getStore();
|
|
1688
|
+
return {
|
|
1689
|
+
result,
|
|
1690
|
+
slots: store ? [...store.values()] : []
|
|
1691
|
+
};
|
|
1692
|
+
});
|
|
1693
|
+
};
|
|
1694
|
+
|
|
1640
1695
|
// src/client/streamSwap.ts
|
|
1641
1696
|
var streamSwapRuntime = () => {
|
|
1642
1697
|
if (window.__ABS_SLOT_RUNTIME__ === true)
|
|
@@ -2126,61 +2181,6 @@ var appendStreamingSlotPatchesToStream = (stream, slots = [], {
|
|
|
2126
2181
|
});
|
|
2127
2182
|
};
|
|
2128
2183
|
|
|
2129
|
-
// src/core/streamingSlotRegistrar.ts
|
|
2130
|
-
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
2131
|
-
var getRegistrarGlobal = () => globalThis;
|
|
2132
|
-
var setStreamingSlotRegistrar = (nextRegistrar) => {
|
|
2133
|
-
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY] = nextRegistrar;
|
|
2134
|
-
};
|
|
2135
|
-
var registerStreamingSlot = (slot) => {
|
|
2136
|
-
getRegistrarGlobal()[STREAMING_SLOT_REGISTRAR_KEY]?.(slot);
|
|
2137
|
-
};
|
|
2138
|
-
|
|
2139
|
-
// src/core/streamingSlotRegistry.ts
|
|
2140
|
-
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
2141
|
-
var getStorageGlobal = () => globalThis;
|
|
2142
|
-
var isServerRuntime = () => typeof process !== "undefined" && typeof process.versions?.node === "string";
|
|
2143
|
-
var ensureAsyncLocalStorage = async () => {
|
|
2144
|
-
const storageGlobal = getStorageGlobal();
|
|
2145
|
-
if (typeof storageGlobal[STREAMING_SLOT_STORAGE_KEY] !== "undefined") {
|
|
2146
|
-
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
2147
|
-
}
|
|
2148
|
-
if (!isServerRuntime()) {
|
|
2149
|
-
storageGlobal[STREAMING_SLOT_STORAGE_KEY] = null;
|
|
2150
|
-
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
2151
|
-
}
|
|
2152
|
-
const mod = await import("async_hooks");
|
|
2153
|
-
storageGlobal[STREAMING_SLOT_STORAGE_KEY] = new mod.AsyncLocalStorage;
|
|
2154
|
-
return storageGlobal[STREAMING_SLOT_STORAGE_KEY];
|
|
2155
|
-
};
|
|
2156
|
-
var registerStreamingSlot2 = (slot) => {
|
|
2157
|
-
const storage = getStorageGlobal()[STREAMING_SLOT_STORAGE_KEY];
|
|
2158
|
-
if (!storage)
|
|
2159
|
-
return;
|
|
2160
|
-
const store = storage.getStore();
|
|
2161
|
-
if (!store)
|
|
2162
|
-
return;
|
|
2163
|
-
store.set(slot.id, slot);
|
|
2164
|
-
};
|
|
2165
|
-
setStreamingSlotRegistrar(registerStreamingSlot2);
|
|
2166
|
-
var runWithStreamingSlotRegistry = async (task) => {
|
|
2167
|
-
const storage = await ensureAsyncLocalStorage();
|
|
2168
|
-
if (!storage) {
|
|
2169
|
-
return {
|
|
2170
|
-
result: await task(),
|
|
2171
|
-
slots: []
|
|
2172
|
-
};
|
|
2173
|
-
}
|
|
2174
|
-
return storage.run(new Map, async () => {
|
|
2175
|
-
const result = await task();
|
|
2176
|
-
const store = storage.getStore();
|
|
2177
|
-
return {
|
|
2178
|
-
result,
|
|
2179
|
-
slots: store ? [...store.values()] : []
|
|
2180
|
-
};
|
|
2181
|
-
});
|
|
2182
|
-
};
|
|
2183
|
-
|
|
2184
2184
|
// src/core/responseEnhancers.ts
|
|
2185
2185
|
var toResponse = async (responseLike) => await responseLike;
|
|
2186
2186
|
var cloneHeaders = (response) => {
|
|
@@ -2393,5 +2393,5 @@ export {
|
|
|
2393
2393
|
Island
|
|
2394
2394
|
};
|
|
2395
2395
|
|
|
2396
|
-
//# debugId=
|
|
2396
|
+
//# debugId=1969C58FD206483164756E2164756E21
|
|
2397
2397
|
//# sourceMappingURL=index.js.map
|