Remix migration

This commit is contained in:
2023-10-19 16:49:09 -04:00
parent 5d2774fb2e
commit 04dcbb4181
33 changed files with 16545 additions and 1813 deletions

27
index.d.ts vendored
View File

@ -1,8 +1,8 @@
/// <reference types="vite/client" />
import { type PageContextBuiltIn } from "vite-plugin-ssr";
import type { EmotionCache } from "@emotion/utils";
declare global {
module "*.css";
interface Env {
ASSETS: Fetcher;
DATA: KVNamespace;
@ -10,15 +10,20 @@ declare global {
}
type RequestContext = EventContext<Env, string, { [k: string]: any }>;
interface PageContext extends PageContextBuiltIn {
current_user?: { [k: string]: any };
kv: KVNamespace;
pageProps: {
[k: string]: any;
};
requireAuth?: boolean;
status: number;
interface EmotionCriticalToChunks {
html: string;
styles: { key: string; ids: string[]; css: string }[];
}
interface EmotionServer {
constructStyleTagsFromChunks: (
criticalData: EmotionCriticalToChunks
) => string;
extractCriticalToChunks: (html: string) => EmotionCriticalToChunks;
}
export function createEmotionServer(cache: EmotionCache): EmotionServer;
}
export {};