codeforlife 2.11.9 → 2.11.11
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/api/endpoints/index.d.ts +2 -9
- package/dist/api/index.d.ts +2 -5
- package/dist/components/form/index.d.ts +2 -14
- package/dist/components/index.d.ts +2 -17
- package/dist/components/page/index.d.ts +2 -5
- package/dist/components/router/index.d.ts +2 -6
- package/dist/components/table/index.d.ts +2 -3
- package/dist/features/index.d.ts +2 -4
- package/dist/hooks/index.d.ts +2 -5
- package/dist/index.d.ts +2 -2
- package/dist/middlewares/index.d.ts +2 -1
- package/dist/server/App.d.ts +4 -15
- package/dist/server/entry.cjs.js +1 -1
- package/dist/server/entry.cjs.js.map +1 -1
- package/dist/server/entry.d.ts +2 -16
- package/dist/server/entry.es.js +26 -20
- package/dist/server/entry.es.js.map +1 -1
- package/dist/server/server.d.ts +4 -55
- package/dist/settings/index.d.ts +2 -3
- package/dist/slices/index.d.ts +2 -2
- package/dist/src/api/endpoints/index.d.ts +9 -0
- package/dist/src/api/index.d.ts +5 -0
- package/dist/src/components/form/index.d.ts +14 -0
- package/dist/src/components/index.d.ts +17 -0
- package/dist/src/components/page/index.d.ts +5 -0
- package/dist/src/components/router/index.d.ts +6 -0
- package/dist/src/components/table/index.d.ts +3 -0
- package/dist/src/features/index.d.ts +4 -0
- package/dist/src/hooks/index.d.ts +5 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/middlewares/index.d.ts +1 -0
- package/dist/src/server/App.d.ts +15 -0
- package/dist/src/server/entry.d.ts +16 -0
- package/dist/src/server/server.d.ts +55 -0
- package/dist/src/settings/index.d.ts +3 -0
- package/dist/src/slices/index.d.ts +2 -0
- package/dist/src/theme/components/index.d.ts +3 -0
- package/dist/src/theme/index.d.ts +7 -0
- package/dist/src/utils/api.d.ts +72 -0
- package/dist/src/utils/auth.d.ts +28 -0
- package/dist/src/utils/form.d.ts +25 -0
- package/dist/src/utils/general.d.ts +30 -0
- package/dist/src/utils/router.d.ts +19 -0
- package/dist/src/utils/schema.d.ts +43 -0
- package/dist/src/utils/store.d.ts +10 -0
- package/dist/src/utils/test.d.ts +53 -0
- package/dist/src/utils/theme.d.ts +11 -0
- package/dist/src/utils/window.d.ts +2 -0
- package/dist/theme/components/index.d.ts +4 -3
- package/dist/theme/index.d.ts +2 -7
- package/dist/utils/api.d.ts +2 -72
- package/dist/utils/auth.d.ts +2 -28
- package/dist/utils/form.d.ts +2 -25
- package/dist/utils/general.d.ts +2 -30
- package/dist/utils/router.d.ts +2 -19
- package/dist/utils/schema.d.ts +2 -43
- package/dist/utils/store.d.ts +2 -10
- package/dist/utils/test.d.ts +2 -53
- package/dist/utils/theme.d.ts +2 -11
- package/dist/utils/window.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/{api → src/api}/createApi.d.ts +0 -0
- /package/dist/{api → src/api}/endpoints/authFactor.d.ts +0 -0
- /package/dist/{api → src/api}/endpoints/klass.d.ts +0 -0
- /package/dist/{api → src/api}/endpoints/school.d.ts +0 -0
- /package/dist/{api → src/api}/endpoints/session.d.ts +0 -0
- /package/dist/{api → src/api}/endpoints/user.d.ts +0 -0
- /package/dist/{api → src/api}/models.d.ts +0 -0
- /package/dist/{api → src/api}/schemas.d.ts +0 -0
- /package/dist/{api → src/api}/tagTypes.d.ts +0 -0
- /package/dist/{api → src/api}/urls.d.ts +0 -0
- /package/dist/{components → src/components}/ClickableTooltip.d.ts +0 -0
- /package/dist/{components → src/components}/CopyIconButton.d.ts +0 -0
- /package/dist/{components → src/components}/CopyIconButton.test.d.ts +0 -0
- /package/dist/{components → src/components}/Countdown.d.ts +0 -0
- /package/dist/{components → src/components}/DownloadFileButton.d.ts +0 -0
- /package/dist/{components → src/components}/ElevatedAppBar.d.ts +0 -0
- /package/dist/{components → src/components}/Image.d.ts +0 -0
- /package/dist/{components → src/components}/InputFileButton.d.ts +0 -0
- /package/dist/{components → src/components}/ItemizedList.d.ts +0 -0
- /package/dist/{components → src/components}/OrderedGrid.d.ts +0 -0
- /package/dist/{components → src/components}/ScrollIntoViewLink.d.ts +0 -0
- /package/dist/{components → src/components}/SyncError.d.ts +0 -0
- /package/dist/{components → src/components}/TablePagination.d.ts +0 -0
- /package/dist/{components → src/components}/YouTubeVideo.d.ts +0 -0
- /package/dist/{components → src/components}/form/ApiAutocompleteField.d.ts +0 -0
- /package/dist/{components → src/components}/form/AutocompleteField.d.ts +0 -0
- /package/dist/{components → src/components}/form/CheckboxField.d.ts +0 -0
- /package/dist/{components → src/components}/form/CountryField.d.ts +0 -0
- /package/dist/{components → src/components}/form/DatePickerField.d.ts +0 -0
- /package/dist/{components → src/components}/form/EmailField.d.ts +0 -0
- /package/dist/{components → src/components}/form/FirstNameField.d.ts +0 -0
- /package/dist/{components → src/components}/form/Form.d.ts +0 -0
- /package/dist/{components → src/components}/form/OtpField.d.ts +0 -0
- /package/dist/{components → src/components}/form/PasswordField.d.ts +0 -0
- /package/dist/{components → src/components}/form/RepeatField.d.ts +0 -0
- /package/dist/{components → src/components}/form/SubmitButton.d.ts +0 -0
- /package/dist/{components → src/components}/form/TextField.d.ts +0 -0
- /package/dist/{components → src/components}/form/UkCountyField.d.ts +0 -0
- /package/dist/{components → src/components}/page/Banner.d.ts +0 -0
- /package/dist/{components → src/components}/page/Notification.d.ts +0 -0
- /package/dist/{components → src/components}/page/Page.d.ts +0 -0
- /package/dist/{components → src/components}/page/Section.d.ts +0 -0
- /package/dist/{components → src/components}/page/TabBar.d.ts +0 -0
- /package/dist/{components → src/components}/router/Link.d.ts +0 -0
- /package/dist/{components → src/components}/router/LinkButton.d.ts +0 -0
- /package/dist/{components → src/components}/router/LinkIconButton.d.ts +0 -0
- /package/dist/{components → src/components}/router/LinkListItem.d.ts +0 -0
- /package/dist/{components → src/components}/router/LinkTab.d.ts +0 -0
- /package/dist/{components → src/components}/router/Navigate.d.ts +0 -0
- /package/dist/{components → src/components}/table/CellStack.d.ts +0 -0
- /package/dist/{components → src/components}/table/Table.d.ts +0 -0
- /package/dist/{features → src/features}/InactiveDialog.d.ts +0 -0
- /package/dist/{features → src/features}/ScreenTimeDialog.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/api.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/auth.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/form.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/general.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/router.d.ts +0 -0
- /package/dist/{middlewares → src/middlewares}/session.d.ts +0 -0
- /package/dist/{scripts → src/scripts}/index.d.ts +0 -0
- /package/dist/{settings → src/settings}/custom.d.ts +0 -0
- /package/dist/{settings → src/settings}/vite.d.ts +0 -0
- /package/dist/{slices → src/slices}/createSlice.d.ts +0 -0
- /package/dist/{slices → src/slices}/session.d.ts +0 -0
- /package/dist/{theme → src/theme}/ThemedBox.d.ts +0 -0
- /package/dist/{theme → src/theme}/colors.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiAccordion.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiAutocomplete.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiButton.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiCardActions.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiCheckbox.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiContainer.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiDialog.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiFormControlLabel.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiFormHelperText.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiGrid.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiInputBase.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiLink.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiList.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiListItemText.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiMenu.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiMenuItem.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiSelect.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTab.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTable.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTableBody.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTableHead.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTabs.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTextField.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiToolbar.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/MuiTypography.d.ts +0 -0
- /package/dist/{theme → src/theme}/components/_components.d.ts +0 -0
- /package/dist/{theme → src/theme}/palette.d.ts +0 -0
- /package/dist/{theme → src/theme}/spacing.d.ts +0 -0
- /package/dist/{theme → src/theme}/typography.d.ts +0 -0
- /package/dist/{utils → src/utils}/api.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/form.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/general.test.d.ts +0 -0
- /package/dist/{utils → src/utils}/router.test.d.ts +0 -0
|
@@ -1,9 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export {
|
|
3
|
-
export * from './klass';
|
|
4
|
-
export { default as getReadClassEndpoints } from './klass';
|
|
5
|
-
export * from './school';
|
|
6
|
-
export { default as getReadSchoolEndpoints } from './school';
|
|
7
|
-
export * from './session';
|
|
8
|
-
export * from './user';
|
|
9
|
-
export { default as getReadUserEndpoints } from './user';
|
|
1
|
+
export * from '../../src/api/endpoints/index'
|
|
2
|
+
export {}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export { default as CheckboxField, type CheckboxFieldProps, } from './CheckboxField';
|
|
4
|
-
export { default as CountryField, type CountryFieldProps } from './CountryField';
|
|
5
|
-
export { default as DatePickerField, type DatePickerFieldProps, } from './DatePickerField';
|
|
6
|
-
export { default as EmailField, type EmailFieldProps } from './EmailField';
|
|
7
|
-
export { default as FirstNameField, type FirstNameFieldProps, } from './FirstNameField';
|
|
8
|
-
export { default as Form, type FormProps, type FormErrors } from './Form';
|
|
9
|
-
export { default as OtpField, type OtpFieldProps } from './OtpField';
|
|
10
|
-
export { default as PasswordField, type PasswordFieldProps, } from './PasswordField';
|
|
11
|
-
export { default as RepeatField, type RepeatFieldProps } from './RepeatField';
|
|
12
|
-
export { default as SubmitButton, type SubmitButtonProps } from './SubmitButton';
|
|
13
|
-
export { default as TextField, type TextFieldProps } from './TextField';
|
|
14
|
-
export { default as UkCountyField, type UkCountyFieldProps, } from './UkCountyField';
|
|
1
|
+
export * from '../../src/components/form/index'
|
|
2
|
+
export {}
|
|
@@ -1,17 +1,2 @@
|
|
|
1
|
-
export *
|
|
2
|
-
export
|
|
3
|
-
export * from './router';
|
|
4
|
-
export * as tables from './table';
|
|
5
|
-
export { default as ClickableTooltip, type ClickableTooltipProps, } from './ClickableTooltip';
|
|
6
|
-
export { default as CopyIconButton, type CopyIconButtonProps, } from './CopyIconButton';
|
|
7
|
-
export { default as Countdown, type CountdownProps } from './Countdown';
|
|
8
|
-
export { default as DownloadFileButton, type DownloadFileButtonProps, } from './DownloadFileButton';
|
|
9
|
-
export { default as ElevatedAppBar, type ElevatedAppBarProps, } from './ElevatedAppBar';
|
|
10
|
-
export { default as Image, type ImageProps } from './Image';
|
|
11
|
-
export { default as InputFileButton, type InputFileButtonProps, } from './InputFileButton';
|
|
12
|
-
export { default as ItemizedList, type ItemizedListProps } from './ItemizedList';
|
|
13
|
-
export { default as OrderedGrid, type OrderedGridProps } from './OrderedGrid';
|
|
14
|
-
export { default as ScrollIntoViewLink, type ScrollIntoViewLinkProps, } from './ScrollIntoViewLink';
|
|
15
|
-
export { default as SyncError, type SyncErrorProps } from './SyncError';
|
|
16
|
-
export { default as TablePagination, type TablePaginationProps, } from './TablePagination';
|
|
17
|
-
export { default as YouTubeVideo, type YouTubeVideoProps } from './YouTubeVideo';
|
|
1
|
+
export * from '../src/components/index'
|
|
2
|
+
export {}
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export { default as Page, type PageProps, type PageState } from './Page';
|
|
4
|
-
export { default as Section, type SectionProps } from './Section';
|
|
5
|
-
export { default as TabBar, type TabBarProps } from './TabBar';
|
|
1
|
+
export * from '../../src/components/page/index'
|
|
2
|
+
export {}
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export { default as LinkIconButton, type LinkIconButtonProps, } from './LinkIconButton';
|
|
4
|
-
export { default as LinkListItem, type LinkListItemProps } from './LinkListItem';
|
|
5
|
-
export { default as LinkTab, type LinkTabProps } from './LinkTab';
|
|
6
|
-
export { default as Navigate, type NavigateProps } from './Navigate';
|
|
1
|
+
export * from '../../src/components/router/index'
|
|
2
|
+
export {}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export { TableCell as Cell, type TableCellProps as CellProps, TableRow as BodyRow, type TableRowProps as BodyRowProps, } from '@mui/material';
|
|
1
|
+
export * from '../../src/components/table/index'
|
|
2
|
+
export {}
|
package/dist/features/index.d.ts
CHANGED
package/dist/hooks/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export {
|
|
1
|
+
export * from './src/index'
|
|
2
|
+
export {}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from '
|
|
1
|
+
export * from '../src/middlewares/index'
|
|
2
|
+
export {}
|
package/dist/server/App.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { ThemeProviderProps } from '@mui/material';
|
|
6
|
-
export interface AppProps<A extends Action = Action, S = unknown> {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
emotionCache: EmotionCache;
|
|
9
|
-
theme: ThemeProviderProps["theme"];
|
|
10
|
-
store: StoreProviderProps<A, S>["store"];
|
|
11
|
-
maxIdleSeconds?: number;
|
|
12
|
-
maxTotalSeconds?: number;
|
|
13
|
-
}
|
|
14
|
-
declare const App: <A extends Action = Action, S = unknown>({ children, emotionCache, theme, store, maxIdleSeconds, maxTotalSeconds, }: AppProps<A, S>) => JSX.Element;
|
|
15
|
-
export default App;
|
|
1
|
+
export {}
|
|
2
|
+
import Codeforlife from '../src/server/App'
|
|
3
|
+
export default Codeforlife
|
|
4
|
+
export {}
|
package/dist/server/entry.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var R=Object.create;var h=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var w=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var k=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of p(t))!v.call(e,o)&&o!==r&&h(e,o,{get:()=>t[o],enumerable:!(c=g(t,o))||c.enumerable});return e};var s=(e,t,r)=>(r=e!=null?R(w(e)):{},k(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"),i=require("react-router"),f=require("react"),M=require("@emotion/cache");require("@mui/material");require("@emotion/react");require("react-redux");;/* empty css */const T="codeforlife",E={name:T};function y({key:e="css",prepend:t=!0,...r}={}){return M({key:e,prepend:t,...r})}async function $({App:e,routes:t,createEmotionCacheOptions:r={},...c}){const{default:o}=await import("@emotion/server/create-instance"),{renderToString:a}=await import("react-dom/server"),{default:u}=await import("node:fs/promises"),j=await u.readFile(`./node_modules/${E.name}/dist/style.css`,"utf-8");function x(C){const l=y(r),d=o(l),m=a(n.jsx(f.StrictMode,{children:n.jsx(e,{emotionCache:l,...c,children:n.jsx(i.StaticRouter,{location:C,children:n.jsx(i.Routes,{children:t})})})})),S=d.extractCriticalToChunks(m),q=d.constructStyleTagsFromChunks(S);return{html:m,head:`${q}<style data-cfl>${j}</style>`}}return{render:x}}async function b({App:e,routes:t,createEmotionCacheOptions:r={},...c}){const o=await import("react-dom/client"),{hydrateRoot:a}=o.default||o,u=y(r);a(document.getElementById("root"),n.jsx(f.StrictMode,{children:n.jsx(e,{emotionCache:u,...c,children:n.jsx(i.BrowserRouter,{children:n.jsx(i.Routes,{children:t})})})}))}exports.client=b;exports.server=$;
|
|
2
2
|
//# sourceMappingURL=entry.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
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, Routes, StaticRouter } from \"react-router\"\nimport { type FC, type ReactNode, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\nimport { type AppProps } from \"./App\"\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: ReactNode\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport async function server({\n App,\n routes,\n createEmotionCacheOptions = {} as 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:
|
|
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, Routes, StaticRouter } from \"react-router\"\nimport { type FC, type ReactNode, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\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: ReactNode\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport async function server({\n App,\n routes,\n createEmotionCacheOptions = {} as 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 <Routes>{routes}</Routes>\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 createEmotionCacheOptions = {} as 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 <Routes>{routes}</Routes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","server","App","routes","createEmotionCacheOptions","appProps","createEmotionServer","renderToString","fs","cflStyle","packageJson","render","path","emotionCache","emotionServer","html","StrictMode","jsx","StaticRouter","Routes","emotionChunks","emotionCss","client","reactDomClientModule","hydrateRoot","BrowserRouter"],"mappings":"mxBAuBA,SAASA,EACP,CACE,IAAAC,EAAM,MACN,QAAAC,EAAU,GACV,GAAGC,CACL,EAAI,GACJ,CACA,OAAOC,EAAY,CAAE,IAAAH,EAAK,QAAAC,EAAS,GAAGC,EAAc,CACtD,CAUA,eAAsBE,EAAO,CAC3B,IAAAC,EACA,OAAAC,EACA,0BAAAC,EAA4B,CAAA,EAC5B,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,EAAejB,EAAmBQ,CAAyB,EAC3DU,EAAgBR,EAAoBO,CAAY,EAEhDE,EAAOR,QACVS,EAAAA,WAAA,CACC,SAAAC,MAACf,EAAA,CAAI,aAAAW,EAA6B,GAAGR,EACnC,SAAAY,MAACC,EAAAA,aAAA,CAAa,SAAUN,EACtB,SAAAK,EAAAA,IAACE,EAAAA,OAAA,CAAQ,SAAAhB,CAAA,CAAO,EAClB,EACF,CAAA,CACF,CAAA,EAGIiB,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,IAAApB,EACA,OAAAC,EACA,0BAAAC,EAA4B,CAAA,EAC5B,GAAGC,CACL,EAAgB,CACd,MAAMkB,EAAuB,KAAM,QAAO,kBAAkB,EAItD,CAAE,YAAAC,CAAA,EAAgBD,EAAqB,SAAWA,EAElDV,EAAejB,EAAmBQ,CAAyB,EAEjEoB,EACE,SAAS,eAAe,MAAM,EAC9BP,MAACD,EAAAA,WAAA,CACC,SAAAC,EAAAA,IAACf,EAAA,CAAI,aAAAW,EAA6B,GAAGR,EACnC,SAAAY,EAAAA,IAACQ,EAAAA,cAAA,CACC,SAAAR,EAAAA,IAACE,SAAA,CAAQ,SAAAhB,CAAA,CAAO,EAClB,EACF,CAAA,CACF,CAAA,CAEJ"}
|
package/dist/server/entry.d.ts
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { AppProps } from './App';
|
|
4
|
-
export type EntryAppProps = Pick<AppProps, "emotionCache" | "children">;
|
|
5
|
-
export type EntryKwArgs = {
|
|
6
|
-
App: FC<EntryAppProps>;
|
|
7
|
-
routes: ReactNode;
|
|
8
|
-
createEmotionCacheOptions?: CreateEmotionCacheOptions;
|
|
9
|
-
};
|
|
10
|
-
export declare function server({ App, routes, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<{
|
|
11
|
-
render: (path: string) => {
|
|
12
|
-
html: string;
|
|
13
|
-
head: string;
|
|
14
|
-
};
|
|
15
|
-
}>;
|
|
16
|
-
export declare function client({ App, routes, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<void>;
|
|
1
|
+
export * from '../src/server/entry'
|
|
2
|
+
export {}
|
package/dist/server/entry.es.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { BrowserRouter as
|
|
3
|
-
import { StrictMode as
|
|
4
|
-
import
|
|
2
|
+
import { BrowserRouter as w, Routes as d, StaticRouter as g } from "react-router";
|
|
3
|
+
import { StrictMode as u } from "react";
|
|
4
|
+
import k from "@emotion/cache";
|
|
5
5
|
import "@mui/material";
|
|
6
6
|
import "@emotion/react";
|
|
7
7
|
import "react-redux";
|
|
8
8
|
/* empty css */
|
|
9
|
+
const R = "codeforlife", v = {
|
|
10
|
+
name: R
|
|
11
|
+
};
|
|
9
12
|
function h({
|
|
10
13
|
key: o = "css",
|
|
11
14
|
// ensures all styles are generated with this prefix
|
|
@@ -13,40 +16,43 @@ function h({
|
|
|
13
16
|
// loads MUI-styles first so we can override them easily
|
|
14
17
|
...r
|
|
15
18
|
} = {}) {
|
|
16
|
-
return
|
|
19
|
+
return k({ key: o, prepend: e, ...r });
|
|
17
20
|
}
|
|
18
|
-
async function
|
|
21
|
+
async function D({
|
|
19
22
|
App: o,
|
|
20
23
|
routes: e,
|
|
21
24
|
createEmotionCacheOptions: r = {},
|
|
22
|
-
...
|
|
25
|
+
...c
|
|
23
26
|
}) {
|
|
24
|
-
const { default:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
const { default: n } = await import("@emotion/server/create-instance"), { renderToString: i } = await import("react-dom/server"), { default: s } = await import("node:fs/promises"), f = await s.readFile(
|
|
28
|
+
`./node_modules/${v.name}/dist/style.css`,
|
|
29
|
+
"utf-8"
|
|
30
|
+
);
|
|
31
|
+
function p(C) {
|
|
32
|
+
const a = h(r), m = n(a), l = i(
|
|
33
|
+
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(o, { emotionCache: a, ...c, children: /* @__PURE__ */ t(g, { location: C, children: /* @__PURE__ */ t(d, { children: e }) }) }) })
|
|
34
|
+
), y = m.extractCriticalToChunks(l), S = m.constructStyleTagsFromChunks(y);
|
|
29
35
|
return {
|
|
30
|
-
html:
|
|
31
|
-
head: `${
|
|
36
|
+
html: l,
|
|
37
|
+
head: `${S}<style data-cfl>${f}</style>`
|
|
32
38
|
};
|
|
33
39
|
}
|
|
34
40
|
return { render: p };
|
|
35
41
|
}
|
|
36
|
-
async function
|
|
42
|
+
async function I({
|
|
37
43
|
App: o,
|
|
38
44
|
routes: e,
|
|
39
45
|
createEmotionCacheOptions: r = {},
|
|
40
|
-
...
|
|
46
|
+
...c
|
|
41
47
|
}) {
|
|
42
|
-
const
|
|
43
|
-
|
|
48
|
+
const n = await import("react-dom/client"), { hydrateRoot: i } = n.default || n, s = h(r);
|
|
49
|
+
i(
|
|
44
50
|
document.getElementById("root"),
|
|
45
|
-
/* @__PURE__ */ t(
|
|
51
|
+
/* @__PURE__ */ t(u, { children: /* @__PURE__ */ t(o, { emotionCache: s, ...c, children: /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(d, { children: e }) }) }) })
|
|
46
52
|
);
|
|
47
53
|
}
|
|
48
54
|
export {
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
I as client,
|
|
56
|
+
D as server
|
|
51
57
|
};
|
|
52
58
|
//# sourceMappingURL=entry.es.js.map
|
|
@@ -1 +1 @@
|
|
|
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, Routes, StaticRouter } from \"react-router\"\nimport { type FC, type ReactNode, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\nimport { type AppProps } from \"./App\"\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: ReactNode\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport async function server({\n App,\n routes,\n createEmotionCacheOptions = {} as 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:
|
|
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, Routes, StaticRouter } from \"react-router\"\nimport { type FC, type ReactNode, StrictMode } from \"react\"\nimport createCache, {\n type Options as CreateEmotionCacheOptions,\n} from \"@emotion/cache\"\n\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: ReactNode\n createEmotionCacheOptions?: CreateEmotionCacheOptions\n}\n\nexport async function server({\n App,\n routes,\n createEmotionCacheOptions = {} as 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 <Routes>{routes}</Routes>\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 createEmotionCacheOptions = {} as 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 <Routes>{routes}</Routes>\n </BrowserRouter>\n </App>\n </StrictMode>,\n )\n}\n"],"names":["createEmotionCache","key","prepend","otherOptions","createCache","server","App","routes","createEmotionCacheOptions","appProps","createEmotionServer","renderToString","fs","cflStyle","packageJson","render","path","emotionCache","emotionServer","html","StrictMode","jsx","StaticRouter","Routes","emotionChunks","emotionCss","client","reactDomClientModule","hydrateRoot","BrowserRouter"],"mappings":";;;;;;;;;;;AAuBA,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;AAUA,eAAsBE,EAAO;AAAA,EAC3B,KAAAC;AAAA,EACA,QAAAC;AAAA,EACA,2BAAAC,IAA4B,CAAA;AAAA,EAC5B,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,IAAejB,EAAmBQ,CAAyB,GAC3DU,IAAgBR,EAAoBO,CAAY,GAEhDE,IAAOR;AAAA,wBACVS,GAAA,EACC,UAAA,gBAAAC,EAACf,GAAA,EAAI,cAAAW,GAA6B,GAAGR,GACnC,UAAA,gBAAAY,EAACC,GAAA,EAAa,UAAUN,GACtB,UAAA,gBAAAK,EAACE,GAAA,EAAQ,UAAAhB,EAAA,CAAO,GAClB,GACF,EAAA,CACF;AAAA,IAAA,GAGIiB,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,KAAApB;AAAA,EACA,QAAAC;AAAA,EACA,2BAAAC,IAA4B,CAAA;AAAA,EAC5B,GAAGC;AACL,GAAgB;AACd,QAAMkB,IAAuB,MAAM,OAAO,kBAAkB,GAItD,EAAE,aAAAC,EAAA,IAAgBD,EAAqB,WAAWA,GAElDV,IAAejB,EAAmBQ,CAAyB;AAEjE,EAAAoB;AAAA,IACE,SAAS,eAAe,MAAM;AAAA,IAC9B,gBAAAP,EAACD,GAAA,EACC,UAAA,gBAAAC,EAACf,GAAA,EAAI,cAAAW,GAA6B,GAAGR,GACnC,UAAA,gBAAAY,EAACQ,GAAA,EACC,UAAA,gBAAAR,EAACE,GAAA,EAAQ,UAAAhB,EAAA,CAAO,GAClB,GACF,EAAA,CACF;AAAA,EAAA;AAEJ;"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -1,55 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type Mode = "development" | "staging" | "production";
|
|
6
|
-
type Options = Partial<{
|
|
7
|
-
mode: Mode;
|
|
8
|
-
port: number;
|
|
9
|
-
base: string;
|
|
10
|
-
}>;
|
|
11
|
-
type HealthStatus = "healthy" | "startingUp" | "shuttingDown" | "unhealthy" | "unknown";
|
|
12
|
-
type HealthCheck = {
|
|
13
|
-
healthStatus: HealthStatus;
|
|
14
|
-
additionalInfo: string;
|
|
15
|
-
details?: Array<{
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
health: HealthStatus;
|
|
19
|
-
}>;
|
|
20
|
-
};
|
|
21
|
-
type Render = (path: string) => Promise<{
|
|
22
|
-
head?: string;
|
|
23
|
-
html?: string;
|
|
24
|
-
}>;
|
|
25
|
-
type RenderAndTemplate = [Render, string];
|
|
26
|
-
type GetRenderAndTemplate = (path: string) => Promise<RenderAndTemplate>;
|
|
27
|
-
type OnServeError = (error: Error) => string | undefined;
|
|
28
|
-
type Setup = {
|
|
29
|
-
getRenderAndTemplate: GetRenderAndTemplate;
|
|
30
|
-
onServeError: OnServeError;
|
|
31
|
-
};
|
|
32
|
-
export default class Server {
|
|
33
|
-
envIsProduction: boolean;
|
|
34
|
-
templateHtml: string;
|
|
35
|
-
hostname: string;
|
|
36
|
-
mode: Mode;
|
|
37
|
-
port: number;
|
|
38
|
-
base: string;
|
|
39
|
-
app: Express;
|
|
40
|
-
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
41
|
-
cache: CacheClass<string, any>;
|
|
42
|
-
healthCheckCacheKey: string;
|
|
43
|
-
healthCheckCacheTimeout: number;
|
|
44
|
-
healthCheckStatusCodes: Record<HealthStatus, number>;
|
|
45
|
-
devtoolsWorkspaceUUID: UUID;
|
|
46
|
-
constructor({ mode, port, base }?: Options);
|
|
47
|
-
getHealthCheck(request: Request): HealthCheck;
|
|
48
|
-
handleHealthCheck(request: Request, response: Response): void;
|
|
49
|
-
handleServeHtml(request: Request, response: Response, { getRenderAndTemplate, onServeError }: Setup): Promise<void>;
|
|
50
|
-
handleChromeDevTools(request: Request, response: Response): void;
|
|
51
|
-
setUpProduction(): Promise<Setup>;
|
|
52
|
-
setUpDevelopment(): Promise<Setup>;
|
|
53
|
-
run(): Promise<void>;
|
|
54
|
-
}
|
|
55
|
-
export {};
|
|
1
|
+
export {}
|
|
2
|
+
import Codeforlife from '../src/server/server'
|
|
3
|
+
export default Codeforlife
|
|
4
|
+
export {}
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export * from './vite';
|
|
1
|
+
export * from '../src/settings/index'
|
|
2
|
+
export {}
|
package/dist/slices/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
1
|
+
export * from '../src/slices/index'
|
|
2
|
+
export {}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './authFactor';
|
|
2
|
+
export { default as getReadAuthFactorEndpoints } from './authFactor';
|
|
3
|
+
export * from './klass';
|
|
4
|
+
export { default as getReadClassEndpoints } from './klass';
|
|
5
|
+
export * from './school';
|
|
6
|
+
export { default as getReadSchoolEndpoints } from './school';
|
|
7
|
+
export * from './session';
|
|
8
|
+
export * from './user';
|
|
9
|
+
export { default as getReadUserEndpoints } from './user';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as ApiAutocompleteField, type ApiAutocompleteFieldProps, } from './ApiAutocompleteField';
|
|
2
|
+
export { default as AutocompleteField, type AutocompleteFieldProps, } from './AutocompleteField';
|
|
3
|
+
export { default as CheckboxField, type CheckboxFieldProps, } from './CheckboxField';
|
|
4
|
+
export { default as CountryField, type CountryFieldProps } from './CountryField';
|
|
5
|
+
export { default as DatePickerField, type DatePickerFieldProps, } from './DatePickerField';
|
|
6
|
+
export { default as EmailField, type EmailFieldProps } from './EmailField';
|
|
7
|
+
export { default as FirstNameField, type FirstNameFieldProps, } from './FirstNameField';
|
|
8
|
+
export { default as Form, type FormProps, type FormErrors } from './Form';
|
|
9
|
+
export { default as OtpField, type OtpFieldProps } from './OtpField';
|
|
10
|
+
export { default as PasswordField, type PasswordFieldProps, } from './PasswordField';
|
|
11
|
+
export { default as RepeatField, type RepeatFieldProps } from './RepeatField';
|
|
12
|
+
export { default as SubmitButton, type SubmitButtonProps } from './SubmitButton';
|
|
13
|
+
export { default as TextField, type TextFieldProps } from './TextField';
|
|
14
|
+
export { default as UkCountyField, type UkCountyFieldProps, } from './UkCountyField';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * as forms from './form';
|
|
2
|
+
export * as pages from './page';
|
|
3
|
+
export * from './router';
|
|
4
|
+
export * as tables from './table';
|
|
5
|
+
export { default as ClickableTooltip, type ClickableTooltipProps, } from './ClickableTooltip';
|
|
6
|
+
export { default as CopyIconButton, type CopyIconButtonProps, } from './CopyIconButton';
|
|
7
|
+
export { default as Countdown, type CountdownProps } from './Countdown';
|
|
8
|
+
export { default as DownloadFileButton, type DownloadFileButtonProps, } from './DownloadFileButton';
|
|
9
|
+
export { default as ElevatedAppBar, type ElevatedAppBarProps, } from './ElevatedAppBar';
|
|
10
|
+
export { default as Image, type ImageProps } from './Image';
|
|
11
|
+
export { default as InputFileButton, type InputFileButtonProps, } from './InputFileButton';
|
|
12
|
+
export { default as ItemizedList, type ItemizedListProps } from './ItemizedList';
|
|
13
|
+
export { default as OrderedGrid, type OrderedGridProps } from './OrderedGrid';
|
|
14
|
+
export { default as ScrollIntoViewLink, type ScrollIntoViewLinkProps, } from './ScrollIntoViewLink';
|
|
15
|
+
export { default as SyncError, type SyncErrorProps } from './SyncError';
|
|
16
|
+
export { default as TablePagination, type TablePaginationProps, } from './TablePagination';
|
|
17
|
+
export { default as YouTubeVideo, type YouTubeVideoProps } from './YouTubeVideo';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Banner, type BannerProps } from './Banner';
|
|
2
|
+
export { default as Notification, type NotificationProps } from './Notification';
|
|
3
|
+
export { default as Page, type PageProps, type PageState } from './Page';
|
|
4
|
+
export { default as Section, type SectionProps } from './Section';
|
|
5
|
+
export { default as TabBar, type TabBarProps } from './TabBar';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Link, type LinkProps } from './Link';
|
|
2
|
+
export { default as LinkButton, type LinkButtonProps } from './LinkButton';
|
|
3
|
+
export { default as LinkIconButton, type LinkIconButtonProps, } from './LinkIconButton';
|
|
4
|
+
export { default as LinkListItem, type LinkListItemProps } from './LinkListItem';
|
|
5
|
+
export { default as LinkTab, type LinkTabProps } from './LinkTab';
|
|
6
|
+
export { default as Navigate, type NavigateProps } from './Navigate';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { default as Table, type TableProps } from './Table';
|
|
2
|
+
export { default as CellStack, type CellStackProps } from './CellStack';
|
|
3
|
+
export { TableCell as Cell, type TableCellProps as CellProps, TableRow as BodyRow, type TableRowProps as BodyRowProps, } from '@mui/material';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './session';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EmotionCache } from '@emotion/react';
|
|
2
|
+
import { JSX, ReactNode } from 'react';
|
|
3
|
+
import { ProviderProps as StoreProviderProps } from 'react-redux';
|
|
4
|
+
import { Action } from 'redux';
|
|
5
|
+
import { ThemeProviderProps } from '@mui/material';
|
|
6
|
+
export interface AppProps<A extends Action = Action, S = unknown> {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
emotionCache: EmotionCache;
|
|
9
|
+
theme: ThemeProviderProps["theme"];
|
|
10
|
+
store: StoreProviderProps<A, S>["store"];
|
|
11
|
+
maxIdleSeconds?: number;
|
|
12
|
+
maxTotalSeconds?: number;
|
|
13
|
+
}
|
|
14
|
+
declare const App: <A extends Action = Action, S = unknown>({ children, emotionCache, theme, store, maxIdleSeconds, maxTotalSeconds, }: AppProps<A, S>) => JSX.Element;
|
|
15
|
+
export default App;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { Options as CreateEmotionCacheOptions } from '@emotion/cache';
|
|
3
|
+
import { AppProps } from './App';
|
|
4
|
+
export type EntryAppProps = Pick<AppProps, "emotionCache" | "children">;
|
|
5
|
+
export type EntryKwArgs = {
|
|
6
|
+
App: FC<EntryAppProps>;
|
|
7
|
+
routes: ReactNode;
|
|
8
|
+
createEmotionCacheOptions?: CreateEmotionCacheOptions;
|
|
9
|
+
};
|
|
10
|
+
export declare function server({ App, routes, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<{
|
|
11
|
+
render: (path: string) => {
|
|
12
|
+
html: string;
|
|
13
|
+
head: string;
|
|
14
|
+
};
|
|
15
|
+
}>;
|
|
16
|
+
export declare function client({ App, routes, createEmotionCacheOptions, ...appProps }: EntryKwArgs): Promise<void>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CacheClass } from 'memory-cache';
|
|
2
|
+
import { UUID } from 'node:crypto';
|
|
3
|
+
import { Express, Request, Response } from 'express';
|
|
4
|
+
import { default as http } from 'node:http';
|
|
5
|
+
type Mode = "development" | "staging" | "production";
|
|
6
|
+
type Options = Partial<{
|
|
7
|
+
mode: Mode;
|
|
8
|
+
port: number;
|
|
9
|
+
base: string;
|
|
10
|
+
}>;
|
|
11
|
+
type HealthStatus = "healthy" | "startingUp" | "shuttingDown" | "unhealthy" | "unknown";
|
|
12
|
+
type HealthCheck = {
|
|
13
|
+
healthStatus: HealthStatus;
|
|
14
|
+
additionalInfo: string;
|
|
15
|
+
details?: Array<{
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
health: HealthStatus;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
type Render = (path: string) => Promise<{
|
|
22
|
+
head?: string;
|
|
23
|
+
html?: string;
|
|
24
|
+
}>;
|
|
25
|
+
type RenderAndTemplate = [Render, string];
|
|
26
|
+
type GetRenderAndTemplate = (path: string) => Promise<RenderAndTemplate>;
|
|
27
|
+
type OnServeError = (error: Error) => string | undefined;
|
|
28
|
+
type Setup = {
|
|
29
|
+
getRenderAndTemplate: GetRenderAndTemplate;
|
|
30
|
+
onServeError: OnServeError;
|
|
31
|
+
};
|
|
32
|
+
export default class Server {
|
|
33
|
+
envIsProduction: boolean;
|
|
34
|
+
templateHtml: string;
|
|
35
|
+
hostname: string;
|
|
36
|
+
mode: Mode;
|
|
37
|
+
port: number;
|
|
38
|
+
base: string;
|
|
39
|
+
app: Express;
|
|
40
|
+
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse>;
|
|
41
|
+
cache: CacheClass<string, any>;
|
|
42
|
+
healthCheckCacheKey: string;
|
|
43
|
+
healthCheckCacheTimeout: number;
|
|
44
|
+
healthCheckStatusCodes: Record<HealthStatus, number>;
|
|
45
|
+
devtoolsWorkspaceUUID: UUID;
|
|
46
|
+
constructor({ mode, port, base }?: Options);
|
|
47
|
+
getHealthCheck(request: Request): HealthCheck;
|
|
48
|
+
handleHealthCheck(request: Request, response: Response): void;
|
|
49
|
+
handleServeHtml(request: Request, response: Response, { getRenderAndTemplate, onServeError }: Setup): Promise<void>;
|
|
50
|
+
handleChromeDevTools(request: Request, response: Response): void;
|
|
51
|
+
setUpProduction(): Promise<Setup>;
|
|
52
|
+
setUpDevelopment(): Promise<Setup>;
|
|
53
|
+
run(): Promise<void>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ThemeOptions, Theme } from '@mui/material';
|
|
2
|
+
export * as colors from './colors';
|
|
3
|
+
export * from './palette';
|
|
4
|
+
export * from './ThemedBox';
|
|
5
|
+
export { default as ThemedBox } from './ThemedBox';
|
|
6
|
+
export declare const themeOptions: ThemeOptions;
|
|
7
|
+
export declare const theme: Theme;
|