mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 06:19:21 +00:00
* refactor(studio): remove the storyboard view and its Storyboard/Preview switch * refactor(studio): fold the thumbnail output branches left after the storyboard mode went * docs(studio): drop leftover storyboard references after the view was removed * ci: allow the storyboard view deletions in the no-deletions guard * docs(studio): wrap an over-long comment line in the caption overlay helper * style(studio): reindent App.tsx after the view-mode wrapper was removed
40 lines
1.5 KiB
TypeScript
40 lines
1.5 KiB
TypeScript
import { Hono } from "hono";
|
|
import type { StudioApiAdapter } from "./types.js";
|
|
import { registerProjectRoutes } from "./routes/projects.js";
|
|
import { registerFileRoutes } from "./routes/files.js";
|
|
import { registerPreviewRoutes } from "./routes/preview.js";
|
|
import { registerLintRoutes } from "./routes/lint.js";
|
|
import { registerRenderRoutes } from "./routes/render.js";
|
|
import { registerThumbnailRoutes } from "./routes/thumbnail.js";
|
|
import { registerWaveformRoutes } from "./routes/waveform.js";
|
|
import { registerFontRoutes } from "./routes/fonts.js";
|
|
import { registerRegistryRoutes } from "./routes/registry.js";
|
|
import { registerSelectionRoutes } from "./routes/selection.js";
|
|
import { registerMediaRoutes } from "./routes/media.js";
|
|
import { registerGlobalAssetRoutes } from "./routes/globalAssets.js";
|
|
|
|
/**
|
|
* Create a Hono sub-app with all studio API routes.
|
|
*
|
|
* Both the vite dev server and CLI embedded server mount this app
|
|
* under /api, each providing their own adapter for host-specific behavior.
|
|
*/
|
|
export function createStudioApi(adapter: StudioApiAdapter): Hono {
|
|
const api = new Hono();
|
|
|
|
registerProjectRoutes(api, adapter);
|
|
registerFileRoutes(api, adapter);
|
|
registerPreviewRoutes(api, adapter);
|
|
registerLintRoutes(api, adapter);
|
|
registerRenderRoutes(api, adapter);
|
|
registerThumbnailRoutes(api, adapter);
|
|
registerSelectionRoutes(api, adapter);
|
|
registerMediaRoutes(api, adapter);
|
|
registerWaveformRoutes(api, adapter);
|
|
registerFontRoutes(api);
|
|
registerRegistryRoutes(api, adapter);
|
|
registerGlobalAssetRoutes(api);
|
|
|
|
return api;
|
|
}
|