@alignable/bifrost 0.0.17 → 0.0.19

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.
@@ -0,0 +1,15 @@
1
+ interface DocumentProps {
2
+ title?: string;
3
+ description?: string;
4
+ viewport?: {
5
+ [key: string]: string;
6
+ };
7
+ metaTags?: MetaTag[];
8
+ }
9
+ type MetaTag = {
10
+ name?: string;
11
+ property?: string;
12
+ content: string;
13
+ };
14
+
15
+ export { DocumentProps as D };
@@ -3,7 +3,8 @@ import React from "react";
3
3
  function documentPropsToReact({
4
4
  title = "",
5
5
  description = "",
6
- viewport = {}
6
+ viewport = {},
7
+ metaTags = []
7
8
  }) {
8
9
  return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("title", null, title), /* @__PURE__ */ React.createElement("meta", { name: "title", property: "og:title", content: title }), /* @__PURE__ */ React.createElement("meta", { name: "description", content: description }), /* @__PURE__ */ React.createElement(
9
10
  "meta",
@@ -11,10 +12,10 @@ function documentPropsToReact({
11
12
  name: "viewport",
12
13
  content: Object.entries(viewport).map((e) => e.join("=")).join(", ")
13
14
  }
14
- ));
15
+ ), metaTags.map(({ name, property, content }) => /* @__PURE__ */ React.createElement("meta", { name, property, content })));
15
16
  }
16
17
 
17
18
  export {
18
19
  documentPropsToReact
19
20
  };
20
- //# sourceMappingURL=chunk-AIK6VRNF.js.map
21
+ //# sourceMappingURL=chunk-UO3LKNUB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../renderer/utils/buildHead.tsx"],"sourcesContent":["import React from \"react\";\nimport { DocumentProps } from \"../../types/internal\";\n\nexport function documentPropsToReact({\n title = \"\",\n description = \"\",\n viewport = {},\n metaTags = [],\n}: DocumentProps): React.ReactElement {\n return (\n <>\n <title>{title}</title>\n <meta name=\"title\" property=\"og:title\" content={title} />\n <meta name=\"description\" content={description} />\n <meta\n name=\"viewport\"\n content={Object.entries(viewport)\n .map((e) => e.join(\"=\"))\n .join(\", \")}\n />\n {metaTags.map(({ name, property, content }) => (\n <meta name={name} property={property} content={content} />\n ))}\n </>\n );\n}\n"],"mappings":";AAAA,OAAO,WAAW;AAGX,SAAS,qBAAqB;AAAA,EACnC,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW,CAAC;AAAA,EACZ,WAAW,CAAC;AACd,GAAsC;AACpC,SACE,0DACE,oCAAC,eAAO,KAAM,GACd,oCAAC,UAAK,MAAK,SAAQ,UAAS,YAAW,SAAS,OAAO,GACvD,oCAAC,UAAK,MAAK,eAAc,SAAS,aAAa,GAC/C;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAS,OAAO,QAAQ,QAAQ,EAC7B,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EACtB,KAAK,IAAI;AAAA;AAAA,EACd,GACC,SAAS,IAAI,CAAC,EAAE,MAAM,UAAU,QAAQ,MACvC,oCAAC,UAAK,MAAY,UAAoB,SAAkB,CACzD,CACH;AAEJ;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { PageContextBuiltIn } from 'vite-plugin-ssr/types';
2
- import { A as AugmentMe, P as PageContextNoProxy } from './internal-fe09ebc7.js';
3
- export { N as BifrostConfig, a as BifrostProxyConfig, D as DocumentProps, b as LayoutComponent, L as LayoutMap, c as PageContext } from './internal-fe09ebc7.js';
2
+ import { A as AugmentMe, P as PageContextNoProxy } from './internal-b825691d.js';
3
+ export { N as BifrostConfig, a as BifrostProxyConfig, b as LayoutComponent, L as LayoutMap, c as PageContext } from './internal-b825691d.js';
4
4
  export { usePageContext } from './renderer/usePageContext.js';
