@withl5e/l5e 0.1.0-alpha.0
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/LICENSE +21 -0
- package/README.md +24 -0
- package/dist/action.js +10 -0
- package/dist/action.js.map +1 -0
- package/dist/client-D67hK4Yy.js +9 -0
- package/dist/client-D67hK4Yy.js.map +1 -0
- package/dist/entry-server-Ckh6zfgm.js +258 -0
- package/dist/entry-server-Ckh6zfgm.js.map +1 -0
- package/dist/entry-server.js +12 -0
- package/dist/entry-server.js.map +1 -0
- package/dist/generateMetadata-C5QsMS-H.js +144 -0
- package/dist/generateMetadata-C5QsMS-H.js.map +1 -0
- package/dist/index-BIt7MJT9.js +163 -0
- package/dist/index-BIt7MJT9.js.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/island/client.js +5 -0
- package/dist/island/client.js.map +1 -0
- package/dist/island/runtime.js +98 -0
- package/dist/island/runtime.js.map +1 -0
- package/dist/island.js +39 -0
- package/dist/island.js.map +1 -0
- package/dist/jsx-runtime-C2Vw67N2.js +256 -0
- package/dist/jsx-runtime-C2Vw67N2.js.map +1 -0
- package/dist/jsx-runtime.js +26 -0
- package/dist/jsx-runtime.js.map +1 -0
- package/dist/middleware.js +9 -0
- package/dist/middleware.js.map +1 -0
- package/dist/seo.js +7 -0
- package/dist/seo.js.map +1 -0
- package/dist/server.js +489 -0
- package/dist/server.js.map +1 -0
- package/dist/swap/server.js +15 -0
- package/dist/swap/server.js.map +1 -0
- package/dist/swap.js +121 -0
- package/dist/swap.js.map +1 -0
- package/dist/tooltip.js +129 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/vite-plugin.js +381 -0
- package/dist/vite-plugin.js.map +1 -0
- package/index.ts +1 -0
- package/package.json +129 -0
- package/src/action/define-action.ts +8 -0
- package/src/action/index.ts +2 -0
- package/src/action/types.ts +21 -0
- package/src/core/bundler.ts +275 -0
- package/src/core/const.ts +2 -0
- package/src/core/entry-server.d.ts +1 -0
- package/src/core/entry-server.ts +381 -0
- package/src/core/exceptions.ts +80 -0
- package/src/core/head-priority.ts +15 -0
- package/src/core/index.ts +40 -0
- package/src/core/jsx-runtime.ts +325 -0
- package/src/core/jsx-types.d.ts +548 -0
- package/src/core/render.ts +181 -0
- package/src/core/request.ts +31 -0
- package/src/core/server.ts +740 -0
- package/src/core/vite-plugin.ts +779 -0
- package/src/island/ClientIsland.ts +71 -0
- package/src/island/client.ts +3 -0
- package/src/island/index.ts +3 -0
- package/src/island/runtime.ts +149 -0
- package/src/island/strategy-registry.ts +10 -0
- package/src/island/types.ts +28 -0
- package/src/middleware/defineMiddleware.ts +5 -0
- package/src/middleware/index.ts +133 -0
- package/src/middleware/sequence.ts +105 -0
- package/src/middleware/types.ts +28 -0
- package/src/seo/generateMetadata.tsx +559 -0
- package/src/seo/index.ts +10 -0
- package/src/seo/mergeMetadata.ts +200 -0
- package/src/seo/types.ts +316 -0
- package/src/swap/SwapResponse.tsx +16 -0
- package/src/swap/create-swap.ts +121 -0
- package/src/swap/index.ts +8 -0
- package/src/swap/parse.ts +12 -0
- package/src/swap/server.ts +1 -0
- package/src/swap/swap.ts +57 -0
- package/src/swap/types.ts +47 -0
- package/src/swap/utils.ts +7 -0
- package/src/tooltip/index.ts +2 -0
- package/src/tooltip/tooltip-loader.ts +108 -0
- package/src/tooltip/tooltip-runtime.ts +173 -0
- package/types.d.ts +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 L5E contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# @withl5e/l5e
|
|
2
|
+
|
|
3
|
+
L5E is an HTML-first SSR MPA framework for pages where the full HTML response, SEO data,
|
|
4
|
+
cache headers and failure behavior should be decided before the response is sent.
|
|
5
|
+
|
|
6
|
+
Install:
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
pnpm add @withl5e/l5e vite
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Use the Vite plugin in an app:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { coreVite } from '@withl5e/l5e/vite-plugin';
|
|
16
|
+
import { defineConfig } from 'vite';
|
|
17
|
+
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
esbuild: { jsx: 'preserve' },
|
|
20
|
+
plugins: [coreVite()],
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
See the root README and `examples/basic` for a full app.
|
package/dist/action.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.js","sources":["../src/action/define-action.ts"],"sourcesContent":["import type { ActionOptions, Action } from './types';\n\nexport function defineAction(opts: ActionOptions): Action {\n return {\n handler: opts.handler,\n method: opts.method ?? 'GET',\n } as Action;\n}\n"],"names":["defineAction","opts"],"mappings":"AAEO,SAASA,EAAaC,GAA6B;AACxD,SAAO;AAAA,IACL,SAASA,EAAK;AAAA,IACd,QAAQA,EAAK,UAAU;AAAA,EAAA;AAE3B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client-D67hK4Yy.js","sources":["../src/island/strategy-registry.ts"],"sourcesContent":["import type { MountStrategy } from './types';\n\nexport const strategies = new Map<string, MountStrategy>();\n\nexport function registerMountStrategy(name: string, fn: MountStrategy) {\n if (strategies.has(name)) {\n console.warn(`[l5e-island] Strategy \"${name}\" already registered, overwriting.`);\n }\n strategies.set(name, fn);\n}\n"],"names":["strategies","registerMountStrategy","name","fn"],"mappings":"AAEO,MAAMA,wBAAiB,IAAA;AAEvB,SAASC,EAAsBC,GAAcC,GAAmB;AACrE,EAAIH,EAAW,IAAIE,CAAI,KACrB,QAAQ,KAAK,0BAA0BA,CAAI,oCAAoC,GAEjFF,EAAW,IAAIE,GAAMC,CAAE;AACzB;"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import { M as G } from "./generateMetadata-C5QsMS-H.js";
|
|
2
|
+
import { R as K, b as T, o as W, s as V, p as R, l as H, k as g, i as Y, a as z, H as Q, d as O, e as B, h as X, g as Z, f as D } from "./jsx-runtime-C2Vw67N2.js";
|
|
3
|
+
import { viewLoaders as M, viewComponents as m } from "virtual:l5e-views";
|
|
4
|
+
import q from "virtual:l5e-route";
|
|
5
|
+
import { globalLoader as j } from "virtual:l5e-global-loader";
|
|
6
|
+
import "virtual:l5e-middleware";
|
|
7
|
+
class E extends Error {
|
|
8
|
+
constructor(r, e, s) {
|
|
9
|
+
super(e), this.name = "HttpException", this.statusCode = r, this.data = s, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
class ft extends E {
|
|
13
|
+
constructor(r = "Bad Request", e) {
|
|
14
|
+
super(400, r, e), this.name = "BadRequestException";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class tt extends E {
|
|
18
|
+
constructor(r = "Not Found", e) {
|
|
19
|
+
super(404, r, e), this.name = "NotFoundException";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
class L extends E {
|
|
23
|
+
constructor(r = "Internal Server Error", e) {
|
|
24
|
+
super(500, r, e), this.name = "InternalServerErrorException";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
class et extends E {
|
|
28
|
+
constructor(r = "Service Unavailable", e) {
|
|
29
|
+
super(503, r, e), this.name = "ServiceUnavailableException";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
class rt extends Error {
|
|
33
|
+
constructor(r, e = 302, s) {
|
|
34
|
+
super(`Redirect to ${r}`), this.name = "RedirectException", this.url = r, this.statusCode = e, this.data = s, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
console.log("render.ts");
|
|
38
|
+
const at = /* @__PURE__ */ new Set([
|
|
39
|
+
"area",
|
|
40
|
+
"base",
|
|
41
|
+
"br",
|
|
42
|
+
"col",
|
|
43
|
+
"embed",
|
|
44
|
+
"hr",
|
|
45
|
+
"img",
|
|
46
|
+
"input",
|
|
47
|
+
"link",
|
|
48
|
+
"meta",
|
|
49
|
+
"param",
|
|
50
|
+
"source",
|
|
51
|
+
"track",
|
|
52
|
+
"wbr"
|
|
53
|
+
]);
|
|
54
|
+
function I(t) {
|
|
55
|
+
return t ? typeof t == "string" ? t : Array.isArray(t) ? t.map(I).filter(Boolean).join(" ") : typeof t == "object" ? Object.keys(t).filter((r) => t[r]).join(" ") : "" : "";
|
|
56
|
+
}
|
|
57
|
+
function C(t) {
|
|
58
|
+
return t.replaceAll("&", "&").replaceAll('"', """).replaceAll("<", "<").replaceAll(">", ">").replaceAll(`
|
|
59
|
+
`, " ").trim();
|
|
60
|
+
}
|
|
61
|
+
function N(t) {
|
|
62
|
+
return t.replaceAll("&", "&").replaceAll('"', """).replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll(`
|
|
63
|
+
`, "<br/>");
|
|
64
|
+
}
|
|
65
|
+
function st(t) {
|
|
66
|
+
if (!t) return "";
|
|
67
|
+
let r = "";
|
|
68
|
+
if (t.classList !== void 0 && (r = I(t.classList)), t.class) {
|
|
69
|
+
const s = typeof t.class == "string" ? t.class : "";
|
|
70
|
+
r = r ? `${r} ${s}`.trim() : s;
|
|
71
|
+
}
|
|
72
|
+
const e = Object.entries(t).filter(
|
|
73
|
+
([s]) => s !== "children" && s !== "classList" && s !== "setHtml" && s !== "setText" && s !== "class" && s !== "key" && s !== "cacheTag"
|
|
74
|
+
).map(([s, o]) => {
|
|
75
|
+
if (o === !1 || o === null || o === void 0) return "";
|
|
76
|
+
if (o === !0) return s;
|
|
77
|
+
if (typeof o == "function") {
|
|
78
|
+
const c = o();
|
|
79
|
+
return `${s}="${C(c?.toString() || "")}"`;
|
|
80
|
+
}
|
|
81
|
+
return `${s}="${C(o?.toString() || "")}"`;
|
|
82
|
+
}).filter(Boolean);
|
|
83
|
+
return r && e.push(`class="${C(r)}"`), e.join(" ");
|
|
84
|
+
}
|
|
85
|
+
function w(t) {
|
|
86
|
+
if (t === null || typeof t == "boolean" || t === void 0) return "";
|
|
87
|
+
if (t && typeof t == "object" && t[K])
|
|
88
|
+
return t.content || "";
|
|
89
|
+
if (t && typeof t == "object" && "htmlContent" in t)
|
|
90
|
+
return t.htmlContent;
|
|
91
|
+
if (typeof t == "string") return N(t.toString());
|
|
92
|
+
if (typeof t == "number") return t.toString();
|
|
93
|
+
if (Array.isArray(t))
|
|
94
|
+
return t.map((i) => w(i)).join("");
|
|
95
|
+
const { type: r, props: e, children: s } = t;
|
|
96
|
+
if (e?.cacheTag && T(e.cacheTag), typeof r == "function") {
|
|
97
|
+
const i = r({ ...e || {}, children: s });
|
|
98
|
+
return i && typeof i == "object" && "string" in i ? i.string : w(i);
|
|
99
|
+
}
|
|
100
|
+
const o = st(e);
|
|
101
|
+
if (at.has(r.toLowerCase()))
|
|
102
|
+
return `<${r}${o ? " " + o : ""} />`;
|
|
103
|
+
let n = "";
|
|
104
|
+
return e?.setHtml !== void 0 ? n = e.setHtml?.toString() || "" : e?.setText !== void 0 ? n = N(e.setText?.toString() || "") : n = s.map((i) => w(i)).join(""), `<${r}${o ? " " + o : ""}>${n}</${r}>`;
|
|
105
|
+
}
|
|
106
|
+
function u(t) {
|
|
107
|
+
return t && typeof t == "object" && "string" in t ? t.string : w(t);
|
|
108
|
+
}
|
|
109
|
+
function ht(t) {
|
|
110
|
+
return t && typeof t == "object" && "string" in t ? t : {
|
|
111
|
+
string: w(t)
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
async function P(t, r) {
|
|
115
|
+
const e = "_error", s = `/src/views/${e}/index.tsx`;
|
|
116
|
+
V(e);
|
|
117
|
+
const o = m[s] ? await m[s]() : null;
|
|
118
|
+
if (o?.default) {
|
|
119
|
+
const c = {
|
|
120
|
+
statusCode: t.statusCode,
|
|
121
|
+
message: t.message,
|
|
122
|
+
data: t.data
|
|
123
|
+
}, n = o.default, i = u(g(n, c)), x = O(), S = B(), f = D(), b = f.length > 0 ? f.map((l) => u(l)).join(`
|
|
124
|
+
`) : void 0;
|
|
125
|
+
return {
|
|
126
|
+
html: i,
|
|
127
|
+
scripts: x.map((l) => l.path),
|
|
128
|
+
styles: S.map((l) => l.path),
|
|
129
|
+
head: b,
|
|
130
|
+
lang: r,
|
|
131
|
+
statusCode: t.statusCode
|
|
132
|
+
};
|
|
133
|
+
} else {
|
|
134
|
+
const c = g("div", {}, `${t.statusCode} - ${t.message}`);
|
|
135
|
+
return {
|
|
136
|
+
html: u(c),
|
|
137
|
+
statusCode: t.statusCode
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async function gt(t, r = {}) {
|
|
142
|
+
return W(async () => {
|
|
143
|
+
try {
|
|
144
|
+
const e = await q(r);
|
|
145
|
+
if (!e)
|
|
146
|
+
throw new tt("Page not found", {
|
|
147
|
+
path: r.path,
|
|
148
|
+
pathname: r.pathname,
|
|
149
|
+
url: r.url?.href
|
|
150
|
+
});
|
|
151
|
+
V(e);
|
|
152
|
+
let s = {}, o;
|
|
153
|
+
const c = "/src/global-loader.ts", n = j[c] ? await j[c]() : null;
|
|
154
|
+
if (n?.loader)
|
|
155
|
+
if (n.shouldIgnore?.(e) || !1)
|
|
156
|
+
console.info(`Global loader ignored for view: ${e}`);
|
|
157
|
+
else {
|
|
158
|
+
const p = await n.loader(r);
|
|
159
|
+
s = p.props || {}, o = p.lang, p.cacheTags && T(p.cacheTags);
|
|
160
|
+
}
|
|
161
|
+
let i = {}, x, S, f, b = !1;
|
|
162
|
+
const l = `/src/views/${e}/loader.ts`, d = M[l] ? await M[l]() : null;
|
|
163
|
+
if (d?.loader) {
|
|
164
|
+
const a = await d.loader(r);
|
|
165
|
+
if (a.rawResponse)
|
|
166
|
+
return {
|
|
167
|
+
rawResponse: a.rawResponse,
|
|
168
|
+
statusCode: a.rawResponse.statusCode || 200
|
|
169
|
+
};
|
|
170
|
+
i = a.props || {}, x = a.maxAge, S = a.sMaxAge, f = a.swr, b = a.rawHtml || !1, a.cacheTags && T(a.cacheTags), a.lang && (o = a.lang);
|
|
171
|
+
} else
|
|
172
|
+
console.info(`No loader for view: ${e}`);
|
|
173
|
+
const h = { ...s, ...i };
|
|
174
|
+
if (n?.generateMetadata) {
|
|
175
|
+
const a = n.generateMetadata(r, h);
|
|
176
|
+
a && R(a);
|
|
177
|
+
}
|
|
178
|
+
if (d?.generateMetadata) {
|
|
179
|
+
const a = d.generateMetadata(r, h);
|
|
180
|
+
a && R(a);
|
|
181
|
+
}
|
|
182
|
+
if (n?.generateSchema) {
|
|
183
|
+
const a = n.generateSchema(r, h);
|
|
184
|
+
a && H(a);
|
|
185
|
+
}
|
|
186
|
+
if (d?.generateSchema) {
|
|
187
|
+
const a = d.generateSchema(r, h);
|
|
188
|
+
a && H(a);
|
|
189
|
+
}
|
|
190
|
+
const v = `/src/views/${e}/index.tsx`, y = (m[v] ? await m[v]() : null)?.default;
|
|
191
|
+
if (!y)
|
|
192
|
+
throw console.error(`View component not found: ${e}`), process.env.NODE_ENV !== "production" ? new L(`View component not found: "${e}"`, {
|
|
193
|
+
viewName: e,
|
|
194
|
+
expectedPath: v,
|
|
195
|
+
availableViews: Object.keys(m),
|
|
196
|
+
hint: `Make sure the view component exists at ${v} and exports a default component`,
|
|
197
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
198
|
+
}) : new L("Internal Server Error");
|
|
199
|
+
u(g(G, {})), Y().forEach((a) => {
|
|
200
|
+
const p = JSON.stringify(a);
|
|
201
|
+
z({
|
|
202
|
+
priority: Q.SEO,
|
|
203
|
+
children: g("script", {
|
|
204
|
+
type: "application/ld+json",
|
|
205
|
+
setHtml: p
|
|
206
|
+
})
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
const _ = u(g(y, h)), k = O(), F = B(), $ = X(), J = Z(), A = D(), U = A.length > 0 ? A.map((a) => u(a)).join(`
|
|
210
|
+
`) : void 0;
|
|
211
|
+
return {
|
|
212
|
+
html: _,
|
|
213
|
+
scripts: k.map((a) => a.path),
|
|
214
|
+
styles: F.map((a) => a.path),
|
|
215
|
+
islands: $.length > 0 ? $ : void 0,
|
|
216
|
+
head: U,
|
|
217
|
+
lang: o,
|
|
218
|
+
maxAge: x,
|
|
219
|
+
sMaxAge: S,
|
|
220
|
+
swr: f,
|
|
221
|
+
cacheTags: J,
|
|
222
|
+
rawHtml: b
|
|
223
|
+
};
|
|
224
|
+
} catch (e) {
|
|
225
|
+
if (e instanceof rt)
|
|
226
|
+
return {
|
|
227
|
+
html: "",
|
|
228
|
+
redirect: {
|
|
229
|
+
url: e.url,
|
|
230
|
+
statusCode: e.statusCode
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
if (e instanceof E)
|
|
234
|
+
return await P(e);
|
|
235
|
+
console.error("Failed to render:", e);
|
|
236
|
+
const s = new et(e.message || "Internal Server Error", {
|
|
237
|
+
originalError: e.name,
|
|
238
|
+
stack: e.stack,
|
|
239
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
240
|
+
});
|
|
241
|
+
return await P(s);
|
|
242
|
+
}
|
|
243
|
+
}, r);
|
|
244
|
+
}
|
|
245
|
+
export {
|
|
246
|
+
ft as B,
|
|
247
|
+
E as H,
|
|
248
|
+
L as I,
|
|
249
|
+
tt as N,
|
|
250
|
+
rt as R,
|
|
251
|
+
et as S,
|
|
252
|
+
C as a,
|
|
253
|
+
u as b,
|
|
254
|
+
ht as c,
|
|
255
|
+
N as e,
|
|
256
|
+
gt as r
|
|
257
|
+
};
|
|
258
|
+
//# sourceMappingURL=entry-server-Ckh6zfgm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-server-Ckh6zfgm.js","sources":["../src/core/exceptions.ts","../src/core/render.ts","../src/core/entry-server.ts"],"sourcesContent":["/**\n * Base HTTP Exception class\n */\nexport class HttpException extends Error {\n public readonly statusCode: number;\n public readonly data?: Record<string, any>;\n\n constructor(statusCode: number, message: string, data?: Record<string, any>) {\n super(message);\n this.name = 'HttpException';\n this.statusCode = statusCode;\n this.data = data;\n\n // Maintains proper stack trace for where our error was thrown (only available on V8)\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n\n/**\n * 400 Bad Request Exception\n */\nexport class BadRequestException extends HttpException {\n constructor(message: string = 'Bad Request', data?: Record<string, any>) {\n super(400, message, data);\n this.name = 'BadRequestException';\n }\n}\n\n/**\n * 404 Not Found Exception\n */\nexport class NotFoundException extends HttpException {\n constructor(message: string = 'Not Found', data?: Record<string, any>) {\n super(404, message, data);\n this.name = 'NotFoundException';\n }\n}\n\n/**\n * 500 Internal Server Error Exception\n */\nexport class InternalServerErrorException extends HttpException {\n constructor(message: string = 'Internal Server Error', data?: Record<string, any>) {\n super(500, message, data);\n this.name = 'InternalServerErrorException';\n }\n}\n\n/**\n * 503 Service Unavailable Exception\n */\nexport class ServiceUnavailableException extends HttpException {\n constructor(message: string = 'Service Unavailable', data?: Record<string, any>) {\n super(503, message, data);\n this.name = 'ServiceUnavailableException';\n }\n}\n\n/**\n * Redirect Exception - for HTTP redirects (301/302)\n */\nexport class RedirectException extends Error {\n public readonly url: string;\n public readonly statusCode: number;\n public readonly data?: Record<string, any>;\n\n constructor(url: string, statusCode: number = 302, data?: Record<string, any>) {\n super(`Redirect to ${url}`);\n this.name = 'RedirectException';\n this.url = url;\n this.statusCode = statusCode;\n this.data = data;\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n}\n","import { RAW_HTML_MARKER } from './const';\nimport {\n addCacheTag,\n type HtmlContentObject,\n type JSXChild,\n type JSXNode,\n type RenderedNode,\n} from './jsx-runtime';\n\nif (true) {\n console.log('render.ts');\n}\n\nconst VOID_ELEMENTS = new Set<string>([\n 'area',\n 'base',\n 'br',\n 'col',\n 'embed',\n 'hr',\n 'img',\n 'input',\n 'link',\n 'meta',\n 'param',\n 'source',\n 'track',\n 'wbr',\n]);\n\nfunction classList(input: unknown): string {\n if (!input) return '';\n if (typeof input === 'string') return input;\n if (Array.isArray(input)) {\n return input.map(classList).filter(Boolean).join(' ');\n }\n if (typeof input === 'object') {\n return Object.keys(input as Record<string, boolean>)\n .filter((key) => (input as Record<string, boolean>)[key])\n .join(' ');\n }\n return '';\n}\n\nexport function escapeProp(value: string): string {\n return value\n .replaceAll('&', '&')\n .replaceAll('\"', '"')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\\n', ' ')\n .trim();\n}\n\nexport function escapeHTML(value: string): string {\n return value\n .replaceAll('&', '&')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\\n', '<br/>');\n}\n\nfunction renderAttributes(props?: Record<string, any>): string {\n if (!props) return '';\n\n let classValue = '';\n if (props.classList !== undefined) {\n classValue = classList(props.classList);\n }\n if (props.class) {\n const existingClass = typeof props.class === 'string' ? props.class : '';\n classValue = classValue ? `${classValue} ${existingClass}`.trim() : existingClass;\n }\n\n const attrs = Object.entries(props)\n .filter(\n ([key]) =>\n key !== 'children' &&\n key !== 'classList' &&\n key !== 'setHtml' &&\n key !== 'setText' &&\n key !== 'class' &&\n key !== 'key' &&\n key !== 'cacheTag',\n )\n .map(([key, value]) => {\n // HTML standard behavior with function execution support\n if (value === false || value === null || value === undefined) return '';\n if (value === true) return key;\n\n // Execute function props and get result (new feature)\n if (typeof value === 'function') {\n const result = value();\n return `${key}=\"${escapeProp(result?.toString() || '')}\"`;\n }\n\n return `${key}=\"${escapeProp(value?.toString() || '')}\"`;\n })\n .filter(Boolean) as string[];\n\n if (classValue) {\n attrs.push(`class=\"${escapeProp(classValue)}\"`);\n }\n\n return attrs.join(' ');\n}\n\nfunction renderJsxToHtmlStringInternal(element: JSXChild): string {\n // HTML standard: skip boolean, null, undefined children\n if (element === null || typeof element === 'boolean' || element === undefined) return '';\n\n if (element && typeof element === 'object' && (element as any)[RAW_HTML_MARKER]) {\n return (element as any).content || '';\n }\n\n // Support htmlContent object (new feature)\n if (element && typeof element === 'object' && 'htmlContent' in element) {\n return (element as HtmlContentObject).htmlContent;\n }\n\n if (typeof element === 'string') return escapeHTML(element.toString());\n if (typeof element === 'number') return element.toString();\n\n if (Array.isArray(element)) {\n return (element as JSXChild[]).map((el) => renderJsxToHtmlStringInternal(el)).join('');\n }\n\n const { type, props, children } = element as JSXNode;\n\n // Collect cache tags from props\n if (props?.cacheTag) {\n addCacheTag(props.cacheTag);\n }\n\n if (typeof type === 'function') {\n const componentResult = (type as any)({ ...(props || {}), children });\n // Check if component returned a RenderedNode\n if (componentResult && typeof componentResult === 'object' && 'string' in componentResult) {\n return (componentResult as RenderedNode).string;\n }\n return renderJsxToHtmlStringInternal(componentResult as JSXChild);\n }\n\n const attrs = renderAttributes(props);\n const isVoidElement = VOID_ELEMENTS.has((type as string).toLowerCase());\n\n if (isVoidElement) {\n return `<${type}${attrs ? ' ' + attrs : ''} />`;\n }\n\n let childrenHtml = '';\n if (props?.setHtml !== undefined) {\n childrenHtml = props.setHtml?.toString() || '';\n } else if (props?.setText !== undefined) {\n childrenHtml = escapeHTML(props.setText?.toString() || '');\n } else {\n childrenHtml = (children as JSXChild[]).map((el) => renderJsxToHtmlStringInternal(el)).join('');\n }\n\n return `<${type}${attrs ? ' ' + attrs : ''}>${childrenHtml}</${type}>`;\n}\n\nexport function renderJsxToHtmlString(element: JSXChild | RenderedNode): string {\n // If already a RenderedNode, return its string\n if (element && typeof element === 'object' && 'string' in element) {\n return (element as RenderedNode).string;\n }\n return renderJsxToHtmlStringInternal(element as JSXChild);\n}\n\nexport function renderToRenderedNode(element: JSXChild | RenderedNode): RenderedNode {\n // If already a RenderedNode, return as is\n if (element && typeof element === 'object' && 'string' in element) {\n return element as RenderedNode;\n }\n return {\n string: renderJsxToHtmlStringInternal(element as JSXChild),\n };\n}\n","/// <reference path=\"./jsx-types.d.ts\" />\nimport { MetadataRenderer } from '../seo/generateMetadata';\nimport type { Metadata } from '../seo/types';\nimport {\n HttpException,\n InternalServerErrorException,\n NotFoundException,\n RedirectException,\n ServiceUnavailableException,\n} from './exceptions';\nimport { HEAD_PRIORITY } from './head-priority';\nimport {\n addCacheTag,\n getCacheTags,\n getClientJsEntries,\n getCssEntries,\n getHeadContent,\n getIslandEntries,\n getSchemas,\n jsxFactory as h,\n Head,\n pushMetadata,\n pushSchema,\n runInRenderContext,\n setViewName,\n} from './jsx-runtime';\nimport { renderJsxToHtmlString } from './render';\n// @ts-ignore - Virtual modules provided by Vite plugin\nimport { viewComponents, viewLoaders } from 'virtual:l5e-views';\n// @ts-ignore - Virtual modules provided by Vite plugin\nimport routeHandler from 'virtual:l5e-route';\n// @ts-ignore - Virtual modules provided by Vite plugin\nimport { globalLoader } from 'virtual:l5e-global-loader';\n// @ts-ignore - Virtual modules provided by Vite plugin\nexport { loadMiddleware } from 'virtual:l5e-middleware';\n\nexport interface RawResponse {\n body: string | Buffer;\n contentType: string;\n statusCode?: number;\n headers?: Record<string, string>;\n}\n\nexport interface RenderResult {\n html?: string;\n scripts?: string[];\n styles?: string[];\n islands?: Array<{ key: string; src: string; name: string }>;\n head?: string;\n lang?: string;\n statusCode?: number;\n maxAge?: number;\n sMaxAge?: number;\n swr?: number;\n cacheTags?: string[];\n redirect?: { url: string; statusCode: number };\n rawResponse?: RawResponse;\n rawHtml?: boolean;\n}\n\nexport interface RequestInfo {\n url?: URL;\n path?: string;\n pathname?: string;\n method?: string;\n headers?: Record<string, any>;\n cookies?: Record<string, string>;\n query?: Record<string, any>;\n ip?: string;\n locals?: Record<string, unknown>;\n}\n\n// SchemaMarkup type - có thể là single schema hoặc array of schemas\n// Sử dụng any để tương thích với schema-dts types từ frontend\nexport type SchemaMarkup = any | Array<any>;\n\nexport interface LoaderResult {\n props?: Record<string, any>;\n lang?: string;\n maxAge?: number;\n sMaxAge?: number;\n swr?: number;\n cacheTags?: string[] | Record<string, boolean>;\n rawResponse?: RawResponse;\n rawHtml?: boolean;\n}\n\nexport type LoaderFunction = (requestInfo: RequestInfo) => Promise<LoaderResult>;\n\nexport type GenerateMetadataFunction = (requestInfo: RequestInfo, props: any) => Metadata | null;\n\nexport type GenerateSchemaFunction = (requestInfo: RequestInfo, props: any) => SchemaMarkup | null;\n\nexport interface GlobalLoaderModule {\n loader: LoaderFunction;\n generateMetadata?: GenerateMetadataFunction;\n generateSchema?: GenerateSchemaFunction;\n shouldIgnore?: (viewName: string) => boolean;\n}\n\n/**\n * Helper function to render error view\n */\nasync function renderErrorView(err: HttpException, lang?: string): Promise<RenderResult> {\n const errorViewName = `_error`;\n const errorComponentPath = `/src/views/${errorViewName}/index.tsx`;\n\n // Set error view name in context\n setViewName(errorViewName);\n\n // Try to load error view\n const errorComponentModule = viewComponents[errorComponentPath]\n ? await viewComponents[errorComponentPath]()\n : null;\n\n if (errorComponentModule?.default) {\n // Render error view with exception data\n const errorProps = {\n statusCode: err.statusCode,\n message: err.message,\n data: err.data,\n };\n\n const Component = errorComponentModule.default;\n const htmlBody = renderJsxToHtmlString(h(Component, errorProps));\n const clientEntries = getClientJsEntries();\n const cssEntries = getCssEntries();\n const headContent = getHeadContent();\n\n const headHtml =\n headContent.length > 0\n ? headContent.map((content) => renderJsxToHtmlString(content)).join('\\n ')\n : undefined;\n\n return {\n html: htmlBody,\n scripts: clientEntries.map((entry) => entry.path),\n styles: cssEntries.map((entry) => entry.path),\n head: headHtml,\n lang,\n statusCode: err.statusCode,\n };\n } else {\n // No error view found, render default error message\n const html = h('div', {}, `${err.statusCode} - ${err.message}`);\n return {\n html: renderJsxToHtmlString(html),\n statusCode: err.statusCode,\n };\n }\n}\n\nexport async function render(url: string, requestInfo: RequestInfo = {}): Promise<RenderResult> {\n return runInRenderContext(async () => {\n try {\n // Step 1: Call route handler to get view name\n const viewName = await routeHandler(requestInfo);\n\n if (!viewName) {\n // Throw NotFoundException to render error_404 view\n throw new NotFoundException('Page not found', {\n path: requestInfo.path,\n pathname: requestInfo.pathname,\n url: requestInfo.url?.href,\n });\n }\n\n // Set view name in render context\n setViewName(viewName);\n\n // Step 2: Load global loader (optional)\n let globalProps: Record<string, any> = {};\n let lang: string | undefined;\n\n // Try to load global loader\n const globalLoaderPathTs = '/src/global-loader.ts';\n\n const globalLoaderModule: GlobalLoaderModule | null = globalLoader[globalLoaderPathTs]\n ? await globalLoader[globalLoaderPathTs]()\n : null;\n\n // Run global loader if exists and not ignored\n if (globalLoaderModule?.loader) {\n const shouldIgnore = globalLoaderModule.shouldIgnore?.(viewName) || false;\n\n if (!shouldIgnore) {\n const globalLoaderResult = await globalLoaderModule.loader(requestInfo);\n\n globalProps = globalLoaderResult.props || {};\n lang = globalLoaderResult.lang; // Extract lang from global loader\n\n if (globalLoaderResult.cacheTags) {\n addCacheTag(globalLoaderResult.cacheTags);\n }\n\n // generateMetadata và generateSchema sẽ được gọi sau khi có props\n } else {\n console.info(`Global loader ignored for view: ${viewName}`);\n }\n }\n\n // Step 3: Dynamic import view loader (optional)\n let viewProps: Record<string, any> = {};\n let maxAge: number | undefined;\n let sMaxAge: number | undefined;\n let swr: number | undefined;\n let rawHtml: boolean = false;\n const loaderPathTs = `/src/views/${viewName}/loader.ts`;\n\n // Try TypeScript loader formats only\n const loaderModule = viewLoaders[loaderPathTs] ? await viewLoaders[loaderPathTs]() : null;\n\n if (loaderModule?.loader) {\n const loaderResult = await loaderModule.loader(requestInfo);\n\n // Check if loader returns raw response\n if (loaderResult.rawResponse) {\n return {\n rawResponse: loaderResult.rawResponse,\n statusCode: loaderResult.rawResponse.statusCode || 200,\n };\n }\n\n viewProps = loaderResult.props || {};\n maxAge = loaderResult.maxAge;\n sMaxAge = loaderResult.sMaxAge;\n swr = loaderResult.swr;\n rawHtml = loaderResult.rawHtml || false;\n\n if (loaderResult.cacheTags) {\n addCacheTag(loaderResult.cacheTags);\n }\n\n // View loader lang overrides global loader lang\n if (loaderResult.lang) {\n lang = loaderResult.lang;\n }\n } else {\n console.info(`No loader for view: ${viewName}`);\n }\n\n // Merge props: global props first, then view props (view can override)\n const props = { ...globalProps, ...viewProps };\n\n // Step 3.5: Generate metadata và schema từ generateMetadata và generateSchema functions\n // Global generateMetadata (parent metadata)\n if (globalLoaderModule?.generateMetadata) {\n const globalMetadata = globalLoaderModule.generateMetadata(requestInfo, props);\n if (globalMetadata) {\n pushMetadata(globalMetadata);\n }\n }\n\n // View generateMetadata (child metadata, sẽ merge với parent)\n if (loaderModule?.generateMetadata) {\n const viewMetadata = loaderModule.generateMetadata(requestInfo, props);\n if (viewMetadata) {\n pushMetadata(viewMetadata);\n }\n }\n\n // Global generateSchema (base schemas)\n if (globalLoaderModule?.generateSchema) {\n const globalSchema = globalLoaderModule.generateSchema(requestInfo, props);\n if (globalSchema) {\n pushSchema(globalSchema);\n }\n }\n\n // View generateSchema (view-specific schemas)\n if (loaderModule?.generateSchema) {\n const viewSchema = loaderModule.generateSchema(requestInfo, props);\n if (viewSchema) {\n pushSchema(viewSchema);\n }\n }\n\n // Step 4: Dynamic import component (required)\n const componentPathTsx = `/src/views/${viewName}/index.tsx`;\n\n const componentModule = viewComponents[componentPathTsx]\n ? await viewComponents[componentPathTsx]()\n : null;\n\n const Component = componentModule?.default;\n\n if (!Component) {\n console.error(`View component not found: ${viewName}`);\n\n // Check if in development or production mode\n const isDevelopment = process.env.NODE_ENV !== 'production';\n\n if (isDevelopment) {\n // Development: provide detailed error information\n throw new InternalServerErrorException(`View component not found: \"${viewName}\"`, {\n viewName,\n expectedPath: componentPathTsx,\n availableViews: Object.keys(viewComponents),\n hint: `Make sure the view component exists at ${componentPathTsx} and exports a default component`,\n timestamp: new Date().toISOString(),\n });\n } else {\n // Production: simple error message\n throw new InternalServerErrorException('Internal Server Error');\n }\n }\n\n // Auto-render MetadataRenderer trước khi render component\n // MetadataRenderer sẽ push metadata vào headRegistry thông qua Head component\n renderJsxToHtmlString(h(MetadataRenderer, {}));\n\n // Auto-render schemas vào headRegistry\n const schemas = getSchemas();\n schemas.forEach((schema) => {\n const schemaJson = JSON.stringify(schema);\n // Push schema vào headRegistry thông qua Head component\n // Head component chỉ push vào registry, không cần renderJsxToHtmlString\n Head({\n priority: HEAD_PRIORITY.SEO,\n children: h('script', {\n type: 'application/ld+json',\n setHtml: schemaJson,\n }),\n });\n });\n\n // Render component (có thể có Head components khác)\n const htmlBody = renderJsxToHtmlString(h(Component, props));\n const clientEntries = getClientJsEntries();\n const cssEntries = getCssEntries();\n const islandEntries = getIslandEntries();\n const cacheTags = getCacheTags();\n const headContent = getHeadContent();\n\n // Render head content to HTML string\n const headHtml =\n headContent.length > 0\n ? headContent.map((content) => renderJsxToHtmlString(content)).join('\\n ')\n : undefined;\n\n return {\n html: htmlBody,\n scripts: clientEntries.map((entry) => entry.path),\n styles: cssEntries.map((entry) => entry.path),\n islands: islandEntries.length > 0 ? islandEntries : undefined,\n head: headHtml,\n lang,\n maxAge,\n sMaxAge,\n swr,\n cacheTags,\n rawHtml,\n };\n } catch (err: any) {\n // Handle RedirectException\n if (err instanceof RedirectException) {\n return {\n html: '',\n redirect: {\n url: err.url,\n statusCode: err.statusCode,\n },\n };\n }\n\n // Handle HttpException\n if (err instanceof HttpException) {\n return await renderErrorView(err);\n }\n\n // For other errors, convert to ServiceUnavailableException\n console.error(`Failed to render:`, err);\n const serviceError = new ServiceUnavailableException(err.message || 'Internal Server Error', {\n originalError: err.name,\n stack: err.stack,\n timestamp: new Date().toISOString(),\n });\n return await renderErrorView(serviceError);\n }\n }, requestInfo);\n}\n"],"names":["HttpException","statusCode","message","data","BadRequestException","NotFoundException","InternalServerErrorException","ServiceUnavailableException","RedirectException","url","VOID_ELEMENTS","classList","input","key","escapeProp","value","escapeHTML","renderAttributes","props","classValue","existingClass","attrs","result","renderJsxToHtmlStringInternal","element","RAW_HTML_MARKER","el","type","children","addCacheTag","componentResult","childrenHtml","renderJsxToHtmlString","renderToRenderedNode","renderErrorView","err","lang","errorViewName","errorComponentPath","setViewName","errorComponentModule","viewComponents","errorProps","Component","htmlBody","h","clientEntries","getClientJsEntries","cssEntries","getCssEntries","headContent","getHeadContent","headHtml","content","entry","html","render","requestInfo","runInRenderContext","viewName","routeHandler","globalProps","globalLoaderPathTs","globalLoaderModule","globalLoader","globalLoaderResult","viewProps","maxAge","sMaxAge","swr","rawHtml","loaderPathTs","loaderModule","viewLoaders","loaderResult","globalMetadata","pushMetadata","viewMetadata","globalSchema","pushSchema","viewSchema","componentPathTsx","MetadataRenderer","getSchemas","schema","schemaJson","Head","HEAD_PRIORITY","islandEntries","getIslandEntries","cacheTags","getCacheTags","serviceError"],"mappings":";;;;;;AAGO,MAAMA,UAAsB,MAAM;AAAA,EAIv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,MAAM;AAAA,UACN,UAAU;AAAA,YACR,KAAK2B,EAAI;AAAA,YACT,YAAYA,EAAI;AAAA,UAAA;AAAA,QAClB;AAKJ,UAAIA,aAAenC;AACjB,eAAO,MAAMkC,EAAgBC,CAAG;AAIlC,cAAQ,MAAM,qBAAqBA,CAAG;AACtC,YAAMyD,IAAe,IAAIrF,GAA4B4B,EAAI,WAAW,yBAAyB;AAAA,QAC3F,eAAeA,EAAI;AAAA,QACnB,OAAOA,EAAI;AAAA,QACX,YAAW,oBAAI,KAAA,GAAO,YAAA;AAAA,MAAY,CACnC;AACD,aAAO,MAAMD,EAAgB0D,CAAY;AAAA,IAC3C;AAAA,EACF,GAAGnC,CAAW;AAChB;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./generateMetadata-C5QsMS-H.js";
|
|
2
|
+
import { r as d } from "./entry-server-Ckh6zfgm.js";
|
|
3
|
+
import "./jsx-runtime-C2Vw67N2.js";
|
|
4
|
+
import "virtual:l5e-views";
|
|
5
|
+
import "virtual:l5e-route";
|
|
6
|
+
import "virtual:l5e-global-loader";
|
|
7
|
+
import { loadMiddleware as f } from "virtual:l5e-middleware";
|
|
8
|
+
export {
|
|
9
|
+
f as loadMiddleware,
|
|
10
|
+
d as render
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=entry-server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry-server.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { jsxFactory as t, Fragment as T } from "@withl5e/l5e/jsx-runtime";
|
|
2
|
+
import { t as j, n as M, m as C, a as s, H as l, F as o } from "./jsx-runtime-C2Vw67N2.js";
|
|
3
|
+
function R({ metadata: h }) {
|
|
4
|
+
const { request: w } = j(), u = M(), e = h ? C(u, h) : u;
|
|
5
|
+
if (!e) return null;
|
|
6
|
+
const g = () => e.title ? typeof e.title == "string" ? e.title : e.title.default : null, G = () => {
|
|
7
|
+
if (Object.keys(w.query || {}).filter((p) => typeof e.robots == "string" ? !1 : Array.isArray(e.robots?.allowQueryNames) ? !e.robots.allowQueryNames.includes(p) : p !== e.robots?.allowQueryNames).length > 0) return "noindex, follow";
|
|
8
|
+
if (!e.robots) return null;
|
|
9
|
+
if (typeof e.robots == "string") return e.robots;
|
|
10
|
+
const a = [];
|
|
11
|
+
return e.robots.index === !1 ? a.push("noindex") : e.robots.index === !0 && a.push("index"), e.robots.follow === !1 ? a.push("nofollow") : e.robots.follow === !0 && a.push("follow"), e.robots.noarchive && a.push("noarchive"), e.robots.nosnippet && a.push("nosnippet"), e.robots.noimageindex && a.push("noimageindex"), e.robots.nocache && a.push("nocache"), a.length > 0 ? a.join(", ") : null;
|
|
12
|
+
}, b = () => {
|
|
13
|
+
if (!e.viewport) return null;
|
|
14
|
+
if (typeof e.viewport == "string") return e.viewport;
|
|
15
|
+
const r = [];
|
|
16
|
+
return e.viewport.width && r.push(`width=${e.viewport.width}`), e.viewport.height && r.push(`height=${e.viewport.height}`), e.viewport.initialScale && r.push(`initial-scale=${e.viewport.initialScale}`), e.viewport.maximumScale && r.push(`maximum-scale=${e.viewport.maximumScale}`), e.viewport.minimumScale && r.push(`minimum-scale=${e.viewport.minimumScale}`), e.viewport.userScalable !== void 0 && r.push(`user-scalable=${e.viewport.userScalable ? "yes" : "no"}`), r.length > 0 ? r.join(", ") : null;
|
|
17
|
+
}, k = () => e.keywords ? Array.isArray(e.keywords) ? e.keywords.join(", ") : e.keywords : null, x = () => e.author ? typeof e.author == "string" ? [{ name: e.author }] : Array.isArray(e.author) ? e.author : [e.author] : [], v = () => {
|
|
18
|
+
if (!e.formatDetection) return null;
|
|
19
|
+
const r = [];
|
|
20
|
+
return e.formatDetection.telephone === !1 && r.push("telephone=no"), e.formatDetection.date === !1 && r.push("date=no"), e.formatDetection.address === !1 && r.push("address=no"), e.formatDetection.email === !1 && r.push("email=no"), r.length > 0 ? r.join(", ") : null;
|
|
21
|
+
}, A = () => e.openGraph?.images ? (Array.isArray(e.openGraph.images) ? e.openGraph.images : [e.openGraph.images]).map((n) => typeof n == "string" ? { url: n } : n) : [], _ = () => e.twitter?.images ? (Array.isArray(e.twitter.images) ? e.twitter.images : [e.twitter.images]).map((n) => typeof n == "string" ? { url: n } : n) : [], L = () => {
|
|
22
|
+
if (!e.icons) return { icon: [], apple: [], shortcut: null, other: [] };
|
|
23
|
+
const r = e.icons.icon ? Array.isArray(e.icons.icon) ? e.icons.icon : [e.icons.icon] : [], n = e.icons.apple ? Array.isArray(e.icons.apple) ? e.icons.apple : [e.icons.apple] : [];
|
|
24
|
+
return {
|
|
25
|
+
icon: r,
|
|
26
|
+
apple: n,
|
|
27
|
+
shortcut: e.icons.shortcut || null,
|
|
28
|
+
other: e.icons.other || []
|
|
29
|
+
};
|
|
30
|
+
}, c = g(), d = G(), m = b(), f = k(), S = x(), y = v(), I = A(), D = _(), i = L(), N = Array.isArray(e.themeColor) ? e.themeColor : e.themeColor ? [e.themeColor] : [];
|
|
31
|
+
return /* @__PURE__ */ t(T, null, (e.charset || m) && /* @__PURE__ */ t(s, { priority: l.CRITICAL }, e.charset && /* @__PURE__ */ t("meta", { charset: e.charset }), m && /* @__PURE__ */ t("meta", { name: "viewport", content: m })), (c || e.description || e.canonical || e.prev || e.next) && /* @__PURE__ */ t(s, { priority: l.HIGH }, c && /* @__PURE__ */ t("title", null, c), e.description && /* @__PURE__ */ t("meta", { name: "description", content: e.description }), e.canonical && /* @__PURE__ */ t("link", { rel: "canonical", href: e.canonical }), e.prev && /* @__PURE__ */ t("link", { rel: "prev", href: e.prev }), e.next && /* @__PURE__ */ t("link", { rel: "next", href: e.next })), /* @__PURE__ */ t(s, { priority: l.MEDIUM }, f && /* @__PURE__ */ t("meta", { name: "keywords", content: f }), d && /* @__PURE__ */ t("meta", { name: "robots", content: d }), e.colorScheme && /* @__PURE__ */ t("meta", { name: "color-scheme", content: e.colorScheme }), N.map((r, n) => /* @__PURE__ */ t("meta", { name: "theme-color", content: r })), e.generator && /* @__PURE__ */ t("meta", { name: "generator", content: e.generator }), e.creator && /* @__PURE__ */ t("meta", { name: "creator", content: e.creator }), e.publisher && /* @__PURE__ */ t("meta", { name: "publisher", content: e.publisher }), e.referrer && /* @__PURE__ */ t("meta", { name: "referrer", content: e.referrer }), e.category && /* @__PURE__ */ t("meta", { name: "category", content: e.category }), e.classification && /* @__PURE__ */ t("meta", { name: "classification", content: e.classification }), y && /* @__PURE__ */ t("meta", { name: "format-detection", content: y }), S.map((r, n) => /* @__PURE__ */ t(o, null, /* @__PURE__ */ t("meta", { name: "author", content: r.name }), r.url && /* @__PURE__ */ t("link", { rel: "author", href: r.url }))), i.icon.map((r, n) => /* @__PURE__ */ t("link", { rel: "icon", href: r })), i.shortcut && /* @__PURE__ */ t("link", { rel: "shortcut icon", href: i.shortcut }), i.apple.map((r, n) => /* @__PURE__ */ t("link", { rel: "apple-touch-icon", href: r })), i.other.map((r, n) => /* @__PURE__ */ t(
|
|
32
|
+
"link",
|
|
33
|
+
{
|
|
34
|
+
rel: r.rel || "icon",
|
|
35
|
+
href: r.url,
|
|
36
|
+
...r.sizes && { sizes: r.sizes },
|
|
37
|
+
...r.type && { type: r.type }
|
|
38
|
+
}
|
|
39
|
+
)), e.manifest && /* @__PURE__ */ t("link", { rel: "manifest", href: e.manifest }), e.feed && /* @__PURE__ */ t("link", { rel: "alternate", type: "application/rss+xml", href: e.feed }), e.verification?.google && /* @__PURE__ */ t("meta", { name: "google-site-verification", content: e.verification.google }), e.verification?.yahoo && /* @__PURE__ */ t("meta", { name: "y_key", content: e.verification.yahoo }), e.verification?.yandex && /* @__PURE__ */ t("meta", { name: "yandex-verification", content: e.verification.yandex }), e.verification?.me && (Array.isArray(e.verification.me) ? e.verification.me.map((r, n) => /* @__PURE__ */ t("link", { rel: "me", href: r })) : /* @__PURE__ */ t("link", { rel: "me", href: e.verification.me })), e.verification?.other && Object.entries(e.verification.other).map(
|
|
40
|
+
([r, n]) => Array.isArray(n) ? n.map((a, p) => /* @__PURE__ */ t("meta", { name: r, content: a })) : /* @__PURE__ */ t("meta", { name: r, content: n })
|
|
41
|
+
), e.appLinks && /* @__PURE__ */ t(o, null, e.appLinks.ios?.url && /* @__PURE__ */ t("meta", { property: "al:ios:url", content: e.appLinks.ios.url }), e.appLinks.ios?.app_store_id && /* @__PURE__ */ t(
|
|
42
|
+
"meta",
|
|
43
|
+
{
|
|
44
|
+
property: "al:ios:app_store_id",
|
|
45
|
+
content: e.appLinks.ios.app_store_id
|
|
46
|
+
}
|
|
47
|
+
), e.appLinks.ios?.app_name && /* @__PURE__ */ t("meta", { property: "al:ios:app_name", content: e.appLinks.ios.app_name }), e.appLinks.android?.package && /* @__PURE__ */ t(
|
|
48
|
+
"meta",
|
|
49
|
+
{
|
|
50
|
+
property: "al:android:package",
|
|
51
|
+
content: e.appLinks.android.package
|
|
52
|
+
}
|
|
53
|
+
), e.appLinks.android?.app_name && /* @__PURE__ */ t(
|
|
54
|
+
"meta",
|
|
55
|
+
{
|
|
56
|
+
property: "al:android:app_name",
|
|
57
|
+
content: e.appLinks.android.app_name
|
|
58
|
+
}
|
|
59
|
+
), e.appLinks.android?.url && /* @__PURE__ */ t("meta", { property: "al:android:url", content: e.appLinks.android.url }), e.appLinks.web?.url && /* @__PURE__ */ t("meta", { property: "al:web:url", content: e.appLinks.web.url }), e.appLinks.web?.should_fallback !== void 0 && /* @__PURE__ */ t(
|
|
60
|
+
"meta",
|
|
61
|
+
{
|
|
62
|
+
property: "al:web:should_fallback",
|
|
63
|
+
content: String(e.appLinks.web.should_fallback)
|
|
64
|
+
}
|
|
65
|
+
)), e.other && Object.entries(e.other).map(
|
|
66
|
+
([r, n]) => Array.isArray(n) ? n.map((a, p) => /* @__PURE__ */ t("meta", { name: r, content: String(a) })) : /* @__PURE__ */ t("meta", { name: r, content: String(n) })
|
|
67
|
+
)), (e.openGraph || e.twitter) && /* @__PURE__ */ t(s, { priority: l.SEO }, e.openGraph && /* @__PURE__ */ t(o, null, e.openGraph.title && /* @__PURE__ */ t("meta", { property: "og:title", content: e.openGraph.title }), e.openGraph.description && /* @__PURE__ */ t("meta", { property: "og:description", content: e.openGraph.description }), e.openGraph.type && /* @__PURE__ */ t("meta", { property: "og:type", content: e.openGraph.type }), e.openGraph.url && /* @__PURE__ */ t("meta", { property: "og:url", content: e.openGraph.url }), e.openGraph.siteName && /* @__PURE__ */ t("meta", { property: "og:site_name", content: e.openGraph.siteName }), e.openGraph.locale && /* @__PURE__ */ t("meta", { property: "og:locale", content: e.openGraph.locale }), e.openGraph.alternateLocale && (Array.isArray(e.openGraph.alternateLocale) ? e.openGraph.alternateLocale.map((r, n) => /* @__PURE__ */ t("meta", { property: "og:locale:alternate", content: r })) : /* @__PURE__ */ t(
|
|
68
|
+
"meta",
|
|
69
|
+
{
|
|
70
|
+
property: "og:locale:alternate",
|
|
71
|
+
content: e.openGraph.alternateLocale
|
|
72
|
+
}
|
|
73
|
+
)), e.openGraph.determiner && /* @__PURE__ */ t("meta", { property: "og:determiner", content: e.openGraph.determiner }), I.map((r, n) => /* @__PURE__ */ t(o, null, /* @__PURE__ */ t("meta", { property: "og:image", content: r.url }), r.secureUrl && /* @__PURE__ */ t("meta", { property: "og:image:secure_url", content: r.secureUrl }), r.alt && /* @__PURE__ */ t("meta", { property: "og:image:alt", content: r.alt }), r.type && /* @__PURE__ */ t("meta", { property: "og:image:type", content: r.type }), r.width && /* @__PURE__ */ t("meta", { property: "og:image:width", content: String(r.width) }), r.height && /* @__PURE__ */ t("meta", { property: "og:image:height", content: String(r.height) }))), e.openGraph.publishedTime && /* @__PURE__ */ t(
|
|
74
|
+
"meta",
|
|
75
|
+
{
|
|
76
|
+
property: "article:published_time",
|
|
77
|
+
content: e.openGraph.publishedTime
|
|
78
|
+
}
|
|
79
|
+
), e.openGraph.modifiedTime && /* @__PURE__ */ t(
|
|
80
|
+
"meta",
|
|
81
|
+
{
|
|
82
|
+
property: "article:modified_time",
|
|
83
|
+
content: e.openGraph.modifiedTime
|
|
84
|
+
}
|
|
85
|
+
), e.openGraph.expirationTime && /* @__PURE__ */ t(
|
|
86
|
+
"meta",
|
|
87
|
+
{
|
|
88
|
+
property: "article:expiration_time",
|
|
89
|
+
content: e.openGraph.expirationTime
|
|
90
|
+
}
|
|
91
|
+
), e.openGraph.authors && (Array.isArray(e.openGraph.authors) ? e.openGraph.authors.map((r, n) => /* @__PURE__ */ t("meta", { property: "article:author", content: r })) : /* @__PURE__ */ t("meta", { property: "article:author", content: e.openGraph.authors })), e.openGraph.section && /* @__PURE__ */ t("meta", { property: "article:section", content: e.openGraph.section }), e.openGraph.tags && (Array.isArray(e.openGraph.tags) ? e.openGraph.tags.map((r, n) => /* @__PURE__ */ t("meta", { property: "article:tag", content: r })) : /* @__PURE__ */ t("meta", { property: "article:tag", content: e.openGraph.tags })), e.openGraph.isbn && /* @__PURE__ */ t("meta", { property: "book:isbn", content: e.openGraph.isbn }), e.openGraph.releaseDate && /* @__PURE__ */ t(
|
|
92
|
+
"meta",
|
|
93
|
+
{
|
|
94
|
+
property: "book:release_date",
|
|
95
|
+
content: e.openGraph.releaseDate
|
|
96
|
+
}
|
|
97
|
+
), e.openGraph.firstName && /* @__PURE__ */ t(
|
|
98
|
+
"meta",
|
|
99
|
+
{
|
|
100
|
+
property: "profile:first_name",
|
|
101
|
+
content: e.openGraph.firstName
|
|
102
|
+
}
|
|
103
|
+
), e.openGraph.lastName && /* @__PURE__ */ t("meta", { property: "profile:last_name", content: e.openGraph.lastName }), e.openGraph.username && /* @__PURE__ */ t("meta", { property: "profile:username", content: e.openGraph.username }), e.openGraph.gender && /* @__PURE__ */ t("meta", { property: "profile:gender", content: e.openGraph.gender })), e.twitter && /* @__PURE__ */ t(o, null, e.twitter.card && /* @__PURE__ */ t("meta", { name: "twitter:card", content: e.twitter.card }), e.twitter.site && /* @__PURE__ */ t("meta", { name: "twitter:site", content: e.twitter.site }), e.twitter.siteId && /* @__PURE__ */ t("meta", { name: "twitter:site:id", content: e.twitter.siteId }), e.twitter.creator && /* @__PURE__ */ t("meta", { name: "twitter:creator", content: e.twitter.creator }), e.twitter.creatorId && /* @__PURE__ */ t("meta", { name: "twitter:creator:id", content: e.twitter.creatorId }), e.twitter.title && /* @__PURE__ */ t("meta", { name: "twitter:title", content: e.twitter.title }), e.twitter.description && /* @__PURE__ */ t("meta", { name: "twitter:description", content: e.twitter.description }), D.map((r, n) => /* @__PURE__ */ t(o, null, /* @__PURE__ */ t("meta", { name: "twitter:image", content: r.url }), r.alt && /* @__PURE__ */ t("meta", { name: "twitter:image:alt", content: r.alt }))), e.twitter.app && /* @__PURE__ */ t(o, null, e.twitter.app.name && /* @__PURE__ */ t("meta", { name: "twitter:app:name", content: e.twitter.app.name }), e.twitter.app.id.iphone && /* @__PURE__ */ t(
|
|
104
|
+
"meta",
|
|
105
|
+
{
|
|
106
|
+
name: "twitter:app:id:iphone",
|
|
107
|
+
content: e.twitter.app.id.iphone
|
|
108
|
+
}
|
|
109
|
+
), e.twitter.app.id.ipad && /* @__PURE__ */ t(
|
|
110
|
+
"meta",
|
|
111
|
+
{
|
|
112
|
+
name: "twitter:app:id:ipad",
|
|
113
|
+
content: e.twitter.app.id.ipad
|
|
114
|
+
}
|
|
115
|
+
), e.twitter.app.id.googleplay && /* @__PURE__ */ t(
|
|
116
|
+
"meta",
|
|
117
|
+
{
|
|
118
|
+
name: "twitter:app:id:googleplay",
|
|
119
|
+
content: e.twitter.app.id.googleplay
|
|
120
|
+
}
|
|
121
|
+
), e.twitter.app.url?.iphone && /* @__PURE__ */ t(
|
|
122
|
+
"meta",
|
|
123
|
+
{
|
|
124
|
+
name: "twitter:app:url:iphone",
|
|
125
|
+
content: e.twitter.app.url.iphone
|
|
126
|
+
}
|
|
127
|
+
), e.twitter.app.url?.ipad && /* @__PURE__ */ t(
|
|
128
|
+
"meta",
|
|
129
|
+
{
|
|
130
|
+
name: "twitter:app:url:ipad",
|
|
131
|
+
content: e.twitter.app.url.ipad
|
|
132
|
+
}
|
|
133
|
+
), e.twitter.app.url?.googleplay && /* @__PURE__ */ t(
|
|
134
|
+
"meta",
|
|
135
|
+
{
|
|
136
|
+
name: "twitter:app:url:googleplay",
|
|
137
|
+
content: e.twitter.app.url.googleplay
|
|
138
|
+
}
|
|
139
|
+
)))));
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
R as M
|
|
143
|
+
};
|
|
144
|
+
//# sourceMappingURL=generateMetadata-C5QsMS-H.js.map
|