mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
e9632ade66
The studio shipped one eager entry chunk of 1,126,473 B gzip. CodeMirror and the markdown renderer were the two largest blocks on that path and neither is needed to paint the shell. - React.lazy the source editor (@codemirror/*, @lezer/*) and the storyboard source view (marked, dompurify), copying the deferred-dependency shape of the mediabunny dynamic import in player/lib/mediaProbe.ts. - Add LazyPanel: one Suspense + error boundary whose fallback fills the panel's slot (h-full w-full flex-1) so opening the editor cannot shift the layout, and whose rejected-chunk state renders a visible retry instead of a blank panel. - manualChunks splits the React runtime and the remaining vendor code out of the app chunk so app-only deploys stop invalidating them for repeat visitors. - tests/e2e/studio-bundle-budget.mjs gates the built artifact with no browser. It measures the entry module plus its modulepreloaded chunks, not the entry file alone: the entry file alone gzips to well under half the eager total and would report a false pass while the browser still downloads all of it. The gate enforces a ratchet just above what we ship today and reports the gap to the 600 KiB target every run. Closing that gap needs the Node-only AST stack (@babel/parser, esprima, acorn, recast, ast-types) out of the browser bundle, where it arrives through @hyperframes/sdk — outside this unit.
104 lines
3.0 KiB
JSON
104 lines
3.0 KiB
JSON
{
|
|
"name": "@hyperframes/studio",
|
|
"version": "0.7.90",
|
|
"description": "",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/heygen-com/hyperframes",
|
|
"directory": "packages/studio"
|
|
},
|
|
"files": [
|
|
"src",
|
|
"dist"
|
|
],
|
|
"type": "module",
|
|
"main": "./src/index.ts",
|
|
"types": "./src/index.ts",
|
|
"exports": {
|
|
".": {
|
|
"browser": "./src/index.ts",
|
|
"bun": "./src/index.ts",
|
|
"import": "./src/index.ts",
|
|
"types": "./src/index.ts"
|
|
},
|
|
"./tailwind-preset": {
|
|
"bun": "./src/styles/tailwind-preset.ts",
|
|
"import": "./src/styles/tailwind-preset.ts",
|
|
"types": "./src/styles/tailwind-preset.ts"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"exports": {
|
|
".": {
|
|
"import": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"./tailwind-preset": {
|
|
"import": "./dist/styles/tailwind-preset.js",
|
|
"types": "./dist/styles/tailwind-preset.d.ts"
|
|
},
|
|
"./package.json": "./package.json"
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "vite build && tsup",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:timeline-virtualization": "TIMELINE_ROW_VIRTUALIZATION=on TIMELINE_ELEMENT_COUNT=50000 node tests/e2e/timeline-virtualization.mjs",
|
|
"test:watch": "vitest",
|
|
"report:sdk-cutover": "bun src/utils/sdkCutoverPolicy.report.ts",
|
|
"test:timeline-default": "bun run test:timeline-virtualization",
|
|
"test:studio-bundle-budget": "vite build && node tests/e2e/studio-bundle-budget.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@codemirror/autocomplete": "^6.20.1",
|
|
"@codemirror/commands": "^6.10.3",
|
|
"@codemirror/lang-css": "^6.3.1",
|
|
"@codemirror/lang-html": "^6.4.9",
|
|
"@codemirror/lang-javascript": "^6.2.2",
|
|
"@codemirror/lang-markdown": "^6.3.4",
|
|
"@codemirror/language": "^6.12.2",
|
|
"@codemirror/search": "^6.6.0",
|
|
"@codemirror/state": "^6.6.0",
|
|
"@codemirror/theme-one-dark": "^6.1.2",
|
|
"@codemirror/view": "6.40.0",
|
|
"@hyperframes/core": "workspace:*",
|
|
"@hyperframes/parsers": "workspace:*",
|
|
"@hyperframes/player": "workspace:*",
|
|
"@hyperframes/sdk": "workspace:*",
|
|
"@hyperframes/studio-server": "workspace:*",
|
|
"@phosphor-icons/react": "^2.1.10",
|
|
"@tanstack/react-virtual": "^3.14.6",
|
|
"bpm-detective": "^2.0.5",
|
|
"dompurify": "^3.2.4",
|
|
"gsap": "^3.13.0",
|
|
"marked": "^14.1.4",
|
|
"mediabunny": "^1.45.3"
|
|
},
|
|
"devDependencies": {
|
|
"@hyperframes/producer": "workspace:*",
|
|
"@types/react": "19",
|
|
"@types/react-dom": "19",
|
|
"@vitejs/plugin-react": "^4.0.0",
|
|
"autoprefixer": "^10.4.0",
|
|
"postcss": "^8.4.0",
|
|
"puppeteer-core": "^25.2.1",
|
|
"tailwindcss": "^3.4.0",
|
|
"tsup": "^8.0.0",
|
|
"typescript": "^5.0.0",
|
|
"vite": "^6.4.2",
|
|
"vitest": "^3.2.4",
|
|
"zustand": "^5.0.0"
|
|
},
|
|
"peerDependencies": {
|
|
"react": "19",
|
|
"react-dom": "19",
|
|
"zustand": "^4.0.0 || ^5.0.0"
|
|
}
|
|
}
|