@silicajs/next 0.1.0

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.
Files changed (78) hide show
  1. package/README.md +7 -0
  2. package/dist/auth-config.d.ts +10 -0
  3. package/dist/auth-config.js +25 -0
  4. package/dist/auth-config.js.map +1 -0
  5. package/dist/dev-reload-client.d.ts +3 -0
  6. package/dist/dev-reload-client.js +19 -0
  7. package/dist/dev-reload-client.js.map +1 -0
  8. package/dist/dev-reload.d.ts +6 -0
  9. package/dist/dev-reload.js +36 -0
  10. package/dist/dev-reload.js.map +1 -0
  11. package/dist/index.d.ts +6 -0
  12. package/dist/index.js +33 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/proxy.d.ts +14 -0
  15. package/dist/proxy.js +56 -0
  16. package/dist/proxy.js.map +1 -0
  17. package/dist/routes/api-auth.d.ts +4 -0
  18. package/dist/routes/api-auth.js +27 -0
  19. package/dist/routes/api-auth.js.map +1 -0
  20. package/dist/routes/api-dev-events.d.ts +3 -0
  21. package/dist/routes/api-dev-events.js +18 -0
  22. package/dist/routes/api-dev-events.js.map +1 -0
  23. package/dist/routes/api-revalidate.d.ts +10 -0
  24. package/dist/routes/api-revalidate.js +22 -0
  25. package/dist/routes/api-revalidate.js.map +1 -0
  26. package/dist/routes/api-search.d.ts +17 -0
  27. package/dist/routes/api-search.js +53 -0
  28. package/dist/routes/api-search.js.map +1 -0
  29. package/dist/routes/layout.d.ts +24 -0
  30. package/dist/routes/layout.js +48 -0
  31. package/dist/routes/layout.js.map +1 -0
  32. package/dist/routes/not-allowed.d.ts +5 -0
  33. package/dist/routes/not-allowed.js +9 -0
  34. package/dist/routes/not-allowed.js.map +1 -0
  35. package/dist/routes/not-found.d.ts +5 -0
  36. package/dist/routes/not-found.js +9 -0
  37. package/dist/routes/not-found.js.map +1 -0
  38. package/dist/routes/page.d.ts +26 -0
  39. package/dist/routes/page.js +175 -0
  40. package/dist/routes/page.js.map +1 -0
  41. package/dist/routes/sign-in.d.ts +5 -0
  42. package/dist/routes/sign-in.js +31 -0
  43. package/dist/routes/sign-in.js.map +1 -0
  44. package/dist/routes/tags-page.d.ts +18 -0
  45. package/dist/routes/tags-page.js +57 -0
  46. package/dist/routes/tags-page.js.map +1 -0
  47. package/dist/routing-provider.d.ts +8 -0
  48. package/dist/routing-provider.js +40 -0
  49. package/dist/routing-provider.js.map +1 -0
  50. package/dist/server-data.d.ts +11 -0
  51. package/dist/server-data.js +53 -0
  52. package/dist/server-data.js.map +1 -0
  53. package/dist/template-files/generated-app/app/[[...slug]]/page.tsx +18 -0
  54. package/dist/template-files/generated-app/app/api/auth/[...all]/route.ts +1 -0
  55. package/dist/template-files/generated-app/app/api/search/route.ts +1 -0
  56. package/dist/template-files/generated-app/app/api/silica/dev-events/route.ts +1 -0
  57. package/dist/template-files/generated-app/app/api/silica/revalidate/route.ts +1 -0
  58. package/dist/template-files/generated-app/app/layout.tsx +22 -0
  59. package/dist/template-files/generated-app/app/not-allowed/page.tsx +1 -0
  60. package/dist/template-files/generated-app/app/not-found.tsx +1 -0
  61. package/dist/template-files/generated-app/app/sign-in/page.tsx +1 -0
  62. package/dist/template-files/generated-app/app/tags/[...tag]/page.tsx +5 -0
  63. package/dist/template-files/generated-app/postcss.config.mjs +1 -0
  64. package/dist/template-files/generated-app/proxy.ts +10 -0
  65. package/dist/template-files/next.config.ts +32 -0
  66. package/dist/template-files/package.json +15 -0
  67. package/dist/template-files/silica-theme.ts +7 -0
  68. package/dist/template-files/tsconfig.json +21 -0
  69. package/dist/templates.d.ts +14 -0
  70. package/dist/templates.js +80 -0
  71. package/dist/templates.js.map +1 -0
  72. package/dist/theme-layout.d.ts +1 -0
  73. package/dist/theme-layout.js +6 -0
  74. package/dist/theme-layout.js.map +1 -0
  75. package/dist/theme-page.d.ts +3 -0
  76. package/dist/theme-page.js +11 -0
  77. package/dist/theme-page.js.map +1 -0
  78. package/package.json +104 -0
