@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.cjs
CHANGED
|
@@ -15694,7 +15694,7 @@ function createDocumentTree(options) {
|
|
|
15694
15694
|
}),
|
|
15695
15695
|
...extraMetaTags,
|
|
15696
15696
|
...linkTags,
|
|
15697
|
-
...entrypointFiles.length > 0 ? entrypointFiles.
|
|
15697
|
+
...entrypointFiles.length > 0 ? entrypointFiles.map(
|
|
15698
15698
|
(file) => import_react.default.createElement("link", {
|
|
15699
15699
|
key: `preload-${file}`,
|
|
15700
15700
|
rel: "preload",
|
|
@@ -15715,6 +15715,13 @@ function createDocumentTree(options) {
|
|
|
15715
15715
|
href: faviconPath,
|
|
15716
15716
|
type: faviconType || (faviconPath.endsWith(".ico") ? "image/x-icon" : "image/png")
|
|
15717
15717
|
}),
|
|
15718
|
+
// Preload CSS para evitar bloqueo de renderizado
|
|
15719
|
+
import_react.default.createElement("link", {
|
|
15720
|
+
key: "preload-css",
|
|
15721
|
+
rel: "preload",
|
|
15722
|
+
href: clientCssPath,
|
|
15723
|
+
as: "style"
|
|
15724
|
+
}),
|
|
15718
15725
|
import_react.default.createElement("link", {
|
|
15719
15726
|
rel: "stylesheet",
|
|
15720
15727
|
href: clientCssPath
|
|
@@ -19223,132 +19230,134 @@ function getOrCreateLink(rel, href) {
|
|
|
19223
19230
|
}
|
|
19224
19231
|
function applyMetadata(md) {
|
|
19225
19232
|
if (!md) return;
|
|
19226
|
-
|
|
19227
|
-
|
|
19228
|
-
|
|
19229
|
-
|
|
19230
|
-
|
|
19231
|
-
|
|
19232
|
-
|
|
19233
|
-
|
|
19234
|
-
|
|
19235
|
-
|
|
19236
|
-
|
|
19237
|
-
|
|
19238
|
-
|
|
19239
|
-
|
|
19240
|
-
|
|
19241
|
-
|
|
19242
|
-
|
|
19243
|
-
|
|
19244
|
-
|
|
19245
|
-
|
|
19246
|
-
|
|
19247
|
-
|
|
19248
|
-
|
|
19249
|
-
|
|
19250
|
-
|
|
19251
|
-
|
|
19252
|
-
|
|
19253
|
-
|
|
19254
|
-
|
|
19255
|
-
|
|
19256
|
-
|
|
19257
|
-
|
|
19258
|
-
|
|
19259
|
-
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
|
|
19265
|
-
|
|
19266
|
-
|
|
19267
|
-
if (
|
|
19268
|
-
|
|
19269
|
-
|
|
19270
|
-
|
|
19271
|
-
|
|
19272
|
-
|
|
19273
|
-
|
|
19274
|
-
|
|
19275
|
-
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
|
|
19279
|
-
|
|
19280
|
-
|
|
19281
|
-
|
|
19282
|
-
|
|
19283
|
-
|
|
19233
|
+
requestAnimationFrame(() => {
|
|
19234
|
+
if (md.title) {
|
|
19235
|
+
document.title = md.title;
|
|
19236
|
+
}
|
|
19237
|
+
if (md.description) {
|
|
19238
|
+
const meta = getOrCreateMeta('meta[name="description"]', { name: "description" });
|
|
19239
|
+
meta.content = md.description;
|
|
19240
|
+
}
|
|
19241
|
+
if (md.robots) {
|
|
19242
|
+
const meta = getOrCreateMeta('meta[name="robots"]', { name: "robots" });
|
|
19243
|
+
meta.content = md.robots;
|
|
19244
|
+
}
|
|
19245
|
+
if (md.themeColor) {
|
|
19246
|
+
const meta = getOrCreateMeta('meta[name="theme-color"]', { name: "theme-color" });
|
|
19247
|
+
meta.content = md.themeColor;
|
|
19248
|
+
}
|
|
19249
|
+
if (md.viewport) {
|
|
19250
|
+
const meta = getOrCreateMeta('meta[name="viewport"]', { name: "viewport" });
|
|
19251
|
+
meta.content = md.viewport;
|
|
19252
|
+
}
|
|
19253
|
+
if (md.canonical) {
|
|
19254
|
+
getOrCreateLink("canonical", md.canonical);
|
|
19255
|
+
}
|
|
19256
|
+
if (md.openGraph) {
|
|
19257
|
+
const og = md.openGraph;
|
|
19258
|
+
if (og.title) {
|
|
19259
|
+
const meta = getOrCreateMeta('meta[property="og:title"]', { property: "og:title" });
|
|
19260
|
+
meta.content = og.title;
|
|
19261
|
+
}
|
|
19262
|
+
if (og.description) {
|
|
19263
|
+
const meta = getOrCreateMeta('meta[property="og:description"]', { property: "og:description" });
|
|
19264
|
+
meta.content = og.description;
|
|
19265
|
+
}
|
|
19266
|
+
if (og.type) {
|
|
19267
|
+
const meta = getOrCreateMeta('meta[property="og:type"]', { property: "og:type" });
|
|
19268
|
+
meta.content = og.type;
|
|
19269
|
+
}
|
|
19270
|
+
if (og.url) {
|
|
19271
|
+
const meta = getOrCreateMeta('meta[property="og:url"]', { property: "og:url" });
|
|
19272
|
+
meta.content = og.url;
|
|
19273
|
+
}
|
|
19274
|
+
if (og.image) {
|
|
19275
|
+
if (typeof og.image === "string") {
|
|
19276
|
+
const meta = getOrCreateMeta('meta[property="og:image"]', { property: "og:image" });
|
|
19277
|
+
meta.content = og.image;
|
|
19278
|
+
} else {
|
|
19279
|
+
const meta = getOrCreateMeta('meta[property="og:image"]', { property: "og:image" });
|
|
19280
|
+
meta.content = og.image.url;
|
|
19281
|
+
if (og.image.width) {
|
|
19282
|
+
const metaWidth = getOrCreateMeta('meta[property="og:image:width"]', { property: "og:image:width" });
|
|
19283
|
+
metaWidth.content = String(og.image.width);
|
|
19284
|
+
}
|
|
19285
|
+
if (og.image.height) {
|
|
19286
|
+
const metaHeight = getOrCreateMeta('meta[property="og:image:height"]', { property: "og:image:height" });
|
|
19287
|
+
metaHeight.content = String(og.image.height);
|
|
19288
|
+
}
|
|
19289
|
+
if (og.image.alt) {
|
|
19290
|
+
const metaAlt = getOrCreateMeta('meta[property="og:image:alt"]', { property: "og:image:alt" });
|
|
19291
|
+
metaAlt.content = og.image.alt;
|
|
19292
|
+
}
|
|
19284
19293
|
}
|
|
19285
19294
|
}
|
|
19295
|
+
if (og.siteName) {
|
|
19296
|
+
const meta = getOrCreateMeta('meta[property="og:site_name"]', { property: "og:site_name" });
|
|
19297
|
+
meta.content = og.siteName;
|
|
19298
|
+
}
|
|
19299
|
+
if (og.locale) {
|
|
19300
|
+
const meta = getOrCreateMeta('meta[property="og:locale"]', { property: "og:locale" });
|
|
19301
|
+
meta.content = og.locale;
|
|
19302
|
+
}
|
|
19286
19303
|
}
|
|
19287
|
-
if (
|
|
19288
|
-
const
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19293
|
-
|
|
19294
|
-
|
|
19295
|
-
|
|
19296
|
-
|
|
19297
|
-
|
|
19298
|
-
|
|
19299
|
-
|
|
19300
|
-
|
|
19301
|
-
|
|
19302
|
-
|
|
19303
|
-
|
|
19304
|
-
|
|
19305
|
-
|
|
19306
|
-
|
|
19307
|
-
|
|
19308
|
-
|
|
19309
|
-
|
|
19310
|
-
|
|
19311
|
-
|
|
19312
|
-
|
|
19304
|
+
if (md.twitter) {
|
|
19305
|
+
const twitter = md.twitter;
|
|
19306
|
+
if (twitter.card) {
|
|
19307
|
+
const meta = getOrCreateMeta('meta[name="twitter:card"]', { name: "twitter:card" });
|
|
19308
|
+
meta.content = twitter.card;
|
|
19309
|
+
}
|
|
19310
|
+
if (twitter.title) {
|
|
19311
|
+
const meta = getOrCreateMeta('meta[name="twitter:title"]', { name: "twitter:title" });
|
|
19312
|
+
meta.content = twitter.title;
|
|
19313
|
+
}
|
|
19314
|
+
if (twitter.description) {
|
|
19315
|
+
const meta = getOrCreateMeta('meta[name="twitter:description"]', { name: "twitter:description" });
|
|
19316
|
+
meta.content = twitter.description;
|
|
19317
|
+
}
|
|
19318
|
+
if (twitter.image) {
|
|
19319
|
+
const meta = getOrCreateMeta('meta[name="twitter:image"]', { name: "twitter:image" });
|
|
19320
|
+
meta.content = twitter.image;
|
|
19321
|
+
}
|
|
19322
|
+
if (twitter.imageAlt) {
|
|
19323
|
+
const meta = getOrCreateMeta('meta[name="twitter:image:alt"]', { name: "twitter:image:alt" });
|
|
19324
|
+
meta.content = twitter.imageAlt;
|
|
19325
|
+
}
|
|
19326
|
+
if (twitter.site) {
|
|
19327
|
+
const meta = getOrCreateMeta('meta[name="twitter:site"]', { name: "twitter:site" });
|
|
19328
|
+
meta.content = twitter.site;
|
|
19329
|
+
}
|
|
19330
|
+
if (twitter.creator) {
|
|
19331
|
+
const meta = getOrCreateMeta('meta[name="twitter:creator"]', { name: "twitter:creator" });
|
|
19332
|
+
meta.content = twitter.creator;
|
|
19333
|
+
}
|
|
19313
19334
|
}
|
|
19314
|
-
if (
|
|
19315
|
-
|
|
19316
|
-
|
|
19335
|
+
if (md.metaTags && Array.isArray(md.metaTags)) {
|
|
19336
|
+
md.metaTags.forEach((tag) => {
|
|
19337
|
+
let selector = "";
|
|
19338
|
+
if (tag.name) {
|
|
19339
|
+
selector = `meta[name="${tag.name}"]`;
|
|
19340
|
+
} else if (tag.property) {
|
|
19341
|
+
selector = `meta[property="${tag.property}"]`;
|
|
19342
|
+
} else if (tag.httpEquiv) {
|
|
19343
|
+
selector = `meta[http-equiv="${tag.httpEquiv}"]`;
|
|
19344
|
+
}
|
|
19345
|
+
if (selector) {
|
|
19346
|
+
const meta = getOrCreateMeta(selector, {
|
|
19347
|
+
name: tag.name,
|
|
19348
|
+
property: tag.property,
|
|
19349
|
+
httpEquiv: tag.httpEquiv
|
|
19350
|
+
});
|
|
19351
|
+
meta.content = tag.content;
|
|
19352
|
+
}
|
|
19353
|
+
});
|
|
19317
19354
|
}
|
|
19318
|
-
if (
|
|
19319
|
-
|
|
19320
|
-
|
|
19355
|
+
if (md.links && Array.isArray(md.links)) {
|
|
19356
|
+
md.links.forEach((link) => {
|
|
19357
|
+
getOrCreateLink(link.rel, link.href);
|
|
19358
|
+
});
|
|
19321
19359
|
}
|
|
19322
|
-
|
|
19323
|
-
const meta = getOrCreateMeta('meta[name="twitter:creator"]', { name: "twitter:creator" });
|
|
19324
|
-
meta.content = twitter.creator;
|
|
19325
|
-
}
|
|
19326
|
-
}
|
|
19327
|
-
if (md.metaTags && Array.isArray(md.metaTags)) {
|
|
19328
|
-
md.metaTags.forEach((tag) => {
|
|
19329
|
-
let selector = "";
|
|
19330
|
-
if (tag.name) {
|
|
19331
|
-
selector = `meta[name="${tag.name}"]`;
|
|
19332
|
-
} else if (tag.property) {
|
|
19333
|
-
selector = `meta[property="${tag.property}"]`;
|
|
19334
|
-
} else if (tag.httpEquiv) {
|
|
19335
|
-
selector = `meta[http-equiv="${tag.httpEquiv}"]`;
|
|
19336
|
-
}
|
|
19337
|
-
if (selector) {
|
|
19338
|
-
const meta = getOrCreateMeta(selector, {
|
|
19339
|
-
name: tag.name,
|
|
19340
|
-
property: tag.property,
|
|
19341
|
-
httpEquiv: tag.httpEquiv
|
|
19342
|
-
});
|
|
19343
|
-
meta.content = tag.content;
|
|
19344
|
-
}
|
|
19345
|
-
});
|
|
19346
|
-
}
|
|
19347
|
-
if (md.links && Array.isArray(md.links)) {
|
|
19348
|
-
md.links.forEach((link) => {
|
|
19349
|
-
getOrCreateLink(link.rel, link.href);
|
|
19350
|
-
});
|
|
19351
|
-
}
|
|
19360
|
+
});
|
|
19352
19361
|
}
|
|
19353
19362
|
|
|
19354
19363
|
// modules/runtime/client/AppShell.tsx
|