feat: complete TechLog Studio publication flow

This commit is contained in:
DongHyeonka
2026-08-16 00:35:11 +09:00
parent 9c6906fc6f
commit c5c8b9423c
60 changed files with 2028 additions and 2948 deletions
+2 -6
View File
@@ -9,7 +9,6 @@ import {
} from "react";
import {
createBrowserRouter,
Outlet,
RouterProvider,
type RouteObject,
useLocation,
@@ -30,7 +29,7 @@ import {
import { ChunkRecoveryBoundary } from "../boundaries/chunk-recovery-boundary.tsx";
import { Button, PageHeader } from "../design-system/index.ts";
import { LocaleProvider, useLocale } from "../i18n/index.ts";
import { AppShell } from "../layouts/app-shell.tsx";
import { TECH_LOG_ROUTE_LAYOUTS } from "../../features/tech-log/presentation/tech-log-route-runtime.tsx";
import { useApplication } from "../providers/application-provider.tsx";
import { SessionProvider, useSession } from "../providers/session-provider.tsx";
import { ThemeProvider } from "../providers/theme-provider.tsx";
@@ -459,10 +458,7 @@ export function AppRouter({
createGroupedRouteObjects(
ROUTE_REGISTRY,
ROUTE_RUNTIME,
{
PUBLIC: <AppShell />,
STUDIO: <Outlet />,
},
TECH_LOG_ROUTE_LAYOUTS,
buildId,
ROUTE_CODECS,
),
@@ -1,6 +1,6 @@
import { z } from "zod";
export const PLATFORM_ROUTE_CODECS = {
export const PLATFORM_ROUTE_CODECS = Object.freeze({
none: z.object({}).strict(),
NotFoundSplat: z.object({ "*": z.string().min(1).optional() }).strict(),
} as const;
});
+1 -47
View File
@@ -1,47 +1 @@
import {
lazy,
type ComponentType,
type LazyExoticComponent,
} from "react";
import { PLATFORM_ROUTE_RUNTIME_CONTRACT } from "../../contracts/route-runtime-contract.ts";
type RouteModule = Readonly<{ default: ComponentType }>;
type RouteRuntime = Readonly<{
moduleId: string;
Component: LazyExoticComponent<ComponentType>;
}>;
function runtime(
routeId: keyof typeof PLATFORM_ROUTE_RUNTIME_CONTRACT,
load: () => Promise<RouteModule>,
): RouteRuntime {
return Object.freeze({
moduleId: PLATFORM_ROUTE_RUNTIME_CONTRACT[routeId].moduleId,
Component: lazy(load),
});
}
export const PLATFORM_ROUTE_RUNTIME = {
APP_HOME: runtime("APP_HOME", () => import("../pages/home-page.tsx")),
EXAMPLES_PLATFORM: runtime(
"EXAMPLES_PLATFORM",
() => import("../examples/platform-overview-page.tsx"),
),
EXAMPLES_UI: runtime(
"EXAMPLES_UI",
() => import("../examples/ui-gallery-page.tsx"),
),
EXAMPLES_STATES: runtime(
"EXAMPLES_STATES",
() => import("../examples/state-gallery-page.tsx"),
),
EXAMPLES_AUTH: runtime(
"EXAMPLES_AUTH",
() => import("../examples/auth-example-page.tsx"),
),
NOT_FOUND: runtime(
"NOT_FOUND",
() => import("../pages/not-found-page.tsx"),
),
} satisfies Record<keyof typeof PLATFORM_ROUTE_RUNTIME_CONTRACT, RouteRuntime>;
export const PLATFORM_ROUTE_RUNTIME = Object.freeze({});