codeforlife 2.14.6 → 2.14.7
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/common-BQDBPfA-.js +23 -0
- package/dist/common-BQDBPfA-.js.map +1 -0
- package/dist/common-Cxc7W70B.cjs +2 -0
- package/dist/common-Cxc7W70B.cjs.map +1 -0
- package/dist/server/entry/client.cjs.js +2 -0
- package/dist/server/entry/client.cjs.js.map +1 -0
- package/dist/server/entry/client.d.ts +2 -0
- package/dist/server/entry/client.es.js +23 -0
- package/dist/server/entry/client.es.js.map +1 -0
- package/dist/server/entry/index.cjs.js +2 -0
- package/dist/server/entry/index.cjs.js.map +1 -0
- package/dist/server/entry/index.d.ts +2 -0
- package/dist/server/entry/index.es.js +9 -0
- package/dist/server/entry/index.es.js.map +1 -0
- package/dist/server/entry/server.cjs.js +2 -0
- package/dist/server/entry/server.cjs.js.map +1 -0
- package/dist/server/entry/server.d.ts +2 -0
- package/dist/server/entry/server.es.js +37 -0
- package/dist/server/entry/server.es.js.map +1 -0
- package/dist/src/server/entry/client.d.ts +2 -0
- package/dist/src/server/entry/common.d.ts +19 -0
- package/dist/src/server/entry/index.d.ts +1 -0
- package/dist/src/server/entry/server.d.ts +7 -0
- package/package.json +14 -4
- package/dist/server/entry.cjs.js +0 -2
- package/dist/server/entry.cjs.js.map +0 -1
- package/dist/server/entry.d.ts +0 -2
- package/dist/server/entry.es.js +0 -62
- package/dist/server/entry.es.js.map +0 -1
- package/dist/src/server/entry.d.ts +0 -18
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import e from "@emotion/cache";
|
|
2
|
+
import "react";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "@mui/material";
|
|
5
|
+
import "@emotion/react";
|
|
6
|
+
import "react-redux";
|
|
7
|
+
/* empty css */
|
|
8
|
+
import "react-router";
|
|
9
|
+
function C({
|
|
10
|
+
key: t = "css",
|
|
11
|
+
// ensures all styles are generated with this prefix
|
|
12
|
+
prepend: r = !0,
|
|
13
|
+
// loads MUI-styles first so we can override them easily
|
|
14
|
+
...o
|
|
15
|
+
} = {}) {
|
|
16
|
+
return e({ key: t, prepend: r, ...o });
|
|
17
|
+
}
|
|
18
|
+
const A = !0;
|
|
19
|
+
export {
|
|
20
|
+
A as D,
|
|
21
|
+
C as c
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=common-BQDBPfA-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-BQDBPfA-.js","sources":["../src/server/entry/common.ts"],"sourcesContent":["import createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\nimport { type FC } from \"react\"\n\nimport { type AppProps } from \"../App\"\nimport { type DefaultRoutesProps } from \"../DefaultRoutes\"\n\n/**\n * Creates a new Emotion cache instance.\n */\nexport function createEmotionCache(\n {\n key = \"css\", // ensures all styles are generated with this prefix\n prepend = true, // loads MUI-styles first so we can override them easily\n ...otherOptions\n } = {} as CreateEmotionCacheOptions,\n) {\n return createCache({ key, prepend, ...otherOptions })\n}\n\nexport type EntryAppProps = Pick<AppProps, \"emotionCache\" | \"children\">\n\nexport type EntryKwArgs = {\n App: FC<EntryAppProps>\n routes: DefaultRoutesProps[\"children\"]\n catchAllRoute?: DefaultRoutesProps[\"catchAll\"]\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport const DEFAULT_CATCH_ALL: DefaultRoutesProps[\"catchAll\"] = true\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","DEFAULT_CATCH_ALL"],"mappings":";;;;;;;;AAWO,SAASA,EACd;AAAA,EACE,KAAAC,IAAM;AAAA;AAAA,EACN,SAAAC,IAAU;AAAA;AAAA,EACV,GAAGC;AACL,IAAI,IACJ;AACA,SAAOC,EAAY,EAAE,KAAAH,GAAK,SAAAC,GAAS,GAAGC,GAAc;AACtD;AAWO,MAAME,IAAoD;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const u=require("@emotion/cache");require("react");require("react/jsx-runtime");require("@mui/material");require("@emotion/react");require("react-redux");;/* empty css */require("react-router");function i({key:e="css",prepend:r=!0,...t}={}){return u({key:e,prepend:r,...t})}const c=!0;exports.DEFAULT_CATCH_ALL=c;exports.createEmotionCache=i;
|
|
2
|
+
//# sourceMappingURL=common-Cxc7W70B.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common-Cxc7W70B.cjs","sources":["../src/server/entry/common.ts"],"sourcesContent":["import createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\nimport { type FC } from \"react\"\n\nimport { type AppProps } from \"../App\"\nimport { type DefaultRoutesProps } from \"../DefaultRoutes\"\n\n/**\n * Creates a new Emotion cache instance.\n */\nexport function createEmotionCache(\n {\n key = \"css\", // ensures all styles are generated with this prefix\n prepend = true, // loads MUI-styles first so we can override them easily\n ...otherOptions\n } = {} as CreateEmotionCacheOptions,\n) {\n return createCache({ key, prepend, ...otherOptions })\n}\n\nexport type EntryAppProps = Pick<AppProps, \"emotionCache\" | \"children\">\n\nexport type EntryKwArgs = {\n App: FC<EntryAppProps>\n routes: DefaultRoutesProps[\"children\"]\n catchAllRoute?: DefaultRoutesProps[\"catchAll\"]\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport const DEFAULT_CATCH_ALL: DefaultRoutesProps[\"catchAll\"] = true\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","DEFAULT_CATCH_ALL"],"mappings":"6NAWO,SAASA,EACd,CACE,IAAAC,EAAM,MACN,QAAAC,EAAU,GACV,GAAGC,CACL,EAAI,GACJ,CACA,OAAOC,EAAY,CAAE,IAAAH,EAAK,QAAAC,EAAS,GAAGC,EAAc,CACtD,CAWO,MAAME,EAAoD"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react-router"),l=require("react"),a=require("react-dom/client"),t=require("../../common-Cxc7W70B.cjs"),d=require("../DefaultRoutes.cjs.js");function h({App:r,routes:o,catchAllRoute:c=t.DEFAULT_CATCH_ALL,createEmotionCacheOptions:n,...i}){const s=t.createEmotionCache(n);a.hydrateRoot(document.getElementById("root"),e.jsx(l.StrictMode,{children:e.jsx(r,{emotionCache:s,...i,children:e.jsx(u.BrowserRouter,{children:e.jsx(d,{catchAll:c,children:o})})})}))}exports.client=h;
|
|
2
|
+
//# sourceMappingURL=client.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.cjs.js","sources":["../../../src/server/entry/client.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The client entrypoint when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { BrowserRouter } from \"react-router\"\nimport { StrictMode } from \"react\"\nimport { hydrateRoot } from \"react-dom/client\"\n\nimport {\n DEFAULT_CATCH_ALL,\n type EntryKwArgs,\n createEmotionCache,\n} from \"./common\"\nimport DefaultRoutes from \"../DefaultRoutes\"\n\nexport function client({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n\n hydrateRoot(\n document.getElementById(\"root\") as HTMLElement,\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <BrowserRouter>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["client","App","routes","catchAllRoute","DEFAULT_CATCH_ALL","createEmotionCacheOptions","appProps","emotionCache","createEmotionCache","hydrateRoot","StrictMode","jsx","BrowserRouter","DefaultRoutes"],"mappings":"4QAsBO,SAASA,EAAO,CACrB,IAAAC,EACA,OAAAC,EACA,cAAAC,EAAgBC,EAAAA,kBAChB,0BAAAC,EACA,GAAGC,CACL,EAAgB,CACd,MAAMC,EAAeC,EAAAA,mBAAmBH,CAAyB,EAEjEI,EAAAA,YACE,SAAS,eAAe,MAAM,QAC7BC,EAAAA,WAAA,CACC,SAAAC,MAACV,EAAA,CAAI,aAAAM,EAA6B,GAAGD,EACnC,SAAAK,MAACC,EAAAA,cAAA,CACC,SAAAD,EAAAA,IAACE,GAAc,SAAUV,EAAgB,SAAAD,CAAA,CAAO,EAClD,EACF,CAAA,CACF,CAAA,CAEJ"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { BrowserRouter as n } from "react-router";
|
|
3
|
+
import { StrictMode as l } from "react";
|
|
4
|
+
import { hydrateRoot as a } from "react-dom/client";
|
|
5
|
+
import { c as d, D as f } from "../../common-BQDBPfA-.js";
|
|
6
|
+
import h from "../DefaultRoutes.es.js";
|
|
7
|
+
function E({
|
|
8
|
+
App: t,
|
|
9
|
+
routes: r,
|
|
10
|
+
catchAllRoute: e = f,
|
|
11
|
+
createEmotionCacheOptions: m,
|
|
12
|
+
...c
|
|
13
|
+
}) {
|
|
14
|
+
const i = d(m);
|
|
15
|
+
a(
|
|
16
|
+
document.getElementById("root"),
|
|
17
|
+
/* @__PURE__ */ o(l, { children: /* @__PURE__ */ o(t, { emotionCache: i, ...c, children: /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(h, { catchAll: e, children: r }) }) }) })
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
E as client
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=client.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.es.js","sources":["../../../src/server/entry/client.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The client entrypoint when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { BrowserRouter } from \"react-router\"\nimport { StrictMode } from \"react\"\nimport { hydrateRoot } from \"react-dom/client\"\n\nimport {\n DEFAULT_CATCH_ALL,\n type EntryKwArgs,\n createEmotionCache,\n} from \"./common\"\nimport DefaultRoutes from \"../DefaultRoutes\"\n\nexport function client({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n\n hydrateRoot(\n document.getElementById(\"root\") as HTMLElement,\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <BrowserRouter>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["client","App","routes","catchAllRoute","DEFAULT_CATCH_ALL","createEmotionCacheOptions","appProps","emotionCache","createEmotionCache","hydrateRoot","StrictMode","jsx","BrowserRouter","DefaultRoutes"],"mappings":";;;;;;AAsBO,SAASA,EAAO;AAAA,EACrB,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgBC;AAAA,EAChB,2BAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AACd,QAAMC,IAAeC,EAAmBH,CAAyB;AAEjE,EAAAI;AAAA,IACE,SAAS,eAAe,MAAM;AAAA,sBAC7BC,GAAA,EACC,UAAA,gBAAAC,EAACV,GAAA,EAAI,cAAAM,GAA6B,GAAGD,GACnC,UAAA,gBAAAK,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACE,KAAc,UAAUV,GAAgB,UAAAD,EAAA,CAAO,GAClD,GACF,EAAA,CACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),C=require("react-router"),S=require("react"),q=require("@emotion/server/create-instance"),y=require("node:fs/promises"),v=require("react-dom/server"),n=require("../../common-Cxc7W70B.cjs"),j=require("../DefaultRoutes.cjs.js"),x="codeforlife",T={name:x};async function g({App:c,routes:s,catchAllRoute:i=n.DEFAULT_CATCH_ALL,createEmotionCacheOptions:a,...u}){const l=await y.readFile(`./node_modules/${T.name}/dist/style.css`,"utf-8");function d(m){const t=n.createEmotionCache(a),r=q(t),o=v.renderToString(e.jsx(S.StrictMode,{children:e.jsx(c,{emotionCache:t,...u,children:e.jsx(C.StaticRouter,{location:m,children:e.jsx(j,{catchAll:i,children:s})})})})),h=r.extractCriticalToChunks(o),f=r.constructStyleTagsFromChunks(h);return{html:o,head:`${f}<style data-cfl>${l}</style>`}}return{render:d}}exports.server=g;
|
|
2
|
+
//# sourceMappingURL=server.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.cjs.js","sources":["../../../src/server/entry/server.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The server entrypoint when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { StaticRouter } from \"react-router\"\nimport { StrictMode } from \"react\"\nimport createEmotionServer from \"@emotion/server/create-instance\"\nimport fs from \"node:fs/promises\"\nimport { renderToString } from \"react-dom/server\"\n\nimport {\n DEFAULT_CATCH_ALL,\n type EntryKwArgs,\n createEmotionCache,\n} from \"./common\"\nimport DefaultRoutes from \"../DefaultRoutes\"\nimport packageJson from \"../../../package.json\"\n\nexport async function server({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const cflStyle = await fs.readFile(\n `./node_modules/${packageJson.name}/dist/style.css`,\n \"utf-8\",\n )\n\n function render(path: string) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n const emotionServer = createEmotionServer(emotionCache)\n\n const html = renderToString(\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <StaticRouter location={path}>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </StaticRouter>\n </App>\n </StrictMode>,\n )\n\n const emotionChunks = emotionServer.extractCriticalToChunks(html)\n const emotionCss = emotionServer.constructStyleTagsFromChunks(emotionChunks)\n\n return {\n html,\n head: `${emotionCss}<style data-cfl>${cflStyle}</style>`,\n }\n }\n\n return { render }\n}\n"],"names":["server","App","routes","catchAllRoute","DEFAULT_CATCH_ALL","createEmotionCacheOptions","appProps","cflStyle","fs","packageJson","render","path","emotionCache","createEmotionCache","emotionServer","createEmotionServer","html","renderToString","StrictMode","jsx","StaticRouter","DefaultRoutes","emotionChunks","emotionCss"],"mappings":"kXAyBA,eAAsBA,EAAO,CAC3B,IAAAC,EACA,OAAAC,EACA,cAAAC,EAAgBC,EAAAA,kBAChB,0BAAAC,EACA,GAAGC,CACL,EAAgB,CACd,MAAMC,EAAW,MAAMC,EAAG,SACxB,kBAAkBC,EAAY,IAAI,kBAClC,OAAA,EAGF,SAASC,EAAOC,EAAc,CAC5B,MAAMC,EAAeC,EAAAA,mBAAmBR,CAAyB,EAC3DS,EAAgBC,EAAoBH,CAAY,EAEhDI,EAAOC,EAAAA,qBACVC,EAAAA,WAAA,CACC,SAAAC,EAAAA,IAAClB,GAAI,aAAAW,EAA6B,GAAGN,EACnC,SAAAa,EAAAA,IAACC,EAAAA,aAAA,CAAa,SAAUT,EACtB,eAACU,EAAA,CAAc,SAAUlB,EAAgB,SAAAD,CAAA,CAAO,CAAA,CAClD,EACF,CAAA,CACF,CAAA,EAGIoB,EAAgBR,EAAc,wBAAwBE,CAAI,EAC1DO,EAAaT,EAAc,6BAA6BQ,CAAa,EAE3E,MAAO,CACL,KAAAN,EACA,KAAM,GAAGO,CAAU,mBAAmBhB,CAAQ,UAAA,CAElD,CAEA,MAAO,CAAE,OAAAG,CAAA,CACX"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { StaticRouter as h } from "react-router";
|
|
3
|
+
import { StrictMode as p } from "react";
|
|
4
|
+
import C from "@emotion/server/create-instance";
|
|
5
|
+
import S from "node:fs/promises";
|
|
6
|
+
import { renderToString as y } from "react-dom/server";
|
|
7
|
+
import { D as T, c as k } from "../../common-BQDBPfA-.js";
|
|
8
|
+
import A from "../DefaultRoutes.es.js";
|
|
9
|
+
const g = "codeforlife", v = {
|
|
10
|
+
name: g
|
|
11
|
+
};
|
|
12
|
+
async function j({
|
|
13
|
+
App: n,
|
|
14
|
+
routes: c,
|
|
15
|
+
catchAllRoute: i = T,
|
|
16
|
+
createEmotionCacheOptions: s,
|
|
17
|
+
...m
|
|
18
|
+
}) {
|
|
19
|
+
const a = await S.readFile(
|
|
20
|
+
`./node_modules/${v.name}/dist/style.css`,
|
|
21
|
+
"utf-8"
|
|
22
|
+
);
|
|
23
|
+
function l(f) {
|
|
24
|
+
const o = k(s), e = C(o), r = y(
|
|
25
|
+
/* @__PURE__ */ t(p, { children: /* @__PURE__ */ t(n, { emotionCache: o, ...m, children: /* @__PURE__ */ t(h, { location: f, children: /* @__PURE__ */ t(A, { catchAll: i, children: c }) }) }) })
|
|
26
|
+
), d = e.extractCriticalToChunks(r), u = e.constructStyleTagsFromChunks(d);
|
|
27
|
+
return {
|
|
28
|
+
html: r,
|
|
29
|
+
head: `${u}<style data-cfl>${a}</style>`
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return { render: l };
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
j as server
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=server.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.es.js","sources":["../../../src/server/entry/server.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The server entrypoint when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { StaticRouter } from \"react-router\"\nimport { StrictMode } from \"react\"\nimport createEmotionServer from \"@emotion/server/create-instance\"\nimport fs from \"node:fs/promises\"\nimport { renderToString } from \"react-dom/server\"\n\nimport {\n DEFAULT_CATCH_ALL,\n type EntryKwArgs,\n createEmotionCache,\n} from \"./common\"\nimport DefaultRoutes from \"../DefaultRoutes\"\nimport packageJson from \"../../../package.json\"\n\nexport async function server({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const cflStyle = await fs.readFile(\n `./node_modules/${packageJson.name}/dist/style.css`,\n \"utf-8\",\n )\n\n function render(path: string) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n const emotionServer = createEmotionServer(emotionCache)\n\n const html = renderToString(\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <StaticRouter location={path}>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </StaticRouter>\n </App>\n </StrictMode>,\n )\n\n const emotionChunks = emotionServer.extractCriticalToChunks(html)\n const emotionCss = emotionServer.constructStyleTagsFromChunks(emotionChunks)\n\n return {\n html,\n head: `${emotionCss}<style data-cfl>${cflStyle}</style>`,\n }\n }\n\n return { render }\n}\n"],"names":["server","App","routes","catchAllRoute","DEFAULT_CATCH_ALL","createEmotionCacheOptions","appProps","cflStyle","fs","packageJson","render","path","emotionCache","createEmotionCache","emotionServer","createEmotionServer","html","renderToString","StrictMode","jsx","StaticRouter","DefaultRoutes","emotionChunks","emotionCss"],"mappings":";;;;;;;;;;;AAyBA,eAAsBA,EAAO;AAAA,EAC3B,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgBC;AAAA,EAChB,2BAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AACd,QAAMC,IAAW,MAAMC,EAAG;AAAA,IACxB,kBAAkBC,EAAY,IAAI;AAAA,IAClC;AAAA,EAAA;AAGF,WAASC,EAAOC,GAAc;AAC5B,UAAMC,IAAeC,EAAmBR,CAAyB,GAC3DS,IAAgBC,EAAoBH,CAAY,GAEhDI,IAAOC;AAAA,wBACVC,GAAA,EACC,UAAA,gBAAAC,EAAClB,KAAI,cAAAW,GAA6B,GAAGN,GACnC,UAAA,gBAAAa,EAACC,GAAA,EAAa,UAAUT,GACtB,4BAACU,GAAA,EAAc,UAAUlB,GAAgB,UAAAD,EAAA,CAAO,EAAA,CAClD,GACF,EAAA,CACF;AAAA,IAAA,GAGIoB,IAAgBR,EAAc,wBAAwBE,CAAI,GAC1DO,IAAaT,EAAc,6BAA6BQ,CAAa;AAE3E,WAAO;AAAA,MACL,MAAAN;AAAA,MACA,MAAM,GAAGO,CAAU,mBAAmBhB,CAAQ;AAAA,IAAA;AAAA,EAElD;AAEA,SAAO,EAAE,QAAAG,EAAA;AACX;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Options as CreateEmotionCacheOptions } from '@emotion/cache';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { AppProps } from '../App';
|
|
4
|
+
import { DefaultRoutesProps } from '../DefaultRoutes';
|
|
5
|
+
import { EmotionCache } from '@emotion/utils';
|
|
6
|
+
/**
|
|
7
|
+
* Creates a new Emotion cache instance.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createEmotionCache({ key, // ensures all styles are generated with this prefix
|
|
10
|
+
prepend, // loads MUI-styles first so we can override them easily
|
|
11
|
+
...otherOptions }?: CreateEmotionCacheOptions): EmotionCache;
|
|
12
|
+
export type EntryAppProps = Pick<AppProps, "emotionCache" | "children">;
|
|
13
|
+
export type EntryKwArgs = {
|
|
14
|
+
App: FC<EntryAppProps>;
|
|
15
|
+
routes: DefaultRoutesProps["children"];
|
|
16
|
+
catchAllRoute?: DefaultRoutesProps["catchAll"];
|
|
17
|
+
createEmotionCacheOptions?: CreateEmotionCacheOptions;
|
|
18
|
+
};
|
|
19
|
+
export declare const DEFAULT_CATCH_ALL: DefaultRoutesProps["catchAll"];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type EntryAppProps } from './common';
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "codeforlife",
|
|
3
3
|
"description": "Common frontend code",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "2.14.
|
|
5
|
+
"version": "2.14.7",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"module": "dist/index.es.js",
|
|
@@ -79,9 +79,19 @@
|
|
|
79
79
|
"require": "./dist/server/DefaultRoutes.cjs.js"
|
|
80
80
|
},
|
|
81
81
|
"./server/entry": {
|
|
82
|
-
"types": "./dist/server/entry.d.ts",
|
|
83
|
-
"import": "./dist/server/entry.es.js",
|
|
84
|
-
"require": "./dist/server/entry.cjs.js"
|
|
82
|
+
"types": "./dist/server/entry/index.d.ts",
|
|
83
|
+
"import": "./dist/server/entry/index.es.js",
|
|
84
|
+
"require": "./dist/server/entry/index.cjs.js"
|
|
85
|
+
},
|
|
86
|
+
"./server/entry/client": {
|
|
87
|
+
"types": "./dist/server/entry/client.d.ts",
|
|
88
|
+
"import": "./dist/server/entry/client.es.js",
|
|
89
|
+
"require": "./dist/server/entry/client.cjs.js"
|
|
90
|
+
},
|
|
91
|
+
"./server/entry/server": {
|
|
92
|
+
"types": "./dist/server/entry/server.d.ts",
|
|
93
|
+
"import": "./dist/server/entry/server.es.js",
|
|
94
|
+
"require": "./dist/server/entry/server.cjs.js"
|
|
85
95
|
},
|
|
86
96
|
"./slices": {
|
|
87
97
|
"types": "./dist/slices/index.d.ts",
|
package/dist/server/entry.cjs.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";var v=Object.create;var h=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var E=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of T(t))!k.call(e,o)&&o!==r&&h(e,o,{get:()=>t[o],enumerable:!(c=w(t,o))||c.enumerable});return e};var i=(e,t,r)=>(r=e!=null?v(A(e)):{},E(t||!e||!e.__esModule?h(r,"default",{value:e,enumerable:!0}):r,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),f=require("react-router"),C=require("react"),M=require("@emotion/cache"),y=require("./DefaultRoutes.cjs.js");require("@mui/material");require("@emotion/react");require("react-redux");;/* empty css */const _="codeforlife",D={name:_};function j({key:e="css",prepend:t=!0,...r}={}){return M({key:e,prepend:t,...r})}const x=!0;async function F({App:e,routes:t,catchAllRoute:r=x,createEmotionCacheOptions:c,...o}){const{default:s}=await import("@emotion/server/create-instance"),{renderToString:a}=await import("react-dom/server"),{default:u}=await import("node:fs/promises"),S=await u.readFile(`./node_modules/${D.name}/dist/style.css`,"utf-8");function q(R){const l=j(c),d=s(l),m=a(n.jsx(C.StrictMode,{children:n.jsx(e,{emotionCache:l,...o,children:n.jsx(f.StaticRouter,{location:R,children:n.jsx(y,{catchAll:r,children:t})})})})),g=d.extractCriticalToChunks(m),p=d.constructStyleTagsFromChunks(g);return{html:m,head:`${p}<style data-cfl>${S}</style>`}}return{render:q}}async function L({App:e,routes:t,catchAllRoute:r=x,createEmotionCacheOptions:c,...o}){const s=await import("react-dom/client"),{hydrateRoot:a}=s.default||s,u=j(c);a(document.getElementById("root"),n.jsx(C.StrictMode,{children:n.jsx(e,{emotionCache:u,...o,children:n.jsx(f.BrowserRouter,{children:n.jsx(y,{catchAll:r,children:t})})})}))}exports.client=L;exports.server=F;
|
|
2
|
-
//# sourceMappingURL=entry.cjs.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.cjs.js","sources":["../../src/server/entry.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The client and server entrypoints when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { BrowserRouter, StaticRouter } from \"react-router\"\nimport { type FC, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\nimport DefaultRoutes, { type DefaultRoutesProps } from \"./DefaultRoutes\"\nimport { type AppProps } from \"./App\"\nimport packageJson from \"../../package.json\"\n\n/**\n * Creates a new Emotion cache instance.\n */\nfunction createEmotionCache(\n {\n key = \"css\", // ensures all styles are generated with this prefix\n prepend = true, // loads MUI-styles first so we can override them easily\n ...otherOptions\n } = {} as CreateEmotionCacheOptions,\n) {\n return createCache({ key, prepend, ...otherOptions })\n}\n\nexport type EntryAppProps = Pick<AppProps, \"emotionCache\" | \"children\">\n\nexport type EntryKwArgs = {\n App: FC<EntryAppProps>\n routes: DefaultRoutesProps[\"children\"]\n catchAllRoute?: DefaultRoutesProps[\"catchAll\"]\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nconst DEFAULT_CATCH_ALL: DefaultRoutesProps[\"catchAll\"] = true\n\nexport async function server({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const { default: createEmotionServer } = await import(\n \"@emotion/server/create-instance\"\n )\n const { renderToString } = await import(\"react-dom/server\")\n const { default: fs } = await import(\"node:fs/promises\")\n\n const cflStyle = await fs.readFile(\n `./node_modules/${packageJson.name}/dist/style.css`,\n \"utf-8\",\n )\n\n function render(path: string) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n const emotionServer = createEmotionServer(emotionCache)\n\n const html = renderToString(\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <StaticRouter location={path}>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </StaticRouter>\n </App>\n </StrictMode>,\n )\n\n const emotionChunks = emotionServer.extractCriticalToChunks(html)\n const emotionCss = emotionServer.constructStyleTagsFromChunks(emotionChunks)\n\n return {\n html,\n head: `${emotionCss}<style data-cfl>${cflStyle}</style>`,\n }\n }\n\n return { render }\n}\n\nexport async function client({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const reactDomClientModule = await import(\"react-dom/client\")\n\n // Check for the .default property to handle CJS/ESM interop.\n // 'hydrateRoot' will be on the module itself OR on the .default object.\n const { hydrateRoot } = reactDomClientModule.default || reactDomClientModule\n\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n\n hydrateRoot(\n document.getElementById(\"root\") as HTMLElement,\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <BrowserRouter>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","DEFAULT_CATCH_ALL","server","App","routes","catchAllRoute","createEmotionCacheOptions","appProps","createEmotionServer","renderToString","fs","cflStyle","packageJson","render","path","emotionCache","emotionServer","html","StrictMode","jsx","StaticRouter","DefaultRoutes","emotionChunks","emotionCss","client","reactDomClientModule","hydrateRoot","BrowserRouter"],"mappings":"uzBAwBA,SAASA,EACP,CACE,IAAAC,EAAM,MACN,QAAAC,EAAU,GACV,GAAGC,CACL,EAAI,GACJ,CACA,OAAOC,EAAY,CAAE,IAAAH,EAAK,QAAAC,EAAS,GAAGC,EAAc,CACtD,CAWA,MAAME,EAAoD,GAE1D,eAAsBC,EAAO,CAC3B,IAAAC,EACA,OAAAC,EACA,cAAAC,EAAgBJ,EAChB,0BAAAK,EACA,GAAGC,CACL,EAAgB,CACd,KAAM,CAAE,QAASC,GAAwB,KAAM,QAC7C,iCACF,EACM,CAAE,eAAAC,CAAA,EAAmB,KAAM,QAAO,kBAAkB,EACpD,CAAE,QAASC,GAAO,KAAM,QAAO,kBAAkB,EAEjDC,EAAW,MAAMD,EAAG,SACxB,kBAAkBE,EAAY,IAAI,kBAClC,OAAA,EAGF,SAASC,EAAOC,EAAc,CAC5B,MAAMC,EAAenB,EAAmBU,CAAyB,EAC3DU,EAAgBR,EAAoBO,CAAY,EAEhDE,EAAOR,QACVS,EAAAA,WAAA,CACC,SAAAC,EAAAA,IAAChB,GAAI,aAAAY,EAA6B,GAAGR,EACnC,SAAAY,EAAAA,IAACC,EAAAA,aAAA,CAAa,SAAUN,EACtB,eAACO,EAAA,CAAc,SAAUhB,EAAgB,SAAAD,CAAA,CAAO,CAAA,CAClD,EACF,CAAA,CACF,CAAA,EAGIkB,EAAgBN,EAAc,wBAAwBC,CAAI,EAC1DM,EAAaP,EAAc,6BAA6BM,CAAa,EAE3E,MAAO,CACL,KAAAL,EACA,KAAM,GAAGM,CAAU,mBAAmBZ,CAAQ,UAAA,CAElD,CAEA,MAAO,CAAE,OAAAE,CAAA,CACX,CAEA,eAAsBW,EAAO,CAC3B,IAAArB,EACA,OAAAC,EACA,cAAAC,EAAgBJ,EAChB,0BAAAK,EACA,GAAGC,CACL,EAAgB,CACd,MAAMkB,EAAuB,KAAM,QAAO,kBAAkB,EAItD,CAAE,YAAAC,CAAA,EAAgBD,EAAqB,SAAWA,EAElDV,EAAenB,EAAmBU,CAAyB,EAEjEoB,EACE,SAAS,eAAe,MAAM,QAC7BR,EAAAA,WAAA,CACC,SAAAC,MAAChB,EAAA,CAAI,aAAAY,EAA6B,GAAGR,EACnC,SAAAY,MAACQ,EAAAA,cAAA,CACC,SAAAR,EAAAA,IAACE,GAAc,SAAUhB,EAAgB,SAAAD,CAAA,CAAO,EAClD,EACF,CAAA,CACF,CAAA,CAEJ"}
|
package/dist/server/entry.d.ts
DELETED
package/dist/server/entry.es.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { BrowserRouter as T, StaticRouter as g } from "react-router";
|
|
3
|
-
import { StrictMode as u } from "react";
|
|
4
|
-
import k from "@emotion/cache";
|
|
5
|
-
import h from "./DefaultRoutes.es.js";
|
|
6
|
-
import "@mui/material";
|
|
7
|
-
import "@emotion/react";
|
|
8
|
-
import "react-redux";
|
|
9
|
-
/* empty css */
|
|
10
|
-
const E = "codeforlife", R = {
|
|
11
|
-
name: E
|
|
12
|
-
};
|
|
13
|
-
function f({
|
|
14
|
-
key: o = "css",
|
|
15
|
-
// ensures all styles are generated with this prefix
|
|
16
|
-
prepend: e = !0,
|
|
17
|
-
// loads MUI-styles first so we can override them easily
|
|
18
|
-
...r
|
|
19
|
-
} = {}) {
|
|
20
|
-
return k({ key: o, prepend: e, ...r });
|
|
21
|
-
}
|
|
22
|
-
const p = !0;
|
|
23
|
-
async function j({
|
|
24
|
-
App: o,
|
|
25
|
-
routes: e,
|
|
26
|
-
catchAllRoute: r = p,
|
|
27
|
-
createEmotionCacheOptions: c,
|
|
28
|
-
...i
|
|
29
|
-
}) {
|
|
30
|
-
const { default: n } = await import("@emotion/server/create-instance"), { renderToString: a } = await import("react-dom/server"), { default: s } = await import("node:fs/promises"), C = await s.readFile(
|
|
31
|
-
`./node_modules/${R.name}/dist/style.css`,
|
|
32
|
-
"utf-8"
|
|
33
|
-
);
|
|
34
|
-
function y(S) {
|
|
35
|
-
const l = f(c), m = n(l), d = a(
|
|
36
|
-
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(o, { emotionCache: l, ...i, children: /* @__PURE__ */ t(g, { location: S, children: /* @__PURE__ */ t(h, { catchAll: r, children: e }) }) }) })
|
|
37
|
-
), w = m.extractCriticalToChunks(d), A = m.constructStyleTagsFromChunks(w);
|
|
38
|
-
return {
|
|
39
|
-
html: d,
|
|
40
|
-
head: `${A}<style data-cfl>${C}</style>`
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
return { render: y };
|
|
44
|
-
}
|
|
45
|
-
async function H({
|
|
46
|
-
App: o,
|
|
47
|
-
routes: e,
|
|
48
|
-
catchAllRoute: r = p,
|
|
49
|
-
createEmotionCacheOptions: c,
|
|
50
|
-
...i
|
|
51
|
-
}) {
|
|
52
|
-
const n = await import("react-dom/client"), { hydrateRoot: a } = n.default || n, s = f(c);
|
|
53
|
-
a(
|
|
54
|
-
document.getElementById("root"),
|
|
55
|
-
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(o, { emotionCache: s, ...i, children: /* @__PURE__ */ t(T, { children: /* @__PURE__ */ t(h, { catchAll: r, children: e }) }) }) })
|
|
56
|
-
);
|
|
57
|
-
}
|
|
58
|
-
export {
|
|
59
|
-
H as client,
|
|
60
|
-
j as server
|
|
61
|
-
};
|
|
62
|
-
//# sourceMappingURL=entry.es.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"entry.es.js","sources":["../../src/server/entry.tsx"],"sourcesContent":["/**\n * © Ocado Group\n * Created on 20/10/2025 at 17:45:17(+01:00).\n *\n * The client and server entrypoints when doing server-side rendering.\n *\n * Helpful links:\n * https://mui.com/material-ui/guides/server-rendering/\n * https://github.com/remix-run/react-router/tree/main/examples/ssr\n */\n\nimport { BrowserRouter, StaticRouter } from \"react-router\"\nimport { type FC, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\nimport DefaultRoutes, { type DefaultRoutesProps } from \"./DefaultRoutes\"\nimport { type AppProps } from \"./App\"\nimport packageJson from \"../../package.json\"\n\n/**\n * Creates a new Emotion cache instance.\n */\nfunction createEmotionCache(\n {\n key = \"css\", // ensures all styles are generated with this prefix\n prepend = true, // loads MUI-styles first so we can override them easily\n ...otherOptions\n } = {} as CreateEmotionCacheOptions,\n) {\n return createCache({ key, prepend, ...otherOptions })\n}\n\nexport type EntryAppProps = Pick<AppProps, \"emotionCache\" | \"children\">\n\nexport type EntryKwArgs = {\n App: FC<EntryAppProps>\n routes: DefaultRoutesProps[\"children\"]\n catchAllRoute?: DefaultRoutesProps[\"catchAll\"]\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nconst DEFAULT_CATCH_ALL: DefaultRoutesProps[\"catchAll\"] = true\n\nexport async function server({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const { default: createEmotionServer } = await import(\n \"@emotion/server/create-instance\"\n )\n const { renderToString } = await import(\"react-dom/server\")\n const { default: fs } = await import(\"node:fs/promises\")\n\n const cflStyle = await fs.readFile(\n `./node_modules/${packageJson.name}/dist/style.css`,\n \"utf-8\",\n )\n\n function render(path: string) {\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n const emotionServer = createEmotionServer(emotionCache)\n\n const html = renderToString(\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <StaticRouter location={path}>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </StaticRouter>\n </App>\n </StrictMode>,\n )\n\n const emotionChunks = emotionServer.extractCriticalToChunks(html)\n const emotionCss = emotionServer.constructStyleTagsFromChunks(emotionChunks)\n\n return {\n html,\n head: `${emotionCss}<style data-cfl>${cflStyle}</style>`,\n }\n }\n\n return { render }\n}\n\nexport async function client({\n App,\n routes,\n catchAllRoute = DEFAULT_CATCH_ALL,\n createEmotionCacheOptions,\n ...appProps\n}: EntryKwArgs) {\n const reactDomClientModule = await import(\"react-dom/client\")\n\n // Check for the .default property to handle CJS/ESM interop.\n // 'hydrateRoot' will be on the module itself OR on the .default object.\n const { hydrateRoot } = reactDomClientModule.default || reactDomClientModule\n\n const emotionCache = createEmotionCache(createEmotionCacheOptions)\n\n hydrateRoot(\n document.getElementById(\"root\") as HTMLElement,\n <StrictMode>\n <App emotionCache={emotionCache} {...appProps}>\n <BrowserRouter>\n <DefaultRoutes catchAll={catchAllRoute}>{routes}</DefaultRoutes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","DEFAULT_CATCH_ALL","server","App","routes","catchAllRoute","createEmotionCacheOptions","appProps","createEmotionServer","renderToString","fs","cflStyle","packageJson","render","path","emotionCache","emotionServer","html","StrictMode","jsx","StaticRouter","DefaultRoutes","emotionChunks","emotionCss","client","reactDomClientModule","hydrateRoot","BrowserRouter"],"mappings":";;;;;;;;;;;;AAwBA,SAASA,EACP;AAAA,EACE,KAAAC,IAAM;AAAA;AAAA,EACN,SAAAC,IAAU;AAAA;AAAA,EACV,GAAGC;AACL,IAAI,IACJ;AACA,SAAOC,EAAY,EAAE,KAAAH,GAAK,SAAAC,GAAS,GAAGC,GAAc;AACtD;AAWA,MAAME,IAAoD;AAE1D,eAAsBC,EAAO;AAAA,EAC3B,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgBJ;AAAA,EAChB,2BAAAK;AAAA,EACA,GAAGC;AACL,GAAgB;AACd,QAAM,EAAE,SAASC,MAAwB,MAAM,OAC7C,iCACF,GACM,EAAE,gBAAAC,EAAA,IAAmB,MAAM,OAAO,kBAAkB,GACpD,EAAE,SAASC,MAAO,MAAM,OAAO,kBAAkB,GAEjDC,IAAW,MAAMD,EAAG;AAAA,IACxB,kBAAkBE,EAAY,IAAI;AAAA,IAClC;AAAA,EAAA;AAGF,WAASC,EAAOC,GAAc;AAC5B,UAAMC,IAAenB,EAAmBU,CAAyB,GAC3DU,IAAgBR,EAAoBO,CAAY,GAEhDE,IAAOR;AAAA,wBACVS,GAAA,EACC,UAAA,gBAAAC,EAAChB,KAAI,cAAAY,GAA6B,GAAGR,GACnC,UAAA,gBAAAY,EAACC,GAAA,EAAa,UAAUN,GACtB,4BAACO,GAAA,EAAc,UAAUhB,GAAgB,UAAAD,EAAA,CAAO,EAAA,CAClD,GACF,EAAA,CACF;AAAA,IAAA,GAGIkB,IAAgBN,EAAc,wBAAwBC,CAAI,GAC1DM,IAAaP,EAAc,6BAA6BM,CAAa;AAE3E,WAAO;AAAA,MACL,MAAAL;AAAA,MACA,MAAM,GAAGM,CAAU,mBAAmBZ,CAAQ;AAAA,IAAA;AAAA,EAElD;AAEA,SAAO,EAAE,QAAAE,EAAA;AACX;AAEA,eAAsBW,EAAO;AAAA,EAC3B,KAAArB;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgBJ;AAAA,EAChB,2BAAAK;AAAA,EACA,GAAGC;AACL,GAAgB;AACd,QAAMkB,IAAuB,MAAM,OAAO,kBAAkB,GAItD,EAAE,aAAAC,EAAA,IAAgBD,EAAqB,WAAWA,GAElDV,IAAenB,EAAmBU,CAAyB;AAEjE,EAAAoB;AAAA,IACE,SAAS,eAAe,MAAM;AAAA,sBAC7BR,GAAA,EACC,UAAA,gBAAAC,EAAChB,GAAA,EAAI,cAAAY,GAA6B,GAAGR,GACnC,UAAA,gBAAAY,EAACQ,GAAA,EACC,UAAA,gBAAAR,EAACE,KAAc,UAAUhB,GAAgB,UAAAD,EAAA,CAAO,GAClD,GACF,EAAA,CACF;AAAA,EAAA;AAEJ;"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { Options as CreateEmotionCacheOptions } from '@emotion/cache';
|
|
3
|
-
import { DefaultRoutesProps } from './DefaultRoutes';
|
|
4
|
-
import { AppProps } from './App';
|
|
5
|
-
export type EntryAppProps = Pick<AppProps, "emotionCache" | "children">;
|
|
6
|
-
export type EntryKwArgs = {
|
|
7
|
-
App: FC<EntryAppProps>;
|
|
8
|
-
routes: DefaultRoutesProps["children"];
|
|
9
|
-
catchAllRoute?: DefaultRoutesProps["catchAll"];
|
|
10
|
-
createEmotionCacheOptions?: CreateEmotionCacheOptions;
|
|
11
|
-
};
|
|
12
|
-
export declare function server({ App, routes, catchAllRoute, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<{
|
|
13
|
-
render: (path: string) => {
|
|
14
|
-
html: string;
|
|
15
|
-
head: string;
|
|
16
|
-
};
|
|
17
|
-
}>;
|
|
18
|
-
export declare function client({ App, routes, catchAllRoute, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<void>;
|