UNPKG

@tabnews/ui

Version:
28 lines (27 loc) 1.34 kB
"use server"; import { jsxs as o, jsx as t } from "react/jsx-runtime"; import { cookies as h } from "next/headers"; import { AutoThemeProvider as c } from "../AutoThemeProvider/AutoThemeProvider.js"; import { COLOR_MODE_COOKIE as p } from "../constants/public.js"; import { StyledComponentsRegistry as u } from "../SCRegistry/SCRegistry.js"; async function C({ children: i, colorMode: s, defaultColorMode: n, headChildren: a, htmlProps: d, lang: m, ...l }) { const e = await (await h()).get(p), r = (s || (e == null ? void 0 : e.value) || n) === "dark" ? "dark" : "light"; return /* @__PURE__ */ o("html", { lang: m, suppressHydrationWarning: !0, "data-color-mode": r, ...d, children: [ /* @__PURE__ */ o("head", { children: [ a, /* @__PURE__ */ t( "link", { rel: "stylesheet", href: "https://cdn.jsdelivr.net/npm/katex@0.16.22/dist/katex.min.css", integrity: "sha384-5TcZemv2l/9On385z///+d7MSYlvIEw9FuZTIdZ14vJLqWphw7e7ZPuOiCHJcFCP", crossOrigin: "anonymous" } ) ] }), /* @__PURE__ */ t("body", { "data-light-theme": "light", "data-dark-theme": "dark", children: /* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(c, { defaultColorMode: r, noFlash: !1, preventSSRMismatch: !0, ...l, children: i }) }) }) ] }); } export { C as PrimerRoot };