@absolutejs/absolute 0.19.0-beta.807 → 0.19.0-beta.809
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 +9801 -57
- package/dist/angular/browser.js.map +246 -4
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +14877 -60
- package/dist/angular/index.js.map +281 -4
- package/dist/angular/server.js +5610 -45
- package/dist/angular/server.js.map +51 -3
- package/dist/build.js +18092 -45
- package/dist/build.js.map +99 -3
- package/dist/cli/index.js +317 -86
- package/dist/client/index.js +1091 -70
- package/dist/client/index.js.map +24 -4
- package/dist/core/streamingSlotRegistrar.js +108 -11
- package/dist/core/streamingSlotRegistrar.js.map +4 -3
- package/dist/core/streamingSlotRegistry.js +169 -7
- package/dist/core/streamingSlotRegistry.js.map +5 -3
- package/dist/index.js +19957 -547
- package/dist/index.js.map +116 -3
- package/dist/islands/browser.js +228 -9
- package/dist/islands/browser.js.map +9 -4
- package/dist/islands/index.js +1908 -17
- package/dist/islands/index.js.map +27 -3
- package/dist/react/browser.js +328 -12
- package/dist/react/browser.js.map +12 -4
- package/dist/react/components/index.js +167 -16
- package/dist/react/components/index.js.map +6 -3
- package/dist/react/hooks/index.js +183 -8
- package/dist/react/hooks/index.js.map +7 -3
- package/dist/react/index.js +3627 -36
- package/dist/react/index.js.map +45 -4
- package/dist/react/jsxDevRuntimeCompat.js +61 -2
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/server.js +1789 -18
- package/dist/react/server.js.map +21 -3
- package/dist/src/angular/injectorPatch.d.ts +1 -0
- package/dist/src/angular/islands.d.ts +1 -0
- package/dist/src/client/hydrators/react.d.ts +3 -0
- package/dist/src/client/hydrators/svelte.d.ts +2 -0
- package/dist/src/client/hydrators/vue.d.ts +2 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/svelte/browser.js +247 -12
- package/dist/svelte/browser.js.map +10 -3
- package/dist/svelte/index.js +3732 -37
- package/dist/svelte/index.js.map +47 -4
- package/dist/svelte/server.js +2794 -21
- package/dist/svelte/server.js.map +27 -3
- package/dist/vue/browser.js +348 -12
- package/dist/vue/browser.js.map +12 -4
- package/dist/vue/components/Image.js +240 -7
- package/dist/vue/components/Image.js.map +6 -3
- package/dist/vue/components/index.js +544 -11
- package/dist/vue/components/index.js.map +9 -3
- package/dist/vue/index.js +4212 -52
- package/dist/vue/index.js.map +50 -4
- package/dist/vue/server.js +1849 -18
- package/dist/vue/server.js.map +21 -3
- package/package.json +1 -1
- package/dist/chunk-0867j0r0.js +0 -136
- package/dist/chunk-0867j0r0.js.map +0 -10
- package/dist/chunk-102fp7xe.js +0 -63
- package/dist/chunk-102fp7xe.js.map +0 -10
- package/dist/chunk-11zpfqz6.js +0 -19
- package/dist/chunk-11zpfqz6.js.map +0 -10
- package/dist/chunk-1rfh7hw9.js +0 -319
- package/dist/chunk-1rfh7hw9.js.map +0 -11
- package/dist/chunk-1x4fxm57.js +0 -51
- package/dist/chunk-1x4fxm57.js.map +0 -9
- package/dist/chunk-25v9t56f.js +0 -29
- package/dist/chunk-25v9t56f.js.map +0 -11
- package/dist/chunk-2f21eenc.js +0 -21
- package/dist/chunk-2f21eenc.js.map +0 -10
- package/dist/chunk-2ga2znex.js +0 -13
- package/dist/chunk-2ga2znex.js.map +0 -9
- package/dist/chunk-30yrw0f6.js +0 -33
- package/dist/chunk-30yrw0f6.js.map +0 -10
- package/dist/chunk-3g91wb4f.js +0 -358
- package/dist/chunk-3g91wb4f.js.map +0 -10
- package/dist/chunk-3rea1gam.js +0 -4403
- package/dist/chunk-3rea1gam.js.map +0 -28
- package/dist/chunk-3yjzpcne.js +0 -34
- package/dist/chunk-3yjzpcne.js.map +0 -10
- package/dist/chunk-41bf6aqt.js +0 -17
- package/dist/chunk-41bf6aqt.js.map +0 -9
- package/dist/chunk-4d39r92n.js +0 -81
- package/dist/chunk-4d39r92n.js.map +0 -10
- package/dist/chunk-5003emhv.js +0 -17
- package/dist/chunk-5003emhv.js.map +0 -10
- package/dist/chunk-5f67rsed.js +0 -466
- package/dist/chunk-5f67rsed.js.map +0 -10
- package/dist/chunk-5fhp1jap.js +0 -9169
- package/dist/chunk-5fhp1jap.js.map +0 -236
- package/dist/chunk-629x0yh4.js +0 -20
- package/dist/chunk-629x0yh4.js.map +0 -9
- package/dist/chunk-6pdj08z3.js +0 -73
- package/dist/chunk-6pdj08z3.js.map +0 -12
- package/dist/chunk-6qjbrt0k.js +0 -13
- package/dist/chunk-6qjbrt0k.js.map +0 -9
- package/dist/chunk-6sccb4jr.js +0 -14
- package/dist/chunk-6sccb4jr.js.map +0 -9
- package/dist/chunk-798spvzv.js +0 -50
- package/dist/chunk-798spvzv.js.map +0 -10
- package/dist/chunk-7fw6x3js.js +0 -131
- package/dist/chunk-7fw6x3js.js.map +0 -11
- package/dist/chunk-7kjj42xm.js +0 -11
- package/dist/chunk-7kjj42xm.js.map +0 -10
- package/dist/chunk-7mtstdqn.js +0 -90
- package/dist/chunk-7mtstdqn.js.map +0 -10
- package/dist/chunk-851whwc7.js +0 -17
- package/dist/chunk-851whwc7.js.map +0 -10
- package/dist/chunk-85n68sy6.js +0 -103
- package/dist/chunk-85n68sy6.js.map +0 -10
- package/dist/chunk-8kcfffry.js +0 -35
- package/dist/chunk-8kcfffry.js.map +0 -10
- package/dist/chunk-92fsjfpp.js +0 -1731
- package/dist/chunk-92fsjfpp.js.map +0 -11
- package/dist/chunk-93sqk7be.js +0 -139
- package/dist/chunk-93sqk7be.js.map +0 -12
- package/dist/chunk-9c5tj4k3.js +0 -130
- package/dist/chunk-9c5tj4k3.js.map +0 -10
- package/dist/chunk-9j59emg3.js +0 -184
- package/dist/chunk-9j59emg3.js.map +0 -11
- package/dist/chunk-9ve9jq72.js +0 -203
- package/dist/chunk-9ve9jq72.js.map +0 -10
- package/dist/chunk-9xrsjeem.js +0 -12
- package/dist/chunk-9xrsjeem.js.map +0 -9
- package/dist/chunk-a9mvyp04.js +0 -87
- package/dist/chunk-a9mvyp04.js.map +0 -10
- package/dist/chunk-b3gbnrwe.js +0 -21
- package/dist/chunk-b3gbnrwe.js.map +0 -10
- package/dist/chunk-bgb8k1qs.js +0 -672
- package/dist/chunk-bgb8k1qs.js.map +0 -15
- package/dist/chunk-bmgqm774.js +0 -65
- package/dist/chunk-bmgqm774.js.map +0 -9
- package/dist/chunk-bxfghpma.js +0 -69
- package/dist/chunk-bxfghpma.js.map +0 -10
- package/dist/chunk-c1jfjnka.js +0 -74
- package/dist/chunk-c1jfjnka.js.map +0 -10
- package/dist/chunk-cbkrwmvh.js +0 -80
- package/dist/chunk-cbkrwmvh.js.map +0 -10
- package/dist/chunk-cdxd7sy2.js +0 -71
- package/dist/chunk-cdxd7sy2.js.map +0 -10
- package/dist/chunk-cg95827x.js +0 -21
- package/dist/chunk-cg95827x.js.map +0 -10
- package/dist/chunk-cm0g4q6w.js +0 -149
- package/dist/chunk-cm0g4q6w.js.map +0 -10
- package/dist/chunk-d7mwkzry.js +0 -261
- package/dist/chunk-d7mwkzry.js.map +0 -10
- package/dist/chunk-d9c0am65.js +0 -12
- package/dist/chunk-d9c0am65.js.map +0 -10
- package/dist/chunk-daqghmg8.js +0 -12
- package/dist/chunk-daqghmg8.js.map +0 -9
- package/dist/chunk-e3r9fxaa.js +0 -149
- package/dist/chunk-e3r9fxaa.js.map +0 -10
- package/dist/chunk-e8eecyrq.js +0 -244
- package/dist/chunk-e8eecyrq.js.map +0 -10
- package/dist/chunk-ex2hxe0v.js +0 -160
- package/dist/chunk-ex2hxe0v.js.map +0 -11
- package/dist/chunk-fak944et.js +0 -91
- package/dist/chunk-fak944et.js.map +0 -10
- package/dist/chunk-fygx2ymm.js +0 -118
- package/dist/chunk-fygx2ymm.js.map +0 -12
- package/dist/chunk-g15qj669.js +0 -271
- package/dist/chunk-g15qj669.js.map +0 -11
- package/dist/chunk-gd6wmknh.js +0 -121
- package/dist/chunk-gd6wmknh.js.map +0 -11
- package/dist/chunk-gf0ygptk.js +0 -85
- package/dist/chunk-gf0ygptk.js.map +0 -11
- package/dist/chunk-gytkmthr.js +0 -220
- package/dist/chunk-gytkmthr.js.map +0 -10
- package/dist/chunk-h5bbfn3n.js +0 -28
- package/dist/chunk-h5bbfn3n.js.map +0 -11
- package/dist/chunk-h6mye9r3.js +0 -93
- package/dist/chunk-h6mye9r3.js.map +0 -10
- package/dist/chunk-hcsmxw1v.js +0 -85
- package/dist/chunk-hcsmxw1v.js.map +0 -10
- package/dist/chunk-hyjs4bqs.js +0 -8
- package/dist/chunk-hyjs4bqs.js.map +0 -10
- package/dist/chunk-jn91vzkh.js +0 -66
- package/dist/chunk-jn91vzkh.js.map +0 -10
- package/dist/chunk-jpkjdgsk.js +0 -167
- package/dist/chunk-jpkjdgsk.js.map +0 -11
- package/dist/chunk-jwxt8gnp.js +0 -13
- package/dist/chunk-jwxt8gnp.js.map +0 -9
- package/dist/chunk-kk8w9rh5.js +0 -195
- package/dist/chunk-kk8w9rh5.js.map +0 -10
- package/dist/chunk-kwgh8rmg.js +0 -426
- package/dist/chunk-kwgh8rmg.js.map +0 -14
- package/dist/chunk-m97ze5hz.js +0 -46
- package/dist/chunk-m97ze5hz.js.map +0 -10
- package/dist/chunk-mbazhahf.js +0 -60
- package/dist/chunk-mbazhahf.js.map +0 -10
- package/dist/chunk-mgfwq18r.js +0 -15
- package/dist/chunk-mgfwq18r.js.map +0 -9
- package/dist/chunk-mtgf69xn.js +0 -88
- package/dist/chunk-mtgf69xn.js.map +0 -10
- package/dist/chunk-mtxzyxpg.js +0 -102
- package/dist/chunk-mtxzyxpg.js.map +0 -10
- package/dist/chunk-nehhtthw.js +0 -225
- package/dist/chunk-nehhtthw.js.map +0 -10
- package/dist/chunk-p5504p14.js +0 -16
- package/dist/chunk-p5504p14.js.map +0 -10
- package/dist/chunk-p5zgj77m.js +0 -184
- package/dist/chunk-p5zgj77m.js.map +0 -10
- package/dist/chunk-pnscgw95.js +0 -90
- package/dist/chunk-pnscgw95.js.map +0 -10
- package/dist/chunk-pvpp4pvs.js +0 -17
- package/dist/chunk-pvpp4pvs.js.map +0 -10
- package/dist/chunk-qh75agse.js +0 -95
- package/dist/chunk-qh75agse.js.map +0 -10
- package/dist/chunk-qxq2zcty.js +0 -52
- package/dist/chunk-qxq2zcty.js.map +0 -10
- package/dist/chunk-r6e8pytx.js +0 -22
- package/dist/chunk-r6e8pytx.js.map +0 -9
- package/dist/chunk-r7jmgqnw.js +0 -114
- package/dist/chunk-r7jmgqnw.js.map +0 -10
- package/dist/chunk-s6defjk2.js +0 -116
- package/dist/chunk-s6defjk2.js.map +0 -10
- package/dist/chunk-sd39p726.js +0 -619
- package/dist/chunk-sd39p726.js.map +0 -10
- package/dist/chunk-swrnzs4c.js +0 -63
- package/dist/chunk-swrnzs4c.js.map +0 -10
- package/dist/chunk-tfe3sb44.js +0 -33
- package/dist/chunk-tfe3sb44.js.map +0 -10
- package/dist/chunk-tjr0kcev.js +0 -41
- package/dist/chunk-tjr0kcev.js.map +0 -9
- package/dist/chunk-tx9edm1x.js +0 -34
- package/dist/chunk-tx9edm1x.js.map +0 -10
- package/dist/chunk-txhm2vb5.js +0 -18
- package/dist/chunk-txhm2vb5.js.map +0 -9
- package/dist/chunk-v5vmsxmy.js +0 -526
- package/dist/chunk-v5vmsxmy.js.map +0 -12
- package/dist/chunk-vjhxm8n2.js +0 -29
- package/dist/chunk-vjhxm8n2.js.map +0 -9
- package/dist/chunk-vkrpm7kc.js +0 -247
- package/dist/chunk-vkrpm7kc.js.map +0 -12
- package/dist/chunk-w3m4m5we.js +0 -4925
- package/dist/chunk-w3m4m5we.js.map +0 -12
- package/dist/chunk-wrxtn9ve.js +0 -18
- package/dist/chunk-wrxtn9ve.js.map +0 -10
- package/dist/chunk-x09cskqd.js +0 -377
- package/dist/chunk-x09cskqd.js.map +0 -10
- package/dist/chunk-xnt8c6h2.js +0 -576
- package/dist/chunk-xnt8c6h2.js.map +0 -10
- package/dist/chunk-xw0tx842.js +0 -13
- package/dist/chunk-xw0tx842.js.map +0 -9
- package/dist/chunk-xx5b6b9m.js +0 -69
- package/dist/chunk-xx5b6b9m.js.map +0 -10
- package/dist/chunk-xz1kdswj.js +0 -21
- package/dist/chunk-xz1kdswj.js.map +0 -9
- package/dist/chunk-y84qnsd3.js +0 -32
- package/dist/chunk-y84qnsd3.js.map +0 -10
- package/dist/chunk-ywjn0rad.js +0 -14
- package/dist/chunk-ywjn0rad.js.map +0 -9
- package/dist/chunk-z9nvhm6r.js +0 -13
- package/dist/chunk-z9nvhm6r.js.map +0 -9
- package/dist/chunk-zhmvdpk6.js +0 -15
- package/dist/chunk-zhmvdpk6.js.map +0 -9
- package/dist/chunk-zrg9d4zw.js +0 -784
- package/dist/chunk-zrg9d4zw.js.map +0 -10
package/dist/chunk-9c5tj4k3.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
DEFAULT_QUALITY,
|
|
4
|
-
buildOptimizedUrl,
|
|
5
|
-
generateBlurSvg,
|
|
6
|
-
generateSrcSet
|
|
7
|
-
} from "./chunk-798spvzv.js";
|
|
8
|
-
|
|
9
|
-
// src/vue/components/Image.ts
|
|
10
|
-
import { computed, defineComponent, h, ref } from "vue";
|
|
11
|
-
var fillWrapperStyle = {
|
|
12
|
-
display: "block",
|
|
13
|
-
height: "100%",
|
|
14
|
-
overflow: "hidden",
|
|
15
|
-
position: "relative",
|
|
16
|
-
width: "100%"
|
|
17
|
-
};
|
|
18
|
-
var Image = defineComponent({
|
|
19
|
-
name: "AbsoluteImage",
|
|
20
|
-
props: {
|
|
21
|
-
alt: { required: true, type: String },
|
|
22
|
-
blurDataURL: { default: undefined, type: String },
|
|
23
|
-
className: { default: undefined, type: String },
|
|
24
|
-
crossOrigin: { default: undefined, type: String },
|
|
25
|
-
fetchPriority: { default: undefined, type: String },
|
|
26
|
-
fill: { default: false, type: Boolean },
|
|
27
|
-
height: { default: undefined, type: Number },
|
|
28
|
-
loader: { default: undefined, type: Function },
|
|
29
|
-
loading: { default: "lazy", type: String },
|
|
30
|
-
onError: { default: undefined, type: Function },
|
|
31
|
-
onLoad: { default: undefined, type: Function },
|
|
32
|
-
overrideSrc: { default: undefined, type: String },
|
|
33
|
-
placeholder: { default: undefined, type: String },
|
|
34
|
-
priority: { default: false, type: Boolean },
|
|
35
|
-
quality: { default: DEFAULT_QUALITY, type: Number },
|
|
36
|
-
referrerPolicy: { default: undefined, type: String },
|
|
37
|
-
sizes: { default: undefined, type: String },
|
|
38
|
-
src: { required: true, type: String },
|
|
39
|
-
style: { default: undefined, type: Object },
|
|
40
|
-
unoptimized: { default: false, type: Boolean },
|
|
41
|
-
width: { default: undefined, type: Number }
|
|
42
|
-
},
|
|
43
|
-
setup(props) {
|
|
44
|
-
const blurRemoved = ref(false);
|
|
45
|
-
const resolvedSrc = computed(() => {
|
|
46
|
-
if (props.overrideSrc)
|
|
47
|
-
return props.overrideSrc;
|
|
48
|
-
if (props.unoptimized)
|
|
49
|
-
return props.src;
|
|
50
|
-
if (props.loader) {
|
|
51
|
-
return props.loader({
|
|
52
|
-
quality: props.quality ?? DEFAULT_QUALITY,
|
|
53
|
-
src: props.src,
|
|
54
|
-
width: props.width ?? 0
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
if (!props.width) {
|
|
58
|
-
return buildOptimizedUrl(props.src, 0, props.quality ?? DEFAULT_QUALITY);
|
|
59
|
-
}
|
|
60
|
-
return buildOptimizedUrl(props.src, props.width, props.quality ?? DEFAULT_QUALITY);
|
|
61
|
-
});
|
|
62
|
-
const srcSet = computed(() => props.unoptimized ? undefined : generateSrcSet(props.src, props.width, props.sizes));
|
|
63
|
-
const resolvedSizes = computed(() => props.sizes ?? (props.fill ? "100vw" : undefined));
|
|
64
|
-
const resolvedLoading = computed(() => props.priority ? "eager" : props.loading ?? "lazy");
|
|
65
|
-
const resolvedFetchPriority = computed(() => props.priority ? "high" : props.fetchPriority);
|
|
66
|
-
const hasBlur = computed(() => props.placeholder === "blur" || typeof props.placeholder === "string" && props.placeholder !== "empty" && props.placeholder.startsWith("data:"));
|
|
67
|
-
const blurBackground = computed(() => {
|
|
68
|
-
if (!hasBlur.value || blurRemoved.value)
|
|
69
|
-
return;
|
|
70
|
-
if (typeof props.placeholder === "string" && props.placeholder !== "blur" && props.placeholder.startsWith("data:")) {
|
|
71
|
-
return generateBlurSvg(props.placeholder);
|
|
72
|
-
}
|
|
73
|
-
if (props.blurDataURL)
|
|
74
|
-
return generateBlurSvg(props.blurDataURL);
|
|
75
|
-
return;
|
|
76
|
-
});
|
|
77
|
-
const imgStyle = computed(() => {
|
|
78
|
-
const base = {
|
|
79
|
-
...props.style ?? {},
|
|
80
|
-
color: "transparent"
|
|
81
|
-
};
|
|
82
|
-
if (blurBackground.value) {
|
|
83
|
-
base.backgroundImage = blurBackground.value;
|
|
84
|
-
base.backgroundPosition = "center";
|
|
85
|
-
base.backgroundRepeat = "no-repeat";
|
|
86
|
-
base.backgroundSize = "cover";
|
|
87
|
-
}
|
|
88
|
-
if (props.fill) {
|
|
89
|
-
base.height = "100%";
|
|
90
|
-
base.inset = "0";
|
|
91
|
-
base.objectFit = "cover";
|
|
92
|
-
base.position = "absolute";
|
|
93
|
-
base.width = "100%";
|
|
94
|
-
}
|
|
95
|
-
return base;
|
|
96
|
-
});
|
|
97
|
-
const handleLoad = (event) => {
|
|
98
|
-
blurRemoved.value = true;
|
|
99
|
-
props.onLoad?.(event);
|
|
100
|
-
};
|
|
101
|
-
const handleError = (event) => {
|
|
102
|
-
props.onError?.(event);
|
|
103
|
-
};
|
|
104
|
-
return () => {
|
|
105
|
-
const imgNode = h("img", {
|
|
106
|
-
alt: props.alt,
|
|
107
|
-
class: props.className,
|
|
108
|
-
crossorigin: props.crossOrigin,
|
|
109
|
-
decoding: "async",
|
|
110
|
-
fetchpriority: resolvedFetchPriority.value,
|
|
111
|
-
height: props.fill ? undefined : props.height,
|
|
112
|
-
loading: resolvedLoading.value,
|
|
113
|
-
onError: handleError,
|
|
114
|
-
onLoad: handleLoad,
|
|
115
|
-
referrerpolicy: props.referrerPolicy,
|
|
116
|
-
sizes: resolvedSizes.value,
|
|
117
|
-
src: resolvedSrc.value,
|
|
118
|
-
srcset: srcSet.value,
|
|
119
|
-
style: imgStyle.value,
|
|
120
|
-
width: props.fill ? undefined : props.width
|
|
121
|
-
});
|
|
122
|
-
return props.fill ? h("span", { style: fillWrapperStyle }, [imgNode]) : imgNode;
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
export { Image };
|
|
128
|
-
|
|
129
|
-
//# debugId=6AAC1DE77C755A8164756E2164756E21
|
|
130
|
-
//# sourceMappingURL=chunk-9c5tj4k3.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/vue/components/Image.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { computed, defineComponent, h, ref } from 'vue';\nimport {\n\tDEFAULT_QUALITY,\n\tbuildOptimizedUrl,\n\tgenerateBlurSvg,\n\tgenerateSrcSet\n} from '../../utils/imageClient';\n\ntype ImageLoader = (params: {\n\tsrc: string;\n\twidth: number;\n\tquality: number;\n}) => string;\n\ntype ImageStyle = Record<string, string | number>;\n\ntype ImageProps = {\n\tsrc: string;\n\talt: string;\n\twidth?: number;\n\theight?: number;\n\tfill?: boolean;\n\tquality?: number;\n\tsizes?: string;\n\tloader?: ImageLoader;\n\tunoptimized?: boolean;\n\tloading?: 'lazy' | 'eager';\n\tpriority?: boolean;\n\tplaceholder?: string;\n\tblurDataURL?: string;\n\tclassName?: string;\n\tstyle?: ImageStyle;\n\tonLoad?: (() => void) | ((event: Event) => void);\n\tonError?: (() => void) | ((event: Event) => void);\n\tcrossOrigin?: 'anonymous' | 'use-credentials' | '';\n\treferrerPolicy?:\n\t\t| ''\n\t\t| 'no-referrer'\n\t\t| 'no-referrer-when-downgrade'\n\t\t| 'origin'\n\t\t| 'origin-when-cross-origin'\n\t\t| 'same-origin'\n\t\t| 'strict-origin'\n\t\t| 'strict-origin-when-cross-origin'\n\t\t| 'unsafe-url';\n\tfetchPriority?: 'high' | 'low' | 'auto';\n\toverrideSrc?: string;\n};\n\nconst fillWrapperStyle: ImageStyle = {\n\tdisplay: 'block',\n\theight: '100%',\n\toverflow: 'hidden',\n\tposition: 'relative',\n\twidth: '100%'\n};\n\nexport const Image = defineComponent({\n\tname: 'AbsoluteImage',\n\tprops: {\n\t\talt: { required: true, type: String },\n\t\tblurDataURL: { default: undefined, type: String },\n\t\tclassName: { default: undefined, type: String },\n\t\tcrossOrigin: { default: undefined, type: String },\n\t\tfetchPriority: { default: undefined, type: String },\n\t\tfill: { default: false, type: Boolean },\n\t\theight: { default: undefined, type: Number },\n\t\tloader: { default: undefined, type: Function },\n\t\tloading: { default: 'lazy', type: String },\n\t\tonError: { default: undefined, type: Function },\n\t\tonLoad: { default: undefined, type: Function },\n\t\toverrideSrc: { default: undefined, type: String },\n\t\tplaceholder: { default: undefined, type: String },\n\t\tpriority: { default: false, type: Boolean },\n\t\tquality: { default: DEFAULT_QUALITY, type: Number },\n\t\treferrerPolicy: { default: undefined, type: String },\n\t\tsizes: { default: undefined, type: String },\n\t\tsrc: { required: true, type: String },\n\t\tstyle: { default: undefined, type: Object },\n\t\tunoptimized: { default: false, type: Boolean },\n\t\twidth: { default: undefined, type: Number }\n\t},\n\tsetup(props: ImageProps) {\n\t\tconst blurRemoved = ref(false);\n\n\t\tconst resolvedSrc = computed(() => {\n\t\t\tif (props.overrideSrc) return props.overrideSrc;\n\t\t\tif (props.unoptimized) return props.src;\n\t\t\tif (props.loader) {\n\t\t\t\treturn props.loader({\n\t\t\t\t\tquality: props.quality ?? DEFAULT_QUALITY,\n\t\t\t\t\tsrc: props.src,\n\t\t\t\t\twidth: props.width ?? 0\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (!props.width) {\n\t\t\t\treturn buildOptimizedUrl(\n\t\t\t\t\tprops.src,\n\t\t\t\t\t0,\n\t\t\t\t\tprops.quality ?? DEFAULT_QUALITY\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn buildOptimizedUrl(\n\t\t\t\tprops.src,\n\t\t\t\tprops.width,\n\t\t\t\tprops.quality ?? DEFAULT_QUALITY\n\t\t\t);\n\t\t});\n\n\t\tconst srcSet = computed(() =>\n\t\t\tprops.unoptimized\n\t\t\t\t? undefined\n\t\t\t\t: generateSrcSet(props.src, props.width, props.sizes)\n\t\t);\n\n\t\tconst resolvedSizes = computed(\n\t\t\t() => props.sizes ?? (props.fill ? '100vw' : undefined)\n\t\t);\n\n\t\tconst resolvedLoading = computed(() =>\n\t\t\tprops.priority ? 'eager' : (props.loading ?? 'lazy')\n\t\t);\n\n\t\tconst resolvedFetchPriority = computed(() =>\n\t\t\tprops.priority ? 'high' : props.fetchPriority\n\t\t);\n\n\t\tconst hasBlur = computed(\n\t\t\t() =>\n\t\t\t\tprops.placeholder === 'blur' ||\n\t\t\t\t(typeof props.placeholder === 'string' &&\n\t\t\t\t\tprops.placeholder !== 'empty' &&\n\t\t\t\t\tprops.placeholder.startsWith('data:'))\n\t\t);\n\n\t\tconst blurBackground = computed(() => {\n\t\t\tif (!hasBlur.value || blurRemoved.value) return undefined;\n\t\t\tif (\n\t\t\t\ttypeof props.placeholder === 'string' &&\n\t\t\t\tprops.placeholder !== 'blur' &&\n\t\t\t\tprops.placeholder.startsWith('data:')\n\t\t\t) {\n\t\t\t\treturn generateBlurSvg(props.placeholder);\n\t\t\t}\n\t\t\tif (props.blurDataURL) return generateBlurSvg(props.blurDataURL);\n\n\t\t\treturn undefined;\n\t\t});\n\n\t\tconst imgStyle = computed(() => {\n\t\t\tconst base: ImageStyle = {\n\t\t\t\t...(props.style ?? {}),\n\t\t\t\tcolor: 'transparent'\n\t\t\t};\n\t\t\tif (blurBackground.value) {\n\t\t\t\tbase.backgroundImage = blurBackground.value;\n\t\t\t\tbase.backgroundPosition = 'center';\n\t\t\t\tbase.backgroundRepeat = 'no-repeat';\n\t\t\t\tbase.backgroundSize = 'cover';\n\t\t\t}\n\t\t\tif (props.fill) {\n\t\t\t\tbase.height = '100%';\n\t\t\t\tbase.inset = '0';\n\t\t\t\tbase.objectFit = 'cover';\n\t\t\t\tbase.position = 'absolute';\n\t\t\t\tbase.width = '100%';\n\t\t\t}\n\n\t\t\treturn base;\n\t\t});\n\n\t\tconst handleLoad = (event: Event) => {\n\t\t\tblurRemoved.value = true;\n\t\t\tprops.onLoad?.(event);\n\t\t};\n\n\t\tconst handleError = (event: Event) => {\n\t\t\tprops.onError?.(event);\n\t\t};\n\n\t\treturn () => {\n\t\t\tconst imgNode = h('img', {\n\t\t\t\talt: props.alt,\n\t\t\t\tclass: props.className,\n\t\t\t\tcrossorigin: props.crossOrigin,\n\t\t\t\tdecoding: 'async',\n\t\t\t\tfetchpriority: resolvedFetchPriority.value,\n\t\t\t\theight: props.fill ? undefined : props.height,\n\t\t\t\tloading: resolvedLoading.value,\n\t\t\t\tonError: handleError,\n\t\t\t\tonLoad: handleLoad,\n\t\t\t\treferrerpolicy: props.referrerPolicy,\n\t\t\t\tsizes: resolvedSizes.value,\n\t\t\t\tsrc: resolvedSrc.value,\n\t\t\t\tsrcset: srcSet.value,\n\t\t\t\tstyle: imgStyle.value,\n\t\t\t\twidth: props.fill ? undefined : props.width\n\t\t\t});\n\n\t\t\treturn props.fill\n\t\t\t\t? h('span', { style: fillWrapperStyle }, [imgNode])\n\t\t\t\t: imgNode;\n\t\t};\n\t}\n});\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;AAAA;AAiDA,IAAM,mBAA+B;AAAA,EACpC,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AACR;AAEO,IAAM,QAAQ,gBAAgB;AAAA,EACpC,MAAM;AAAA,EACN,OAAO;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|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
compileSvelteServerModule
|
|
4
|
-
} from "./chunk-9ve9jq72.js";
|
|
5
|
-
import {
|
|
6
|
-
getIslandMarkerAttributes,
|
|
7
|
-
serializeIslandAttributes
|
|
8
|
-
} from "./chunk-2f21eenc.js";
|
|
9
|
-
import {
|
|
10
|
-
getIslandBuildReference,
|
|
11
|
-
getIslandComponent
|
|
12
|
-
} from "./chunk-8kcfffry.js";
|
|
13
|
-
import {
|
|
14
|
-
__require
|
|
15
|
-
} from "./chunk-bmgqm774.js";
|
|
16
|
-
|
|
17
|
-
// src/core/islandSsr.ts
|
|
18
|
-
var renderAngularIslandToHtmlInternal = async (component, props, islandId) => {
|
|
19
|
-
const { renderAngularIslandToHtml } = await import("./chunk-629x0yh4.js");
|
|
20
|
-
return renderAngularIslandToHtml(component, props, islandId);
|
|
21
|
-
};
|
|
22
|
-
var renderAngularIslandToHtml = renderAngularIslandToHtmlInternal;
|
|
23
|
-
var renderReactIslandToHtml = (component, props) => import("react").then(({ createElement }) => import("react-dom/server").then(({ renderToStaticMarkup }) => renderToStaticMarkup(createElement(component, props))));
|
|
24
|
-
var renderSvelteIslandToHtml = (component, props) => import("svelte/server").then(({ render }) => {
|
|
25
|
-
const { body } = render(component, { props });
|
|
26
|
-
return body;
|
|
27
|
-
});
|
|
28
|
-
var renderVueIslandToHtml = (component, props) => import("vue").then(({ createSSRApp, h: createVueVNode }) => {
|
|
29
|
-
const app = createSSRApp({
|
|
30
|
-
render: () => createVueVNode(component, props)
|
|
31
|
-
});
|
|
32
|
-
return import("vue/server-renderer").then(({ renderToString }) => renderToString(app));
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
// src/core/renderIslandMarkup.ts
|
|
36
|
-
var islandSequence = 0;
|
|
37
|
-
var resolvedServerComponentCache = new Map;
|
|
38
|
-
var resolvedServerBuildComponentCache = new Map;
|
|
39
|
-
var nextIslandId = () => {
|
|
40
|
-
islandSequence += 1;
|
|
41
|
-
return `island-${islandSequence}`;
|
|
42
|
-
};
|
|
43
|
-
var isRecord = (value) => typeof value === "object" && value !== null;
|
|
44
|
-
var isReactServerIslandComponent = (value) => typeof value === "function";
|
|
45
|
-
var isSvelteServerIslandComponent = (value) => typeof value === "function";
|
|
46
|
-
var isVueServerIslandComponent = (value) => typeof value === "function" || isRecord(value);
|
|
47
|
-
var isAngularServerIslandComponent = (value) => typeof value === "function";
|
|
48
|
-
var resolveBuildReferencePath = (source, registryPath) => {
|
|
49
|
-
if (source.startsWith("file://"))
|
|
50
|
-
return new URL(source).pathname;
|
|
51
|
-
if (source.startsWith("."))
|
|
52
|
-
return new URL(source, registryPath).pathname;
|
|
53
|
-
return source;
|
|
54
|
-
};
|
|
55
|
-
var loadAndCompileServerBuildComponent = async (buildReferencePath) => {
|
|
56
|
-
const compiledModulePath = await compileSvelteServerModule(buildReferencePath);
|
|
57
|
-
const loadedModule = await import(compiledModulePath);
|
|
58
|
-
return "default" in loadedModule ? loadedModule.default : loadedModule;
|
|
59
|
-
};
|
|
60
|
-
var loadServerBuildComponent = async (buildReferencePath) => {
|
|
61
|
-
const cachedBuildComponent = resolvedServerBuildComponentCache.get(buildReferencePath);
|
|
62
|
-
if (cachedBuildComponent) {
|
|
63
|
-
return cachedBuildComponent;
|
|
64
|
-
}
|
|
65
|
-
const loadPromise = loadAndCompileServerBuildComponent(buildReferencePath);
|
|
66
|
-
resolvedServerBuildComponentCache.set(buildReferencePath, loadPromise);
|
|
67
|
-
return loadPromise;
|
|
68
|
-
};
|
|
69
|
-
var loadServerImportComponent = async (resolvedComponent, exportName) => {
|
|
70
|
-
const resolvedModulePath = resolvedComponent.startsWith(".") ? new URL(resolvedComponent, import.meta.url).pathname : resolvedComponent;
|
|
71
|
-
const importTarget = resolvedModulePath.endsWith(".svelte") ? await compileSvelteServerModule(resolvedModulePath) : resolvedModulePath;
|
|
72
|
-
const loadedModule = await import(importTarget);
|
|
73
|
-
if (exportName && exportName !== "default" && exportName in loadedModule) {
|
|
74
|
-
return loadedModule[exportName];
|
|
75
|
-
}
|
|
76
|
-
return "default" in loadedModule ? loadedModule.default : loadedModule;
|
|
77
|
-
};
|
|
78
|
-
var resolveIslandComponent = async (component) => {
|
|
79
|
-
const buildReference = getIslandBuildReference(component);
|
|
80
|
-
const buildReferencePath = buildReference?.source ? resolveBuildReferencePath(buildReference.source, import.meta.url) : null;
|
|
81
|
-
if (buildReferencePath?.endsWith(".svelte")) {
|
|
82
|
-
return loadServerBuildComponent(buildReferencePath);
|
|
83
|
-
}
|
|
84
|
-
if (buildReferencePath) {
|
|
85
|
-
return loadServerImportComponent(buildReferencePath, buildReference?.export);
|
|
86
|
-
}
|
|
87
|
-
const resolvedComponent = getIslandComponent(component);
|
|
88
|
-
if (typeof resolvedComponent !== "string") {
|
|
89
|
-
return resolvedComponent;
|
|
90
|
-
}
|
|
91
|
-
return loadServerImportComponent(resolvedComponent);
|
|
92
|
-
};
|
|
93
|
-
var resolveServerIslandComponent = async (component) => {
|
|
94
|
-
const cachedResolvedComponent = resolvedServerComponentCache.get(component);
|
|
95
|
-
if (cachedResolvedComponent) {
|
|
96
|
-
return cachedResolvedComponent;
|
|
97
|
-
}
|
|
98
|
-
const resolutionPromise = resolveIslandComponent(component);
|
|
99
|
-
resolvedServerComponentCache.set(component, resolutionPromise);
|
|
100
|
-
return resolutionPromise;
|
|
101
|
-
};
|
|
102
|
-
var resolveReactServerIslandComponent = async (component) => {
|
|
103
|
-
const resolvedComponent = await resolveServerIslandComponent(component);
|
|
104
|
-
if (!isReactServerIslandComponent(resolvedComponent)) {
|
|
105
|
-
throw new Error("Resolved React island is not a valid React component.");
|
|
106
|
-
}
|
|
107
|
-
return resolvedComponent;
|
|
108
|
-
};
|
|
109
|
-
var resolveSvelteServerIslandComponent = async (component) => {
|
|
110
|
-
const resolvedComponent = await resolveServerIslandComponent(component);
|
|
111
|
-
if (!isSvelteServerIslandComponent(resolvedComponent)) {
|
|
112
|
-
throw new Error("Resolved Svelte island is not a valid Svelte component.");
|
|
113
|
-
}
|
|
114
|
-
return resolvedComponent;
|
|
115
|
-
};
|
|
116
|
-
var resolveVueServerIslandComponent = async (component) => {
|
|
117
|
-
const resolvedComponent = await resolveServerIslandComponent(component);
|
|
118
|
-
if (!isVueServerIslandComponent(resolvedComponent)) {
|
|
119
|
-
throw new Error("Resolved Vue island is not a valid Vue component.");
|
|
120
|
-
}
|
|
121
|
-
return resolvedComponent;
|
|
122
|
-
};
|
|
123
|
-
var resolveAngularServerIslandComponent = async (component) => {
|
|
124
|
-
const resolvedComponent = await resolveServerIslandComponent(component);
|
|
125
|
-
if (!isAngularServerIslandComponent(resolvedComponent)) {
|
|
126
|
-
throw new Error("Resolved Angular island is not a valid Angular component.");
|
|
127
|
-
}
|
|
128
|
-
return resolvedComponent;
|
|
129
|
-
};
|
|
130
|
-
var renderIslandMarkup = async (registry, props) => {
|
|
131
|
-
const result = await renderIslandResult(registry, props);
|
|
132
|
-
return `<div ${serializeIslandAttributes(result.attributes)}>${result.html}</div>`;
|
|
133
|
-
};
|
|
134
|
-
var renderIslandResult = async (registry, props) => {
|
|
135
|
-
const islandId = nextIslandId();
|
|
136
|
-
const attributes = getIslandMarkerAttributes(props);
|
|
137
|
-
if (props.framework === "react") {
|
|
138
|
-
const entry = registry.react?.[props.component];
|
|
139
|
-
if (!entry) {
|
|
140
|
-
throw new Error(`Island component "${props.component}" is not registered for framework "react".`);
|
|
141
|
-
}
|
|
142
|
-
const component = await resolveReactServerIslandComponent(entry);
|
|
143
|
-
const html = await renderReactIslandToHtml(component, props.props);
|
|
144
|
-
return { attributes, html };
|
|
145
|
-
}
|
|
146
|
-
if (props.framework === "svelte") {
|
|
147
|
-
const entry = registry.svelte?.[props.component];
|
|
148
|
-
if (!entry) {
|
|
149
|
-
throw new Error(`Island component "${props.component}" is not registered for framework "svelte".`);
|
|
150
|
-
}
|
|
151
|
-
const component = await resolveSvelteServerIslandComponent(entry);
|
|
152
|
-
const html = await renderSvelteIslandToHtml(component, props.props);
|
|
153
|
-
return { attributes, html };
|
|
154
|
-
}
|
|
155
|
-
if (props.framework === "vue") {
|
|
156
|
-
const entry = registry.vue?.[props.component];
|
|
157
|
-
if (!entry) {
|
|
158
|
-
throw new Error(`Island component "${props.component}" is not registered for framework "vue".`);
|
|
159
|
-
}
|
|
160
|
-
const component = await resolveVueServerIslandComponent(entry);
|
|
161
|
-
const html = await renderVueIslandToHtml(component, props.props);
|
|
162
|
-
return { attributes, html };
|
|
163
|
-
}
|
|
164
|
-
if (props.framework === "angular") {
|
|
165
|
-
const entry = registry.angular?.[props.component];
|
|
166
|
-
if (!entry) {
|
|
167
|
-
throw new Error(`Island component "${props.component}" is not registered for framework "angular".`);
|
|
168
|
-
}
|
|
169
|
-
const component = await resolveAngularServerIslandComponent(entry);
|
|
170
|
-
const html = await renderAngularIslandToHtml(component, props.props, islandId);
|
|
171
|
-
return {
|
|
172
|
-
attributes: {
|
|
173
|
-
...getIslandMarkerAttributes(props, islandId)
|
|
174
|
-
},
|
|
175
|
-
html
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
throw new Error(`Framework "${props.framework}" is not implemented in this prototype.`);
|
|
179
|
-
};
|
|
180
|
-
|
|
181
|
-
export { renderIslandMarkup, renderIslandResult };
|
|
182
|
-
|
|
183
|
-
//# debugId=422A05E95D6E1A7B64756E2164756E21
|
|
184
|
-
//# sourceMappingURL=chunk-9j59emg3.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/core/islandSsr.ts", "../src/core/renderIslandMarkup.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"type ReactComponentType<Props extends Record<string, unknown>> =\n\timport('react').ComponentType<Props>;\n\nconst renderAngularIslandToHtmlInternal = async (\n\tcomponent: import('@angular/core').Type<object>,\n\tprops: Record<string, unknown>,\n\tislandId: string\n) => {\n\tconst { renderAngularIslandToHtml } = await import('../angular/islands');\n\n\treturn renderAngularIslandToHtml(component, props, islandId);\n};\nexport const renderAngularIslandToHtml = renderAngularIslandToHtmlInternal;\nexport const renderReactIslandToHtml = <Props extends Record<string, unknown>>(\n\tcomponent: ReactComponentType<Props>,\n\tprops: Props\n) =>\n\timport('react').then(({ createElement }) =>\n\t\timport('react-dom/server').then(({ renderToStaticMarkup }) =>\n\t\t\trenderToStaticMarkup(createElement(component, props))\n\t\t)\n\t);\nexport const renderSvelteIslandToHtml = <Props extends Record<string, unknown>>(\n\tcomponent: import('svelte').Component<Props>,\n\tprops: Props\n) =>\n\timport('svelte/server').then(({ render }) => {\n\t\tconst { body } = render(component, { props });\n\n\t\treturn body;\n\t});\nexport const renderVueIslandToHtml = <Props extends Record<string, unknown>>(\n\tcomponent: import('vue').Component<Props>,\n\tprops: Props\n) =>\n\timport('vue').then(({ createSSRApp, h: createVueVNode }) => {\n\t\tconst app = createSSRApp({\n\t\t\trender: () => createVueVNode(component, props)\n\t\t});\n\n\t\treturn import('vue/server-renderer').then(({ renderToString }) =>\n\t\t\trenderToString(app)\n\t\t);\n\t});\n",
|
|
6
|
-
"import type {\n\tIslandRegistry,\n\tIslandRegistryInput,\n\tRuntimeIslandRenderProps\n} from '../../types/island';\nimport {\n\trenderAngularIslandToHtml,\n\trenderReactIslandToHtml,\n\trenderSvelteIslandToHtml,\n\trenderVueIslandToHtml\n} from './islandSsr';\nimport { compileSvelteServerModule } from './svelteServerModule';\nimport {\n\tgetIslandMarkerAttributes,\n\tserializeIslandAttributes\n} from './islandMarkupAttributes';\nimport { getIslandBuildReference, getIslandComponent } from './islands';\n\nlet islandSequence = 0;\nconst resolvedServerComponentCache = new Map<unknown, Promise<unknown>>();\nconst resolvedServerBuildComponentCache = new Map<string, Promise<unknown>>();\n\nconst nextIslandId = () => {\n\tislandSequence += 1;\n\n\treturn `island-${islandSequence}`;\n};\n\ntype AngularServerIslandComponent = import('@angular/core').Type<object>;\ntype ReactServerIslandComponent = import('react').ComponentType<\n\tRecord<string, unknown>\n>;\ntype SvelteServerIslandComponent = import('svelte').Component<\n\tRecord<string, unknown>\n>;\ntype VueServerIslandComponent = import('vue').Component<\n\tRecord<string, unknown>\n>;\nconst isRecord = (value: unknown): value is Record<string, unknown> =>\n\ttypeof value === 'object' && value !== null;\n\nconst isReactServerIslandComponent = (\n\tvalue: unknown\n): value is ReactServerIslandComponent => typeof value === 'function';\n\nconst isSvelteServerIslandComponent = (\n\tvalue: unknown\n): value is SvelteServerIslandComponent => typeof value === 'function';\n\nconst isVueServerIslandComponent = (\n\tvalue: unknown\n): value is VueServerIslandComponent =>\n\ttypeof value === 'function' || isRecord(value);\n\nconst isAngularServerIslandComponent = (\n\tvalue: unknown\n): value is AngularServerIslandComponent => typeof value === 'function';\n\nconst resolveBuildReferencePath = (source: string, registryPath: string) => {\n\tif (source.startsWith('file://')) return new URL(source).pathname;\n\tif (source.startsWith('.')) return new URL(source, registryPath).pathname;\n\n\treturn source;\n};\n\nconst loadAndCompileServerBuildComponent = async (\n\tbuildReferencePath: string\n) => {\n\tconst compiledModulePath =\n\t\tawait compileSvelteServerModule(buildReferencePath);\n\tconst loadedModule = await import(compiledModulePath);\n\n\treturn 'default' in loadedModule ? loadedModule.default : loadedModule;\n};\n\nconst loadServerBuildComponent = async (buildReferencePath: string) => {\n\tconst cachedBuildComponent =\n\t\tresolvedServerBuildComponentCache.get(buildReferencePath);\n\tif (cachedBuildComponent) {\n\t\treturn cachedBuildComponent;\n\t}\n\n\tconst loadPromise = loadAndCompileServerBuildComponent(buildReferencePath);\n\tresolvedServerBuildComponentCache.set(buildReferencePath, loadPromise);\n\n\treturn loadPromise;\n};\n\nconst loadServerImportComponent = async (\n\tresolvedComponent: string,\n\texportName?: string\n) => {\n\tconst resolvedModulePath = resolvedComponent.startsWith('.')\n\t\t? new URL(resolvedComponent, import.meta.url).pathname\n\t\t: resolvedComponent;\n\tconst importTarget = resolvedModulePath.endsWith('.svelte')\n\t\t? await compileSvelteServerModule(resolvedModulePath)\n\t\t: resolvedModulePath;\n\tconst loadedModule = await import(importTarget);\n\n\tif (exportName && exportName !== 'default' && exportName in loadedModule) {\n\t\treturn loadedModule[exportName];\n\t}\n\n\treturn 'default' in loadedModule ? loadedModule.default : loadedModule;\n};\n\nconst resolveIslandComponent = async (component: unknown) => {\n\tconst buildReference = getIslandBuildReference(component);\n\tconst buildReferencePath = buildReference?.source\n\t\t? resolveBuildReferencePath(buildReference.source, import.meta.url)\n\t\t: null;\n\tif (buildReferencePath?.endsWith('.svelte')) {\n\t\treturn loadServerBuildComponent(buildReferencePath);\n\t}\n\tif (buildReferencePath) {\n\t\treturn loadServerImportComponent(\n\t\t\tbuildReferencePath,\n\t\t\tbuildReference?.export\n\t\t);\n\t}\n\n\tconst resolvedComponent = getIslandComponent(component);\n\tif (typeof resolvedComponent !== 'string') {\n\t\treturn resolvedComponent;\n\t}\n\n\treturn loadServerImportComponent(resolvedComponent);\n};\n\nconst resolveServerIslandComponent = async (component: unknown) => {\n\tconst cachedResolvedComponent = resolvedServerComponentCache.get(component);\n\tif (cachedResolvedComponent) {\n\t\treturn cachedResolvedComponent;\n\t}\n\n\tconst resolutionPromise = resolveIslandComponent(component);\n\n\tresolvedServerComponentCache.set(component, resolutionPromise);\n\n\treturn resolutionPromise;\n};\n\nconst resolveReactServerIslandComponent = async (component: unknown) => {\n\tconst resolvedComponent = await resolveServerIslandComponent(component);\n\tif (!isReactServerIslandComponent(resolvedComponent)) {\n\t\tthrow new Error(\n\t\t\t'Resolved React island is not a valid React component.'\n\t\t);\n\t}\n\n\treturn resolvedComponent;\n};\n\nconst resolveSvelteServerIslandComponent = async (component: unknown) => {\n\tconst resolvedComponent = await resolveServerIslandComponent(component);\n\tif (!isSvelteServerIslandComponent(resolvedComponent)) {\n\t\tthrow new Error(\n\t\t\t'Resolved Svelte island is not a valid Svelte component.'\n\t\t);\n\t}\n\n\treturn resolvedComponent;\n};\n\nconst resolveVueServerIslandComponent = async (component: unknown) => {\n\tconst resolvedComponent = await resolveServerIslandComponent(component);\n\tif (!isVueServerIslandComponent(resolvedComponent)) {\n\t\tthrow new Error('Resolved Vue island is not a valid Vue component.');\n\t}\n\n\treturn resolvedComponent;\n};\n\nconst resolveAngularServerIslandComponent = async (component: unknown) => {\n\tconst resolvedComponent = await resolveServerIslandComponent(component);\n\tif (!isAngularServerIslandComponent(resolvedComponent)) {\n\t\tthrow new Error(\n\t\t\t'Resolved Angular island is not a valid Angular component.'\n\t\t);\n\t}\n\n\treturn resolvedComponent;\n};\n\nexport const renderIslandMarkup = async <T extends IslandRegistryInput>(\n\tregistry: IslandRegistry<T> | T,\n\tprops: RuntimeIslandRenderProps\n) => {\n\tconst result = await renderIslandResult(registry, props);\n\n\treturn `<div ${serializeIslandAttributes(result.attributes)}>${result.html}</div>`;\n};\nexport const renderIslandResult = async <T extends IslandRegistryInput>(\n\tregistry: IslandRegistry<T> | T,\n\tprops: RuntimeIslandRenderProps\n) => {\n\tconst islandId = nextIslandId();\n\tconst attributes = getIslandMarkerAttributes(props);\n\n\tif (props.framework === 'react') {\n\t\tconst entry = registry.react?.[props.component];\n\t\tif (!entry) {\n\t\t\tthrow new Error(\n\t\t\t\t`Island component \"${props.component}\" is not registered for framework \"react\".`\n\t\t\t);\n\t\t}\n\t\tconst component = await resolveReactServerIslandComponent(entry);\n\t\tconst html = await renderReactIslandToHtml(component, props.props);\n\n\t\treturn { attributes, html };\n\t}\n\n\tif (props.framework === 'svelte') {\n\t\tconst entry = registry.svelte?.[props.component];\n\t\tif (!entry) {\n\t\t\tthrow new Error(\n\t\t\t\t`Island component \"${props.component}\" is not registered for framework \"svelte\".`\n\t\t\t);\n\t\t}\n\t\tconst component = await resolveSvelteServerIslandComponent(entry);\n\t\tconst html = await renderSvelteIslandToHtml(component, props.props);\n\n\t\treturn { attributes, html };\n\t}\n\n\tif (props.framework === 'vue') {\n\t\tconst entry = registry.vue?.[props.component];\n\t\tif (!entry) {\n\t\t\tthrow new Error(\n\t\t\t\t`Island component \"${props.component}\" is not registered for framework \"vue\".`\n\t\t\t);\n\t\t}\n\t\tconst component = await resolveVueServerIslandComponent(entry);\n\t\tconst html = await renderVueIslandToHtml(component, props.props);\n\n\t\treturn { attributes, html };\n\t}\n\n\tif (props.framework === 'angular') {\n\t\tconst entry = registry.angular?.[props.component];\n\t\tif (!entry) {\n\t\t\tthrow new Error(\n\t\t\t\t`Island component \"${props.component}\" is not registered for framework \"angular\".`\n\t\t\t);\n\t\t}\n\t\tconst component = await resolveAngularServerIslandComponent(entry);\n\t\tconst html = await renderAngularIslandToHtml(\n\t\t\tcomponent,\n\t\t\tprops.props,\n\t\t\tislandId\n\t\t);\n\n\t\treturn {\n\t\t\tattributes: {\n\t\t\t\t...getIslandMarkerAttributes(props, islandId)\n\t\t\t},\n\t\t\thtml\n\t\t};\n\t}\n\n\tthrow new Error(\n\t\t`Framework \"${props.framework}\" is not implemented in this prototype.`\n\t);\n};\n"
|
|
7
|
-
],
|
|
8
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAGA,IAAM,oCAAoC,OACzC,WACA,OACA,aACI;AAAA,EACJ,QAAQ,8BAA8B,MAAa;AAAA,EAEnD,OAAO,0BAA0B,WAAW,OAAO,QAAQ;AAAA;AAErD,IAAM,4BAA4B;AAClC,IAAM,0BAA0B,CACtC,WACA,UAEO,gBAAS,KAAK,GAAG,oBAChB,2BAAoB,KAAK,GAAG,2BAClC,qBAAqB,cAAc,WAAW,KAAK,CAAC,CACrD,CACD;AACM,IAAM,2BAA2B,CACvC,WACA,UAEO,wBAAiB,KAAK,GAAG,aAAa;AAAA,EAC5C,QAAQ,SAAS,OAAO,WAAW,EAAE,MAAM,CAAC;AAAA,EAE5C,OAAO;AAAA,CACP;AACK,IAAM,wBAAwB,CACpC,WACA,UAEO,cAAO,KAAK,GAAG,cAAc,GAAG,qBAAqB;AAAA,EAC3D,MAAM,MAAM,aAAa;AAAA,IACxB,QAAQ,MAAM,eAAe,WAAW,KAAK;AAAA,EAC9C,C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
5
|
-
} from "./chunk-7fw6x3js.js";
|
|
6
|
-
import {
|
|
7
|
-
resolvePackageImport
|
|
8
|
-
} from "./chunk-mbazhahf.js";
|
|
9
|
-
import {
|
|
10
|
-
createSvelteStylePreprocessor
|
|
11
|
-
} from "./chunk-xnt8c6h2.js";
|
|
12
|
-
import {
|
|
13
|
-
__require
|
|
14
|
-
} from "./chunk-bmgqm774.js";
|
|
15
|
-
|
|
16
|
-
// src/core/svelteServerModule.ts
|
|
17
|
-
import { mkdir, readdir } from "fs/promises";
|
|
18
|
-
import { basename, dirname, extname, join, relative, resolve } from "path";
|
|
19
|
-
var serverCacheRoot = join(process.cwd(), ".absolutejs", "islands", "svelte");
|
|
20
|
-
var compiledModuleCache = new Map;
|
|
21
|
-
var originalSourcePathCache = new Map;
|
|
22
|
-
var transpiler = new Bun.Transpiler({
|
|
23
|
-
loader: "ts",
|
|
24
|
-
target: "browser"
|
|
25
|
-
});
|
|
26
|
-
var ensureRelativeImportPath = (from, target) => {
|
|
27
|
-
const importPath = relative(dirname(from), target).replace(/\\/g, "/");
|
|
28
|
-
return importPath.startsWith(".") ? importPath : `./${importPath}`;
|
|
29
|
-
};
|
|
30
|
-
var processDirectoryEntries = (entries, dir, targetFileName, stack) => {
|
|
31
|
-
for (const entry of entries) {
|
|
32
|
-
const entryPath = join(dir, entry.name);
|
|
33
|
-
if (entry.isDirectory())
|
|
34
|
-
stack.push(entryPath);
|
|
35
|
-
if (entry.isFile() && entry.name === targetFileName) {
|
|
36
|
-
return entryPath;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return null;
|
|
40
|
-
};
|
|
41
|
-
var searchDirectoryLevel = async (dirs, targetFileName) => {
|
|
42
|
-
if (dirs.length === 0)
|
|
43
|
-
return null;
|
|
44
|
-
const nextStack = [];
|
|
45
|
-
const dirEntries = await Promise.all(dirs.map(async (dir) => ({
|
|
46
|
-
dir,
|
|
47
|
-
entries: await readdir(dir, {
|
|
48
|
-
encoding: "utf-8",
|
|
49
|
-
withFileTypes: true
|
|
50
|
-
})
|
|
51
|
-
})));
|
|
52
|
-
for (const { dir, entries } of dirEntries) {
|
|
53
|
-
const found = processDirectoryEntries(entries, dir, targetFileName, nextStack);
|
|
54
|
-
if (found)
|
|
55
|
-
return found;
|
|
56
|
-
}
|
|
57
|
-
return searchDirectoryLevel(nextStack, targetFileName);
|
|
58
|
-
};
|
|
59
|
-
var findSourceFileByBasename = async (searchRoot, targetFileName) => searchDirectoryLevel([searchRoot], targetFileName);
|
|
60
|
-
var normalizeBuiltSvelteFileName = (sourcePath) => basename(sourcePath).replace(/-[a-z0-9]{6,}(?=\.svelte$)/i, "");
|
|
61
|
-
var resolveOriginalSourcePath = async (sourcePath) => {
|
|
62
|
-
const cachedPath = originalSourcePathCache.get(sourcePath);
|
|
63
|
-
if (cachedPath !== undefined) {
|
|
64
|
-
return cachedPath;
|
|
65
|
-
}
|
|
66
|
-
if (!sourcePath.includes(`${join(process.cwd(), "build")}${process.platform === "win32" ? "" : "/"}`) && !sourcePath.includes("/build/")) {
|
|
67
|
-
originalSourcePathCache.set(sourcePath, sourcePath);
|
|
68
|
-
return sourcePath;
|
|
69
|
-
}
|
|
70
|
-
const resolvedSourcePath = await findSourceFileByBasename(join(process.cwd(), "src"), normalizeBuiltSvelteFileName(sourcePath));
|
|
71
|
-
const nextPath = resolvedSourcePath ?? sourcePath;
|
|
72
|
-
originalSourcePathCache.set(sourcePath, nextPath);
|
|
73
|
-
return nextPath;
|
|
74
|
-
};
|
|
75
|
-
var resolveRelativeModule = async (spec, from) => {
|
|
76
|
-
if (!spec.startsWith(".")) {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
const basePath = resolve(dirname(from), spec);
|
|
80
|
-
const candidates = [
|
|
81
|
-
basePath,
|
|
82
|
-
`${basePath}.ts`,
|
|
83
|
-
`${basePath}.js`,
|
|
84
|
-
`${basePath}.mjs`,
|
|
85
|
-
`${basePath}.cjs`,
|
|
86
|
-
`${basePath}.json`,
|
|
87
|
-
join(basePath, "index.ts"),
|
|
88
|
-
join(basePath, "index.js"),
|
|
89
|
-
join(basePath, "index.mjs"),
|
|
90
|
-
join(basePath, "index.cjs"),
|
|
91
|
-
join(basePath, "index.json")
|
|
92
|
-
];
|
|
93
|
-
const existResults = await Promise.all(candidates.map((candidate) => Bun.file(candidate).exists()));
|
|
94
|
-
const foundIndex = existResults.indexOf(true);
|
|
95
|
-
return foundIndex >= 0 ? candidates[foundIndex] ?? null : null;
|
|
96
|
-
};
|
|
97
|
-
var getCachedModulePath = (sourcePath) => {
|
|
98
|
-
const relativeSourcePath = relative(process.cwd(), sourcePath).replace(/\\/g, "/");
|
|
99
|
-
const normalizedSourcePath = relativeSourcePath.startsWith("..") ? sourcePath.replace(/[:\\/]/g, "_") : relativeSourcePath;
|
|
100
|
-
return join(serverCacheRoot, `${normalizedSourcePath}.server.js`);
|
|
101
|
-
};
|
|
102
|
-
var resolveSvelteImport = async (spec, from) => {
|
|
103
|
-
if (!spec.startsWith(".") && !spec.startsWith("/")) {
|
|
104
|
-
const resolved = resolvePackageImport(spec);
|
|
105
|
-
return resolved && resolved.endsWith(".svelte") ? resolved : null;
|
|
106
|
-
}
|
|
107
|
-
if (spec.startsWith("/")) {
|
|
108
|
-
return spec;
|
|
109
|
-
}
|
|
110
|
-
if (!spec.startsWith(".")) {
|
|
111
|
-
return null;
|
|
112
|
-
}
|
|
113
|
-
const explicitPath = resolve(dirname(from), spec);
|
|
114
|
-
if (extname(explicitPath) === ".svelte") {
|
|
115
|
-
return explicitPath;
|
|
116
|
-
}
|
|
117
|
-
const candidate = `${explicitPath}.svelte`;
|
|
118
|
-
if (await Bun.file(candidate).exists() === true) {
|
|
119
|
-
return candidate;
|
|
120
|
-
}
|
|
121
|
-
return null;
|
|
122
|
-
};
|
|
123
|
-
var writeIfChanged = async (path, content) => {
|
|
124
|
-
const targetFile = Bun.file(path);
|
|
125
|
-
const exists = await targetFile.exists();
|
|
126
|
-
if (exists) {
|
|
127
|
-
const currentContent = await targetFile.text();
|
|
128
|
-
if (currentContent === content) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
await Bun.write(path, content);
|
|
133
|
-
};
|
|
134
|
-
var compileSvelteServerModule = async (sourcePath) => {
|
|
135
|
-
const cachedModulePath = compiledModuleCache.get(sourcePath);
|
|
136
|
-
if (cachedModulePath) {
|
|
137
|
-
return cachedModulePath;
|
|
138
|
-
}
|
|
139
|
-
const resolutionSourcePath = await resolveOriginalSourcePath(sourcePath);
|
|
140
|
-
const source = await Bun.file(sourcePath).text();
|
|
141
|
-
const { compile, preprocess } = await import("svelte/compiler");
|
|
142
|
-
const loweredAwaitSource = lowerSvelteAwaitSlotSyntax(source);
|
|
143
|
-
const loweredSource = lowerSvelteIslandSyntax(loweredAwaitSource.code, "server");
|
|
144
|
-
const preprocessed = await preprocess(loweredSource.code, createSvelteStylePreprocessor());
|
|
145
|
-
let transpiled = sourcePath.endsWith(".ts") || sourcePath.endsWith(".svelte.ts") ? transpiler.transformSync(preprocessed.code) : preprocessed.code;
|
|
146
|
-
const childImportSpecs = Array.from(transpiled.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((value) => value !== undefined);
|
|
147
|
-
const resolvedChildModules = await Promise.all(childImportSpecs.map((spec) => resolveSvelteImport(spec, resolutionSourcePath)));
|
|
148
|
-
const resolvedModuleImports = await Promise.all(childImportSpecs.map((spec) => resolveRelativeModule(spec, resolutionSourcePath)));
|
|
149
|
-
const childModulePaths = new Map;
|
|
150
|
-
const rewrittenModulePaths = new Map;
|
|
151
|
-
const compiledChildren = await Promise.all(childImportSpecs.map(async (spec, index) => {
|
|
152
|
-
const resolvedChild = resolvedChildModules[index];
|
|
153
|
-
if (!spec || !resolvedChild)
|
|
154
|
-
return null;
|
|
155
|
-
return {
|
|
156
|
-
compiledPath: await compileSvelteServerModule(resolvedChild),
|
|
157
|
-
resolvedChild,
|
|
158
|
-
spec
|
|
159
|
-
};
|
|
160
|
-
}));
|
|
161
|
-
for (const result of compiledChildren) {
|
|
162
|
-
if (!result)
|
|
163
|
-
continue;
|
|
164
|
-
childModulePaths.set(result.spec, result.compiledPath);
|
|
165
|
-
childModulePaths.set(result.resolvedChild, result.compiledPath);
|
|
166
|
-
}
|
|
167
|
-
for (let index = 0;index < childImportSpecs.length; index += 1) {
|
|
168
|
-
const spec = childImportSpecs[index];
|
|
169
|
-
const resolvedModuleImport = resolvedModuleImports[index];
|
|
170
|
-
if (!spec || !resolvedModuleImport)
|
|
171
|
-
continue;
|
|
172
|
-
if (resolvedChildModules[index])
|
|
173
|
-
continue;
|
|
174
|
-
rewrittenModulePaths.set(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), resolvedModuleImport));
|
|
175
|
-
}
|
|
176
|
-
for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
|
|
177
|
-
transpiled = transpiled.replaceAll(spec, resolvedModuleImport);
|
|
178
|
-
}
|
|
179
|
-
let compiledCode = compile(transpiled, {
|
|
180
|
-
css: "injected",
|
|
181
|
-
experimental: {
|
|
182
|
-
async: loweredAwaitSource.transformed || loweredSource.transformed
|
|
183
|
-
},
|
|
184
|
-
filename: resolutionSourcePath,
|
|
185
|
-
generate: "server"
|
|
186
|
-
}).js.code;
|
|
187
|
-
for (const [spec, compiledChildPath] of childModulePaths) {
|
|
188
|
-
compiledCode = compiledCode.replaceAll(spec, ensureRelativeImportPath(getCachedModulePath(sourcePath), compiledChildPath));
|
|
189
|
-
}
|
|
190
|
-
for (const [spec, resolvedModuleImport] of rewrittenModulePaths) {
|
|
191
|
-
compiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);
|
|
192
|
-
}
|
|
193
|
-
const compiledModulePath = getCachedModulePath(sourcePath);
|
|
194
|
-
await mkdir(dirname(compiledModulePath), { recursive: true });
|
|
195
|
-
await writeIfChanged(compiledModulePath, compiledCode);
|
|
196
|
-
compiledModuleCache.set(sourcePath, compiledModulePath);
|
|
197
|
-
return compiledModulePath;
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
export { compileSvelteServerModule };
|
|
201
|
-
|
|
202
|
-
//# debugId=7E4C5416175915DB64756E2164756E21
|
|
203
|
-
//# sourceMappingURL=chunk-9ve9jq72.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/core/svelteServerModule.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { Dirent } from 'node:fs';\nimport { mkdir, readdir } from 'node:fs/promises';\nimport { basename, dirname, extname, join, relative, resolve } from 'node:path';\nimport { resolvePackageImport } from '../build/resolvePackageImport';\nimport { lowerSvelteIslandSyntax } from '../svelte/lowerIslandSyntax';\nimport { lowerSvelteAwaitSlotSyntax } from '../svelte/lowerAwaitSlotSyntax';\nimport { createSvelteStylePreprocessor } from '../build/stylePreprocessor';\n\nconst serverCacheRoot = join(process.cwd(), '.absolutejs', 'islands', 'svelte');\n\nconst compiledModuleCache = new Map<string, string>();\nconst originalSourcePathCache = new Map<string, string>();\n\nconst transpiler = new Bun.Transpiler({\n\tloader: 'ts',\n\ttarget: 'browser'\n});\n\nconst ensureRelativeImportPath = (from: string, target: string) => {\n\tconst importPath = relative(dirname(from), target).replace(/\\\\/g, '/');\n\n\treturn importPath.startsWith('.') ? importPath : `./${importPath}`;\n};\n\nconst processDirectoryEntries = (\n\tentries: Dirent<string>[],\n\tdir: string,\n\ttargetFileName: string,\n\tstack: string[]\n) => {\n\tfor (const entry of entries) {\n\t\tconst entryPath = join(dir, entry.name);\n\t\tif (entry.isDirectory()) stack.push(entryPath);\n\n\t\tif (entry.isFile() && entry.name === targetFileName) {\n\t\t\treturn entryPath;\n\t\t}\n\t}\n\n\treturn null;\n};\n\nconst searchDirectoryLevel = async (dirs: string[], targetFileName: string) => {\n\tif (dirs.length === 0) return null;\n\n\tconst nextStack: string[] = [];\n\tconst dirEntries = await Promise.all(\n\t\tdirs.map(async (dir) => ({\n\t\t\tdir,\n\t\t\tentries: await readdir(dir, {\n\t\t\t\tencoding: 'utf-8',\n\t\t\t\twithFileTypes: true\n\t\t\t})\n\t\t}))\n\t);\n\n\tfor (const { dir, entries } of dirEntries) {\n\t\tconst found = processDirectoryEntries(\n\t\t\tentries,\n\t\t\tdir,\n\t\t\ttargetFileName,\n\t\t\tnextStack\n\t\t);\n\t\tif (found) return found;\n\t}\n\n\treturn searchDirectoryLevel(nextStack, targetFileName);\n};\n\nconst findSourceFileByBasename = async (\n\tsearchRoot: string,\n\ttargetFileName: string\n) => searchDirectoryLevel([searchRoot], targetFileName);\n\nconst normalizeBuiltSvelteFileName = (sourcePath: string) =>\n\tbasename(sourcePath).replace(/-[a-z0-9]{6,}(?=\\.svelte$)/i, '');\n\nconst resolveOriginalSourcePath = async (sourcePath: string) => {\n\tconst cachedPath = originalSourcePathCache.get(sourcePath);\n\tif (cachedPath !== undefined) {\n\t\treturn cachedPath;\n\t}\n\n\tif (\n\t\t!sourcePath.includes(\n\t\t\t`${join(process.cwd(), 'build')}${process.platform === 'win32' ? '' : '/'}`\n\t\t) &&\n\t\t!sourcePath.includes('/build/')\n\t) {\n\t\toriginalSourcePathCache.set(sourcePath, sourcePath);\n\n\t\treturn sourcePath;\n\t}\n\n\tconst resolvedSourcePath = await findSourceFileByBasename(\n\t\tjoin(process.cwd(), 'src'),\n\t\tnormalizeBuiltSvelteFileName(sourcePath)\n\t);\n\tconst nextPath = resolvedSourcePath ?? sourcePath;\n\toriginalSourcePathCache.set(sourcePath, nextPath);\n\n\treturn nextPath;\n};\n\nconst resolveRelativeModule = async (spec: string, from: string) => {\n\tif (!spec.startsWith('.')) {\n\t\treturn null;\n\t}\n\n\tconst basePath = resolve(dirname(from), spec);\n\tconst candidates = [\n\t\tbasePath,\n\t\t`${basePath}.ts`,\n\t\t`${basePath}.js`,\n\t\t`${basePath}.mjs`,\n\t\t`${basePath}.cjs`,\n\t\t`${basePath}.json`,\n\t\tjoin(basePath, 'index.ts'),\n\t\tjoin(basePath, 'index.js'),\n\t\tjoin(basePath, 'index.mjs'),\n\t\tjoin(basePath, 'index.cjs'),\n\t\tjoin(basePath, 'index.json')\n\t];\n\n\tconst existResults = await Promise.all(\n\t\tcandidates.map((candidate) => Bun.file(candidate).exists())\n\t);\n\tconst foundIndex = existResults.indexOf(true);\n\n\treturn foundIndex >= 0 ? (candidates[foundIndex] ?? null) : null;\n};\n\nconst getCachedModulePath = (sourcePath: string) => {\n\tconst relativeSourcePath = relative(process.cwd(), sourcePath).replace(\n\t\t/\\\\/g,\n\t\t'/'\n\t);\n\tconst normalizedSourcePath = relativeSourcePath.startsWith('..')\n\t\t? sourcePath.replace(/[:\\\\/]/g, '_')\n\t\t: relativeSourcePath;\n\n\treturn join(serverCacheRoot, `${normalizedSourcePath}.server.js`);\n};\n\nconst resolveSvelteImport = async (spec: string, from: string) => {\n\tif (!spec.startsWith('.') && !spec.startsWith('/')) {\n\t\tconst resolved = resolvePackageImport(spec);\n\n\t\treturn resolved && resolved.endsWith('.svelte') ? resolved : null;\n\t}\n\n\tif (spec.startsWith('/')) {\n\t\treturn spec;\n\t}\n\n\tif (!spec.startsWith('.')) {\n\t\treturn null;\n\t}\n\n\tconst explicitPath = resolve(dirname(from), spec);\n\tif (extname(explicitPath) === '.svelte') {\n\t\treturn explicitPath;\n\t}\n\n\tconst candidate = `${explicitPath}.svelte`;\n\tif ((await Bun.file(candidate).exists()) === true) {\n\t\treturn candidate;\n\t}\n\n\treturn null;\n};\n\nconst writeIfChanged = async (path: string, content: string) => {\n\tconst targetFile = Bun.file(path);\n\tconst exists = await targetFile.exists();\n\tif (exists) {\n\t\tconst currentContent = await targetFile.text();\n\t\tif (currentContent === content) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tawait Bun.write(path, content);\n};\n\nexport const compileSvelteServerModule = async (sourcePath: string) => {\n\tconst cachedModulePath = compiledModuleCache.get(sourcePath);\n\tif (cachedModulePath) {\n\t\treturn cachedModulePath;\n\t}\n\n\tconst resolutionSourcePath = await resolveOriginalSourcePath(sourcePath);\n\tconst source = await Bun.file(sourcePath).text();\n\tconst { compile, preprocess } = await import('svelte/compiler');\n\tconst loweredAwaitSource = lowerSvelteAwaitSlotSyntax(source);\n\tconst loweredSource = lowerSvelteIslandSyntax(\n\t\tloweredAwaitSource.code,\n\t\t'server'\n\t);\n\tconst preprocessed = await preprocess(\n\t\tloweredSource.code,\n\t\tcreateSvelteStylePreprocessor()\n\t);\n\tlet transpiled =\n\t\tsourcePath.endsWith('.ts') || sourcePath.endsWith('.svelte.ts')\n\t\t\t? transpiler.transformSync(preprocessed.code)\n\t\t\t: preprocessed.code;\n\tconst childImportSpecs = Array.from(\n\t\ttranspiled.matchAll(/from\\s+['\"]([^'\"]+)['\"]/g)\n\t)\n\t\t.map((match) => match[1])\n\t\t.filter((value): value is string => value !== undefined);\n\tconst resolvedChildModules = await Promise.all(\n\t\tchildImportSpecs.map((spec) =>\n\t\t\tresolveSvelteImport(spec, resolutionSourcePath)\n\t\t)\n\t);\n\tconst resolvedModuleImports = await Promise.all(\n\t\tchildImportSpecs.map((spec) =>\n\t\t\tresolveRelativeModule(spec, resolutionSourcePath)\n\t\t)\n\t);\n\tconst childModulePaths = new Map<string, string>();\n\tconst rewrittenModulePaths = new Map<string, string>();\n\n\tconst compiledChildren = await Promise.all(\n\t\tchildImportSpecs.map(async (spec, index) => {\n\t\t\tconst resolvedChild = resolvedChildModules[index];\n\t\t\tif (!spec || !resolvedChild) return null;\n\n\t\t\treturn {\n\t\t\t\tcompiledPath: await compileSvelteServerModule(resolvedChild),\n\t\t\t\tresolvedChild,\n\t\t\t\tspec\n\t\t\t};\n\t\t})\n\t);\n\n\tfor (const result of compiledChildren) {\n\t\tif (!result) continue;\n\t\tchildModulePaths.set(result.spec, result.compiledPath);\n\t\tchildModulePaths.set(result.resolvedChild, result.compiledPath);\n\t}\n\n\tfor (let index = 0; index < childImportSpecs.length; index += 1) {\n\t\tconst spec = childImportSpecs[index];\n\t\tconst resolvedModuleImport = resolvedModuleImports[index];\n\t\tif (!spec || !resolvedModuleImport) continue;\n\t\tif (resolvedChildModules[index]) continue;\n\n\t\trewrittenModulePaths.set(\n\t\t\tspec,\n\t\t\tensureRelativeImportPath(\n\t\t\t\tgetCachedModulePath(sourcePath),\n\t\t\t\tresolvedModuleImport\n\t\t\t)\n\t\t);\n\t}\n\n\tfor (const [spec, resolvedModuleImport] of rewrittenModulePaths) {\n\t\ttranspiled = transpiled.replaceAll(spec, resolvedModuleImport);\n\t}\n\n\tlet compiledCode = compile(transpiled, {\n\t\tcss: 'injected',\n\t\texperimental: {\n\t\t\tasync: loweredAwaitSource.transformed || loweredSource.transformed\n\t\t},\n\t\tfilename: resolutionSourcePath,\n\t\tgenerate: 'server'\n\t}).js.code;\n\n\tfor (const [spec, compiledChildPath] of childModulePaths) {\n\t\tcompiledCode = compiledCode.replaceAll(\n\t\t\tspec,\n\t\t\tensureRelativeImportPath(\n\t\t\t\tgetCachedModulePath(sourcePath),\n\t\t\t\tcompiledChildPath\n\t\t\t)\n\t\t);\n\t}\n\n\tfor (const [spec, resolvedModuleImport] of rewrittenModulePaths) {\n\t\tcompiledCode = compiledCode.replaceAll(spec, resolvedModuleImport);\n\t}\n\n\tconst compiledModulePath = getCachedModulePath(sourcePath);\n\tawait mkdir(dirname(compiledModulePath), { recursive: true });\n\tawait writeIfChanged(compiledModulePath, compiledCode);\n\tcompiledModuleCache.set(sourcePath, compiledModulePath);\n\n\treturn compiledModulePath;\n};\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;;;;;;;;;;;;AACA;AACA;AAMA,IAAM,kBAAkB,KAAK,QAAQ,IAAI,GAAG,eAAe,WAAW,QAAQ;AAE9E,IAAM,sBAAsB,IAAI;AAChC,IAAM,0BAA0B,IAAI;AAEpC,IAAM,aAAa,IAAI,IAAI,WAAW;AAAA,EACrC,QAAQ;AAAA,EACR,QAAQ;AACT,CAAC;AAED,IAAM,2BAA2B,CAAC,MAAc,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|
|
3
|
-
generateReactIndexFiles
|
|
4
|
-
} from "./chunk-3g91wb4f.js";
|
|
5
|
-
import"./chunk-p5504p14.js";
|
|
6
|
-
import"./chunk-bmgqm774.js";
|
|
7
|
-
export {
|
|
8
|
-
generateReactIndexFiles
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//# debugId=8B1CBA3878A33C6264756E2164756E21
|
|
12
|
-
//# sourceMappingURL=chunk-9xrsjeem.js.map
|