Update environment type definitions and remove generated files. Added new environment variables to ambient.d.ts and dynamic private module. Deleted obsolete generated files including root.js, root.svelte, and client-related files. Updated route metadata and types for improved structure and clarity.

This commit is contained in:
2026-01-22 17:22:57 -06:00
parent f15f7b8e38
commit 4a7f3c192d
27 changed files with 689 additions and 170 deletions
+8 -1
View File
@@ -1,3 +1,10 @@
{
"/": []
"/": [
"src/routes/+page.ts",
"src/routes/+page.server.ts",
"src/routes/+layout.ts",
"src/routes/+layout.server.ts",
"src/routes/+layout.ts",
"src/routes/+layout.server.ts"
]
}
+20 -6
View File
@@ -11,14 +11,28 @@ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Pa
type EnsureDefined<T> = T extends null | undefined ? {} : T;
type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
export type Snapshot<T = any> = Kit.Snapshot<T>;
type PageServerParentData = EnsureDefined<LayoutServerData>;
type PageParentData = EnsureDefined<LayoutData>;
type LayoutRouteId = RouteId | "/" | null
type LayoutParams = RouteParams & { }
type LayoutServerParentData = EnsureDefined<{}>;
type LayoutParentData = EnsureDefined<{}>;
export type PageServerData = null;
export type PageData = Expand<PageParentData>;
export type PageProps = { params: RouteParams; data: PageData }
export type LayoutServerData = null;
export type LayoutData = Expand<LayoutParentData>;
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
export type PageServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
export type ActionData = unknown;
export type PageServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.server.js').load>>>>>>;
export type PageLoad<OutputData extends OutputDataShape<PageParentData> = OutputDataShape<PageParentData>> = Kit.Load<RouteParams, PageServerData, PageParentData, OutputData, RouteId>;
export type PageLoadEvent = Parameters<PageLoad>[0];
export type PageData = Expand<Omit<PageParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.js').load>>>>>>;
export type Action<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Action<RouteParams, OutputData, RouteId>
export type Actions<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Actions<RouteParams, OutputData, RouteId>
export type PageProps = { params: RouteParams; data: PageData; form: ActionData }
export type LayoutServerLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.ServerLoad<LayoutParams, LayoutServerParentData, OutputData, LayoutRouteId>;
export type LayoutServerLoadEvent = Parameters<LayoutServerLoad>[0];
export type LayoutServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.server.js').load>>>>>>;
export type LayoutLoad<OutputData extends Partial<App.PageData> & Record<string, any> | void = Partial<App.PageData> & Record<string, any> | void> = Kit.Load<LayoutParams, LayoutServerData, LayoutParentData, OutputData, LayoutRouteId>;
export type LayoutLoadEvent = Parameters<LayoutLoad>[0];
export type LayoutData = Expand<Omit<LayoutParentData, keyof Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>> & OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+layout.js').load>>>>>>;
export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }
export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
@@ -0,0 +1,12 @@
// @ts-nocheck
// Server-only load function for the root layout.
// Runs only on the server.
// Provides shared data that requires server access (auth, user info, etc.).
import type { LayoutServerLoad } from './$types';
export const load = async ({ locals }: Parameters<LayoutServerLoad>[0]) => {
// Example: Load user session or server-side data here
return {
// Add server-side shared data here
};
};
@@ -0,0 +1,12 @@
// @ts-nocheck
// Universal load function for the root layout.
// Runs on both server and client.
// Provides shared data to all child routes.
import type { LayoutLoad } from './$types';
export const load = async () => {
return {
appName: 'My SvelteKit App'
};
};
;null as any as LayoutLoad;
@@ -0,0 +1,17 @@
// @ts-nocheck
// Server-only load function for the home page.
// Runs only on the server with access to cookies, database, and server APIs.
import type { PageServerLoad } from './$types';
export const load = async ({ cookies }: Parameters<PageServerLoad>[0]) => {
// Example: Access cookies, database, or server APIs here
const visitCount = parseInt(cookies.get('visit-count') || '0', 10);
cookies.set('visit-count', String(visitCount + 1), {
path: '/',
httpOnly: true
});
return {
visitCount
};
};
@@ -0,0 +1,12 @@
// @ts-nocheck
// Universal load function for the home page.
// Runs on both server and client.
// Returns data to the page component.
import type { PageLoad } from './$types';
export const load = async () => {
return {
title: 'Welcome to SvelteKit'
};
};
;null as any as PageLoad;