package/README.md ADDED
@@ -0,0 +1,7 @@
1
+ # @silicajs/next
2
+
3
+ Next.js runtime adapter for Silica.
4
+
5
+ Exports generated route implementations, server data loaders, theme types, proxy auth helpers, and templates used by `@silicajs/cli` to materialize `.silica/next/`.
6
+
7
+ Generated route files are intentionally tiny re-exports so upgrading Silica is just a package bump plus a rerun of `silica dev` or `silica build`.
@@ -0,0 +1,10 @@
1
+ import { ResolvedSilicaConfig } from '@silicajs/core/runtime';
2
+
3
+ type RuntimeAuthConfig = {
4
+ authEnabled: boolean;
5
+ allowedDomains: string[];
6
+ allowedEmails: string[];
7
+ };
8
+ declare function resolveRuntimeAuthConfig(config: ResolvedSilicaConfig): RuntimeAuthConfig;
9
+
10
+ export { type RuntimeAuthConfig, resolveRuntimeAuthConfig };
@@ -0,0 +1,25 @@
1
+ function resolveRuntimeAuthConfig(config) {
2
+ const allowedDomains = uniqueList([
3
+ ...config.auth?.allowedDomains ?? [],
4
+ ...parseList(process.env.SILICA_ALLOWED_DOMAINS)
5
+ ]);
6
+ const allowedEmails = uniqueList([
7
+ ...config.auth?.allowedEmails ?? [],
8
+ ...parseList(process.env.SILICA_ALLOWED_EMAILS)
9
+ ]);
10
+ return {
11
+ authEnabled: Boolean(config.auth) || process.env.SILICA_AUTH_ENABLED === "true",
12
+ allowedDomains,
13
+ allowedEmails
14
+ };
15
+ }
16
+ function parseList(value) {
17
+ return value ? value.split(",").map((item) => item.trim()).filter(Boolean) : [];
18
+ }
19
+ function uniqueList(values) {
20
+ return [...new Set(values.map((item) => item.trim()).filter(Boolean))];
21
+ }
22
+ export {
23
+ resolveRuntimeAuthConfig
24
+ };
25
+ //# sourceMappingURL=auth-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/auth-config.ts"],"sourcesContent":["import type { ResolvedSilicaConfig } from \"@silicajs/core/runtime\";\n\nexport type RuntimeAuthConfig = {\n authEnabled: boolean;\n allowedDomains: string[];\n allowedEmails: string[];\n};\n\nexport function resolveRuntimeAuthConfig(\n config: ResolvedSilicaConfig,\n): RuntimeAuthConfig {\n const allowedDomains = uniqueList([\n ...(config.auth?.allowedDomains ?? []),\n ...parseList(process.env.SILICA_ALLOWED_DOMAINS),\n ]);\n const allowedEmails = uniqueList([\n ...(config.auth?.allowedEmails ?? []),\n ...parseList(process.env.SILICA_ALLOWED_EMAILS),\n ]);\n\n return {\n authEnabled:\n Boolean(config.auth) || process.env.SILICA_AUTH_ENABLED === \"true\",\n allowedDomains,\n allowedEmails,\n };\n}\n\nfunction parseList(value: string | undefined): string[] {\n return value\n ? value\n .split(\",\")\n .map((item) => item.trim())\n .filter(Boolean)\n : [];\n}\n\nfunction uniqueList(values: readonly string[]): string[] {\n return [...new Set(values.map((item) => item.trim()).filter(Boolean))];\n}\n"],"mappings":"AAQO,SAAS,yBACd,QACmB;AACnB,QAAM,iBAAiB,WAAW;AAAA,IAChC,GAAI,OAAO,MAAM,kBAAkB,CAAC;AAAA,IACpC,GAAG,UAAU,QAAQ,IAAI,sBAAsB;AAAA,EACjD,CAAC;AACD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,GAAI,OAAO,MAAM,iBAAiB,CAAC;AAAA,IACnC,GAAG,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAChD,CAAC;AAED,SAAO;AAAA,IACL,aACE,QAAQ,OAAO,IAAI,KAAK,QAAQ,IAAI,wBAAwB;AAAA,IAC9D;AAAA,IACA;AAAA,EACF;AACF;AAEA,SAAS,UAAU,OAAqC;AACtD,SAAO,QACH,MACG,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,OAAO,IACjB,CAAC;AACP;AAEA,SAAS,WAAW,QAAqC;AACvD,SAAO,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EAAE,OAAO,OAAO,CAAC,CAAC;AACvE;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function SilicaDevReload(): null;
2
+
3
+ export { SilicaDevReload };
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { useRouter } from "next/navigation";
3
+ import { useEffect } from "react";
4
+ function SilicaDevReload() {
5
+ const router = useRouter();
6
+ useEffect(() => {
7
+ if (process.env.NODE_ENV !== "development") return;
8
+ const source = new EventSource("/api/silica/dev-events");
9
+ source.addEventListener("reload", () => {
10
+ router.refresh();
11
+ });
12
+ return () => source.close();
13
+ }, [router]);
14
+ return null;
15
+ }
16
+ export {
17
+ SilicaDevReload
18
+ };
19
+ //# sourceMappingURL=dev-reload-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dev-reload-client.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRouter } from \"next/navigation\";\nimport { useEffect } from \"react\";\n\nexport function SilicaDevReload() {\n const router = useRouter();\n\n useEffect(() => {\n if (process.env.NODE_ENV !== \"development\") return;\n\n const source = new EventSource(\"/api/silica/dev-events\");\n source.addEventListener(\"reload\", () => {\n router.refresh();\n });\n\n return () => source.close();\n }, [router]);\n\n return null;\n}\n"],"mappings":";AAEA,SAAS,iBAAiB;AAC1B,SAAS,iBAAiB;AAEnB,SAAS,kBAAkB;AAChC,QAAM,SAAS,UAAU;AAEzB,YAAU,MAAM;AACd,QAAI,QAAQ,IAAI,aAAa,cAAe;AAE5C,UAAM,SAAS,IAAI,YAAY,wBAAwB;AACvD,WAAO,iBAAiB,UAAU,MAAM;AACtC,aAAO,QAAQ;AAAA,IACjB,CAAC;AAED,WAAO,MAAM,OAAO,MAAM;AAAA,EAC5B,GAAG,CAAC,MAAM,CAAC;AAEX,SAAO;AACT;","names":[]}
@@ -0,0 +1,6 @@
1
+ type DevReloadListener = (chunk: string) => void;
2
+ declare function addDevReloadListener(listener: DevReloadListener): () => void;
3
+ declare function notifyDevReload(): void;
4
+ declare function createDevReloadStream(): ReadableStream<Uint8Array>;
5
+
6
+ export { addDevReloadListener, createDevReloadStream, notifyDevReload };
@@ -0,0 +1,36 @@
1
+ const listeners = /* @__PURE__ */ new Set();
2
+ function addDevReloadListener(listener) {
3
+ listeners.add(listener);
4
+ return () => listeners.delete(listener);
5
+ }
6
+ function notifyDevReload() {
7
+ for (const listener of listeners) {
8
+ listener("event: reload\ndata: {}\n\n");
9
+ }
10
+ }
11
+ function createDevReloadStream() {
12
+ const encoder = new TextEncoder();
13
+ let unsubscribe;
14
+ return new ReadableStream({
15
+ start(controller) {
16
+ const send = (chunk) => {
17
+ try {
18
+ controller.enqueue(encoder.encode(chunk));
19
+ } catch {
20
+ unsubscribe?.();
21
+ }
22
+ };
23
+ send(": connected\n\n");
24
+ unsubscribe = addDevReloadListener(send);
25
+ },
26
+ cancel() {
27
+ unsubscribe?.();
28
+ }
29
+ });
30
+ }
31
+ export {
32
+ addDevReloadListener,
33
+ createDevReloadStream,
34
+ notifyDevReload
35
+ };
36
+ //# sourceMappingURL=dev-reload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/dev-reload.ts"],"sourcesContent":["type DevReloadListener = (chunk: string) => void;\n\nconst listeners = new Set<DevReloadListener>();\n\nexport function addDevReloadListener(listener: DevReloadListener): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nexport function notifyDevReload(): void {\n for (const listener of listeners) {\n listener(\"event: reload\\ndata: {}\\n\\n\");\n }\n}\n\nexport function createDevReloadStream(): ReadableStream<Uint8Array> {\n const encoder = new TextEncoder();\n let unsubscribe: (() => void) | undefined;\n\n return new ReadableStream({\n start(controller) {\n const send = (chunk: string) => {\n try {\n controller.enqueue(encoder.encode(chunk));\n } catch {\n unsubscribe?.();\n }\n };\n\n send(\": connected\\n\\n\");\n unsubscribe = addDevReloadListener(send);\n },\n cancel() {\n unsubscribe?.();\n },\n });\n}\n"],"mappings":"AAEA,MAAM,YAAY,oBAAI,IAAuB;AAEtC,SAAS,qBAAqB,UAAyC;AAC5E,YAAU,IAAI,QAAQ;AACtB,SAAO,MAAM,UAAU,OAAO,QAAQ;AACxC;AAEO,SAAS,kBAAwB;AACtC,aAAW,YAAY,WAAW;AAChC,aAAS,6BAA6B;AAAA,EACxC;AACF;AAEO,SAAS,wBAAoD;AAClE,QAAM,UAAU,IAAI,YAAY;AAChC,MAAI;AAEJ,SAAO,IAAI,eAAe;AAAA,IACxB,MAAM,YAAY;AAChB,YAAM,OAAO,CAAC,UAAkB;AAC9B,YAAI;AACF,qBAAW,QAAQ,QAAQ,OAAO,KAAK,CAAC;AAAA,QAC1C,QAAQ;AACN,wBAAc;AAAA,QAChB;AAAA,MACF;AAEA,WAAK,iBAAiB;AACtB,oBAAc,qBAAqB,IAAI;AAAA,IACzC;AAAA,IACA,SAAS;AACP,oBAAc;AAAA,IAChB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,6 @@
1
+ export { TemplateFile, getSilicaTemplates, nextConfigTemplate, packageJsonTemplate, proxyTemplate, themeModuleTemplate, tsconfigTemplate } from './templates.js';
2
+ export { getProjectRoot, getSilicaRoot, loadBuildId, loadGraph, loadManifest, loadResolvedConfig } from './server-data.js';
3
+ export { SilicaNextRoutingProvider } from './routing-provider.js';
4
+ import '@silicajs/core/runtime';
5
+ import 'react/jsx-runtime';
6
+ import 'react';
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ import {
2
+ getSilicaTemplates,
3
+ nextConfigTemplate,
4
+ packageJsonTemplate,
5
+ proxyTemplate,
6
+ themeModuleTemplate,
7
+ tsconfigTemplate
8
+ } from "./templates.js";
9
+ import {
10
+ getProjectRoot,
11
+ getSilicaRoot,
12
+ loadBuildId,
13
+ loadGraph,
14
+ loadManifest,
15
+ loadResolvedConfig
16
+ } from "./server-data.js";
17
+ import { SilicaNextRoutingProvider } from "./routing-provider.js";
18
+ export {
19
+ SilicaNextRoutingProvider,
20
+ getProjectRoot,
21
+ getSilicaRoot,
22
+ getSilicaTemplates,
23
+ loadBuildId,
24
+ loadGraph,
25
+ loadManifest,
26
+ loadResolvedConfig,
27
+ nextConfigTemplate,
28
+ packageJsonTemplate,
29
+ proxyTemplate,
30
+ themeModuleTemplate,
31
+ tsconfigTemplate
32
+ };
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n getSilicaTemplates,\n nextConfigTemplate,\n packageJsonTemplate,\n proxyTemplate,\n themeModuleTemplate,\n tsconfigTemplate,\n type TemplateFile,\n} from \"./templates.js\";\nexport {\n getProjectRoot,\n getSilicaRoot,\n loadBuildId,\n loadGraph,\n loadManifest,\n loadResolvedConfig,\n} from \"./server-data.js\";\nexport { SilicaNextRoutingProvider } from \"./routing-provider.js\";\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iCAAiC;","names":[]}
@@ -0,0 +1,14 @@
1
+ import { NextRequest, NextResponse } from 'next/server';
2
+
3
+ type SilicaProxyOptions = {
4
+ authEnabled?: boolean;
5
+ allowedDomains?: readonly string[];
6
+ allowedEmails?: readonly string[];
7
+ };
8
+ declare function silicaProxy(request: NextRequest, options?: SilicaProxyOptions): Promise<NextResponse<unknown>>;
9
+ declare const config: {
10
+ matcher: string[];
11
+ };
12
+ declare function isSilicaPublicPath(pathname: string): boolean;
13
+
14
+ export { type SilicaProxyOptions, config, isSilicaPublicPath, silicaProxy };
package/dist/proxy.js ADDED
@@ -0,0 +1,56 @@
1
+ import { NextResponse } from "next/server";
2
+ import { isSilicaRequestAllowed } from "@silicajs/auth";
3
+ const PUBLIC_PREFIXES = [
4
+ "/_next",
5
+ "/api/auth",
6
+ "/api/silica/revalidate",
7
+ "/api/silica/dev-events"
8
+ ];
9
+ const PUBLIC_PATHS = ["/sign-in", "/not-allowed", "/favicon.ico"];
10
+ async function silicaProxy(request, options = {}) {
11
+ const { pathname } = request.nextUrl;
12
+ const authEnabled = options.authEnabled === true || process.env.SILICA_AUTH_ENABLED === "true";
13
+ if (!authEnabled) return NextResponse.next();
14
+ if (isSilicaPublicPath(pathname)) return NextResponse.next();
15
+ const allowedDomains = uniqueList([
16
+ ...options.allowedDomains ?? [],
17
+ ...parseList(process.env.SILICA_ALLOWED_DOMAINS)
18
+ ]);
19
+ const allowedEmails = uniqueList([
20
+ ...options.allowedEmails ?? [],
21
+ ...parseList(process.env.SILICA_ALLOWED_EMAILS)
22
+ ]);
23
+ const secret = process.env.BETTER_AUTH_SECRET;
24
+ const hasValidatedSession = secret ? await isSilicaRequestAllowed(request, {
25
+ secret: process.env.BETTER_AUTH_SECRET,
26
+ allowedDomains,
27
+ allowedEmails
28
+ }) : false;
29
+ if (!hasValidatedSession) {
30
+ const signInUrl = request.nextUrl.clone();
31
+ signInUrl.pathname = "/sign-in";
32
+ signInUrl.searchParams.set("callbackUrl", request.nextUrl.pathname);
33
+ return NextResponse.redirect(signInUrl);
34
+ }
35
+ return NextResponse.next();
36
+ }
37
+ const config = {
38
+ matcher: ["/((?!_next/static|_next/image|favicon.ico).*)"]
39
+ };
40
+ function isSilicaPublicPath(pathname) {
41
+ return PUBLIC_PATHS.includes(pathname) || PUBLIC_PREFIXES.some(
42
+ (prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`)
43
+ );
44
+ }
45
+ function parseList(value) {
46
+ return value ? value.split(",").map((item) => item.trim()).filter(Boolean) : [];
47
+ }
48
+ function uniqueList(values) {
49
+ return [...new Set(values.map((item) => item.trim()).filter(Boolean))];
50
+ }
51
+ export {
52
+ config,
53
+ isSilicaPublicPath,
54
+ silicaProxy
55
+ };
56
+ //# sourceMappingURL=proxy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/proxy.ts"],"sourcesContent":["import { NextRequest, NextResponse } from \"next/server\";\nimport { isSilicaRequestAllowed } from \"@silicajs/auth\";\n\nexport type SilicaProxyOptions = {\n authEnabled?: boolean;\n allowedDomains?: readonly string[];\n allowedEmails?: readonly string[];\n};\n\nconst PUBLIC_PREFIXES = [\n \"/_next\",\n \"/api/auth\",\n \"/api/silica/revalidate\",\n \"/api/silica/dev-events\",\n];\nconst PUBLIC_PATHS = [\"/sign-in\", \"/not-allowed\", \"/favicon.ico\"];\n\nexport async function silicaProxy(\n request: NextRequest,\n options: SilicaProxyOptions = {},\n) {\n const { pathname } = request.nextUrl;\n\n const authEnabled =\n options.authEnabled === true || process.env.SILICA_AUTH_ENABLED === \"true\";\n if (!authEnabled) return NextResponse.next();\n if (isSilicaPublicPath(pathname)) return NextResponse.next();\n\n const allowedDomains = uniqueList([\n ...(options.allowedDomains ?? []),\n ...parseList(process.env.SILICA_ALLOWED_DOMAINS),\n ]);\n const allowedEmails = uniqueList([\n ...(options.allowedEmails ?? []),\n ...parseList(process.env.SILICA_ALLOWED_EMAILS),\n ]);\n const secret = process.env.BETTER_AUTH_SECRET;\n const hasValidatedSession = secret\n ? await isSilicaRequestAllowed(request, {\n secret: process.env.BETTER_AUTH_SECRET,\n allowedDomains,\n allowedEmails,\n })\n : false;\n\n if (!hasValidatedSession) {\n const signInUrl = request.nextUrl.clone();\n signInUrl.pathname = \"/sign-in\";\n signInUrl.searchParams.set(\"callbackUrl\", request.nextUrl.pathname);\n return NextResponse.redirect(signInUrl);\n }\n\n return NextResponse.next();\n}\n\nexport const config = {\n matcher: [\"/((?!_next/static|_next/image|favicon.ico).*)\"],\n};\n\nexport function isSilicaPublicPath(pathname: string): boolean {\n return (\n PUBLIC_PATHS.includes(pathname) ||\n PUBLIC_PREFIXES.some(\n (prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`),\n )\n );\n}\n\nfunction parseList(value: string | undefined): string[] {\n return value\n ? value\n .split(\",\")\n .map((item) => item.trim())\n .filter(Boolean)\n : [];\n}\n\nfunction uniqueList(values: readonly string[]): string[] {\n return [...new Set(values.map((item) => item.trim()).filter(Boolean))];\n}\n"],"mappings":"AAAA,SAAsB,oBAAoB;AAC1C,SAAS,8BAA8B;AAQvC,MAAM,kBAAkB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,eAAe,CAAC,YAAY,gBAAgB,cAAc;AAEhE,eAAsB,YACpB,SACA,UAA8B,CAAC,GAC/B;AACA,QAAM,EAAE,SAAS,IAAI,QAAQ;AAE7B,QAAM,cACJ,QAAQ,gBAAgB,QAAQ,QAAQ,IAAI,wBAAwB;AACtE,MAAI,CAAC,YAAa,QAAO,aAAa,KAAK;AAC3C,MAAI,mBAAmB,QAAQ,EAAG,QAAO,aAAa,KAAK;AAE3D,QAAM,iBAAiB,WAAW;AAAA,IAChC,GAAI,QAAQ,kBAAkB,CAAC;AAAA,IAC/B,GAAG,UAAU,QAAQ,IAAI,sBAAsB;AAAA,EACjD,CAAC;AACD,QAAM,gBAAgB,WAAW;AAAA,IAC/B,GAAI,QAAQ,iBAAiB,CAAC;AAAA,IAC9B,GAAG,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAChD,CAAC;AACD,QAAM,SAAS,QAAQ,IAAI;AAC3B,QAAM,sBAAsB,SACxB,MAAM,uBAAuB,SAAS;AAAA,IACpC,QAAQ,QAAQ,IAAI;AAAA,IACpB;AAAA,IACA;AAAA,EACF,CAAC,IACD;AAEJ,MAAI,CAAC,qBAAqB;AACxB,UAAM,YAAY,QAAQ,QAAQ,MAAM;AACxC,cAAU,WAAW;AACrB,cAAU,aAAa,IAAI,eAAe,QAAQ,QAAQ,QAAQ;AAClE,WAAO,aAAa,SAAS,SAAS;AAAA,EACxC;AAEA,SAAO,aAAa,KAAK;AAC3B;AAEO,MAAM,SAAS;AAAA,EACpB,SAAS,CAAC,+CAA+C;AAC3D;AAEO,SAAS,mBAAmB,UAA2B;AAC5D,SACE,aAAa,SAAS,QAAQ,KAC9B,gBAAgB;AAAA,IACd,CAAC,WAAW,aAAa,UAAU,SAAS,WAAW,GAAG,MAAM,GAAG;AAAA,EACrE;AAEJ;AAEA,SAAS,UAAU,OAAqC;AACtD,SAAO,QACH,MACG,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EACzB,OAAO,OAAO,IACjB,CAAC;AACP;AAEA,SAAS,WAAW,QAAqC;AACvD,SAAO,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,CAAC,EAAE,OAAO,OAAO,CAAC,CAAC;AACvE;","names":[]}
@@ -0,0 +1,4 @@
1
+ declare function GET(request: Request): Promise<Response>;
2
+ declare function POST(request: Request): Promise<Response>;
3
+
4
+ export { GET, POST };
@@ -0,0 +1,27 @@
1
+ import { toNextJsHandler } from "better-auth/next-js";
2
+ import { silicaAuth } from "@silicajs/auth";
3
+ import { resolveRuntimeAuthConfig } from "../auth-config.js";
4
+ import { loadResolvedConfig } from "../server-data.js";
5
+ async function getAuth() {
6
+ const config = await loadResolvedConfig();
7
+ const auth = resolveRuntimeAuthConfig(config);
8
+ return silicaAuth({
9
+ allowedDomains: auth.allowedDomains,
10
+ allowedEmails: auth.allowedEmails
11
+ });
12
+ }
13
+ async function GET(request) {
14
+ const auth = await getAuth();
15
+ const handler = toNextJsHandler(auth);
16
+ return handler.GET(request);
17
+ }
18
+ async function POST(request) {
19
+ const auth = await getAuth();
20
+ const handler = toNextJsHandler(auth);
21
+ return handler.POST(request);
22
+ }
23
+ export {
24
+ GET,
25
+ POST
26
+ };
27
+ //# sourceMappingURL=api-auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/api-auth.ts"],"sourcesContent":["import { toNextJsHandler } from \"better-auth/next-js\";\nimport { silicaAuth } from \"@silicajs/auth\";\nimport { resolveRuntimeAuthConfig } from \"../auth-config.js\";\nimport { loadResolvedConfig } from \"../server-data.js\";\n\nasync function getAuth() {\n const config = await loadResolvedConfig();\n const auth = resolveRuntimeAuthConfig(config);\n return silicaAuth({\n allowedDomains: auth.allowedDomains,\n allowedEmails: auth.allowedEmails,\n });\n}\n\nexport async function GET(request: Request) {\n const auth = await getAuth();\n const handler = toNextJsHandler(auth);\n return handler.GET(request);\n}\n\nexport async function POST(request: Request) {\n const auth = await getAuth();\n const handler = toNextJsHandler(auth);\n return handler.POST(request);\n}\n"],"mappings":"AAAA,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,gCAAgC;AACzC,SAAS,0BAA0B;AAEnC,eAAe,UAAU;AACvB,QAAM,SAAS,MAAM,mBAAmB;AACxC,QAAM,OAAO,yBAAyB,MAAM;AAC5C,SAAO,WAAW;AAAA,IAChB,gBAAgB,KAAK;AAAA,IACrB,eAAe,KAAK;AAAA,EACtB,CAAC;AACH;AAEA,eAAsB,IAAI,SAAkB;AAC1C,QAAM,OAAO,MAAM,QAAQ;AAC3B,QAAM,UAAU,gBAAgB,IAAI;AACpC,SAAO,QAAQ,IAAI,OAAO;AAC5B;AAEA,eAAsB,KAAK,SAAkB;AAC3C,QAAM,OAAO,MAAM,QAAQ;AAC3B,QAAM,UAAU,gBAAgB,IAAI;AACpC,SAAO,QAAQ,KAAK,OAAO;AAC7B;","names":[]}
@@ -0,0 +1,3 @@
1
+ declare function GET(): Promise<Response>;
2
+
3
+ export { GET };
@@ -0,0 +1,18 @@
1
+ import { NextResponse } from "next/server";
2
+ import { createDevReloadStream } from "../dev-reload.js";
3
+ async function GET() {
4
+ if (process.env.NODE_ENV === "production") {
5
+ return NextResponse.json({ error: "Not found" }, { status: 404 });
6
+ }
7
+ return new Response(createDevReloadStream(), {
8
+ headers: {
9
+ "Content-Type": "text/event-stream",
10
+ "Cache-Control": "no-cache, no-transform",
11
+ Connection: "keep-alive"
12
+ }
13
+ });
14
+ }
15
+ export {
16
+ GET
17
+ };
18
+ //# sourceMappingURL=api-dev-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/api-dev-events.ts"],"sourcesContent":["import { NextResponse } from \"next/server\";\nimport { createDevReloadStream } from \"../dev-reload.js\";\n\nexport async function GET() {\n if (process.env.NODE_ENV === \"production\") {\n return NextResponse.json({ error: \"Not found\" }, { status: 404 });\n }\n\n return new Response(createDevReloadStream(), {\n headers: {\n \"Content-Type\": \"text/event-stream\",\n \"Cache-Control\": \"no-cache, no-transform\",\n Connection: \"keep-alive\",\n },\n });\n}\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,6BAA6B;AAEtC,eAAsB,MAAM;AAC1B,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAO,aAAa,KAAK,EAAE,OAAO,YAAY,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EAClE;AAEA,SAAO,IAAI,SAAS,sBAAsB,GAAG;AAAA,IAC3C,SAAS;AAAA,MACP,gBAAgB;AAAA,MAChB,iBAAiB;AAAA,MACjB,YAAY;AAAA,IACd;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,10 @@
1
+ import { NextResponse } from 'next/server';
2
+
3
+ declare function POST(request: Request): Promise<NextResponse<{
4
+ error: string;
5
+ }> | NextResponse<{
6
+ ok: boolean;
7
+ tag: string;
8
+ }>>;
9
+
10
+ export { POST };
@@ -0,0 +1,22 @@
1
+ import { revalidateTag } from "next/cache";
2
+ import { NextResponse } from "next/server";
3
+ import { notifyDevReload } from "../dev-reload.js";
4
+ async function POST(request) {
5
+ if (process.env.NODE_ENV === "production") {
6
+ return NextResponse.json({ error: "Not found" }, { status: 404 });
7
+ }
8
+ const secret = process.env.SILICA_REVALIDATE_SECRET;
9
+ if (!secret || request.headers.get("x-silica-revalidate-secret") !== secret) {
10
+ return NextResponse.json({ error: "Forbidden" }, { status: 403 });
11
+ }
12
+ const url = new URL(request.url);
13
+ const tag = url.searchParams.get("tag");
14
+ if (!tag) return NextResponse.json({ error: "Missing tag" }, { status: 400 });
15
+ revalidateTag(tag, "max");
16
+ notifyDevReload();
17
+ return NextResponse.json({ ok: true, tag });
18
+ }
19
+ export {
20
+ POST
21
+ };
22
+ //# sourceMappingURL=api-revalidate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/api-revalidate.ts"],"sourcesContent":["import { revalidateTag } from \"next/cache\";\nimport { NextResponse } from \"next/server\";\nimport { notifyDevReload } from \"../dev-reload.js\";\n\nexport async function POST(request: Request) {\n if (process.env.NODE_ENV === \"production\") {\n return NextResponse.json({ error: \"Not found\" }, { status: 404 });\n }\n const secret = process.env.SILICA_REVALIDATE_SECRET;\n if (!secret || request.headers.get(\"x-silica-revalidate-secret\") !== secret) {\n return NextResponse.json({ error: \"Forbidden\" }, { status: 403 });\n }\n const url = new URL(request.url);\n const tag = url.searchParams.get(\"tag\");\n if (!tag) return NextResponse.json({ error: \"Missing tag\" }, { status: 400 });\n revalidateTag(tag, \"max\");\n notifyDevReload();\n return NextResponse.json({ ok: true, tag });\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,eAAsB,KAAK,SAAkB;AAC3C,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,WAAO,aAAa,KAAK,EAAE,OAAO,YAAY,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EAClE;AACA,QAAM,SAAS,QAAQ,IAAI;AAC3B,MAAI,CAAC,UAAU,QAAQ,QAAQ,IAAI,4BAA4B,MAAM,QAAQ;AAC3E,WAAO,aAAa,KAAK,EAAE,OAAO,YAAY,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EAClE;AACA,QAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;AAC/B,QAAM,MAAM,IAAI,aAAa,IAAI,KAAK;AACtC,MAAI,CAAC,IAAK,QAAO,aAAa,KAAK,EAAE,OAAO,cAAc,GAAG,EAAE,QAAQ,IAAI,CAAC;AAC5E,gBAAc,KAAK,KAAK;AACxB,kBAAgB;AAChB,SAAO,aAAa,KAAK,EAAE,IAAI,MAAM,IAAI,CAAC;AAC5C;","names":[]}
@@ -0,0 +1,17 @@
1
+ import { NextResponse } from 'next/server';
2
+
3
+ declare function GET(request: Request): Promise<NextResponse<{
4
+ error: string;
5
+ }> | NextResponse<{
6
+ results: {
7
+ slug: string;
8
+ title: string;
9
+ excerpt: string;
10
+ }[];
11
+ }>>;
12
+ declare function parseTagQuery(query: string): {
13
+ query: string;
14
+ tags: string[];
15
+ };
16
+
17
+ export { GET, parseTagQuery };
@@ -0,0 +1,53 @@
1
+ import path from "node:path";
2
+ import { NextResponse } from "next/server";
3
+ import { loadSearchIndex, querySearchIndex } from "@silicajs/search";
4
+ import { getSilicaRoot } from "../server-data.js";
5
+ const MAX_QUERY_LENGTH = 120;
6
+ const MAX_TAGS = 10;
7
+ const MAX_TAG_LENGTH = 64;
8
+ async function GET(request) {
9
+ const url = new URL(request.url);
10
+ const query = url.searchParams.get("q") ?? "";
11
+ if (query.length > MAX_QUERY_LENGTH) {
12
+ return NextResponse.json({ error: "Query is too long" }, { status: 400 });
13
+ }
14
+ const parsed = parseTagQuery(query);
15
+ const tags = [...url.searchParams.getAll("tag"), ...parsed.tags].slice(0, MAX_TAGS).map((tag) => tag.trim()).filter((tag) => tag.length > 0 && tag.length <= MAX_TAG_LENGTH);
16
+ const loaded = await loadSearchIndex(
17
+ path.join(getSilicaRoot(), "search-index.json")
18
+ );
19
+ const results = querySearchIndex(loaded, parsed.query, { tags, limit: 10 });
20
+ return NextResponse.json({
21
+ results: results.map(({ slug, title, excerpt }) => ({
22
+ slug,
23
+ title,
24
+ excerpt
25
+ }))
26
+ });
27
+ }
28
+ function parseTagQuery(query) {
29
+ const tags = [];
30
+ const withoutOperators = query.replace(
31
+ /(?:^|\s)tag:(#?\S+)/gi,
32
+ (_match, tag) => {
33
+ tags.push(tag);
34
+ return " ";
35
+ }
36
+ );
37
+ const withoutShortcuts = withoutOperators.replace(
38
+ /(?:^|\s)(#\S+)/g,
39
+ (_match, tag) => {
40
+ tags.push(tag);
41
+ return " ";
42
+ }
43
+ );
44
+ return {
45
+ query: withoutShortcuts.replace(/\s+/g, " ").trim(),
46
+ tags
47
+ };
48
+ }
49
+ export {
50
+ GET,
51
+ parseTagQuery
52
+ };
53
+ //# sourceMappingURL=api-search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/api-search.ts"],"sourcesContent":["import path from \"node:path\";\nimport { NextResponse } from \"next/server\";\nimport { loadSearchIndex, querySearchIndex } from \"@silicajs/search\";\nimport { getSilicaRoot } from \"../server-data.js\";\n\nconst MAX_QUERY_LENGTH = 120;\nconst MAX_TAGS = 10;\nconst MAX_TAG_LENGTH = 64;\n\nexport async function GET(request: Request) {\n const url = new URL(request.url);\n const query = url.searchParams.get(\"q\") ?? \"\";\n if (query.length > MAX_QUERY_LENGTH) {\n return NextResponse.json({ error: \"Query is too long\" }, { status: 400 });\n }\n\n const parsed = parseTagQuery(query);\n const tags = [...url.searchParams.getAll(\"tag\"), ...parsed.tags]\n .slice(0, MAX_TAGS)\n .map((tag) => tag.trim())\n .filter((tag) => tag.length > 0 && tag.length <= MAX_TAG_LENGTH);\n const loaded = await loadSearchIndex(\n path.join(getSilicaRoot(), \"search-index.json\"),\n );\n const results = querySearchIndex(loaded, parsed.query, { tags, limit: 10 });\n return NextResponse.json({\n results: results.map(({ slug, title, excerpt }) => ({\n slug,\n title,\n excerpt,\n })),\n });\n}\n\nexport function parseTagQuery(query: string): {\n query: string;\n tags: string[];\n} {\n const tags: string[] = [];\n const withoutOperators = query.replace(\n /(?:^|\\s)tag:(#?\\S+)/gi,\n (_match, tag: string) => {\n tags.push(tag);\n return \" \";\n },\n );\n const withoutShortcuts = withoutOperators.replace(\n /(?:^|\\s)(#\\S+)/g,\n (_match, tag: string) => {\n tags.push(tag);\n return \" \";\n },\n );\n\n return {\n query: withoutShortcuts.replace(/\\s+/g, \" \").trim(),\n tags,\n };\n}\n"],"mappings":"AAAA,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB,wBAAwB;AAClD,SAAS,qBAAqB;AAE9B,MAAM,mBAAmB;AACzB,MAAM,WAAW;AACjB,MAAM,iBAAiB;AAEvB,eAAsB,IAAI,SAAkB;AAC1C,QAAM,MAAM,IAAI,IAAI,QAAQ,GAAG;AAC/B,QAAM,QAAQ,IAAI,aAAa,IAAI,GAAG,KAAK;AAC3C,MAAI,MAAM,SAAS,kBAAkB;AACnC,WAAO,aAAa,KAAK,EAAE,OAAO,oBAAoB,GAAG,EAAE,QAAQ,IAAI,CAAC;AAAA,EAC1E;AAEA,QAAM,SAAS,cAAc,KAAK;AAClC,QAAM,OAAO,CAAC,GAAG,IAAI,aAAa,OAAO,KAAK,GAAG,GAAG,OAAO,IAAI,EAC5D,MAAM,GAAG,QAAQ,EACjB,IAAI,CAAC,QAAQ,IAAI,KAAK,CAAC,EACvB,OAAO,CAAC,QAAQ,IAAI,SAAS,KAAK,IAAI,UAAU,cAAc;AACjE,QAAM,SAAS,MAAM;AAAA,IACnB,KAAK,KAAK,cAAc,GAAG,mBAAmB;AAAA,EAChD;AACA,QAAM,UAAU,iBAAiB,QAAQ,OAAO,OAAO,EAAE,MAAM,OAAO,GAAG,CAAC;AAC1E,SAAO,aAAa,KAAK;AAAA,IACvB,SAAS,QAAQ,IAAI,CAAC,EAAE,MAAM,OAAO,QAAQ,OAAO;AAAA,MAClD;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE;AAAA,EACJ,CAAC;AACH;AAEO,SAAS,cAAc,OAG5B;AACA,QAAM,OAAiB,CAAC;AACxB,QAAM,mBAAmB,MAAM;AAAA,IAC7B;AAAA,IACA,CAAC,QAAQ,QAAgB;AACvB,WAAK,KAAK,GAAG;AACb,aAAO;AAAA,IACT;AAAA,EACF;AACA,QAAM,mBAAmB,iBAAiB;AAAA,IACxC;AAAA,IACA,CAAC,QAAQ,QAAgB;AACvB,WAAK,KAAK,GAAG;AACb,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAO,iBAAiB,QAAQ,QAAQ,GAAG,EAAE,KAAK;AAAA,IAClD;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,24 @@
1
+ declare function generateMetadata(): Promise<{
2
+ title: {
3
+ default: string;
4
+ template: string;
5
+ };
6
+ description: string;
7
+ }>;
8
+ declare function getLayoutProps(): Promise<{
9
+ navigation: {
10
+ entries: {
11
+ slug: string;
12
+ title: string;
13
+ sortKey: string | undefined;
14
+ }[];
15
+ };
16
+ config: {
17
+ title: string;
18
+ description: string;
19
+ baseUrl: string | undefined;
20
+ authEnabled: boolean;
21
+ };
22
+ }>;
23
+
24
+ export { generateMetadata, getLayoutProps };
@@ -0,0 +1,48 @@
1
+ import { cacheLife, cacheTag } from "next/cache";
2
+ import { resolveRuntimeAuthConfig } from "../auth-config.js";
3
+ import {
4
+ loadBuildId,
5
+ loadManifest,
6
+ loadResolvedConfig
7
+ } from "../server-data.js";
8
+ async function generateMetadata() {
9
+ const { config } = await getLayoutProps();
10
+ return {
11
+ title: {
12
+ default: config.title,
13
+ template: `%s \xB7 ${config.title}`
14
+ },
15
+ description: config.description
16
+ };
17
+ }
18
+ async function getLayoutProps() {
19
+ "use cache";
20
+ cacheLife("max");
21
+ const buildId = await loadBuildId();
22
+ cacheTag("build", `build:${buildId}`);
23
+ const [manifest, config] = await Promise.all([
24
+ loadManifest(),
25
+ loadResolvedConfig()
26
+ ]);
27
+ const auth = resolveRuntimeAuthConfig(config);
28
+ return {
29
+ navigation: {
30
+ entries: manifest.entries.filter((entry) => entry.frontmatter.listed !== false).map((entry) => ({
31
+ slug: entry.slug,
32
+ title: entry.menuLabel ?? entry.title,
33
+ sortKey: entry.sortKey
34
+ }))
35
+ },
36
+ config: {
37
+ title: config.title,
38
+ description: config.description,
39
+ baseUrl: config.baseUrl,
40
+ authEnabled: auth.authEnabled
41
+ }
42
+ };
43
+ }
44
+ export {
45
+ generateMetadata,
46
+ getLayoutProps
47
+ };
48
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/layout.tsx"],"sourcesContent":["import { cacheLife, cacheTag } from \"next/cache\";\nimport { resolveRuntimeAuthConfig } from \"../auth-config.js\";\nimport {\n loadBuildId,\n loadManifest,\n loadResolvedConfig,\n} from \"../server-data.js\";\n\nexport async function generateMetadata() {\n const { config } = await getLayoutProps();\n return {\n title: {\n default: config.title,\n template: `%s · ${config.title}`,\n },\n description: config.description,\n };\n}\n\nexport async function getLayoutProps() {\n \"use cache\";\n cacheLife(\"max\");\n const buildId = await loadBuildId();\n cacheTag(\"build\", `build:${buildId}`);\n const [manifest, config] = await Promise.all([\n loadManifest(),\n loadResolvedConfig(),\n ]);\n const auth = resolveRuntimeAuthConfig(config);\n return {\n navigation: {\n entries: manifest.entries\n .filter((entry) => entry.frontmatter.listed !== false)\n .map((entry) => ({\n slug: entry.slug,\n title: entry.menuLabel ?? entry.title,\n sortKey: entry.sortKey,\n })),\n },\n config: {\n title: config.title,\n description: config.description,\n baseUrl: config.baseUrl,\n authEnabled: auth.authEnabled,\n },\n };\n}\n"],"mappings":"AAAA,SAAS,WAAW,gBAAgB;AACpC,SAAS,gCAAgC;AACzC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,eAAsB,mBAAmB;AACvC,QAAM,EAAE,OAAO,IAAI,MAAM,eAAe;AACxC,SAAO;AAAA,IACL,OAAO;AAAA,MACL,SAAS,OAAO;AAAA,MAChB,UAAU,WAAQ,OAAO,KAAK;AAAA,IAChC;AAAA,IACA,aAAa,OAAO;AAAA,EACtB;AACF;AAEA,eAAsB,iBAAiB;AACrC;AACA,YAAU,KAAK;AACf,QAAM,UAAU,MAAM,YAAY;AAClC,WAAS,SAAS,SAAS,OAAO,EAAE;AACpC,QAAM,CAAC,UAAU,MAAM,IAAI,MAAM,QAAQ,IAAI;AAAA,IAC3C,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AACD,QAAM,OAAO,yBAAyB,MAAM;AAC5C,SAAO;AAAA,IACL,YAAY;AAAA,MACV,SAAS,SAAS,QACf,OAAO,CAAC,UAAU,MAAM,YAAY,WAAW,KAAK,EACpD,IAAI,CAAC,WAAW;AAAA,QACf,MAAM,MAAM;AAAA,QACZ,OAAO,MAAM,aAAa,MAAM;AAAA,QAChC,SAAS,MAAM;AAAA,MACjB,EAAE;AAAA,IACN;AAAA,IACA,QAAQ;AAAA,MACN,OAAO,OAAO;AAAA,MACd,aAAa,OAAO;AAAA,MACpB,SAAS,OAAO;AAAA,MAChB,aAAa,KAAK;AAAA,IACpB;AAAA,EACF;AACF;","names":[]}
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function NotAllowedPage(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { NotAllowedPage as default };
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { NotAllowed } from "@silicajs/components";
3
+ function NotAllowedPage() {
4
+ return /* @__PURE__ */ jsx(NotAllowed, {});
5
+ }
6
+ export {
7
+ NotAllowedPage as default
8
+ };
9
+ //# sourceMappingURL=not-allowed.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/not-allowed.tsx"],"sourcesContent":["import { NotAllowed } from \"@silicajs/components\";\n\nexport default function NotAllowedPage() {\n return <NotAllowed />;\n}\n"],"mappings":"AAGS;AAHT,SAAS,kBAAkB;AAEZ,SAAR,iBAAkC;AACvC,SAAO,oBAAC,cAAW;AACrB;","names":[]}
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function NotFoundPage(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { NotFoundPage as default };
@@ -0,0 +1,9 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { NotFound } from "@silicajs/components";
3
+ function NotFoundPage() {
4
+ return /* @__PURE__ */ jsx(NotFound, {});
5
+ }
6
+ export {
7
+ NotFoundPage as default
8
+ };
9
+ //# sourceMappingURL=not-found.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/not-found.tsx"],"sourcesContent":["import { NotFound } from \"@silicajs/components\";\n\nexport default function NotFoundPage() {\n return <NotFound />;\n}\n"],"mappings":"AAGS;AAHT,SAAS,gBAAgB;AAEV,SAAR,eAAgC;AACrC,SAAO,oBAAC,YAAS;AACnB;","names":[]}
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SilicaTheme } from '@silicajs/core/theme';
3
+
4
+ declare function generateStaticParams(): Promise<{
5
+ slug: string[];
6
+ }[]>;
7
+ declare function generateMetadata({ params }: PageProps): Promise<{
8
+ title?: undefined;
9
+ description?: undefined;
10
+ } | {
11
+ title: string;
12
+ description: string | undefined;
13
+ }>;
14
+ type PageProps = {
15
+ params: Promise<{
16
+ slug?: string[];
17
+ }> | {
18
+ slug?: string[];
19
+ };
20
+ };
21
+ declare function VaultContent({ slug, theme, }: {
22
+ slug: string;
23
+ theme: SilicaTheme;
24
+ }): Promise<react_jsx_runtime.JSX.Element>;
25
+
26
+ export { type PageProps, VaultContent, generateMetadata, generateStaticParams };