@@ -13,7 +13,6 @@ import { createProjectWatcher, type ProjectWatcher } from "./fileWatcher.js";
1313import { loadRuntimeSource } from "./runtimeSource.js" ;
1414import { VERSION as version } from "../version.js" ;
1515import {
16- createStudioManualEditsRenderBodyScript ,
1716 createStudioApi ,
1817 createProjectSignature ,
1918 getMimeType ,
@@ -24,8 +23,6 @@ import {
2423import { getElementScreenshotClip } from "@hyperframes/core/studio-api/screenshot-clip" ;
2524import type { ScreenshotClip } from "@hyperframes/core/studio-api/screenshot-clip" ;
2625
27- const STUDIO_MANUAL_EDITS_PATH = ".hyperframes/studio-manual-edits.json" ;
28-
2926// ── Path resolution ─────────────────────────────────────────────────────────
3027
3128function resolveDistDir ( ) : string {
@@ -81,38 +78,6 @@ function resolveRuntimePath(): string {
8178 return builtPath ;
8279}
8380
84- function readStudioManualEditManifestContent ( projectDir : string ) : string {
85- const manifestPath = join ( projectDir , STUDIO_MANUAL_EDITS_PATH ) ;
86- if ( ! existsSync ( manifestPath ) ) return "" ;
87- try {
88- return readFileSync ( manifestPath , "utf-8" ) ;
89- } catch {
90- return "" ;
91- }
92- }
93-
94- async function applyStudioManualEditsToThumbnailPage (
95- page : import ( "puppeteer-core" ) . Page ,
96- manifestContent : string ,
97- activeCompositionPath : string ,
98- ) : Promise < void > {
99- const script = createStudioManualEditsRenderBodyScript ( manifestContent , {
100- activeCompositionPath,
101- } ) ;
102- if ( ! script ) return ;
103- await page . addScriptTag ( { content : script } ) ;
104- }
105-
106- async function reapplyStudioManualEditsToThumbnailPage (
107- page : import ( "puppeteer-core" ) . Page ,
108- ) : Promise < void > {
109- await page . evaluate ( ( ) => {
110- const apply = ( window as Window & { __hfStudioManualEditsApply ?: ( ) => number } )
111- . __hfStudioManualEditsApply ;
112- if ( typeof apply === "function" ) apply ( ) ;
113- } ) ;
114- }
115-
11681// ── Shared thumbnail browser (singleton per process) ────────────────────────
11782// One browser instance is reused across all composition thumbnail requests.
11883// Spawning a new Puppeteer process per request adds 2-5s overhead and causes
@@ -253,16 +218,13 @@ export function createStudioServer(options: StudioServerOptions): StudioServer {
253218 // Continue without — acquireBrowser will try its own resolution
254219 }
255220
256- const manifestContent = readStudioManualEditManifestContent ( opts . project . dir ) ;
257- const manualEditsRenderScript = createStudioManualEditsRenderBodyScript ( manifestContent ) ;
258221 const job = createRenderJob ( {
259222 // opts.fps is already an Fps rational — see vite-config-studio
260223 // adapter for the same convention.
261224 fps : opts . fps ,
262225 quality : opts . quality as "draft" | "standard" | "high" ,
263226 format : opts . format ,
264227 outputResolution : opts . outputResolution ,
265- ...( manualEditsRenderScript ? { renderBodyScripts : [ manualEditsRenderScript ] } : { } ) ,
266228 } ) ;
267229 const startTime = Date . now ( ) ;
268230 const onProgress = ( j : { progress : number ; currentStage ?: string } ) => {
@@ -319,11 +281,8 @@ export function createStudioServer(options: StudioServerOptions): StudioServer {
319281 win . __timeline . seek ( t ) ;
320282 }
321283 } , opts . seekTime ) ;
322- const manifestContent = readStudioManualEditManifestContent ( opts . project . dir ) ;
323- await applyStudioManualEditsToThumbnailPage ( page , manifestContent , opts . compPath ) ;
324284 // Let the seek render settle.
325285 await new Promise ( ( r ) => setTimeout ( r , 200 ) ) ;
326- await reapplyStudioManualEditsToThumbnailPage ( page ) ;
327286 let clip : ScreenshotClip | undefined ;
328287 if ( opts . selector ) {
329288 clip = await page . evaluate ( getElementScreenshotClip , opts . selector , opts . selectorIndex ) ;
0 commit comments