shelving
Version:
Toolkit for using data in JavaScript.
12 lines (11 loc) • 889 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { MetaContext, requireMeta } from "../misc/MetaContext.js";
/**
* Output a `<html>` element wrapping `<head>` (via `<Head>`) and `<body>`.
* - `<Head>` renders the literal `<head>` with `<base>` and other shell-level metadata; per-page hoistable elements (title, meta, links, stylesheets, scripts) come from `<PageHead>` inside `<Page>` and are hoisted into this `<head>` by React 19.
*/
export function HTML({ children, ...meta }) {
const merged = requireMeta(meta);
const { language, root, app } = merged;
return (_jsxs("html", { lang: language, children: [_jsxs("head", { children: [_jsx("meta", { charSet: "utf-8" }), root && _jsx("base", { href: root.href }), app && _jsx("title", { children: app })] }), _jsx("body", { children: _jsx(MetaContext, { value: merged, children: children }) })] }));
}