@makeswift/runtime 0.11.4 → 0.11.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/index.cjs.js +10 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +10 -2
- package/dist/index.es.js.map +1 -1
- package/dist/types/src/components/page/Page.d.ts.map +1 -1
- package/dist/types/src/next/client.d.ts +5 -0
- package/dist/types/src/next/client.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -571,6 +571,7 @@ function Page$1({
|
|
|
571
571
|
const socialImage = (_e = baseLocalizedPage == null ? void 0 : baseLocalizedPage.meta.socialImage) != null ? _e : page.meta.socialImage;
|
|
572
572
|
const canonicalUrl = (_f = baseLocalizedPage == null ? void 0 : baseLocalizedPage.seo.canonicalUrl) != null ? _f : page.seo.canonicalUrl;
|
|
573
573
|
const isIndexingBlocked = (_g = baseLocalizedPage == null ? void 0 : baseLocalizedPage.seo.isIndexingBlocked) != null ? _g : page.seo.isIndexingBlocked;
|
|
574
|
+
const hreflangs = page.hreflangs;
|
|
574
575
|
const fontFamilyParamValue = React.useMemo(() => {
|
|
575
576
|
if (site == null) {
|
|
576
577
|
return page.fonts.map(({
|
|
@@ -682,7 +683,14 @@ function Page$1({
|
|
|
682
683
|
rel: "stylesheet",
|
|
683
684
|
href: `https://fonts.googleapis.com/css?family=${fontFamilyParamValue}&display=swap`
|
|
684
685
|
})
|
|
685
|
-
}),
|
|
686
|
+
}), hreflangs.map(({
|
|
687
|
+
hreflang,
|
|
688
|
+
href
|
|
689
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx("link", {
|
|
690
|
+
rel: "alternate",
|
|
691
|
+
hrefLang: hreflang,
|
|
692
|
+
href
|
|
693
|
+
}, hreflang)), headSnippets.map(snippetToElement).map((children) => React.Children.map(children, (child) => {
|
|
686
694
|
if (typeof child === "string")
|
|
687
695
|
return child;
|
|
688
696
|
if (VALID_HEAD_ELEMENT_TYPES.includes(child.type))
|
|
@@ -1203,7 +1211,7 @@ async function fonts(_req, res, { getFonts } = {}) {
|
|
|
1203
1211
|
const fonts2 = (_a = await (getFonts == null ? void 0 : getFonts())) != null ? _a : [];
|
|
1204
1212
|
return res.json(fonts2);
|
|
1205
1213
|
}
|
|
1206
|
-
const version = "0.11.
|
|
1214
|
+
const version = "0.11.5";
|
|
1207
1215
|
async function handler(req, res, { apiKey, siteVersions }) {
|
|
1208
1216
|
if (req.query.secret !== apiKey) {
|
|
1209
1217
|
return res.status(401).json({ message: "Unauthorized" });
|