5
+ export { D as DocumentProps } from './DocumentProps-b3e3740a.js';
5
6
  import 'react';
6
7
  import './proxy/pages/_config.js';
7
8
  import './renderer/_config.js';
@@ -2,6 +2,7 @@ import { PropsWithChildren } from 'react';
2
2
  import { ConfigNonHeaderFile, Config, PageContextBuiltIn, PageContextBuiltInClientWithClientRouting } from 'vite-plugin-ssr/types';
3
3
  import _default from './proxy/pages/_config.js';
4
4
  import _default$1 from './renderer/_config.js';
5
+ import { D as DocumentProps } from './DocumentProps-b3e3740a.js';
5
6
 
6
7
  declare namespace AugmentMe {
7
8
  interface PageContextInit {
@@ -42,18 +43,12 @@ type PageContextProxyRestorationVisit = PageContextBuiltInClientWithClientRoutin
42
43
  bodyEl: Element;
43
44
  headEl: HTMLHeadElement;
44
45
  } & PageContextProxyCommon;
45
- interface DocumentProps {
46
- title?: string;
47
- description?: string;
48
- viewport?: {
49
- [key: string]: string;
50
- };
51
- }
52
46
  type NoProxyConfig = ConfigConstructor<typeof _default$1, {
53
47
  Layout: LayoutComponent;
54
48
  layoutProps: AugmentMe.LayoutProps;
55
49
  documentProps: DocumentProps;
56
50
  scripts: string[];
51
+ favicon: string;
57
52
  }>;
58
53
  type PageProps = Record<string, unknown>;
59
54
  type Page = React.ComponentType<PageProps>;
@@ -69,4 +64,4 @@ type PageContextNoProxyClient = PageContextBuiltInClientWithClientRouting<Page>
69
64
  type PageContextNoProxy = PageContextNoProxyServer | PageContextNoProxyClient;
70
65
  type PageContext = PageContextNoProxy | PageContextProxy | PageContextProxyRestorationVisit;
71
66
 
72
- export { AugmentMe as A, DocumentProps as D, LayoutMap as L, NoProxyConfig as N, PageContextNoProxy as P, ProxyConfig as a, LayoutComponent as b, PageContext as c, PageContextNoProxyClient as d, PageContextNoProxyServer as e, PageContextProxyServer as f, PageContextProxyClient as g, PageContextProxyRestorationVisit as h };
67
+ export { AugmentMe as A, LayoutMap as L, NoProxyConfig as N, PageContextNoProxy as P, ProxyConfig as a, LayoutComponent as b, PageContext as c, PageContextNoProxyClient as d, PageContextNoProxyServer as e, PageContextProxyServer as f, PageContextProxyClient as g, PageContextProxyRestorationVisit as h };
@@ -1,8 +1,9 @@
1
- import { f as PageContextProxyServer } from '../../internal-fe09ebc7.js';
1
+ import { f as PageContextProxyServer } from '../../internal-b825691d.js';
2
2
  import 'react';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import './_config.js';
5
5
  import '../../renderer/_config.js';
6
+ import '../../DocumentProps-b3e3740a.js';
6
7
 
7
8
  declare function onBeforeRender(pageContext: PageContextProxyServer): Promise<{
8
9
  pageContext: {};
@@ -1,8 +1,9 @@
1
- import { g as PageContextProxyClient } from '../../internal-fe09ebc7.js';
1
+ import { g as PageContextProxyClient } from '../../internal-b825691d.js';
2
2
  import 'react';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import './_config.js';
5
5
  import '../../renderer/_config.js';
6
+ import '../../DocumentProps-b3e3740a.js';
6
7
 
7
8
  declare function onRenderClient(pageContext: PageContextProxyClient): Promise<void>;
8
9
 
@@ -1,9 +1,10 @@
1
1
  import * as vite_plugin_ssr_dist_types_node_runtime_html_renderHtml_js from 'vite-plugin-ssr/dist/types/node/runtime/html/renderHtml.js';
2
- import { f as PageContextProxyServer } from '../../internal-fe09ebc7.js';
2
+ import { f as PageContextProxyServer } from '../../internal-b825691d.js';
3
3
  import 'react';
4
4
  import 'vite-plugin-ssr/types';
5
5
  import './_config.js';
6
6
  import '../../renderer/_config.js';
7
+ import '../../DocumentProps-b3e3740a.js';
7
8
 
8
9
  declare function onRenderHtml(pageContext: PageContextProxyServer): Promise<{
9
10
  documentHtml: vite_plugin_ssr_dist_types_node_runtime_html_renderHtml_js.TemplateWrapped;
@@ -1,8 +1,9 @@
1
- import { h as PageContextProxyRestorationVisit } from '../../../internal-fe09ebc7.js';
1
+ import { h as PageContextProxyRestorationVisit } from '../../../internal-b825691d.js';
2
2
  import 'react';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import '../_config.js';
5
5
  import '../../../renderer/_config.js';
6
+ import '../../../DocumentProps-b3e3740a.js';
6
7
 
7
8
  declare function onRenderClient(pageContext: PageContextProxyRestorationVisit): Promise<void>;
8
9
 
@@ -18,6 +18,9 @@ declare const _default: {
18
18
  scripts: {
19
19
  env: "server-and-client";
20
20
  };
21
+ favicon: {
22
+ env: "server-only";
23
+ };
21
24
  };
22
25
  };
23
26
 
@@ -17,7 +17,8 @@ var config_default = {
17
17
  Layout: { env: "server-and-client" },
18
18
  layoutProps: { env: "server-and-client" },
19
19
  documentProps: { env: "server-and-client" },
20
- scripts: { env: "server-and-client" }
20
+ scripts: { env: "server-and-client" },
21
+ favicon: { env: "server-only" }
21
22
  }
22
23
  };
23
24
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../renderer/+config.ts"],"sourcesContent":["import { type ConfigNonHeaderFile } from \"vite-plugin-ssr/types\";\n\nconst passToClient = [\n \"layoutProps\",\n \"pageProps\",\n \"redirectTo\",\n \"documentProps\",\n \"scripts\",\n];\nexport default {\n passToClient,\n onRenderClient: \"import:@alignable/bifrost/renderer/onRenderClient\",\n onRenderHtml: \"import:@alignable/bifrost/renderer/onRenderHtml\",\n onBeforeRoute: \"import:@alignable/bifrost/renderer/onBeforeRoute\",\n clientRouting: true,\n hydrationCanBeAborted: true,\n meta: {\n Layout: { env: \"server-and-client\" },\n layoutProps: { env: \"server-and-client\" },\n documentProps: { env: \"server-and-client\" },\n scripts: { env: \"server-and-client\" },\n },\n} satisfies ConfigNonHeaderFile;\n"],"mappings":";AAEA,IAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,IAAO,iBAAQ;AAAA,EACb;AAAA,EACA,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,MAAM;AAAA,IACJ,QAAQ,EAAE,KAAK,oBAAoB;AAAA,IACnC,aAAa,EAAE,KAAK,oBAAoB;AAAA,IACxC,eAAe,EAAE,KAAK,oBAAoB;AAAA,IAC1C,SAAS,EAAE,KAAK,oBAAoB;AAAA,EACtC;AACF;","names":[]}
1
+ {"version":3,"sources":["../../renderer/+config.ts"],"sourcesContent":["import { type ConfigNonHeaderFile } from \"vite-plugin-ssr/types\";\n\nconst passToClient = [\n \"layoutProps\",\n \"pageProps\",\n \"redirectTo\",\n \"documentProps\",\n \"scripts\",\n];\nexport default {\n passToClient,\n onRenderClient: \"import:@alignable/bifrost/renderer/onRenderClient\",\n onRenderHtml: \"import:@alignable/bifrost/renderer/onRenderHtml\",\n onBeforeRoute: \"import:@alignable/bifrost/renderer/onBeforeRoute\",\n clientRouting: true,\n hydrationCanBeAborted: true,\n meta: {\n Layout: { env: \"server-and-client\" },\n layoutProps: { env: \"server-and-client\" },\n documentProps: { env: \"server-and-client\" },\n scripts: { env: \"server-and-client\" },\n favicon: { env: \"server-only\" },\n },\n} satisfies ConfigNonHeaderFile;\n"],"mappings":";AAEA,IAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,IAAO,iBAAQ;AAAA,EACb;AAAA,EACA,gBAAgB;AAAA,EAChB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,eAAe;AAAA,EACf,uBAAuB;AAAA,EACvB,MAAM;AAAA,IACJ,QAAQ,EAAE,KAAK,oBAAoB;AAAA,IACnC,aAAa,EAAE,KAAK,oBAAoB;AAAA,IACxC,eAAe,EAAE,KAAK,oBAAoB;AAAA,IAC1C,SAAS,EAAE,KAAK,oBAAoB;AAAA,IACpC,SAAS,EAAE,KAAK,cAAc;AAAA,EAChC;AACF;","names":[]}
@@ -1,8 +1,9 @@
1
- import { P as PageContextNoProxy } from '../internal-fe09ebc7.js';
1
+ import { P as PageContextNoProxy } from '../internal-b825691d.js';
2
2
  import 'react';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import '../proxy/pages/_config.js';
