vinojs 0.0.1 → 0.1.1

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,10 @@
1
+ import { Child } from "hono/jsx";
2
+ //#region src/vino/component-wrap.d.ts
3
+ declare function wrapComponent(Component: (...args: never[]) => unknown, componentId: string, exportName: string): {
4
+ (props?: Record<string, unknown>): import("hono/jsx").JSXNode;
5
+ displayName: string;
6
+ };
7
+ declare function wrapModule(mod: Record<string, unknown>, componentId: string): Record<string, unknown>;
8
+ //#endregion
9
+ export { type Child, wrapComponent, wrapModule };
10
+ //# sourceMappingURL=component-wrap.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-wrap.d.mts","names":[],"sources":["../src/vino/component-wrap.ts"],"mappings":";;iBAcgB,cACd,eAAe,2BACf,qBACA;GAEwB,QAAA,6CAAuB;;;iBAYjC,WAAW,KAAK,yBAAyB,sBAAmB"}
@@ -0,0 +1,33 @@
1
+ import { t as COMPONENT_TAG } from "./constants-BVT2bJEd.mjs";
2
+ import { jsxDEV } from "hono/jsx/jsx-dev-runtime";
3
+ //#region src/vino/component-wrap.ts
4
+ function serializeProps(props) {
5
+ const rest = {};
6
+ for (const [key, value] of Object.entries(props)) {
7
+ if (key === "children") continue;
8
+ if (typeof value === "function" || typeof value === "symbol") continue;
9
+ rest[key] = value;
10
+ }
11
+ return JSON.stringify(rest);
12
+ }
13
+ function wrapComponent(Component, componentId, exportName) {
14
+ function Wrapped(props = {}) {
15
+ return jsxDEV(COMPONENT_TAG, {
16
+ "data-component": componentId,
17
+ "data-export": exportName,
18
+ "data-props": serializeProps(props),
19
+ children: jsxDEV(Component, props)
20
+ });
21
+ }
22
+ Wrapped.displayName = `Vino(${exportName})`;
23
+ return Wrapped;
24
+ }
25
+ function wrapModule(mod, componentId) {
26
+ const out = { ...mod };
27
+ for (const [key, value] of Object.entries(mod)) if (typeof value === "function" && key !== "__esModule") out[key] = wrapComponent(value, componentId, key);
28
+ return out;
29
+ }
30
+ //#endregion
31
+ export { wrapComponent, wrapModule };
32
+
33
+ //# sourceMappingURL=component-wrap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-wrap.mjs","names":["jsx"],"sources":["../src/vino/component-wrap.ts"],"sourcesContent":["import { jsxDEV as jsx } from \"hono/jsx/jsx-dev-runtime\";\nimport type { Child } from \"hono/jsx\";\nimport { COMPONENT_TAG } from \"./constants.ts\";\n\nfunction serializeProps(props: Record<string, unknown>): string {\n const rest: Record<string, unknown> = {};\n for (const [key, value] of Object.entries(props)) {\n if (key === \"children\") continue;\n if (typeof value === \"function\" || typeof value === \"symbol\") continue;\n rest[key] = value;\n }\n return JSON.stringify(rest);\n}\n\nexport function wrapComponent(\n Component: (...args: never[]) => unknown,\n componentId: string,\n exportName: string,\n) {\n function Wrapped(props: Record<string, unknown> = {}) {\n return jsx(COMPONENT_TAG, {\n \"data-component\": componentId,\n \"data-export\": exportName,\n \"data-props\": serializeProps(props),\n children: jsx(Component, props),\n });\n }\n Wrapped.displayName = `Vino(${exportName})`;\n return Wrapped;\n}\n\nexport function wrapModule(mod: Record<string, unknown>, componentId: string) {\n const out: Record<string, unknown> = { ...mod };\n for (const [key, value] of Object.entries(mod)) {\n if (typeof value === \"function\" && key !== \"__esModule\") {\n out[key] = wrapComponent(value as (...args: never[]) => unknown, componentId, key);\n }\n }\n return out;\n}\n\nexport type { Child };\n"],"mappings":";;;AAIA,SAAS,eAAe,OAAwC;CAC9D,MAAM,OAAgC,CAAC;CACvC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,KAAK,GAAG;EAChD,IAAI,QAAQ,YAAY;EACxB,IAAI,OAAO,UAAU,cAAc,OAAO,UAAU,UAAU;EAC9D,KAAK,OAAO;CACd;CACA,OAAO,KAAK,UAAU,IAAI;AAC5B;AAEA,SAAgB,cACd,WACA,aACA,YACA;CACA,SAAS,QAAQ,QAAiC,CAAC,GAAG;EACpD,OAAOA,OAAI,eAAe;GACxB,kBAAkB;GAClB,eAAe;GACf,cAAc,eAAe,KAAK;GAClC,UAAUA,OAAI,WAAW,KAAK;EAChC,CAAC;CACH;CACA,QAAQ,cAAc,QAAQ,WAAW;CACzC,OAAO;AACT;AAEA,SAAgB,WAAW,KAA8B,aAAqB;CAC5E,MAAM,MAA+B,EAAE,GAAG,IAAI;CAC9C,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,GAAG,GAC3C,IAAI,OAAO,UAAU,cAAc,QAAQ,cACzC,IAAI,OAAO,cAAc,OAAwC,aAAa,GAAG;CAGrF,OAAO;AACT"}
@@ -0,0 +1,27 @@
1
+ //#region src/vino/constants.ts
2
+ const PAGE_SLOT_ID = "vino-page";
3
+ const PAYLOAD_SCRIPT_ID = "__VINO__";
4
+ const COMPONENT_TAG = "vino-component";
5
+ const DEFAULT_PAGES_DIR = "src/pages";
6
+ const DEFAULT_LAYOUTS_DIR = "src/layout";
7
+ const DEFAULT_COMPONENTS_DIR = "src/components";
8
+ const DEFAULT_ENTRY = "src/server.ts";
9
+ const NAV_HEADER = "X-Vino-Nav";
10
+ const SHELL_HEADER = "X-Vino-Shell";
11
+ const VIRTUAL_MANIFEST = "virtual:vino/manifest";
12
+ const VIRTUAL_COMPONENTS = "virtual:vino/components";
13
+ const VIRTUAL_ASSETS = "virtual:vino/assets";
14
+ const VIRTUAL_CLIENT = "virtual:vino/client";
15
+ const VIRTUAL_CLIENT_PAGES = "virtual:vino/client-pages";
16
+ const VIRTUAL_SSR_HOOKS = "virtual:vino/ssr-hooks";
17
+ const PAGE_EXTS = [
18
+ ".tsx",
19
+ ".ts",
20
+ ".jsx",
21
+ ".js",
22
+ ".mjs"
23
+ ];
24
+ //#endregion
25
+ export { DEFAULT_PAGES_DIR as a, PAGE_SLOT_ID as c, VIRTUAL_ASSETS as d, VIRTUAL_CLIENT as f, VIRTUAL_SSR_HOOKS as g, VIRTUAL_MANIFEST as h, DEFAULT_LAYOUTS_DIR as i, PAYLOAD_SCRIPT_ID as l, VIRTUAL_COMPONENTS as m, DEFAULT_COMPONENTS_DIR as n, NAV_HEADER as o, VIRTUAL_CLIENT_PAGES as p, DEFAULT_ENTRY as r, PAGE_EXTS as s, COMPONENT_TAG as t, SHELL_HEADER as u };
26
+
27
+ //# sourceMappingURL=constants-BVT2bJEd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants-BVT2bJEd.mjs","names":[],"sources":["../src/vino/constants.ts"],"sourcesContent":["export const PAGE_SLOT_ID = \"vino-page\";\nexport const PAYLOAD_SCRIPT_ID = \"__VINO__\";\nexport const COMPONENT_TAG = \"vino-component\";\nexport const DEFAULT_PAGES_DIR = \"src/pages\";\nexport const DEFAULT_LAYOUTS_DIR = \"src/layout\";\nexport const DEFAULT_COMPONENTS_DIR = \"src/components\";\nexport const DEFAULT_ENTRY = \"src/server.ts\";\nexport const NAV_HEADER = \"X-Vino-Nav\";\nexport const SHELL_HEADER = \"X-Vino-Shell\";\n\nexport const VIRTUAL_MANIFEST = \"virtual:vino/manifest\";\nexport const VIRTUAL_COMPONENTS = \"virtual:vino/components\";\nexport const VIRTUAL_ASSETS = \"virtual:vino/assets\";\nexport const VIRTUAL_CLIENT = \"virtual:vino/client\";\nexport const VIRTUAL_CLIENT_PAGES = \"virtual:vino/client-pages\";\nexport const VIRTUAL_SSR_HOOKS = \"virtual:vino/ssr-hooks\";\n\nexport const PAGE_EXTS = [\".tsx\", \".ts\", \".jsx\", \".js\", \".mjs\"] as const;\n"],"mappings":";AAAA,MAAa,eAAe;AAC5B,MAAa,oBAAoB;AACjC,MAAa,gBAAgB;AAC7B,MAAa,oBAAoB;AACjC,MAAa,sBAAsB;AACnC,MAAa,yBAAyB;AACtC,MAAa,gBAAgB;AAC7B,MAAa,aAAa;AAC1B,MAAa,eAAe;AAE5B,MAAa,mBAAmB;AAChC,MAAa,qBAAqB;AAClC,MAAa,iBAAiB;AAC9B,MAAa,iBAAiB;AAC9B,MAAa,uBAAuB;AACpC,MAAa,oBAAoB;AAEjC,MAAa,YAAY;CAAC;CAAQ;CAAO;CAAQ;CAAO;AAAM"}
@@ -0,0 +1,73 @@
1
+ //#region src/vino/definePage.ts
2
+ const PAGE_KIND = "vino:page";
3
+ const SERVER_PAGE_KIND = "vino:server-page";
4
+ function isPageDefinition(value) {
5
+ if (value === null || typeof value !== "object" && typeof value !== "function") return false;
6
+ const candidate = value;
7
+ return (candidate.kind === "vino:page" || candidate.kind === "vino:server-page") && typeof candidate.render === "function";
8
+ }
9
+ function isClientPageDefinition(value) {
10
+ return isPageDefinition(value) && value.kind === "vino:page";
11
+ }
12
+ function isServerPageDefinition(value) {
13
+ return isPageDefinition(value) && value.kind === "vino:server-page";
14
+ }
15
+ function readPageDefinition(value) {
16
+ return isPageDefinition(value) ? value : void 0;
17
+ }
18
+ function resolvePageRender(value) {
19
+ if (isPageDefinition(value)) return value.render;
20
+ if (typeof value === "function") return value;
21
+ }
22
+ /** True when source calls `definePage(...)` (hydratable pages). */
23
+ function usesDefinePage(code) {
24
+ return /(?:^|[^\w$])definePage\s*(?:<[^>]*>\s*)?\(/.test(code);
25
+ }
26
+ function pageDefinition(page, kind, fnName) {
27
+ if (typeof page === "function") return {
28
+ kind,
29
+ client: kind === PAGE_KIND,
30
+ render: page
31
+ };
32
+ const render = page.render ?? page.page;
33
+ if (typeof render !== "function") throw new TypeError(`[vino] ${fnName}() requires a JSX function or { render }`);
34
+ return {
35
+ kind,
36
+ client: kind === PAGE_KIND,
37
+ render,
38
+ data: page.data,
39
+ config: page.config
40
+ };
41
+ }
42
+ /**
43
+ * Declare a page that SSRs with `hono/jsx`, then hydrates `#vino-page` with `hono/jsx/dom`.
44
+ *
45
+ * @example
46
+ * export default definePage(() => {
47
+ * const [n, setN] = useState(0)
48
+ * return <button onClick={() => setN(n + 1)}>{n}</button>
49
+ * })
50
+ *
51
+ * @example
52
+ * export default definePage({
53
+ * config: { prerender: 'full', clientRouting: true },
54
+ * data: async (c) => ({ title: 'Hello' }),
55
+ * render: ({ data }) => <h1>{data.title}</h1>,
56
+ * })
57
+ *
58
+ * @example
59
+ * import data from './[slug].server'
60
+ * export default definePage({ data, render: ({ data }) => <h1>{data.title}</h1> })
61
+ */
62
+ const definePage = ((page) => pageDefinition(page, PAGE_KIND, "definePage"));
63
+ /**
64
+ * Declare a page that SSRs only. The output is never hydrated.
65
+ *
66
+ * @example
67
+ * export default defineServerPage(() => <h1>About</h1>)
68
+ */
69
+ const defineServerPage = ((page) => pageDefinition(page, SERVER_PAGE_KIND, "defineServerPage"));
70
+ //#endregion
71
+ export { isServerPageDefinition as a, usesDefinePage as c, isPageDefinition as i, defineServerPage as n, readPageDefinition as o, isClientPageDefinition as r, resolvePageRender as s, definePage as t };
72
+
73
+ //# sourceMappingURL=definePage--9Pz7rHs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"definePage--9Pz7rHs.mjs","names":[],"sources":["../src/vino/definePage.ts"],"sourcesContent":["import type { Env } from \"hono\";\nimport type { ServerFn } from \"./defineServerFn.ts\";\nimport type { DataLoader, PageConfig, PageProps, VinoHtml } from \"./types.ts\";\n\nexport const PAGE_KIND = \"vino:page\" as const;\nexport const SERVER_PAGE_KIND = \"vino:server-page\" as const;\n\nexport type PageRender<Data = unknown> = (props: PageProps<Data>) => VinoHtml;\n\nexport type PageDataFn<E extends Env = Env> = DataLoader<E> | ServerFn<unknown, E>;\n\nexport interface DefinePageOptions<Data = unknown, E extends Env = Env> {\n /** JSX page component. Alias: `page`. */\n render?: PageRender<Data>;\n page?: PageRender<Data>;\n /** Loader or `defineServerFn(...)` */\n data?: DataLoader<E> | ServerFn<Data, E>;\n config?: PageConfig;\n}\n\n/** Options object that infers `data` return type into `render` / `page`. */\nexport type InferDefinePageOptions<\n D extends (...args: never[]) => unknown,\n Data = Awaited<ReturnType<D>>,\n> = {\n data?: D;\n config?: PageConfig;\n} & (\n | { render: PageRender<Data>; page?: PageRender<Data> }\n | { page: PageRender<Data>; render?: PageRender<Data> }\n);\n\n/**\n * `definePage` / `defineServerPage` call signature, with `Env` fixed so `data(c)`\n * is typed without blocking inference of the loader return type.\n */\nexport interface DefinePageFn<E extends Env = Env> {\n <Data = unknown>(page: PageRender<Data>): PageDefinition<Data>;\n <D extends PageDataFn<E>>(\n options: InferDefinePageOptions<D>,\n ): PageDefinition<Awaited<ReturnType<D>>>;\n <Data = unknown>(options: DefinePageOptions<Data, E>): PageDefinition<Data>;\n}\n\nexport interface PageDefinition<Data = unknown> {\n readonly kind: typeof PAGE_KIND | typeof SERVER_PAGE_KIND;\n readonly client: boolean;\n readonly render: PageRender<Data>;\n readonly data?: DataLoader | ServerFn<Data>;\n readonly config?: PageConfig;\n}\n\nexport function isPageDefinition(value: unknown): value is PageDefinition {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) return false;\n const candidate = value as PageDefinition;\n return (\n (candidate.kind === PAGE_KIND || candidate.kind === SERVER_PAGE_KIND) &&\n typeof candidate.render === \"function\"\n );\n}\n\nexport function isClientPageDefinition(value: unknown): value is PageDefinition {\n return isPageDefinition(value) && value.kind === PAGE_KIND;\n}\n\nexport function isServerPageDefinition(value: unknown): value is PageDefinition {\n return isPageDefinition(value) && value.kind === SERVER_PAGE_KIND;\n}\n\nexport function readPageDefinition(value: unknown): PageDefinition | undefined {\n return isPageDefinition(value) ? value : undefined;\n}\n\nexport function resolvePageRender(value: unknown): PageRender | undefined {\n if (isPageDefinition(value)) return value.render;\n if (typeof value === \"function\") return value as PageRender;\n return undefined;\n}\n\n/** True when source calls `definePage(...)` (hydratable pages). */\nexport function usesDefinePage(code: string): boolean {\n return /(?:^|[^\\w$])definePage\\s*(?:<[^>]*>\\s*)?\\(/.test(code);\n}\n\nfunction pageDefinition<Data>(\n page: PageRender<Data> | DefinePageOptions<Data>,\n kind: typeof PAGE_KIND | typeof SERVER_PAGE_KIND,\n fnName: string,\n): PageDefinition<Data> {\n if (typeof page === \"function\") {\n return { kind, client: kind === PAGE_KIND, render: page };\n }\n const render = page.render ?? page.page;\n if (typeof render !== \"function\") {\n throw new TypeError(`[vino] ${fnName}() requires a JSX function or { render }`);\n }\n return {\n kind,\n client: kind === PAGE_KIND,\n render,\n data: page.data,\n config: page.config,\n };\n}\n\n/**\n * Declare a page that SSRs with `hono/jsx`, then hydrates `#vino-page` with `hono/jsx/dom`.\n *\n * @example\n * export default definePage(() => {\n * const [n, setN] = useState(0)\n * return <button onClick={() => setN(n + 1)}>{n}</button>\n * })\n *\n * @example\n * export default definePage({\n * config: { prerender: 'full', clientRouting: true },\n * data: async (c) => ({ title: 'Hello' }),\n * render: ({ data }) => <h1>{data.title}</h1>,\n * })\n *\n * @example\n * import data from './[slug].server'\n * export default definePage({ data, render: ({ data }) => <h1>{data.title}</h1> })\n */\nexport const definePage = ((page: PageRender | DefinePageOptions) => pageDefinition(page, PAGE_KIND, \"definePage\")) as DefinePageFn;\n\n/**\n * Declare a page that SSRs only. The output is never hydrated.\n *\n * @example\n * export default defineServerPage(() => <h1>About</h1>)\n */\nexport const defineServerPage = ((page: PageRender | DefinePageOptions) => pageDefinition(page, SERVER_PAGE_KIND, \"defineServerPage\")) as DefinePageFn;\n"],"mappings":";AAIA,MAAa,YAAY;AACzB,MAAa,mBAAmB;AA+ChC,SAAgB,iBAAiB,OAAyC;CACxE,IAAI,UAAU,QAAS,OAAO,UAAU,YAAY,OAAO,UAAU,YAAa,OAAO;CACzF,MAAM,YAAY;CAClB,QACG,UAAU,SAAA,eAAsB,UAAU,SAAA,uBAC3C,OAAO,UAAU,WAAW;AAEhC;AAEA,SAAgB,uBAAuB,OAAyC;CAC9E,OAAO,iBAAiB,KAAK,KAAK,MAAM,SAAA;AAC1C;AAEA,SAAgB,uBAAuB,OAAyC;CAC9E,OAAO,iBAAiB,KAAK,KAAK,MAAM,SAAA;AAC1C;AAEA,SAAgB,mBAAmB,OAA4C;CAC7E,OAAO,iBAAiB,KAAK,IAAI,QAAQ,KAAA;AAC3C;AAEA,SAAgB,kBAAkB,OAAwC;CACxE,IAAI,iBAAiB,KAAK,GAAG,OAAO,MAAM;CAC1C,IAAI,OAAO,UAAU,YAAY,OAAO;AAE1C;;AAGA,SAAgB,eAAe,MAAuB;CACpD,OAAO,6CAA6C,KAAK,IAAI;AAC/D;AAEA,SAAS,eACP,MACA,MACA,QACsB;CACtB,IAAI,OAAO,SAAS,YAClB,OAAO;EAAE;EAAM,QAAQ,SAAS;EAAW,QAAQ;CAAK;CAE1D,MAAM,SAAS,KAAK,UAAU,KAAK;CACnC,IAAI,OAAO,WAAW,YACpB,MAAM,IAAI,UAAU,UAAU,OAAO,yCAAyC;CAEhF,OAAO;EACL;EACA,QAAQ,SAAS;EACjB;EACA,MAAM,KAAK;EACX,QAAQ,KAAK;CACf;AACF;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAa,eAAe,SAAyC,eAAe,MAAM,WAAW,YAAY;;;;;;;AAQjH,MAAa,qBAAqB,SAAyC,eAAe,MAAM,kBAAkB,kBAAkB"}
@@ -0,0 +1,47 @@
1
+ //#region src/vino/defineServerFn.ts
2
+ const SERVER_FN_KIND = "vino:server-fn";
3
+ function isServerFn(value) {
4
+ return typeof value === "function" && value.kind === "vino:server-fn";
5
+ }
6
+ function readServerFn(value) {
7
+ return isServerFn(value) ? value : void 0;
8
+ }
9
+ /** Call-site of `defineServerFn(...)`, not `function defineServerFn(`. */
10
+ const DEFINE_SERVER_FN_CALL = /(?<!function\s)(?<![$\w])defineServerFn\s*(?:<[^>]*>\s*)?\(/g;
11
+ /** True when source *calls* `defineServerFn(...)`. */
12
+ function usesDefineServerFn(code) {
13
+ DEFINE_SERVER_FN_CALL.lastIndex = 0;
14
+ return DEFINE_SERVER_FN_CALL.test(code);
15
+ }
16
+ /**
17
+ * Mark a function as server-only.
18
+ *
19
+ * Pass the result to `definePage({ data })` (or `defineServerPage`) as a
20
+ * loader. The same function can later be imported and invoked
21
+ *
22
+ * @example
23
+ * // [slug].server.ts
24
+ * export default defineServerFn(c => {
25
+ * const slug = c.req.param("slug") ?? ""
26
+ * return { slug }
27
+ * })
28
+ *
29
+ * @example
30
+ * // [slug].tsx
31
+ * import data from "./[slug].server"
32
+ * export default definePage({ data, render: ({ data }) => <h1>{data.slug}</h1> })
33
+ */
34
+ function defineServerFn(fn) {
35
+ function serverFn(c) {
36
+ return fn(c);
37
+ }
38
+ Object.defineProperty(serverFn, "kind", {
39
+ value: SERVER_FN_KIND,
40
+ enumerable: true
41
+ });
42
+ return serverFn;
43
+ }
44
+ //#endregion
45
+ export { readServerFn as a, isServerFn as i, SERVER_FN_KIND as n, usesDefineServerFn as o, defineServerFn as r, DEFINE_SERVER_FN_CALL as t };
46
+
47
+ //# sourceMappingURL=defineServerFn-H-bz7xBX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defineServerFn-H-bz7xBX.mjs","names":[],"sources":["../src/vino/defineServerFn.ts"],"sourcesContent":["import type { Context, Env } from \"hono\";\n\nexport const SERVER_FN_KIND = \"vino:server-fn\" as const;\n\nexport type ServerFnHandler<T = unknown, E extends Env = Env> = (\n c: Context<E, string>,\n) => T | Promise<T>;\n\n/**\n * A server-only function. Callable as a `definePage({ data })` loader\n */\nexport type ServerFn<T = unknown, E extends Env = Env> = ServerFnHandler<T, E> & {\n readonly kind: typeof SERVER_FN_KIND;\n};\n\n/**\n * `defineServerFn` call signature, with `Env` fixed so `fn(c)` is typed without\n * blocking inference of the return type.\n */\nexport type DefineServerFnFn<E extends Env = Env> = <T>(fn: ServerFnHandler<T, E>) => ServerFn<T, E>;\n\nexport function isServerFn(value: unknown): value is ServerFn {\n return typeof value === \"function\" && (value as ServerFn).kind === SERVER_FN_KIND;\n}\n\nexport function readServerFn(value: unknown): ServerFn | undefined {\n return isServerFn(value) ? value : undefined;\n}\n\n/** Call-site of `defineServerFn(...)`, not `function defineServerFn(`. */\nexport const DEFINE_SERVER_FN_CALL =\n /(?<!function\\s)(?<![$\\w])defineServerFn\\s*(?:<[^>]*>\\s*)?\\(/g;\n\n/** True when source *calls* `defineServerFn(...)`. */\nexport function usesDefineServerFn(code: string): boolean {\n DEFINE_SERVER_FN_CALL.lastIndex = 0;\n return DEFINE_SERVER_FN_CALL.test(code);\n}\n\n/**\n * Mark a function as server-only.\n *\n * Pass the result to `definePage({ data })` (or `defineServerPage`) as a\n * loader. The same function can later be imported and invoked\n *\n * @example\n * // [slug].server.ts\n * export default defineServerFn(c => {\n * const slug = c.req.param(\"slug\") ?? \"\"\n * return { slug }\n * })\n *\n * @example\n * // [slug].tsx\n * import data from \"./[slug].server\"\n * export default definePage({ data, render: ({ data }) => <h1>{data.slug}</h1> })\n */\nexport function defineServerFn<T, E extends Env = Env>(fn: ServerFnHandler<T, E>): ServerFn<T, E> {\n function serverFn(c: Context<E, string>) {\n return fn(c);\n }\n Object.defineProperty(serverFn, \"kind\", {\n value: SERVER_FN_KIND,\n enumerable: true,\n });\n return serverFn as ServerFn<T, E>;\n}\n"],"mappings":";AAEA,MAAa,iBAAiB;AAmB9B,SAAgB,WAAW,OAAmC;CAC5D,OAAO,OAAO,UAAU,cAAe,MAAmB,SAAA;AAC5D;AAEA,SAAgB,aAAa,OAAsC;CACjE,OAAO,WAAW,KAAK,IAAI,QAAQ,KAAA;AACrC;;AAGA,MAAa,wBACX;;AAGF,SAAgB,mBAAmB,MAAuB;CACxD,sBAAsB,YAAY;CAClC,OAAO,sBAAsB,KAAK,IAAI;AACxC;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,eAAuC,IAA2C;CAChG,SAAS,SAAS,GAAuB;EACvC,OAAO,GAAG,CAAC;CACb;CACA,OAAO,eAAe,UAAU,QAAQ;EACtC,OAAO;EACP,YAAY;CACd,CAAC;CACD,OAAO;AACT"}
@@ -0,0 +1,143 @@
1
+ import { a as PageConfig, c as VinoHtml, n as DataLoader, o as PageProps } from "./types-CQITdkpF.mjs";
2
+ import { Context, Env } from "hono";
3
+ //#region src/vino/defineServerFn.d.ts
4
+ declare const SERVER_FN_KIND: "vino:server-fn";
5
+ type ServerFnHandler<T = unknown, E extends Env = Env> = (c: Context<E, string>) => T | Promise<T>;
6
+ /**
7
+ * A server-only function. Callable as a `definePage({ data })` loader
8
+ */
9
+ type ServerFn<T = unknown, E extends Env = Env> = ServerFnHandler<T, E> & {
10
+ readonly kind: typeof SERVER_FN_KIND;
11
+ };
12
+ /**
13
+ * `defineServerFn` call signature, with `Env` fixed so `fn(c)` is typed without
14
+ * blocking inference of the return type.
15
+ */
16
+ type DefineServerFnFn<E extends Env = Env> = <T>(fn: ServerFnHandler<T, E>) => ServerFn<T, E>;
17
+ declare function isServerFn(value: unknown): value is ServerFn;
18
+ declare function readServerFn(value: unknown): ServerFn | undefined;
19
+ /**
20
+ * Mark a function as server-only.
21
+ *
22
+ * Pass the result to `definePage({ data })` (or `defineServerPage`) as a
23
+ * loader. The same function can later be imported and invoked
24
+ *
25
+ * @example
26
+ * // [slug].server.ts
27
+ * export default defineServerFn(c => {
28
+ * const slug = c.req.param("slug") ?? ""
29
+ * return { slug }
30
+ * })
31
+ *
32
+ * @example
33
+ * // [slug].tsx
34
+ * import data from "./[slug].server"
35
+ * export default definePage({ data, render: ({ data }) => <h1>{data.slug}</h1> })
36
+ */
37
+ declare function defineServerFn<T, E extends Env = Env>(fn: ServerFnHandler<T, E>): ServerFn<T, E>;
38
+ //#endregion
39
+ //#region src/vino/definePage.d.ts
40
+ declare const PAGE_KIND: "vino:page";
41
+ declare const SERVER_PAGE_KIND: "vino:server-page";
42
+ type PageRender<Data = unknown> = (props: PageProps<Data>) => VinoHtml;
43
+ type PageDataFn<E extends Env = Env> = DataLoader<E> | ServerFn<unknown, E>;
44
+ interface DefinePageOptions<Data = unknown, E extends Env = Env> {
45
+ /** JSX page component. Alias: `page`. */
46
+ render?: PageRender<Data>;
47
+ page?: PageRender<Data>;
48
+ /** Loader or `defineServerFn(...)` */
49
+ data?: DataLoader<E> | ServerFn<Data, E>;
50
+ config?: PageConfig;
51
+ }
52
+ /** Options object that infers `data` return type into `render` / `page`. */
53
+ type InferDefinePageOptions<D extends (...args: never[]) => unknown, Data = Awaited<ReturnType<D>>> = {
54
+ data?: D;
55
+ config?: PageConfig;
56
+ } & ({
57
+ render: PageRender<Data>;
58
+ page?: PageRender<Data>;
59
+ } | {
60
+ page: PageRender<Data>;
61
+ render?: PageRender<Data>;
62
+ });
63
+ /**
64
+ * `definePage` / `defineServerPage` call signature, with `Env` fixed so `data(c)`
65
+ * is typed without blocking inference of the loader return type.
66
+ */
67
+ interface DefinePageFn<E extends Env = Env> {
68
+ <Data = unknown>(page: PageRender<Data>): PageDefinition<Data>;
69
+ <D extends PageDataFn<E>>(options: InferDefinePageOptions<D>): PageDefinition<Awaited<ReturnType<D>>>;
70
+ <Data = unknown>(options: DefinePageOptions<Data, E>): PageDefinition<Data>;
71
+ }
72
+ interface PageDefinition<Data = unknown> {
73
+ readonly kind: typeof PAGE_KIND | typeof SERVER_PAGE_KIND;
74
+ readonly client: boolean;
75
+ readonly render: PageRender<Data>;
76
+ readonly data?: DataLoader | ServerFn<Data>;
77
+ readonly config?: PageConfig;
78
+ }
79
+ declare function isPageDefinition(value: unknown): value is PageDefinition;
80
+ declare function isClientPageDefinition(value: unknown): value is PageDefinition;
81
+ declare function isServerPageDefinition(value: unknown): value is PageDefinition;
82
+ declare function resolvePageRender(value: unknown): PageRender | undefined;
83
+ /**
84
+ * Declare a page that SSRs with `hono/jsx`, then hydrates `#vino-page` with `hono/jsx/dom`.
85
+ *
86
+ * @example
87
+ * export default definePage(() => {
88
+ * const [n, setN] = useState(0)
89
+ * return <button onClick={() => setN(n + 1)}>{n}</button>
90
+ * })
91
+ *
92
+ * @example
93
+ * export default definePage({
94
+ * config: { prerender: 'full', clientRouting: true },
95
+ * data: async (c) => ({ title: 'Hello' }),
96
+ * render: ({ data }) => <h1>{data.title}</h1>,
97
+ * })
98
+ *
99
+ * @example
100
+ * import data from './[slug].server'
101
+ * export default definePage({ data, render: ({ data }) => <h1>{data.title}</h1> })
102
+ */
103
+ declare const definePage: DefinePageFn;
104
+ /**
105
+ * Declare a page that SSRs only. The output is never hydrated.
106
+ *
107
+ * @example
108
+ * export default defineServerPage(() => <h1>About</h1>)
109
+ */
110
+ declare const defineServerPage: DefinePageFn;
111
+ //#endregion
112
+ //#region src/vino/factory.d.ts
113
+ declare class Factory<E extends Env = Env> {
114
+ /** Same as `definePage`, with `c` typed as `Context<E>`. */
115
+ definePage: DefinePageFn<E>;
116
+ /** Same as `defineServerPage`, with `c` typed as `Context<E>`. */
117
+ defineServerPage: DefinePageFn<E>;
118
+ /** Same as `defineServerFn`, with `c` typed as `Context<E>`. */
119
+ defineServerFn: DefineServerFnFn<E>;
120
+ }
121
+ /**
122
+ * Create a factory that binds `Env` onto page and server-fn helpers.
123
+ *
124
+ * Pair with `createVino<Env>()` (or `new Hono<Env>()`) so the app and pages
125
+ * share one `Env` type.
126
+ *
127
+ * @example
128
+ * // src/factory.ts
129
+ * import { createFactory } from "vinojs/factory"
130
+ * export const factory = createFactory<Env>()
131
+ *
132
+ * @example
133
+ * // src/pages/index.tsx
134
+ * import { factory } from "../factory"
135
+ * export default factory.definePage({
136
+ * data: (c) => ({ title: c.env.TITLE }),
137
+ * render: ({ data }) => <h1>{data.title}</h1>,
138
+ * })
139
+ */
140
+ declare const createFactory: <E extends Env = Env>() => Factory<E>;
141
+ //#endregion
142
+ export { ServerFnHandler as _, InferDefinePageOptions as a, readServerFn as b, PageRender as c, isClientPageDefinition as d, isPageDefinition as f, ServerFn as g, DefineServerFnFn as h, DefinePageOptions as i, definePage as l, resolvePageRender as m, createFactory as n, PageDataFn as o, isServerPageDefinition as p, DefinePageFn as r, PageDefinition as s, Factory as t, defineServerPage as u, defineServerFn as v, isServerFn as y };
143
+ //# sourceMappingURL=factory-AHIdhfy4.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory-AHIdhfy4.d.mts","names":[],"sources":["../src/vino/defineServerFn.ts","../src/vino/definePage.ts","../src/vino/factory.ts"],"mappings":";;;cAEa;KAED,gBAAgB,aAAa,UAAU,MAAM,QACvD,GAAG,QAAQ,eACR,IAAI,QAAQ;;;;KAKL,SAAS,aAAa,UAAU,MAAM,OAAO,gBAAgB,GAAG;WACjE,aAAa;;;;;;KAOZ,iBAAiB,UAAU,MAAM,QAAQ,GAAG,IAAI,gBAAgB,GAAG,OAAO,SAAS,GAAG;iBAElF,WAAW,iBAAiB,SAAS;iBAIrC,aAAa,iBAAiB;;;;;;;;;;;;;;;;;;;iBAgC9B,eAAe,GAAG,UAAU,MAAM,KAAK,IAAI,gBAAgB,GAAG,KAAK,SAAS,GAAG;;;cCrDlF;cACA;KAED,WAAW,mBAAmB,OAAO,UAAU,UAAU;KAEzD,WAAW,UAAU,MAAM,OAAO,WAAW,KAAK,kBAAkB;UAE/D,kBAAkB,gBAAgB,UAAU,MAAM;;EAEjE,SAAS,WAAW;EACpB,OAAO,WAAW;;EAElB,OAAO,WAAW,KAAK,SAAS,MAAM;EACtC,SAAS;;;KAIC,uBACV,cAAc,2BACd,OAAO,QAAQ,WAAW;EAE1B,OAAO;EACP,SAAS;;EAEL,QAAQ,WAAW;EAAO,OAAO,WAAW;;EAC5C,MAAM,WAAW;EAAO,SAAS,WAAW;;;;;;UAOjC,aAAa,UAAU,MAAM;GAC3C,gBAAgB,MAAM,WAAW,QAAQ,eAAe;GACxD,UAAU,WAAW,IACpB,SAAS,uBAAuB,KAC/B,eAAe,QAAQ,WAAW;GACpC,gBAAgB,SAAS,kBAAkB,MAAM,KAAK,eAAe;;UAGvD,eAAe;WACrB,aAAa,mBAAmB;WAChC;WACA,QAAQ,WAAW;WACnB,OAAO,aAAa,SAAS;WAC7B,SAAS;;iBAGJ,iBAAiB,iBAAiB,SAAS;iBAS3C,uBAAuB,iBAAiB,SAAS;iBAIjD,uBAAuB,iBAAiB,SAAS;iBAQjD,kBAAkB,iBAAiB;;;;;;;;;;;;;;;;;;;;;cAoDtC,YAA0G;;;;;;;cAQ1G,kBAA6H;;;cCjH7H,QAAQ,UAAU,MAAM;;EAEnC,YAAY,aAAa;;EAGzB,kBAAkB,aAAa;;EAG/B,gBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;;;cAsBtB,gBAAiB,UAAU,MAAM,UAAQ,QAAQ"}
@@ -0,0 +1,2 @@
1
+ import { n as createFactory, t as Factory } from "./factory-AHIdhfy4.mjs";
2
+ export { Factory, createFactory };
@@ -0,0 +1,35 @@
1
+ import { n as defineServerPage, t as definePage } from "./definePage--9Pz7rHs.mjs";
2
+ import { r as defineServerFn } from "./defineServerFn-H-bz7xBX.mjs";
3
+ //#region src/vino/factory.ts
4
+ var Factory = class {
5
+ /** Same as `definePage`, with `c` typed as `Context<E>`. */
6
+ definePage = definePage;
7
+ /** Same as `defineServerPage`, with `c` typed as `Context<E>`. */
8
+ defineServerPage = defineServerPage;
9
+ /** Same as `defineServerFn`, with `c` typed as `Context<E>`. */
10
+ defineServerFn = defineServerFn;
11
+ };
12
+ /**
13
+ * Create a factory that binds `Env` onto page and server-fn helpers.
14
+ *
15
+ * Pair with `createVino<Env>()` (or `new Hono<Env>()`) so the app and pages
16
+ * share one `Env` type.
17
+ *
18
+ * @example
19
+ * // src/factory.ts
20
+ * import { createFactory } from "vinojs/factory"
21
+ * export const factory = createFactory<Env>()
22
+ *
23
+ * @example
24
+ * // src/pages/index.tsx
25
+ * import { factory } from "../factory"
26
+ * export default factory.definePage({
27
+ * data: (c) => ({ title: c.env.TITLE }),
28
+ * render: ({ data }) => <h1>{data.title}</h1>,
29
+ * })
30
+ */
31
+ const createFactory = () => new Factory();
32
+ //#endregion
33
+ export { Factory, createFactory };
34
+
35
+ //# sourceMappingURL=factory.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.mjs","names":["definePageImpl","defineServerPageImpl","defineServerFnImpl"],"sources":["../src/vino/factory.ts"],"sourcesContent":["/**\n * Factory helper for Vino, analogous to `hono/factory`.\n *\n * Bind `Env` once so `definePage` / `defineServerPage` / `defineServerFn` type\n * `c` without blocking inference of loader return data.\n */\n\nimport type { Env } from \"hono\";\nimport {\n definePage as definePageImpl,\n defineServerPage as defineServerPageImpl,\n type DefinePageFn,\n} from \"./definePage.ts\";\nimport { defineServerFn as defineServerFnImpl, type DefineServerFnFn } from \"./defineServerFn.ts\";\nimport type { PageConfig } from \"./types.ts\";\n\ninterface FactoryOptions {\n pageConfig?: PageConfig;\n}\n\nexport class Factory<E extends Env = Env> {\n /** Same as `definePage`, with `c` typed as `Context<E>`. */\n definePage: DefinePageFn<E> = definePageImpl as unknown as DefinePageFn<E>;\n\n /** Same as `defineServerPage`, with `c` typed as `Context<E>`. */\n defineServerPage: DefinePageFn<E> = defineServerPageImpl as unknown as DefinePageFn<E>;\n\n /** Same as `defineServerFn`, with `c` typed as `Context<E>`. */\n defineServerFn: DefineServerFnFn<E> = defineServerFnImpl;\n}\n\n/**\n * Create a factory that binds `Env` onto page and server-fn helpers.\n *\n * Pair with `createVino<Env>()` (or `new Hono<Env>()`) so the app and pages\n * share one `Env` type.\n *\n * @example\n * // src/factory.ts\n * import { createFactory } from \"vinojs/factory\"\n * export const factory = createFactory<Env>()\n *\n * @example\n * // src/pages/index.tsx\n * import { factory } from \"../factory\"\n * export default factory.definePage({\n * data: (c) => ({ title: c.env.TITLE }),\n * render: ({ data }) => <h1>{data.title}</h1>,\n * })\n */\nexport const createFactory = <E extends Env = Env>(): Factory<E> => new Factory<E>();\n// export const createFactory = <E extends Env = Env>(options?: FactoryOptions): Factory<E> => new Factory<E>(options);\n"],"mappings":";;;AAoBA,IAAa,UAAb,MAA0C;;CAExC,aAA8BA;;CAG9B,mBAAoCC;;CAGpC,iBAAsCC;AACxC;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,sBAAuD,IAAI,QAAW"}
@@ -0,0 +1,77 @@
1
+ import { Context, Env } from "hono";
2
+ import { Child } from "hono/jsx";
3
+ //#region src/vino/types.d.ts
4
+ type VinoHtml = Child;
5
+ interface PageProps<Data = unknown> {
6
+ data: Data;
7
+ params: Record<string, string>;
8
+ }
9
+ interface LayoutProps<Data = unknown> {
10
+ children?: Child;
11
+ data: Data;
12
+ params: Record<string, string>;
13
+ }
14
+ type DataLoader<E extends Env = Env> = (c: Context<E, string>) => unknown;
15
+ type SsgParams = Record<string, string>;
16
+ type SsgParamsFn = () => SsgParams[] | Promise<SsgParams[]>;
17
+ type RenderMode = "full" | "shell" | "content";
18
+ interface PageConfig {
19
+ prerender?: "full" | "partial" | false;
20
+ clientRouting?: boolean;
21
+ ssgParams?: SsgParamsFn;
22
+ }
23
+ interface PageModule {
24
+ default?: unknown;
25
+ GET?: (c: Context) => unknown;
26
+ POST?: (c: Context) => unknown;
27
+ PUT?: (c: Context) => unknown;
28
+ PATCH?: (c: Context) => unknown;
29
+ DELETE?: (c: Context) => unknown;
30
+ [method: string]: unknown;
31
+ }
32
+ interface LayoutModule {
33
+ default: (props: LayoutProps) => VinoHtml;
34
+ }
35
+ type ManifestLoader<T> = () => Promise<T>;
36
+ interface ManifestPage {
37
+ id: string;
38
+ path: string;
39
+ pattern: string;
40
+ isClientPage: boolean;
41
+ isStatic: boolean;
42
+ isCatchAll: boolean;
43
+ paramNames: string[];
44
+ config?: PageConfig;
45
+ loadPage: ManifestLoader<PageModule>;
46
+ loadClientPage?: ManifestLoader<PageModule>;
47
+ loadLayouts: ManifestLoader<LayoutModule>[];
48
+ }
49
+ interface VinoManifest {
50
+ pages: ManifestPage[];
51
+ defaults?: PageConfig;
52
+ }
53
+ interface VinoPayload {
54
+ path: string;
55
+ params: Record<string, string>;
56
+ data: unknown;
57
+ clientRouting: boolean;
58
+ clientPage: string | null;
59
+ /** True when the document is a layout shell; client should fetch page content. */
60
+ partial?: boolean;
61
+ title?: string;
62
+ }
63
+ interface CreateVinoOptions {
64
+ manifest?: VinoManifest;
65
+ }
66
+ interface VinoViteOptions {
67
+ pagesDir?: string;
68
+ layoutsDir?: string;
69
+ componentsDir?: string;
70
+ entry?: string;
71
+ prerender?: "full" | "partial" | false;
72
+ clientRouting?: boolean;
73
+ client?: string;
74
+ }
75
+ //#endregion
76
+ export { PageConfig as a, VinoHtml as c, VinoViteOptions as d, ManifestPage as i, VinoManifest as l, DataLoader as n, PageProps as o, LayoutProps as r, RenderMode as s, CreateVinoOptions as t, VinoPayload as u };
77
+ //# sourceMappingURL=types-CQITdkpF.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-CQITdkpF.d.mts","names":[],"sources":["../src/vino/types.ts"],"mappings":";;;KAGY,WAAW;UAEN,UAAU;EACzB,MAAM;EACN,QAAQ;;UAGO,YAAY;EAC3B,WAAW;EACX,MAAM;EACN,QAAQ;;KAGE,WAAW,UAAU,MAAM,QAAQ,GAAG,QAAQ;KAE9C,YAAY;KACZ,oBAAoB,cAAc,QAAQ;KAE1C;UAEK;EACf;EACA;EACA,YAAY;;UAGG;EACf;EACA,OAAO,GAAG;EACV,QAAQ,GAAG;EACX,OAAO,GAAG;EACV,SAAS,GAAG;EACZ,UAAU,GAAG;GACZ;;UAGc;EACf,UAAU,OAAO,gBAAgB;;KAGvB,eAAe,WAAW,QAAQ;UAE7B;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT,UAAU,eAAe;EACzB,iBAAiB,eAAe;EAChC,aAAa,eAAe;;UAGb;EACf,OAAO;EACP,WAAW;;UAGI;EACf;EACA,QAAQ;EACR;EACA;EACA;;EAEA;EACA;;UAGe;EACf,WAAW;;UAGI;EACf;EACA;EACA;EACA;EACA;EACA;EACA"}
@@ -0,0 +1,45 @@
1
+ import { a as PageConfig, d as VinoViteOptions, i as ManifestPage, l as VinoManifest, o as PageProps, r as LayoutProps, s as RenderMode, t as CreateVinoOptions, u as VinoPayload } from "./types-CQITdkpF.mjs";
2
+ import { wrapComponent, wrapModule } from "./component-wrap.mjs";
3
+ import { _ as ServerFnHandler, a as InferDefinePageOptions, b as readServerFn, c as PageRender, d as isClientPageDefinition, f as isPageDefinition, g as ServerFn, h as DefineServerFnFn, i as DefinePageOptions, l as definePage, m as resolvePageRender, n as createFactory, o as PageDataFn, p as isServerPageDefinition, r as DefinePageFn, s as PageDefinition, t as Factory, u as defineServerPage, v as defineServerFn, y as isServerFn } from "./factory-AHIdhfy4.mjs";
4
+ import { Env, Hono, Schema } from "hono";
5
+ import { BlankSchema } from "hono/types";
6
+ //#region src/vino/createVino.d.ts
7
+ /**
8
+ * Mount filesystem pages from the Vite-generated manifest onto a user-owned Hono app.
9
+ * Extra API routes should be registered on `app` before calling this.
10
+ */
11
+ declare function mountVino<E extends Env, S extends Schema, BasePath extends string>(app: Hono<E, S, BasePath>, options?: CreateVinoOptions): Hono<E, S, BasePath>;
12
+ /**
13
+ * Create a new Vino app. Returns a Hono app with the Vino pages mounted.
14
+ * @param options - The options for the Vino app.
15
+ * @returns A Hono app with the Vino pages mounted.
16
+ */
17
+ declare function createVino<E extends Env = Env, S extends Schema = BlankSchema, BasePath extends string = "/">(options?: CreateVinoOptions): Hono<E, S, BasePath>;
18
+ //#endregion
19
+ //#region src/vino/compile.d.ts
20
+ interface CompiledRoute {
21
+ /** Filesystem-derived path using `:param` (no Hono regex). `/`, `/about`, `/blog/:slug`. */
22
+ path: string;
23
+ /** Hono route pattern (`:slug{.+}` for catch-all). */
24
+ pattern: string;
25
+ isCatchAll: boolean;
26
+ isStatic: boolean;
27
+ paramNames: string[];
28
+ }
29
+ /**
30
+ * Compile a pages-dir-relative file path to a Hono route.
31
+ * `(group)` dirs are omitted, `[param]` becomes `:param`, `[...slug]` becomes `:slug{.+}`,
32
+ * trailing `index` is dropped.
33
+ */
34
+ declare function compileFilePath(relativePath: string): CompiledRoute;
35
+ declare function applyParams(path: string, params: Record<string, string>): string;
36
+ //#endregion
37
+ //#region src/vino/constants.d.ts
38
+ declare const PAGE_SLOT_ID = "vino-page";
39
+ declare const PAYLOAD_SCRIPT_ID = "__VINO__";
40
+ declare const COMPONENT_TAG = "vino-component";
41
+ declare const NAV_HEADER = "X-Vino-Nav";
42
+ declare const SHELL_HEADER = "X-Vino-Shell";
43
+ //#endregion
44
+ export { COMPONENT_TAG, type CreateVinoOptions, type DefinePageFn, type DefinePageOptions, type DefineServerFnFn, Factory, type InferDefinePageOptions, type LayoutProps, type ManifestPage, NAV_HEADER, PAGE_SLOT_ID, PAYLOAD_SCRIPT_ID, type PageConfig, type PageDataFn, type PageDefinition, type PageProps, type PageRender, type RenderMode, SHELL_HEADER, type ServerFn, type ServerFnHandler, type VinoManifest, type VinoPayload, type VinoViteOptions, applyParams, compileFilePath, createFactory, createVino, definePage, defineServerFn, defineServerPage, isClientPageDefinition, isPageDefinition, isServerFn, isServerPageDefinition, mountVino, readServerFn, resolvePageRender, wrapComponent, wrapModule };
45
+ //# sourceMappingURL=vino.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vino.d.mts","names":[],"sources":["../src/vino/createVino.ts","../src/vino/compile.ts","../src/vino/constants.ts"],"mappings":";;;;;;;;;;iBAgGgB,UAAU,UAAU,KAAK,UAAU,QAAQ,yBAAyB,KAAK,KAAK,GAAG,GAAG,WAAW,UAAS,oBAAyB,KAAK,GAAG,GAAG;;;;;;iBAc5I,WAAW,UAAU,MAAM,KAAK,UAAU,SAAS,aAAa,+BAA+B,UAAS,oBAAyB,KAAK,GAAG,GAAG;;;UC9G3I;;EAEf;;EAEA;EACA;EACA;EACA;;;;;;;iBAoBc,gBAAgB,uBAAuB;iBA8DvC,YAAY,cAAc,QAAQ;;;cCzFrC;cACA;cACA;cAKA;cACA"}