Add more features. Customize HTML. Add server logic and other page module exports to __root
This commit is contained in:
+18
-5
@@ -1,5 +1,12 @@
|
||||
import type { MatchedRoute, Server, WebSocketHandler } from "bun";
|
||||
import type { FC, JSX, PropsWithChildren, ReactNode } from "react";
|
||||
import type {
|
||||
DetailedHTMLProps,
|
||||
FC,
|
||||
HtmlHTMLAttributes,
|
||||
JSX,
|
||||
PropsWithChildren,
|
||||
ReactNode,
|
||||
} from "react";
|
||||
|
||||
export type ServerProps = {
|
||||
params: Record<string, string>;
|
||||
@@ -145,11 +152,10 @@ export type PageDistGenParams = {
|
||||
|
||||
export type LivePageDistGenParams = {
|
||||
component: ReactNode;
|
||||
head?: FC<BunextPageHeadFCProps>;
|
||||
pageProps?: any;
|
||||
module?: BunextPageModule;
|
||||
root_module?: BunextRootModule;
|
||||
bundledMap?: BundlerCTXMap;
|
||||
meta?: BunextPageModuleMeta;
|
||||
routeParams?: BunxRouteParams;
|
||||
debug?: boolean;
|
||||
};
|
||||
@@ -165,8 +171,14 @@ export type BunextPageModule = {
|
||||
meta?: BunextPageModuleMeta | BunextPageModuleMetaFn;
|
||||
Head?: FC<BunextPageHeadFCProps>;
|
||||
config?: BunextRouteConfig;
|
||||
html_props?: BunextHTMLProps;
|
||||
};
|
||||
|
||||
export type BunextHTMLProps = DetailedHTMLProps<
|
||||
HtmlHTMLAttributes<HTMLHtmlElement>,
|
||||
HTMLHtmlElement
|
||||
>;
|
||||
|
||||
export type BunextPageModuleMetaFn = (params: {
|
||||
ctx: BunxRouteParams;
|
||||
serverRes?: BunextPageModuleServerReturn;
|
||||
@@ -253,11 +265,12 @@ export type GrabPageComponentRes = {
|
||||
routeParams?: BunxRouteParams;
|
||||
bundledMap?: BundlerCTXMap;
|
||||
module: BunextPageModule;
|
||||
meta?: BunextPageModuleMeta;
|
||||
head?: FC<BunextPageHeadFCProps>;
|
||||
root_module?: BunextRootModule;
|
||||
debug?: boolean;
|
||||
};
|
||||
|
||||
export type BunextRootModule = BunextPageModule;
|
||||
|
||||
export type GrabPageReactBundledComponentRes = {
|
||||
component: JSX.Element;
|
||||
server_res?: BunextPageModuleServerReturn;
|
||||
|
||||
Reference in New Issue
Block a user