5
5
  import './_config.js';
6
+ import '../DocumentProps-b3e3740a.js';
6
7
 
7
8
  type ConfigOrContext = PageContextNoProxy | PageContextNoProxy["config"];
8
9
  /**
@@ -1,8 +1,9 @@
1
- import { d as PageContextNoProxyClient } from '../internal-fe09ebc7.js';
1
+ import { d as PageContextNoProxyClient } from '../internal-b825691d.js';
2
2
  import 'react';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import '../proxy/pages/_config.js';
5
5
  import './_config.js';
6
+ import '../DocumentProps-b3e3740a.js';
6
7
 
7
8
  declare function onRenderClient(pageContext: PageContextNoProxyClient): Promise<void>;
8
9
 
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-ABW2IXO4.js";
5
5
  import {
6
6
  documentPropsToReact
7
- } from "../chunk-AIK6VRNF.js";
7
+ } from "../chunk-UO3LKNUB.js";
8
8
  import {
9
9
  PageShell
10
10
  } from "../chunk-4DL7N7Y5.js";
@@ -1,9 +1,10 @@
1
1
  import * as vite_plugin_ssr_dist_types_node_runtime_html_renderHtml_js from 'vite-plugin-ssr/dist/types/node/runtime/html/renderHtml.js';
2
- import { e as PageContextNoProxyServer } from '../internal-fe09ebc7.js';
2
+ import { e as PageContextNoProxyServer } from '../internal-b825691d.js';
3
3
  import 'react';
4
4
  import 'vite-plugin-ssr/types';
5
5
  import '../proxy/pages/_config.js';
6
6
  import './_config.js';
7
+ import '../DocumentProps-b3e3740a.js';
7
8
 
8
9
  declare function onRenderHtml(pageContext: PageContextNoProxyServer): Promise<{
9
10
  pageContext: {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  documentPropsToReact
3
- } from "../chunk-AIK6VRNF.js";
3
+ } from "../chunk-UO3LKNUB.js";
4
4
  import {
5
5
  PageShell
6
6
  } from "../chunk-4DL7N7Y5.js";
@@ -37,9 +37,12 @@ async function onRenderHtml(pageContext) {
37
37
  getPageContextOrConfig(pageContext, "documentProps") || {}
38
38
  )
39
39
  );
40
+ const { favicon } = pageContext.config;
41
+ const faviconTag = !favicon ? "" : escapeInject`<link rel="icon" href="${favicon}" />`;
40
42
  const documentHtml = escapeInject`<!DOCTYPE html>
41
43
  <html lang="en">
42
44
  <head>
45
+ ${faviconTag}
43
46
  ${dangerouslySkipEscape(headHtml)}
44
47
  ${dangerouslySkipEscape(
45
48
  Object.values(pageContext.config.scripts || {}).join("")
@@ -1 +1 @@
1
- {"version":3,"sources":["../../renderer/onRenderHtml.tsx"],"sourcesContent":["import ReactDOMServer from \"react-dom/server\";\nimport React from \"react\";\nimport { PageShell } from \"../lib/PageShell.js\";\nimport { escapeInject, dangerouslySkipEscape } from \"vite-plugin-ssr/server\";\nimport { PageContextNoProxyServer } from \"../types/internal.js\";\nimport { documentPropsToReact } from \"./utils/buildHead.js\";\nimport { getPageContextOrConfig } from \"./getConfigOrPageContext.js\";\n\nexport default async function onRenderHtml(\n pageContext: PageContextNoProxyServer\n) {\n const { Page, pageProps, redirectTo } = pageContext;\n if (redirectTo) {\n return {\n pageContext: {\n redirectTo,\n },\n };\n }\n const { Layout } = pageContext.config;\n const layoutProps = getPageContextOrConfig(pageContext, \"layoutProps\") || {};\n\n if (!Page)\n throw new Error(\"Server-side render() hook expects Page to be exported\");\n if (!Layout)\n throw new Error(\"Server-side render() hook expects Layout to be exported\");\n\n const pageHtml = ReactDOMServer.renderToString(\n <PageShell pageContext={pageContext}>\n <Layout {...layoutProps}>\n <Page {...pageProps} />\n </Layout>\n </PageShell>\n );\n\n const headHtml = ReactDOMServer.renderToString(\n documentPropsToReact(\n getPageContextOrConfig(pageContext, \"documentProps\") || {}\n )\n );\n\n const documentHtml = escapeInject`<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n ${dangerouslySkipEscape(headHtml)}\n ${dangerouslySkipEscape(\n Object.values(pageContext.config.scripts || {}).join(\"\")\n )}\n ${dangerouslySkipEscape(`<script>\n window.Turbolinks = {controller:{restorationIdentifier: ''}};\n addEventListener(\"DOMContentLoaded\", () => {\n const event = new Event(\"turbolinks:load\", { bubbles: true, cancelable: true });\n event.data = {url: window.location.href};\n document.dispatchEvent(event); \n })\n </script>`)}\n </head>\n <body>\n <div id=\"page-view\">${dangerouslySkipEscape(pageHtml)}</div>\n </body>\n </html>`;\n\n return {\n documentHtml,\n pageContext: {\n // We can add some `pageContext` here, which is useful if we want to do page redirection https://vite-plugin-ssr.com/page-redirection\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,oBAAoB;AAC3B,OAAO,WAAW;AAElB,SAAS,cAAc,6BAA6B;AAKpD,eAAO,aACL,aACA;AACA,QAAM,EAAE,MAAM,WAAW,WAAW,IAAI;AACxC,MAAI,YAAY;AACd,WAAO;AAAA,MACL,aAAa;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,QAAM,EAAE,OAAO,IAAI,YAAY;AAC/B,QAAM,cAAc,uBAAuB,aAAa,aAAa,KAAK,CAAC;AAE3E,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,uDAAuD;AACzE,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,yDAAyD;AAE3E,QAAM,WAAW,eAAe;AAAA,IAC9B,oCAAC,aAAU,eACT,oCAAC,UAAQ,GAAG,eACV,oCAAC,QAAM,GAAG,WAAW,CACvB,CACF;AAAA,EACF;AAEA,QAAM,WAAW,eAAe;AAAA,IAC9B;AAAA,MACE,uBAAuB,aAAa,eAAe,KAAK,CAAC;AAAA,IAC3D;AAAA,EACF;AAEA,QAAM,eAAe;AAAA;AAAA;AAAA,QAGf,sBAAsB,QAAQ,CAAC;AAAA,QAC/B;AAAA,IACA,OAAO,OAAO,YAAY,OAAO,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE;AAAA,EACzD,CAAC;AAAA,QACC,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAOd,CAAC;AAAA;AAAA;AAAA,8BAGa,sBAAsB,QAAQ,CAAC;AAAA;AAAA;AAI3D,SAAO;AAAA,IACL;AAAA,IACA,aAAa;AAAA;AAAA,IAEb;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../renderer/onRenderHtml.tsx"],"sourcesContent":["import ReactDOMServer from \"react-dom/server\";\nimport React from \"react\";\nimport { PageShell } from \"../lib/PageShell.js\";\nimport { escapeInject, dangerouslySkipEscape } from \"vite-plugin-ssr/server\";\nimport { PageContextNoProxyServer } from \"../types/internal.js\";\nimport { documentPropsToReact } from \"./utils/buildHead.js\";\nimport { getPageContextOrConfig } from \"./getConfigOrPageContext.js\";\n\nexport default async function onRenderHtml(\n pageContext: PageContextNoProxyServer\n) {\n const { Page, pageProps, redirectTo } = pageContext;\n if (redirectTo) {\n return {\n pageContext: {\n redirectTo,\n },\n };\n }\n const { Layout } = pageContext.config;\n const layoutProps = getPageContextOrConfig(pageContext, \"layoutProps\") || {};\n\n if (!Page)\n throw new Error(\"Server-side render() hook expects Page to be exported\");\n if (!Layout)\n throw new Error(\"Server-side render() hook expects Layout to be exported\");\n\n const pageHtml = ReactDOMServer.renderToString(\n <PageShell pageContext={pageContext}>\n <Layout {...layoutProps}>\n <Page {...pageProps} />\n </Layout>\n </PageShell>\n );\n\n const headHtml = ReactDOMServer.renderToString(\n documentPropsToReact(\n getPageContextOrConfig(pageContext, \"documentProps\") || {}\n )\n );\n\n const { favicon } = pageContext.config;\n const faviconTag = !favicon\n ? \"\"\n : escapeInject`<link rel=\"icon\" href=\"${favicon}\" />`;\n\n const documentHtml = escapeInject`<!DOCTYPE html>\n <html lang=\"en\">\n <head>\n ${faviconTag}\n ${dangerouslySkipEscape(headHtml)}\n ${dangerouslySkipEscape(\n Object.values(pageContext.config.scripts || {}).join(\"\")\n )}\n ${dangerouslySkipEscape(`<script>\n window.Turbolinks = {controller:{restorationIdentifier: ''}};\n addEventListener(\"DOMContentLoaded\", () => {\n const event = new Event(\"turbolinks:load\", { bubbles: true, cancelable: true });\n event.data = {url: window.location.href};\n document.dispatchEvent(event); \n })\n </script>`)}\n </head>\n <body>\n <div id=\"page-view\">${dangerouslySkipEscape(pageHtml)}</div>\n </body>\n </html>`;\n\n return {\n documentHtml,\n pageContext: {\n // We can add some `pageContext` here, which is useful if we want to do page redirection https://vite-plugin-ssr.com/page-redirection\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAO,oBAAoB;AAC3B,OAAO,WAAW;AAElB,SAAS,cAAc,6BAA6B;AAKpD,eAAO,aACL,aACA;AACA,QAAM,EAAE,MAAM,WAAW,WAAW,IAAI;AACxC,MAAI,YAAY;AACd,WAAO;AAAA,MACL,aAAa;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACA,QAAM,EAAE,OAAO,IAAI,YAAY;AAC/B,QAAM,cAAc,uBAAuB,aAAa,aAAa,KAAK,CAAC;AAE3E,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,uDAAuD;AACzE,MAAI,CAAC;AACH,UAAM,IAAI,MAAM,yDAAyD;AAE3E,QAAM,WAAW,eAAe;AAAA,IAC9B,oCAAC,aAAU,eACT,oCAAC,UAAQ,GAAG,eACV,oCAAC,QAAM,GAAG,WAAW,CACvB,CACF;AAAA,EACF;AAEA,QAAM,WAAW,eAAe;AAAA,IAC9B;AAAA,MACE,uBAAuB,aAAa,eAAe,KAAK,CAAC;AAAA,IAC3D;AAAA,EACF;AAEA,QAAM,EAAE,QAAQ,IAAI,YAAY;AAChC,QAAM,aAAa,CAAC,UAChB,KACA,sCAAsC,OAAO;AAEjD,QAAM,eAAe;AAAA;AAAA;AAAA,QAGf,UAAU;AAAA,QACV,sBAAsB,QAAQ,CAAC;AAAA,QAC/B;AAAA,IACA,OAAO,OAAO,YAAY,OAAO,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE;AAAA,EACzD,CAAC;AAAA,QACC,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAOd,CAAC;AAAA;AAAA;AAAA,8BAGa,sBAAsB,QAAQ,CAAC;AAAA;AAAA;AAI3D,SAAO;AAAA,IACL;AAAA,IACA,aAAa;AAAA;AAAA,IAEb;AAAA,EACF;AACF;","names":[]}
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- import { c as PageContext } from '../internal-fe09ebc7.js';
2
+ import { c as PageContext } from '../internal-b825691d.js';
3
3
  import 'vite-plugin-ssr/types';
4
4
  import '../proxy/pages/_config.js';
5
5
  import './_config.js';
6
+ import '../DocumentProps-b3e3740a.js';
6
7
 
7
8
  declare function PageContextProvider({ pageContext, children }: {
8
9
  pageContext: PageContext;
@@ -1,9 +1,6 @@
1
1
  import React from 'react';
2
- import { D as DocumentProps } from '../../internal-fe09ebc7.js';
3
- import 'vite-plugin-ssr/types';
4
- import '../../proxy/pages/_config.js';
5
- import '../_config.js';
2
+ import { D as DocumentProps } from '../../DocumentProps-b3e3740a.js';
6
3
 
7
- declare function documentPropsToReact({ title, description, viewport, }: DocumentProps): React.ReactElement;
4
+ declare function documentPropsToReact({ title, description, viewport, metaTags, }: DocumentProps): React.ReactElement;
8
5
 
9
6
  export { documentPropsToReact };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  documentPropsToReact
3
- } from "../../chunk-AIK6VRNF.js";
3
+ } from "../../chunk-UO3LKNUB.js";
4
4
  export {
5
5
  documentPropsToReact
6
6
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alignable/bifrost",
3
3
  "repository": "https://github.com/Alignable/bifrost.git",
4
- "version": "0.0.17",
4
+ "version": "0.0.19",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
7
7
  "exports": {
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../renderer/utils/buildHead.tsx"],"sourcesContent":["import React from \"react\";\nimport { DocumentProps } from \"../../types/internal\";\n\nexport function documentPropsToReact({\n title = \"\",\n description = \"\",\n viewport = {},\n}: DocumentProps): React.ReactElement {\n return (\n <>\n <title>{title}</title>\n <meta name=\"title\" property=\"og:title\" content={title} />\n <meta name=\"description\" content={description} />\n <meta\n name=\"viewport\"\n content={Object.entries(viewport)\n .map((e) => e.join(\"=\"))\n .join(\", \")}\n />\n </>\n );\n}\n"],"mappings":";AAAA,OAAO,WAAW;AAGX,SAAS,qBAAqB;AAAA,EACnC,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,WAAW,CAAC;AACd,GAAsC;AACpC,SACE,0DACE,oCAAC,eAAO,KAAM,GACd,oCAAC,UAAK,MAAK,SAAQ,UAAS,YAAW,SAAS,OAAO,GACvD,oCAAC,UAAK,MAAK,eAAc,SAAS,aAAa,GAC/C;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,SAAS,OAAO,QAAQ,QAAQ,EAC7B,IAAI,CAAC,MAAM,EAAE,KAAK,GAAG,CAAC,EACtB,KAAK,IAAI;AAAA;AAAA,EACd,CACF;AAEJ;","names":[]}