@lolyjs/core 0.3.0-alpha.4 → 0.3.0-alpha.5
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/cli.cjs +8 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +8 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +130 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +130 -121
- package/dist/index.mjs.map +1 -1
- package/dist/runtime.cjs +118 -116
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.mjs +118 -116
- package/dist/runtime.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -15658,7 +15658,7 @@ function createDocumentTree(options) {
|
|
|
15658
15658
|
}),
|
|
15659
15659
|
...extraMetaTags,
|
|
15660
15660
|
...linkTags,
|
|
15661
|
-
...entrypointFiles.length > 0 ? entrypointFiles.
|
|
15661
|
+
...entrypointFiles.length > 0 ? entrypointFiles.map(
|
|
15662
15662
|
(file) => React.createElement("link", {
|
|
15663
15663
|
key: `preload-${file}`,
|
|
15664
15664
|
rel: "preload",
|
|
@@ -15679,6 +15679,13 @@ function createDocumentTree(options) {
|
|
|
15679
15679
|
href: faviconPath,
|
|
15680
15680
|
type: faviconType || (faviconPath.endsWith(".ico") ? "image/x-icon" : "image/png")
|
|
15681
15681
|
}),
|
|
15682
|
+
// Preload CSS para evitar bloqueo de renderizado
|
|
15683
|
+
React.createElement("link", {
|
|
15684
|
+
key: "preload-css",
|
|
15685
|
+
rel: "preload",
|
|
15686
|
+
href: clientCssPath,
|
|
15687
|
+
as: "style"
|
|
15688
|
+
}),
|
|
15682
15689
|
React.createElement("link", {
|
|
15683
15690
|
rel: "stylesheet",
|
|
15684
15691
|
href: clientCssPath
|
|
@@ -19187,132 +19194,134 @@ function getOrCreateLink(rel, href) {
|
|
|
19187
19194
|
}
|
|
19188
19195
|
function applyMetadata(md) {
|
|
19189
19196
|
if (!md) return;
|
|
19190
|
-
|
|
19191
|
-
|
|
19192
|
-
|
|
19193
|
-
|
|
19194
|
-
|
|
19195
|
-
|
|
19196
|
-
|
|
19197
|
-
|
|
19198
|
-
|
|
19199
|
-
|
|
19200
|
-
|
|
19201
|
-
|
|
19202
|
-
|
|
19203
|
-
|
|
19204
|
-
|
|
19205
|
-
|
|
19206
|
-
|
|
19207
|
-
|
|
19208
|
-
|
|
19209
|
-
|
|
19210
|
-
|
|
19211
|
-
|
|
19212
|
-
|
|
19213
|
-
|
|
19214
|
-
|
|
19215
|
-
|
|
19216
|
-
|
|
19217
|
-
|
|
19218
|
-
|
|
19219
|
-
|
|
19220
|
-
|
|
19221
|
-
|
|
19222
|
-
|
|
19223
|
-
|
|
19224
|
-
|
|
19225
|
-
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
if (
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19237
|
-
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19246
|
-
|
|
19247
|
-
|
|
19197
|
+
requestAnimationFrame(() => {
|
|
19198
|
+
if (md.title) {
|
|
19199
|
+
document.title = md.title;
|
|
19200
|
+
}
|
|
19201
|
+
if (md.description) {
|
|
19202
|
+
const meta = getOrCreateMeta('meta[name="description"]', { name: "description" });
|
|
19203
|
+
meta.content = md.description;
|
|
19204
|
+
}
|
|
19205
|
+
if (md.robots) {
|
|
19206
|
+
const meta = getOrCreateMeta('meta[name="robots"]', { name: "robots" });
|
|
19207
|
+
meta.content = md.robots;
|
|
19208
|
+
}
|
|
19209
|
+
if (md.themeColor) {
|
|
19210
|
+
const meta = getOrCreateMeta('meta[name="theme-color"]', { name: "theme-color" });
|
|
19211
|
+
meta.content = md.themeColor;
|
|
19212
|
+
}
|
|
19213
|
+
if (md.viewport) {
|
|
19214
|
+
const meta = getOrCreateMeta('meta[name="viewport"]', { name: "viewport" });
|
|
19215
|
+
meta.content = md.viewport;
|
|
19216
|
+
}
|
|
19217
|
+
if (md.canonical) {
|
|
19218
|
+
getOrCreateLink("canonical", md.canonical);
|
|
19219
|
+
}
|
|
19220
|
+
if (md.openGraph) {
|
|
19221
|
+
const og = md.openGraph;
|
|
19222
|
+
if (og.title) {
|
|
19223
|
+
const meta = getOrCreateMeta('meta[property="og:title"]', { property: "og:title" });
|
|
19224
|
+
meta.content = og.title;
|
|
19225
|
+
}
|
|
19226
|
+
if (og.description) {
|
|
19227
|
+
const meta = getOrCreateMeta('meta[property="og:description"]', { property: "og:description" });
|
|
19228
|
+
meta.content = og.description;
|
|
19229
|
+
}
|
|
19230
|
+
if (og.type) {
|
|
19231
|
+
const meta = getOrCreateMeta('meta[property="og:type"]', { property: "og:type" });
|
|
19232
|
+
meta.content = og.type;
|
|
19233
|
+
}
|
|
19234
|
+
if (og.url) {
|
|
19235
|
+
const meta = getOrCreateMeta('meta[property="og:url"]', { property: "og:url" });
|
|
19236
|
+
meta.content = og.url;
|
|
19237
|
+
}
|
|
19238
|
+
if (og.image) {
|
|
19239
|
+
if (typeof og.image === "string") {
|
|
19240
|
+
const meta = getOrCreateMeta('meta[property="og:image"]', { property: "og:image" });
|
|
19241
|
+
meta.content = og.image;
|
|
19242
|
+
} else {
|
|
19243
|
+
const meta = getOrCreateMeta('meta[property="og:image"]', { property: "og:image" });
|
|
19244
|
+
meta.content = og.image.url;
|
|
19245
|
+
if (og.image.width) {
|
|
19246
|
+
const metaWidth = getOrCreateMeta('meta[property="og:image:width"]', { property: "og:image:width" });
|
|
19247
|
+
metaWidth.content = String(og.image.width);
|
|
19248
|
+
}
|
|
19249
|
+
if (og.image.height) {
|
|
19250
|
+
const metaHeight = getOrCreateMeta('meta[property="og:image:height"]', { property: "og:image:height" });
|
|
19251
|
+
metaHeight.content = String(og.image.height);
|
|
19252
|
+
}
|
|
19253
|
+
if (og.image.alt) {
|
|
19254
|
+
const metaAlt = getOrCreateMeta('meta[property="og:image:alt"]', { property: "og:image:alt" });
|
|
19255
|
+
metaAlt.content = og.image.alt;
|
|
19256
|
+
}
|
|
19248
19257
|
}
|
|
19249
19258
|
}
|
|
19259
|
+
if (og.siteName) {
|
|
19260
|
+
const meta = getOrCreateMeta('meta[property="og:site_name"]', { property: "og:site_name" });
|
|
19261
|
+
meta.content = og.siteName;
|
|
19262
|
+
}
|
|
19263
|
+
if (og.locale) {
|
|
19264
|
+
const meta = getOrCreateMeta('meta[property="og:locale"]', { property: "og:locale" });
|
|
19265
|
+
meta.content = og.locale;
|
|
19266
|
+
}
|
|
19250
19267
|
}
|
|
19251
|
-
if (
|
|
19252
|
-
const
|
|
19253
|
-
|
|
19254
|
-
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
|
|
19268
|
-
|
|
19269
|
-
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19268
|
+
if (md.twitter) {
|
|
19269
|
+
const twitter = md.twitter;
|
|
19270
|
+
if (twitter.card) {
|
|
19271
|
+
const meta = getOrCreateMeta('meta[name="twitter:card"]', { name: "twitter:card" });
|
|
19272
|
+
meta.content = twitter.card;
|
|
19273
|
+
}
|
|
19274
|
+
if (twitter.title) {
|
|
19275
|
+
const meta = getOrCreateMeta('meta[name="twitter:title"]', { name: "twitter:title" });
|
|
19276
|
+
meta.content = twitter.title;
|
|
19277
|
+
}
|
|
19278
|
+
if (twitter.description) {
|
|
19279
|
+
const meta = getOrCreateMeta('meta[name="twitter:description"]', { name: "twitter:description" });
|
|
19280
|
+
meta.content = twitter.description;
|
|
19281
|
+
}
|
|
19282
|
+
if (twitter.image) {
|
|
19283
|
+
const meta = getOrCreateMeta('meta[name="twitter:image"]', { name: "twitter:image" });
|
|
19284
|
+
meta.content = twitter.image;
|
|
19285
|
+
}
|
|
19286
|
+
if (twitter.imageAlt) {
|
|
19287
|
+
const meta = getOrCreateMeta('meta[name="twitter:image:alt"]', { name: "twitter:image:alt" });
|
|
19288
|
+
meta.content = twitter.imageAlt;
|
|
19289
|
+
}
|
|
19290
|
+
if (twitter.site) {
|
|
19291
|
+
const meta = getOrCreateMeta('meta[name="twitter:site"]', { name: "twitter:site" });
|
|
19292
|
+
meta.content = twitter.site;
|
|
19293
|
+
}
|
|
19294
|
+
if (twitter.creator) {
|
|
19295
|
+
const meta = getOrCreateMeta('meta[name="twitter:creator"]', { name: "twitter:creator" });
|
|
19296
|
+
meta.content = twitter.creator;
|
|
19297
|
+
}
|
|
19277
19298
|
}
|
|
19278
|
-
if (
|
|
19279
|
-
|
|
19280
|
-
|
|
19299
|
+
if (md.metaTags && Array.isArray(md.metaTags)) {
|
|
19300
|
+
md.metaTags.forEach((tag) => {
|
|
19301
|
+
let selector = "";
|
|
19302
|
+
if (tag.name) {
|
|
19303
|
+
selector = `meta[name="${tag.name}"]`;
|
|
19304
|
+
} else if (tag.property) {
|
|
19305
|
+
selector = `meta[property="${tag.property}"]`;
|
|
19306
|
+
} else if (tag.httpEquiv) {
|
|
19307
|
+
selector = `meta[http-equiv="${tag.httpEquiv}"]`;
|
|
19308
|
+
}
|
|
19309
|
+
if (selector) {
|
|
19310
|
+
const meta = getOrCreateMeta(selector, {
|
|
19311
|
+
name: tag.name,
|
|
19312
|
+
property: tag.property,
|
|
19313
|
+
httpEquiv: tag.httpEquiv
|
|
19314
|
+
});
|
|
19315
|
+
meta.content = tag.content;
|
|
19316
|
+
}
|
|
19317
|
+
});
|
|
19281
19318
|
}
|
|
19282
|
-
if (
|
|
19283
|
-
|
|
19284
|
-
|
|
19319
|
+
if (md.links && Array.isArray(md.links)) {
|
|
19320
|
+
md.links.forEach((link) => {
|
|
19321
|
+
getOrCreateLink(link.rel, link.href);
|
|
19322
|
+
});
|
|
19285
19323
|
}
|
|
19286
|
-
|
|
19287
|
-
const meta = getOrCreateMeta('meta[name="twitter:creator"]', { name: "twitter:creator" });
|
|
19288
|
-
meta.content = twitter.creator;
|
|
19289
|
-
}
|
|
19290
|
-
}
|
|
19291
|
-
if (md.metaTags && Array.isArray(md.metaTags)) {
|
|
19292
|
-
md.metaTags.forEach((tag) => {
|
|
19293
|
-
let selector = "";
|
|
19294
|
-
if (tag.name) {
|
|
19295
|
-
selector = `meta[name="${tag.name}"]`;
|
|
19296
|
-
} else if (tag.property) {
|
|
19297
|
-
selector = `meta[property="${tag.property}"]`;
|
|
19298
|
-
} else if (tag.httpEquiv) {
|
|
19299
|
-
selector = `meta[http-equiv="${tag.httpEquiv}"]`;
|
|
19300
|
-
}
|
|
19301
|
-
if (selector) {
|
|
19302
|
-
const meta = getOrCreateMeta(selector, {
|
|
19303
|
-
name: tag.name,
|
|
19304
|
-
property: tag.property,
|
|
19305
|
-
httpEquiv: tag.httpEquiv
|
|
19306
|
-
});
|
|
19307
|
-
meta.content = tag.content;
|
|
19308
|
-
}
|
|
19309
|
-
});
|
|
19310
|
-
}
|
|
19311
|
-
if (md.links && Array.isArray(md.links)) {
|
|
19312
|
-
md.links.forEach((link) => {
|
|
19313
|
-
getOrCreateLink(link.rel, link.href);
|
|
19314
|
-
});
|
|
19315
|
-
}
|
|
19324
|
+
});
|
|
19316
19325
|
}
|
|
19317
19326
|
|
|
19318
19327
|
// modules/runtime/client/AppShell.tsx
|