AI video skill for Claude Code & Codex — cinematic, editable product promos with Remotion: 124 shot recipe cards, 150 motion previews, beat sync, sound design, Motion Workbench & JianYing (CapCut CN) export.
TypeScript agent-skillsai-agentsai-videoclaude-codeclaude-code-skillsclaude-skillscodexmotion-designmotion-graphicsproduct-videopromo-videoremotionvideo-generationvideo-production
为工作台增加可选主题侧栏、配色编辑与保存导入导出 (#80)
lynnxa1ec677cb465
diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.ymlindex 837d871..0b74efe 100644--- a/.github/workflows/pr-checks.yml+++ b/.github/workflows/pr-checks.yml@@ -152,6 +152,8 @@ jobs:# template/ has no node_modules in CI; borrow the workbench's (same remotion / react pins)ln -s ../workbench/node_modules template/node_modulescd template && ../workbench/node_modules/.bin/tsc --noEmit -p tsconfig.json+ - name: Theme and palette regressions+ run: npm --prefix workbench run test:themesdemo-smoke:runs-on: ubuntu-latestdiff --git a/README.md b/README.mdindex 13a9440..a298dbb 100644--- a/README.md+++ b/README.md@@ -31,6 +31,8 @@ beat-synced cuts, and film-grade SFX included.## ✨ What's new+- **One-click film themes:** switch the template between Ink Press, Modern Light, Midnight, Sage, Coral, Iris, Deep Ocean, Obsidian Violet, and Vintage Kraft in the workbench while keeping your edits. [Theme guide](template/THEMES.md).+> [!IMPORTANT]> ### 🔥 2026-08 · New in the series: **video-talkcraft**, for narration videos> [**video-talkcraft**](https://github.com/Vincentwei1021/video-talkcraft) is thediff --git a/README_CN.md b/README_CN.mdindex ee46131..a00c802 100644--- a/README_CN.md+++ b/README_CN.md@@ -27,6 +27,8 @@和声音设计,产出一支电影感的宣传片 / 营销视频 / 发布视频 / 功能演示——真实页面截图、2.5D 运镜、节奏卡点和电影级 SFX 全部包含。+模板支持在工作台中一键切换 **纸质 / 现代浅色 / 暗黑 / 清新鼠尾草 / 珊瑚点缀 / 柔和鸢尾 / 深海蓝 / 黑曜紫 / 复古牛皮纸**,保留文案与剪辑,预览和导出使用同一主题。[主题使用说明](template/THEMES.md)。+🖼️ [**在线 Gallery:浏览全部 214 条动态样片 »**](https://vincentwei1021.github.io/video-shotcraft/)## ✨ 最近更新diff --git a/template/THEMES.md b/template/THEMES.mdnew file mode 100644index 0000000..9d82518--- /dev/null+++ b/template/THEMES.md@@ -0,0 +1,44 @@+# Visual themes and palette editing++Open the **主题 (Themes)** tab in the existing left sidebar. Its upper section selects a preset; its lower section edits background, card surface, text, secondary text, accent, subtle fill, and border colors using a color picker or a six-digit HEX value. Press Enter or leave the HEX field to apply it. Invalid input is discarded.++Presets: Ink Press, Modern Light, Midnight, Sage, Coral, Iris, Deep Ocean, Obsidian Violet, and Vintage Kraft. Sage, Coral, and Iris replace the earlier bright experiments with pale surfaces and restrained accents. Their existing IDs (`solar-pop`, `coral-burst`, `color-play`) remain compatible with saved projects. Coral's neutral surface / dark violet text / coral accent direction draws on [Happy Hues](https://www.happyhues.co/); values are adapted for this fixture, not an exact copy of a complete site.++- `themeId` and optional `themeColors` are stored in project JSON and browser saves. Changes support undo/redo. A continuous color-picker gesture creates one undo step and keeps the current clip selected.+- Selecting another preset clears palette overrides; **恢复预设** clears them for the current preset. Explicit per-clip edits remain intact and take precedence.+- Ink Press preserves its original raster screenshots and has no palette editor. Select another preset to recolor both the film and its demo UI assets.+- Editable presets preserve the weekly heading in the report-header band and use compact 36px captions near the bottom. Explicit per-clip text, size, and position edits still take precedence.+- Themes apply to the adapted template scenes. Ordinary Gallery cards and the editor's own chrome are not globally recolored.+- Old projects without a theme marker are normalized once; explicit edits are never inferred or discarded after migration.++## Single palette source++`src/themes/palettes.json` defines the seven semantic colors per editable preset. Both the scene adapter and `themes/ui.cjs` read it. Add the palette, its type ID, and a manifest label to add a preset using the same fixture. No copied scene tree is needed.++`src/themes/palette-assets.json` contains five trusted, serialized demo pages and 27 crop definitions. Runtime SVG assets embed this markup using `foreignObject` and validated HEX variables. The same renderer is used in preview and video export, with a bounded cache. Editing colors does not invoke a capture service or recolor pixels with a filter. Third-party screenshots still require a separately adapted source.++After changing fixture markup or geometry, run `node scripts/build-palette-assets.cjs` from `template/`. It requires Playwright in the development environment. `SHOTCRAFT_PLAYWRIGHT` and `SHOTCRAFT_BROWSER` can select an existing module and Chromium executable. The compiled JSON is committed, so end users do not need these tools.++The optional manifest additions are `themes[].palette` and `paletteProp`, alongside `themes`, `defaultTheme`, `themeProp`, and each unit's `themeKey`. Props resolve schema defaults → preset defaults → project palette → explicit clip edits. Manifests without palette support keep their existing behavior.++## Direct render++The existing `AiflPromo` composition accepts `theme` and optional `colors`:++```json+{"theme":"coral-burst","colors":{"accent":"#2459ad","surface":"#e1ecff"}}+```++Save this as a props JSON and pass it to `npm run render -- --props=<file>`. Workbench exports instead carry `project.themeId` and `project.themeColors`. Missing or unknown preset IDs fall back to Ink Press.++## Verification and provenance++After installing dependencies in both `workbench/` and `template/`, run `npm run test:themes` and `npx tsc --noEmit` from `workbench/`, and `npx tsc --noEmit` from `template/`. Tests cover custom palette validation and precedence, reset, edit preservation, legacy saves, unthemed projects, palette history, preserved weekly copy, caption defaults, and separate light/accent/shadow roles. Browser/export validation results are recorded in PR #80.++The fixture describes a fictional research workspace, not a connected service or real research results. Original assets retain their existing attribution/license terms; new fixture code and derived assets use this repository's Apache-2.0 license.++## Save, import and export palettes++Name a palette and click **保存配色** to add it to **我的主题**. These entries live in this browser's local storage, scoped to the current manifest name (up to 50 entries); they are separate from the project timeline. Click an entry to apply it, or its × button to remove it. Export a JSON file to back it up or move it to another browser.++**导入配色** accepts version-1 `shotcraft-palette` JSON exported by this panel, validates the compatible base theme and complete HEX fields, and applies it without changing timeline edits. Click Save afterward to add the imported palette to My Themes. Arbitrary color-site JSON schemas are not yet supported. **导出配色** downloads the current palette, name and base theme ID. Vintage Kraft (`vintage-kraft`) preserves its procedural paper texture when its palette is saved or imported.diff --git a/template/scripts/build-palette-assets.cjs b/template/scripts/build-palette-assets.cjsnew file mode 100644index 0000000..6ebd3fb--- /dev/null+++ b/template/scripts/build-palette-assets.cjs@@ -0,0 +1,33 @@+// Compile trusted fixture markup once. Runtime recoloring uses only validated hex tokens.+const fs=require('node:fs'),path=require('node:path');+const {render}=require('../themes/ui.cjs');+const L=require('../src/aifl/live-layout.json');+const {chromium}=require(process.env.SHOTCRAFT_PLAYWRIGHT || 'playwright');+(async()=>{+ const browser=await chromium.launch({executablePath:process.env.SHOTCRAFT_BROWSER,headless:true});+ try {+ const page=await browser.newPage(); const pages={};+ for(const kind of ['projects','detail','papers','wbr','experiments']){+ await page.setContent(render('modern-light',kind,L));+ pages[kind]=await page.evaluate(()=>{+ const wrapper=document.createElement('div');+ wrapper.setAttribute('xmlns','http://www.w3.org/1999/xhtml');+ wrapper.className='palette-page';+ const style=document.querySelector('style').cloneNode(true);+ style.textContent=style.textContent.replace(/:root\{[^}]*\}/,'').replace(/\bbody\b/g,'.palette-page');+ wrapper.append(style,document.querySelector('main').cloneNode(true));+ return new XMLSerializer().serializeToString(wrapper);+ });+ }+ const clips={};+ const add=(name,kind,b,empty=false)=>{clips[name]={kind,x:Math.round(b.x),y:Math.round(b.y),w:Math.round(b.x+b.w)-Math.round(b.x),h:Math.round(b.y+b.h)-Math.round(b.y),empty}};+ add('projects-full.png','projects',{x:0,y:0,w:L.pageW,h:L.projects.pageH});+ add('projects-empty.png','projects',{x:0,y:0,w:L.pageW,h:L.projects.pageH},true);+ for(const b of [...L.projects.cards,...L.float])add(b.file,'projects',b);+ add('nav.png','projects',L.projects.header);add('card4-hires.png','projects',L.projects.cards[3]);+ for(const [name,kind,h] of [['detail-full.png','detail',L.detail.pageH],['detail-experiments.png','experiments',L.detail.expPageH],['papers-full.png','papers',L.papers.pageH],['wbr-full.png','wbr',L.wbr.pageH]])add(name,kind,{x:0,y:0,w:L.pageW,h});+ L.papers.cards.forEach((b,i)=>add(`paper${i+1}.png`,'papers',b));+ fs.writeFileSync(path.join(__dirname,'../src/themes/palette-assets.json'),JSON.stringify({pages,clips})+'\n');+ console.log(`Compiled ${Object.keys(clips).length} recolorable assets from ${Object.keys(pages).length} pages`);+ }finally{await browser.close()}+})().catch(e=>{console.error(e);process.exitCode=1});diff --git a/template/src/Root.tsx b/template/src/Root.tsxindex 97160f7..978d073 100644--- a/template/src/Root.tsx+++ b/template/src/Root.tsx@@ -1,11 +1,13 @@import { Composition } from 'remotion';-import { AiflMain, AIFL_TOTAL } from './aifl/Main';+import { AIFL_TOTAL } from './aifl/Main';+import { ThemedFilm } from './themes/ThemedFilm';export const Root: React.FC = () => {return (<Compositionid="AiflPromo"- component={AiflMain}+ component={ThemedFilm}+ defaultProps={{theme: 'ink-press'}}durationInFrames={AIFL_TOTAL}fps={30}width={1920}diff --git a/template/src/aifl/Caption.tsx b/template/src/aifl/Caption.tsxindex 32f3144..a437595 100644--- a/template/src/aifl/Caption.tsx+++ b/template/src/aifl/Caption.tsx@@ -1,9 +1,10 @@+import { useVisualTheme, sceneDefaults } from '../themes/visual-theme';import { interpolate, useCurrentFrame } from 'remotion';-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';/** Context-level defaults, editable per clip in the workbench (hex = sRGB of the oklch tokens). */export const CAPTION_DEFAULTS = {+ bottom: 72,fontSize: 22,color: '#575552', // oklch(45% 0.006 82)accent: '#955905', // oklch(52% 0.115 65)@@ -19,14 +20,12 @@ export const Caption: React.FC<{fontSize?: number;color?: string;accent?: string;-}> = ({- text,- duration,- bottom = 72,- fontSize = CAPTION_DEFAULTS.fontSize,- color = CAPTION_DEFAULTS.color,- accent = CAPTION_DEFAULTS.accent,-}) => {+}> = (props) => {+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const {text, duration, ...style} = props;+ const {fontSize, color, accent, bottom} = {...sceneDefaults(theme, 'caption', CAPTION_DEFAULTS), ...style};const frame = useCurrentFrame();const inT = interpolate(frame, [0, 8], [0, 1], {extrapolateLeft: 'clamp',@@ -50,11 +49,12 @@ export const Caption: React.FC<{gap: 14,fontFamily: MONO,fontSize,- letterSpacing: '0.14em',+ letterSpacing: paperStyle ? '0.14em' : '0.015em',+ ...(!paperStyle ? {left: '50%', right: 'auto', width: 'max-content', maxWidth: '90%', padding: '8px 18px', borderRadius: 8, background: theme.surface, border: `1px solid ${theme.border}`, fontWeight: 500, lineHeight: 1.2} : {}),textTransform: 'uppercase',color,opacity: inT * outT,- transform: `translateY(${(1 - inT) * 8}px)`,+ transform: paperStyle ? `translateY(${(1 - inT) * 8}px)` : `translate(-50%, ${(1 - inT) * 8}px)`,pointerEvents: 'none',}}>diff --git a/template/src/aifl/DigitRoll.tsx b/template/src/aifl/DigitRoll.tsxindex 718ae2d..4814491 100644--- a/template/src/aifl/DigitRoll.tsx+++ b/template/src/aifl/DigitRoll.tsx@@ -1,3 +1,4 @@+import { useVisualTheme } from '../themes/visual-theme';import { interpolate, useCurrentFrame, Easing } from 'remotion';const DIGITS = '0123456789';@@ -9,10 +10,13 @@ export const DigitRoll: React.FC<{fontSize?: number;color?: string;}> = ({ value, delay = 0, fontSize = 30, color = 'oklch(52% 0.115 65)' }) => {+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+const frame = useCurrentFrame();const lineH = fontSize * 1.15;return (- <span style={{ display: 'inline-flex', overflow: 'hidden', height: lineH, verticalAlign: 'bottom' }}>+ <span style={{ fontFamily: paperStyle ? undefined : theme.font, display: 'inline-flex', overflow: 'hidden', height: lineH, verticalAlign: 'bottom' }}>{value.split('').map((ch, i) => {const target = DIGITS.indexOf(ch);if (target < 0) {diff --git a/template/src/aifl/FlashCut.tsx b/template/src/aifl/FlashCut.tsxindex 8febf8d..fad369d 100644--- a/template/src/aifl/FlashCut.tsx+++ b/template/src/aifl/FlashCut.tsx@@ -1,9 +1,14 @@+import { useVisualTheme, themePaint } from '../themes/visual-theme';import { AbsoluteFill, interpolate, useCurrentFrame } from 'remotion';/** Bright-field cut: a warm-white bloom that flashes over the hard cut. */export const FlashCut: React.FC<{ duration?: number }> = ({ duration = 10 }) => {+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+const frame = useCurrentFrame();- const o = interpolate(frame, [0, duration * 0.4, duration], [0, 0.85, 0], {+ const o = interpolate(frame, [0, duration * 0.4, duration], [0, paperStyle ? 0.85 : 0.24, 0], {extrapolateLeft: 'clamp',extrapolateRight: 'clamp',});@@ -12,7 +17,7 @@ export const FlashCut: React.FC<{ duration?: number }> = ({ duration = 10 }) =>style={{pointerEvents: 'none',opacity: o,- background: 'radial-gradient(ellipse at 50% 45%, rgba(255,248,235,0.98), rgba(255,244,224,0.55) 55%, transparent 80%)',+ background: paint('radial-gradient(ellipse at 50% 45%, rgba(255,248,235,0.98), rgba(255,244,224,0.55) 55%, transparent 80%)'),}}/>);diff --git a/template/src/aifl/Main.tsx b/template/src/aifl/Main.tsxindex 21110a0..4a78a94 100644--- a/template/src/aifl/Main.tsx+++ b/template/src/aifl/Main.tsx@@ -1,4 +1,5 @@-import { AbsoluteFill, Audio, Sequence, staticFile } from 'remotion';+import { useVisualTheme, themePaint, themeAsset } from '../themes/visual-theme';+import { AbsoluteFill, Audio, Sequence } from 'remotion';import { SceneOpen } from './live/SceneOpen';import { SceneFlyIn } from './live/SceneFlyIn';import { SceneDetail } from './live/SceneDetail';@@ -114,8 +115,12 @@ export const SFX: { from: number; src: string; volume: number }[] = [];export const AiflMain: React.FC = () => {+ const theme = useVisualTheme();+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+return (- <AbsoluteFill style={{ backgroundColor: '#f2eee6' }}>+ <AbsoluteFill style={{ backgroundColor: paint('#f2eee6') }}>{/* beat-pinned promo sound effects (no music bed — SFX only) */}{SFX.map((s, i) => (<Sequence@@ -123,7 +128,7 @@ export const AiflMain: React.FC = () => {from={s.from}durationInFrames={sfxDuration(s)}>- <Audio src={staticFile(`audio/${s.src}`)} volume={s.volume} />+ <Audio src={asset(`audio/${s.src}`)} volume={s.volume} /></Sequence>))}<Sequence from={AIFL_SHOTS.morning.from} durationInFrames={AIFL_SHOTS.morning.duration}>diff --git a/template/src/aifl/PaperTitleCard.tsx b/template/src/aifl/PaperTitleCard.tsxindex 11f79d1..ed5af52 100644--- a/template/src/aifl/PaperTitleCard.tsx+++ b/template/src/aifl/PaperTitleCard.tsx@@ -1,8 +1,7 @@+import { useVisualTheme, themePaint, sceneDefaults } from '../themes/visual-theme';import { AbsoluteFill, interpolate, useCurrentFrame, Easing } from 'remotion';import { DigitRoll } from './DigitRoll';-const SERIF = 'ui-serif, Georgia, "Times New Roman", serif';-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';/** Context-level defaults (copy size / palette). Exposed as props so the* workbench can edit them per clip; the motion timing stays fixed. Hex values@@ -29,14 +28,14 @@ export const PaperTitleCard: React.FC<{accent?: string;muted?: string;paper?: string;-}> = ({- duration, words, sub, subDigits,- fontSize = TITLE_CARD_DEFAULTS.fontSize,- ink = TITLE_CARD_DEFAULTS.ink,- accent = TITLE_CARD_DEFAULTS.accent,- muted = TITLE_CARD_DEFAULTS.muted,- paper = TITLE_CARD_DEFAULTS.paper,-}) => {+}> = (props) => {+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const SERIF = paperStyle ? 'ui-serif, Georgia, "Times New Roman", serif' : theme.font;+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const {duration, words, sub, subDigits, ...style} = props;+ const {fontSize, ink, accent, muted, paper} = {...sceneDefaults(theme, 'title-card', TITLE_CARD_DEFAULTS), ...style};const frame = useCurrentFrame();const fadeOut = interpolate(frame, [duration - 8, duration], [1, 0], {extrapolateLeft: 'clamp',@@ -59,7 +58,7 @@ export const PaperTitleCard: React.FC<{justifyContent: 'center',alignItems: 'center',opacity: fadeOut,- backgroundImage: 'radial-gradient(1100px 750px at 50% 42%, oklch(99.3% 0.014 88 / 0.85), transparent 65%)',+ backgroundImage: paint('radial-gradient(1100px 750px at 50% 42%, oklch(99.3% 0.014 88 / 0.85), transparent 65%)'),}}><div style={{ textAlign: 'center', maxWidth: 1500 }}>@@ -85,7 +84,7 @@ export const PaperTitleCard: React.FC<{transform: `scale(${1.28 - 0.28 * t})`,filter: `blur(${(1 - t) * 7}px)`,display: 'inline-block',- fontStyle: w.accent ? 'italic' : 'normal',+ fontStyle: paperStyle && w.accent ? 'italic' : 'normal',color: w.accent ? accent : undefined,}}>@@ -101,8 +100,8 @@ export const PaperTitleCard: React.FC<{}}/>{sub ? (- <div style={{ fontFamily: MONO, fontSize: 26, letterSpacing: '0.12em', color: muted, marginTop: 34, opacity: subT, textTransform: 'uppercase', display: 'flex', justifyContent: 'center', alignItems: 'baseline', gap: '0.5em' }}>- {subDigits ? <DigitRoll value={subDigits} delay={12} fontSize={26} color={accent} /> : null}+ <div style={{ fontFamily: MONO, fontSize: paperStyle ? 26 : 44, letterSpacing: '0.12em', color: muted, marginTop: 34, opacity: subT, textTransform: 'uppercase', display: 'flex', justifyContent: 'center', alignItems: 'baseline', gap: '0.5em' }}>+ {subDigits ? <DigitRoll value={subDigits} delay={12} fontSize={paperStyle ? 26 : 44} color={accent} /> : null}<span>{sub}</span></div>) : null}diff --git a/template/src/aifl/live/PageCam.tsx b/template/src/aifl/live/PageCam.tsxindex 2e58041..7a62a7d 100644--- a/template/src/aifl/live/PageCam.tsx+++ b/template/src/aifl/live/PageCam.tsx@@ -1,3 +1,4 @@+import { useVisualTheme, themePaint, themeAsset } from '../../themes/visual-theme';import { AbsoluteFill, Img, interpolate, staticFile, useCurrentFrame, Easing } from 'remotion';export type CamKey = {@@ -35,6 +36,10 @@ export const PageCam: React.FC<{ease?: (t: number) => number;dof?: { focusY: number; strength: number };}> = ({ src, pageH, keys, children, blur = 0, saturate = 1, ease = Easing.bezier(0.33, 0, 0.15, 1), dof }) => {+ const theme = useVisualTheme();+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+const frame = useCurrentFrame();// find segmentlet a = keys[0], b = keys[keys.length - 1];@@ -57,7 +62,7 @@ export const PageCam: React.FC<{if (!has3D) {return (- <AbsoluteFill style={{ overflow: 'hidden', backgroundColor: '#faf7f2' }}>+ <AbsoluteFill style={{ overflow: 'hidden', backgroundColor: paint('#faf7f2') }}><divstyle={{position: 'absolute', width: 1920, height: pageH,@@ -66,7 +71,7 @@ export const PageCam: React.FC<{filter: filters.length ? filters.join(' ') : undefined,}}>- <Img src={staticFile(src)} style={{ position: 'absolute', width: 1920, height: pageH }} />+ <Img src={asset(src)} style={{ position: 'absolute', width: 1920, height: pageH }} />{children}</div></AbsoluteFill>@@ -82,7 +87,7 @@ export const PageCam: React.FC<{const persp = lerp(a.persp ?? 1400, b.persp ?? 1400, t);return (- <AbsoluteFill style={{ overflow: 'hidden', backgroundColor: '#faf7f2' }}>+ <AbsoluteFill style={{ overflow: 'hidden', backgroundColor: paint('#faf7f2') }}><divstyle={{position: 'absolute', inset: 0,@@ -117,7 +122,7 @@ export const PageCam: React.FC<{filter: filters.length ? filters.join(' ') : undefined,}}>- <Img src={staticFile(src)} style={{ position: 'absolute', width: 1920, height: pageH }} />+ <Img src={asset(src)} style={{ position: 'absolute', width: 1920, height: pageH }} />{children}</div></div>@@ -134,8 +139,8 @@ export const PageCam: React.FC<{height: Math.max(0, dof.focusY),backdropFilter: `blur(${dof.strength}px)`,WebkitBackdropFilter: `blur(${dof.strength}px)`,- maskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)',- WebkitMaskImage: 'linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)',+ maskImage: paint('linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)'),+ WebkitMaskImage: paint('linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 45%, rgba(0,0,0,0) 100%)'),pointerEvents: 'none',}}/>diff --git a/template/src/aifl/live/SceneDetail.tsx b/template/src/aifl/live/SceneDetail.tsxindex ecc88bc..9188905 100644--- a/template/src/aifl/live/SceneDetail.tsx+++ b/template/src/aifl/live/SceneDetail.tsx@@ -1,5 +1,6 @@+import { useVisualTheme, themePaint, themeAsset, sceneDefaults } from '../../themes/visual-theme';import React from 'react';-import { interpolate, staticFile, useCurrentFrame, Easing } from 'remotion';+import { interpolate, useCurrentFrame, Easing } from 'remotion';import { PageCam, CamKey } from './PageCam';import layout from '../live-layout.json';@@ -14,7 +15,6 @@ const DETAIL_CAM: CamKey[] = [];const FLY_EASE = Easing.bezier(0.3, 0, 0.25, 1);-const detailSrc = staticFile('textures/live/detail-full.png');/** Context-level defaults, editable per clip in the workbench. */export const SCENE_DETAIL_DEFAULTS = {@@ -25,7 +25,12 @@ type SceneDetailProps = Partial<typeof SCENE_DETAIL_DEFAULTS>;/** Open on the nano-lab detail page, then pan down while the* research-question rows fly in from the air and embed into their slots. */export const SceneDetail: React.FC<SceneDetailProps> = (props) => {- const { accent } = { ...SCENE_DETAIL_DEFAULTS, ...props };+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+ const detailSrc = asset('textures/live/detail-full.png');+ const { accent } = { ...sceneDefaults(theme, 'macro', SCENE_DETAIL_DEFAULTS), ...props };const frame = useCurrentFrame();const df = frame;@@ -52,7 +57,7 @@ export const SceneDetail: React.FC<SceneDetailProps> = (props) => {top: r.y - 4,width: r.w + 24,height: r.h + 8,- background: '#fdfcfa',+ background: paperStyle ? '#fdfcfa' : theme.surface,opacity: patchOpacity,zIndex: 1,pointerEvents: 'none',@@ -93,13 +98,13 @@ export const SceneDetail: React.FC<SceneDetailProps> = (props) => {width: r.w,height: r.h,borderRadius: 8,- backgroundColor: '#fff',+ backgroundColor: paint('#fff'),backgroundImage: `url(${detailSrc})`,backgroundSize: `1920px ${DETAIL_H}px`,backgroundPosition: `-${r.x}px -${r.y}px`,opacity: appear,transform: `perspective(900px) translateY(${-120 * air}px) rotateX(${16 * air}deg) scale(${scale})`,- boxShadow: `0 ${30 * air}px ${60 * air}px rgba(30,25,18,${0.22 * air}), 0 ${8 * air}px ${16 * air}px rgba(30,25,18,${0.12 * air})`,+ boxShadow: paint(`0 ${30 * air}px ${60 * air}px rgba(30,25,18,${0.22 * air}), 0 ${8 * air}px ${16 * air}px rgba(30,25,18,${0.12 * air})`),zIndex: 3,pointerEvents: 'none',}}@@ -131,7 +136,7 @@ export const SceneDetail: React.FC<SceneDetailProps> = (props) => {width: seamW,height: 2,background: accent,- boxShadow: '0 0 6px rgba(180,120,50,0.35)',+ boxShadow: paint('0 0 6px rgba(180,120,50,0.35)'),opacity: seamOpacity,zIndex: 4,pointerEvents: 'none',diff --git a/template/src/aifl/live/SceneFlyIn.tsx b/template/src/aifl/live/SceneFlyIn.tsxindex b2fc858..753224e 100644--- a/template/src/aifl/live/SceneFlyIn.tsx+++ b/template/src/aifl/live/SceneFlyIn.tsx@@ -1,4 +1,5 @@-import { Img, interpolate, staticFile, useCurrentFrame, Easing, getRemotionEnvironment } from 'remotion';+import { useVisualTheme, themePaint, themeAsset, sceneDefaults } from '../../themes/visual-theme';+import { Img, interpolate, useCurrentFrame, Easing, getRemotionEnvironment } from 'remotion';import { PageCam, CamKey } from './PageCam';import layout from '../live-layout.json';@@ -11,8 +12,6 @@ const DIVE_EASE = Easing.bezier(0.3, 0, 0.2, 1); // decelerate into the hoverconst SLIDE_EASE = Easing.bezier(0.35, 0, 0.2, 1); // nano-lab card slide to the top slot// page paper colors, sampled from the rendered projects-empty texture-const PAPER = '#f9f6f1'; // page background (bottom rows)-const FIELD = '#fefcf9'; // search-box interior// ---- 16 "overflow" extras extend the grid DOWNWARD (no hovering, no overlap):// fill the empty 3rd column of the y=1402 row, then five new rows below the@@ -54,7 +53,6 @@ const METAL_FADE = [34, 56] as const;// dark table and white page (measured: ~20 blank-outs in the first 2s). A flat fill needs// no raster at all. Same geometry, same fade — only the paint differs; the render still// paints the brushed metal. Tone = median of the rendered table (#373637 sampled).-const METAL_PREVIEW = '#383638';const grid = [...cards.map((c) => ({ file: c.file, x: c.x, y: c.y, w: c.w, h: c.h, title: c.title })),@@ -121,7 +119,14 @@ const CAM_KEYS: CamKey[] = [];export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {- const { query: QUERY, accent } = { ...SCENE_FLYIN_DEFAULTS, ...props };+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+ const PAPER = paint('#f9f6f1'); // page background (bottom rows)+ const FIELD = paint('#fefcf9'); // search-box interior+ const METAL_PREVIEW = paint('#383638');+ const { query: QUERY, accent } = { ...sceneDefaults(theme, 'table', SCENE_FLYIN_DEFAULTS), ...props };const frame = useCurrentFrame();const { isRendering } = getRemotionEnvironment();@@ -163,14 +168,14 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {opacity: interpolate(frame, [METAL_FADE[0], METAL_FADE[1]], [1, 0], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp',}),- background: isRendering ? [+ background: !paperStyle ? theme.stage : isRendering ? [// warm key light pooled on the pile- `radial-gradient(1300px 900px at ${3000 + PILE_CX}px ${3000 + PILE_CY}px, rgba(255,214,150,0.20), rgba(255,190,120,0.06) 40%, transparent 68%)`,+ paint(`radial-gradient(1300px 900px at ${3000 + PILE_CX}px ${3000 + PILE_CY}px, rgba(255,214,150,0.20), rgba(255,190,120,0.06) 40%, transparent 68%)`),// brushed-metal grain: fine anisotropic streaks- 'repeating-linear-gradient(100deg, rgba(255,255,255,0.028) 0px, rgba(255,255,255,0.028) 1px, transparent 2px, transparent 7px)',- 'repeating-linear-gradient(100deg, rgba(0,0,0,0.16) 0px, rgba(0,0,0,0.16) 2px, transparent 4px, transparent 13px)',+ paint('repeating-linear-gradient(100deg, rgba(255,255,255,0.028) 0px, rgba(255,255,255,0.028) 1px, transparent 2px, transparent 7px)'),+ paint('repeating-linear-gradient(100deg, rgba(0,0,0,0.16) 0px, rgba(0,0,0,0.16) 2px, transparent 4px, transparent 13px)'),// broad steel sheen- 'linear-gradient(115deg, #2a2d33 0%, #383c44 28%, #22242a 55%, #33363e 78%, #1d1f24 100%)',+ paint('linear-gradient(115deg, #2a2d33 0%, #383c44 28%, #22242a 55%, #33363e 78%, #1d1f24 100%)'),].join(', ') : METAL_PREVIEW,pointerEvents: 'none',}}@@ -287,12 +292,12 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {// shadow: stacked cards carry almost none (they sit on each other),// airborne large/soft, tight when flush, widening on the slideconst shadow = isNano && frame >= FILTER_START- ? `0 ${2 + 14 * float}px ${6 + 26 * float}px rgba(60,45,30,${0.08 + 0.1 * float})`+ ? paint(`0 ${2 + 14 * float}px ${6 + 26 * float}px rgba(60,45,30,${0.08 + 0.1 * float})`): landed- ? '0 2px 6px rgba(60,45,30,.08)'+ ? paint('0 2px 6px rgba(60,45,30,.08)'): inPile- ? '0 1px 3px rgba(60,45,30,.14)'- : `0 ${36 - 30 * settleT}px ${70 - 60 * settleT}px rgba(60,45,30,${0.3 - 0.22 * settleT})`;+ ? paint('0 1px 3px rgba(60,45,30,.14)')+ : paint(`0 ${36 - 30 * settleT}px ${70 - 60 * settleT}px rgba(60,45,30,${0.3 - 0.22 * settleT})`);// motion-blur ghost during the deal: a faint blurred copy trailing the flight pathconst showGhost = diveT > 0.02 && diveT < 0.98;@@ -319,7 +324,7 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {}}><Img- src={staticFile(`textures/live/${c.file}`)}+ src={asset(`textures/live/${c.file}`)}style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', display: 'block' }}/></div>@@ -341,7 +346,7 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {}}><Img- src={staticFile(`textures/live/${c.file}`)}+ src={asset(`textures/live/${c.file}`)}style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', display: 'block' }}/></div>@@ -376,10 +381,10 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {height: SEARCH.h,display: 'flex',alignItems: 'center',- fontFamily: 'ui-sans-serif, system-ui, -apple-system, sans-serif',+ fontFamily: (paperStyle ? 'ui-sans-serif, system-ui, -apple-system, sans-serif' : theme.font),fontSize: 15,letterSpacing: 0.2,- color: 'oklch(25% 0.006 82)',+ color: paint('oklch(25% 0.006 82)'),pointerEvents: 'none',}}>@@ -435,7 +440,7 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {height: nano.h + 12,borderRadius: 16,border: `3px solid ${accent}`,- boxShadow: '0 0 40px rgba(180,120,50,0.5)',+ boxShadow: paint('0 0 40px rgba(180,120,50,0.5)'),opacity: interpolate(frame, [178, 181], [0.5, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp',}),@@ -452,7 +457,7 @@ export const SceneFlyIn: React.FC<SceneFlyInProps> = (props) => {right: 0,top: PAPER_EXT.y + PAPER_EXT.h - 8,height: 8,- background: 'rgba(255,255,255,0.85)',+ background: paint('rgba(255,255,255,0.85)'),filter: 'blur(6px)',opacity: 0.5,pointerEvents: 'none',diff --git a/template/src/aifl/live/SceneOpen.tsx b/template/src/aifl/live/SceneOpen.tsxindex fe94f9d..cd4fe61 100644--- a/template/src/aifl/live/SceneOpen.tsx+++ b/template/src/aifl/live/SceneOpen.tsx@@ -1,10 +1,9 @@-import { AbsoluteFill, Img, interpolate, staticFile, useCurrentFrame, Easing } from 'remotion';+import { useVisualTheme, themePaint, themeAsset, sceneDefaults } from '../../themes/visual-theme';+import { AbsoluteFill, Img, interpolate, useCurrentFrame, Easing } from 'remotion';import { AIFL_SHOTS } from '../Main';import { PageCam, CamKey } from './PageCam';import layout from '../live-layout.json';-const SERIF = 'ui-serif, Georgia, "Times New Roman", serif';-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';/** Context-level defaults (copy / sizes / palette), editable per clip in the* workbench. Motion timing below stays fixed. Hex = sRGB of the oklch tokens. */@@ -51,9 +50,6 @@ const PUSH_EASE = Easing.bezier(0.35, 0, 0.2, 1);const POP_EASE = Easing.bezier(0.2, 1.25, 0.3, 1); // spring with overshootconst RESEAT_EASE = Easing.bezier(0.4, 0, 0.3, 1.05); // compress on touchdown-const PATCH = 'oklch(97.5% 0.008 82)';-const SLOT_AMBER = 'oklch(58% 0.13 65)';-const BEAM_CORE = 'rgba(255,248,232,0.98)';/** Brand open (0–83): an invisible pen draws an amber crosshair, "AI* Foundation Lab" letterpresses in glyph by glyph (all glyphs down by ~46), a mono kicker@@ -68,10 +64,19 @@ const BEAM_CORE = 'rgba(255,248,232,0.98)';* while a beam runs two laps around its rounded outline; then it settles flush* back into its slot (lock→touchdown ≈ 3.3s). */export const SceneOpen: React.FC<SceneOpenProps> = (props) => {+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+ const SERIF = (paperStyle ? 'ui-serif, Georgia, "Times New Roman", serif' : theme.font);+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const PATCH = paint('oklch(97.5% 0.008 82)');+ const SLOT_AMBER = paint('oklch(58% 0.13 65)');+ const BEAM_CORE = paint('rgba(255,248,232,0.98)');const {wordmark: WORDMARK, wordmarkSize, kicker: KICKER, kickerSize, noteLine1, noteLine2, noteSize,ink: INK, amber: AMBER, muted: INK2, paper,- } = { ...SCENE_OPEN_DEFAULTS, ...props };+ } = { ...sceneDefaults(theme, 'morning', SCENE_OPEN_DEFAULTS), ...props };const frame = useCurrentFrame();const duration = AIFL_SHOTS.morning.duration; // 220@@ -136,7 +141,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {const poolRx = poolBase * (1 + poolPulse);const poolRy = poolBase * 0.8 * (1 + poolPulse);// outside-pool dim deepens as the light locks and the camera pushes in.- const vignette = interpolate(frame, [104, 114, 130], [0.16, 0.34, 0.42], {+ const vignette = interpolate(frame, [104, 114, 130], paperStyle ? [0.16, 0.34, 0.42] : [0.04, 0.07, 0.09], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp',});@@ -167,7 +172,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {});// two-layer shadow that grows with altitude- const shadow = `0 ${8 * lift}px ${10 + 12 * lift}px rgba(40,30,20,${0.18 * lift}), 0 ${46 * lift}px ${90 * lift}px rgba(40,30,20,${0.22 * lift})`;+ const shadow = paint(`0 ${8 * lift}px ${10 + 12 * lift}px rgba(40,30,20,${0.18 * lift}), 0 ${46 * lift}px ${90 * lift}px rgba(40,30,20,${0.22 * lift})`);// vacated-slot amber outline: alive while airborne, brightens as the card// lands, then vanishes.@@ -223,7 +228,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {<divstyle={{position: 'absolute', left: 0, right: 0, bottom: 0, height: 8,- background: 'rgba(255,255,255,0.85)', filter: 'blur(6px)',+ background: paint('rgba(255,255,255,0.85)'), filter: 'blur(6px)',opacity: 0.6 * Math.min(1, lift + Math.max(0, (frame - 114) / 16)),pointerEvents: 'none',}}@@ -238,7 +243,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {position: 'absolute', left: CARD.x - 2, top: CARD.y - 2,width: CARD.w + 4, height: CARD.h + 4, background: PATCH,borderRadius: RADIUS,- boxShadow: `inset 0 0 26px rgba(180,120,50,${0.12 * slotEdge})`,+ boxShadow: paint(`inset 0 0 26px rgba(180,120,50,${0.12 * slotEdge})`),opacity: slotVis,}}>@@ -271,7 +276,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {}}><Img- src={staticFile(`textures/live/${CARD.file}`)}+ src={asset(`textures/live/${CARD.file}`)}style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', display: 'block' }}/>{/* 4x hi-res capture layered on top, laid out at plain CARD@@ -281,7 +286,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {px) and samples DOWN from the 1432px source — crisp — ratherthan being downsampled to layout size and GPU-upscaled. */}<Img- src={staticFile('textures/live/card4-hires.png')}+ src={asset('textures/live/card4-hires.png')}style={{position: 'absolute',inset: 0,@@ -295,7 +300,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {<divstyle={{position: 'absolute', inset: 0,- background: 'linear-gradient(160deg, rgba(255,255,255,0.5), transparent 40%)',+ background: paint('linear-gradient(160deg, rgba(255,255,255,0.5), transparent 40%)'),opacity: lift, pointerEvents: 'none',}}/>@@ -304,7 +309,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {<divstyle={{position: 'absolute', inset: 0, borderRadius: RADIUS,- boxShadow: `inset 0 0 0 1px rgba(255,255,255,${0.7 * lift})`,+ boxShadow: paint(`inset 0 0 0 1px rgba(255,255,255,${0.7 * lift})`),pointerEvents: 'none',}}/>@@ -320,7 +325,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {position: 'absolute', left: -3, top: -3, overflow: 'visible',pointerEvents: 'none',opacity: beam1On ? 1 : 0.62,- filter: `drop-shadow(0 0 6px ${AMBER}) drop-shadow(0 0 18px rgba(255,240,210,0.55))`,+ filter: paint(`drop-shadow(0 0 6px ${AMBER}) drop-shadow(0 0 18px rgba(255,240,210,0.55))`),}}>{/* amber edge (wider) */}@@ -374,7 +379,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {style={{position: 'absolute', left: 566, top: 736, width: 210, height: 74,transform: 'translateZ(2px)',- background: 'radial-gradient(ellipse at 50% 50%, rgba(40,30,20,0.3), transparent 70%)',+ background: paint('radial-gradient(ellipse at 50% 50%, rgba(40,30,20,0.3), transparent 70%)'),filter: 'blur(12px)',opacity: 0.55 * noteVis,}}@@ -382,6 +387,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {<divstyle={{position: 'absolute', left: 556, top: 668, width: 230,+ ...(!paperStyle ? {background: theme.page, boxShadow: `0 0 0 14px ${theme.page}`, borderRadius: 7} : {}),transform: `translateZ(${noteZ}px) translateY(${(1 - noteIn) * 26}px)`,opacity: noteVis,filter: `blur(${(1 - noteIn) * 4}px)`,@@ -401,14 +407,14 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {style={{position: 'absolute', left: -5, top: '12%', bottom: '4%',width: `calc(${hl} * (100% + 10px))`,- background: 'oklch(88% 0.095 85)',+ background: paint('oklch(88% 0.095 85)'),borderRadius: 4,}}/><divstyle={{position: 'relative',- fontFamily: SERIF, fontStyle: 'italic', fontSize: noteSize, fontWeight: 600,+ fontFamily: SERIF, fontStyle: paperStyle ? 'italic' : 'normal', fontSize: noteSize, fontWeight: 600,color: INK, lineHeight: 1.16, letterSpacing: '-0.012em',}}>@@ -424,17 +430,17 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {{/* roving / locking spotlight: warm pool + dim outside so it reads */}<AbsoluteFillstyle={{- background: `radial-gradient(${poolRx}px ${poolRy}px at ${spotX}% ${spotY}%, rgba(255,241,214,0.42), rgba(255,241,214,0.10) 45%, rgba(70,56,38,${vignette * spotOn}) 100%)`,+ background: paint(`radial-gradient(${poolRx}px ${poolRy}px at ${spotX}% ${spotY}%, rgba(255,241,214,0.42), rgba(255,241,214,0.10) 45%, rgba(70,56,38,${vignette * spotOn}) 100%)`),pointerEvents: 'none',- opacity: spotOn,+ opacity: paperStyle ? spotOn : spotOn * 0.18,}}/>{/* faint trailing bounce of the same light */}<AbsoluteFillstyle={{- background: `radial-gradient(300px 220px at ${spotX - 6}% ${spotY + 10}%, rgba(255,246,228,0.18), transparent 70%)`,+ background: paint(`radial-gradient(300px 220px at ${spotX - 6}% ${spotY + 10}%, rgba(255,246,228,0.18), transparent 70%)`),pointerEvents: 'none',- opacity: spotOn * 0.7,+ opacity: paperStyle ? spotOn * 0.7 : 0,}}/></AbsoluteFill>@@ -478,7 +484,7 @@ export const SceneOpen: React.FC<SceneOpenProps> = (props) => {}}>{WORDMARK.split('').map((ch, i) => {- const delay = 10 + i * 3;+ const delay = 10 + i * (paperStyle ? 3 : 1.5);const t = interpolate(frame, [delay, delay + 12], [0, 1], {extrapolateLeft: 'clamp', extrapolateRight: 'clamp',easing: Easing.bezier(0.2, 0.7, 0.25, 1),diff --git a/template/src/aifl/live/SceneOutroLive.tsx b/template/src/aifl/live/SceneOutroLive.tsxindex 3df2b9c..73ded87 100644--- a/template/src/aifl/live/SceneOutroLive.tsx+++ b/template/src/aifl/live/SceneOutroLive.tsx@@ -1,10 +1,9 @@-import { AbsoluteFill, Img, interpolate, staticFile, useCurrentFrame, Easing } from 'remotion';+import { useVisualTheme, themePaint, themeAsset, sceneDefaults } from '../../themes/visual-theme';+import { AbsoluteFill, Img, interpolate, useCurrentFrame, Easing } from 'remotion';import { PageCam, CamKey } from './PageCam';import { AIFL_SHOTS } from '../Main';import layout from '../live-layout.json';-const SERIF = 'ui-serif, Georgia, "Times New Roman", serif';-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';/** Context-level defaults (copy / sizes / palette), editable per clip in the workbench. */export const SCENE_OUTRO_DEFAULTS = {wordmark: 'AI Foundation Lab',@@ -74,7 +73,13 @@ const DUST = Array.from({ length: 20 }, (_, i) => ({* trails + landing glows on the fly-ins, a stage light behind the wordmark,* gold dust and a single opening light sweep for atmosphere. */export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {- const { wordmark, wordmarkSize, tagline, taglineSize, ink, amber, muted } = { ...SCENE_OUTRO_DEFAULTS, ...props };+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+ const SERIF = (paperStyle ? 'ui-serif, Georgia, "Times New Roman", serif' : theme.font);+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const { wordmark, wordmarkSize, tagline, taglineSize, ink, amber, muted } = { ...sceneDefaults(theme, 'outro', SCENE_OUTRO_DEFAULTS), ...props };const LETTERS = wordmark.split('');const frame = useCurrentFrame();const duration = AIFL_SHOTS.outro.duration; // 115@@ -89,7 +94,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {extrapolateRight: 'clamp',easing: Easing.bezier(0.3, 0, 0.2, 1),});- const tag = interpolate(frame, [68, 80], [0, 1], {+ const tag = interpolate(frame, paperStyle ? [68, 80] : [62, 72], [0, 1], {extrapolateLeft: 'clamp',extrapolateRight: 'clamp',});@@ -172,7 +177,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {><PageCam src="textures/live/projects-full.png" pageH={PAGE_H} keys={CAM} blur={blur} saturate={0.9} />{/* warm scrim under the flying elements: keeps the center legible without washing them */}- <AbsoluteFill style={{ background: 'radial-gradient(1200px 800px at 50% 48%, rgba(250,247,242,0.82), rgba(250,247,242,0.55) 60%, rgba(250,247,242,0.35))', pointerEvents: 'none' }} />+ <AbsoluteFill style={{ background: paint('radial-gradient(1200px 800px at 50% 48%, rgba(250,247,242,0.82), rgba(250,247,242,0.55) 60%, rgba(250,247,242,0.35))'), pointerEvents: 'none' }} />{/* group photo: elements fly in from all sides and settle around the wordmark */}<AbsoluteFill style={{ pointerEvents: 'none' }}>@@ -198,16 +203,16 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {const air = Math.max(0, 1 - t);const shadow =air > 0.01- ? `0 ${10 + 26 * air}px ${24 + 46 * air}px rgba(30,25,18,${0.16 + 0.1 * air}), 0 2px 6px rgba(30,25,18,.08)`- : '0 10px 24px rgba(30,25,18,.16), 0 2px 6px rgba(30,25,18,.08)';+ ? paint(`0 ${10 + 26 * air}px ${24 + 46 * air}px rgba(30,25,18,${0.16 + 0.1 * air}), 0 2px 6px rgba(30,25,18,.08)`)+ : paint('0 10px 24px rgba(30,25,18,.16), 0 2px 6px rgba(30,25,18,.08)');const settledOpacity = opacity * (1 - 0.12 * recede);const saturate = 1 - 0.08 * recede;const texture = el.wbrCrop? {- background: `#fff url(${staticFile(`textures/live/${el.file}`)}) -576px -173px / 1920px ${WBR_PAGE_H}px no-repeat`,- border: '1px solid oklch(90% .008 82)',+ background: paint(`#fff url(${asset(`textures/live/${el.file}`)}) -576px -173px / 1920px ${WBR_PAGE_H}px no-repeat`),+ border: paint('1px solid oklch(90% .008 82)'),}: null;@@ -247,7 +252,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {>{el.wbrCrop ? null : (<Img- src={staticFile(`textures/live/${el.file}`)}+ src={asset(`textures/live/${el.file}`)}style={{ position: 'absolute', inset: 0, width: el.w, height: el.h, display: 'block' }}/>)}@@ -272,12 +277,12 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {>{el.wbrCrop ? null : (<Img- src={staticFile(`textures/live/${el.file}`)}+ src={asset(`textures/live/${el.file}`)}style={{ position: 'absolute', inset: 0, width: el.w, height: el.h, display: 'block' }}/>)}</div>- {showGlow ? (+ {paperStyle && showGlow ? (<divstyle={{position: 'absolute',@@ -286,7 +291,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {width: glowR * 2,height: glowR * 2,borderRadius: '50%',- background: 'radial-gradient(circle, oklch(78% 0.13 70 / 0.9), oklch(78% 0.13 70 / 0) 70%)',+ background: paint('radial-gradient(circle, oklch(78% 0.13 70 / 0.9), oklch(78% 0.13 70 / 0) 70%)'),opacity: glow,mixBlendMode: 'multiply',}}@@ -300,7 +305,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {{/* ---- atmosphere: gold dust drifting up in front of the group photo ---- */}<AbsoluteFill style={{ pointerEvents: 'none' }}>- {DUST.map((d, i) => {+ {paperStyle && DUST.map((d, i) => {const y = (((d.y0 - frame * d.rise) % 1080) + 1080) % 1080;const x = d.x + Math.sin(frame * d.swayFreq + d.phase) * d.swayAmp;return (@@ -313,7 +318,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {width: d.size,height: d.size,borderRadius: '50%',- background: 'oklch(75% 0.08 85)',+ background: paint('oklch(75% 0.08 85)'),opacity: d.opacity,}}/>@@ -331,8 +336,8 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {bottom: 0,left: sweepX - 300,width: 600,- background: 'linear-gradient(90deg, rgba(255,244,224,0), rgba(255,244,224,1) 50%, rgba(255,244,224,0))',- opacity: sweepOpacity,+ background: paint('linear-gradient(90deg, rgba(255,244,224,0), rgba(255,244,224,1) 50%, rgba(255,244,224,0))'),+ opacity: paperStyle ? sweepOpacity : 0,}}/></AbsoluteFill>@@ -343,8 +348,8 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {<AbsoluteFillstyle={{pointerEvents: 'none',- background: 'radial-gradient(700px 360px at 960px 470px, rgba(255,246,228,0.95), rgba(255,246,228,0.35) 55%, rgba(255,246,228,0) 75%)',- opacity: stageLight,+ background: paint('radial-gradient(700px 360px at 960px 470px, rgba(255,246,228,0.95), rgba(255,246,228,0.35) 55%, rgba(255,246,228,0) 75%)'),+ opacity: paperStyle ? stageLight : 0,}}/>) : null}@@ -354,7 +359,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {<AbsoluteFillstyle={{pointerEvents: 'none',- background: 'radial-gradient(1400px 900px at 50% 50%, rgba(62,48,32,0) 55%, rgba(62,48,32,0.7) 100%)',+ background: paint('radial-gradient(1400px 900px at 50% 50%, rgba(62,48,32,0) 55%, rgba(62,48,32,0.7) 100%)'),opacity: vignette,}}/>@@ -364,7 +369,7 @@ export const SceneOutroLive: React.FC<SceneOutroProps> = (props) => {<div style={{ textAlign: 'center' }}><div style={{ fontFamily: SERIF, fontSize: wordmarkSize, fontWeight: 600, color: ink, letterSpacing: `${wordSpacing}em`, display: 'flex' }}>{LETTERS.map((ch, i) => {- const delay = Math.round(42 + i * 1.8);+ const delay = Math.round(42 + i * (paperStyle ? 1.8 : 1.3));const t = interpolate(frame, [delay, delay + 8], [0, 1], {extrapolateLeft: 'clamp',extrapolateRight: 'clamp',diff --git a/template/src/aifl/live/ScenePapers.tsx b/template/src/aifl/live/ScenePapers.tsxindex fe5ff3b..afa7b80 100644--- a/template/src/aifl/live/ScenePapers.tsx+++ b/template/src/aifl/live/ScenePapers.tsx@@ -1,4 +1,5 @@-import { AbsoluteFill, Img, interpolate, staticFile, useCurrentFrame, Easing } from 'remotion';+import { useVisualTheme, themePaint, themeAsset, sceneDefaults } from '../../themes/visual-theme';+import { AbsoluteFill, Img, interpolate, useCurrentFrame, Easing } from 'remotion';import { PageCam, CamKey } from './PageCam';import { AIFL_SHOTS } from '../Main';import layout from '../live-layout.json';@@ -7,7 +8,6 @@ import { DigitRoll } from '../DigitRoll';const cards = layout.papers.cards;const PAGE_H = layout.papers.pageH;-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';/** Context-level defaults (screen-space counter copy / palette), editable per clip in the workbench. */export const SCENE_PAPERS_DEFAULTS = {@@ -42,7 +42,12 @@ const CAM_KEYS: CamKey[] = [* motif), each landing pressing the settled stack down and bouncing back, with* an amber highlight sweeping the linked-project name and a screen-space counter. */export const ScenePapers: React.FC<ScenePapersProps> = (props) => {- const { title, subtitle, counterSize, amber: AMBER, muted } = { ...SCENE_PAPERS_DEFAULTS, ...props };+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const asset = (src: string) => themeAsset(theme, src);+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const { title, subtitle, counterSize, amber: AMBER, muted } = { ...sceneDefaults(theme, 'chart', SCENE_PAPERS_DEFAULTS), ...props };const frame = useCurrentFrame();// how many cards have already landed (t reached 1) — drives the counter@@ -89,7 +94,7 @@ export const ScenePapers: React.FC<ScenePapersProps> = (props) => {top: c.y - 10,width: c.w + 24,height: c.h + 20,- background: '#faf7f2',+ background: paint('#faf7f2'),opacity: frame >= CUES[i] + DUR - 2 ? 0 : 1,}}/>@@ -106,8 +111,8 @@ export const ScenePapers: React.FC<ScenePapersProps> = (props) => {const rot = TILTS[i] * (1 - t);const scale = 1.06 - 0.06 * t;const shadow = settled- ? '0 2px 8px rgba(60,45,30,.10)'- : `0 32px 64px rgba(60,45,30,${0.22 * (1 - t) + 0.06})`;+ ? paint('0 2px 8px rgba(60,45,30,.10)')+ : paint(`0 32px 64px rgba(60,45,30,${0.22 * (1 - t) + 0.06})`);// amber highlight over the linked-project name, 6 frames after landing.// card-relative: x ~20px in, y ~72% of card height, ~40% wide.@@ -137,7 +142,7 @@ export const ScenePapers: React.FC<ScenePapersProps> = (props) => {}}><Img- src={staticFile(`textures/live/${FILES[i]}`)}+ src={asset(`textures/live/${FILES[i]}`)}style={{ position: 'absolute', inset: 0, width: '100%', height: '100%', display: 'block' }}/>{/* amber highlight sweep on the linked-project name */}@@ -149,7 +154,7 @@ export const ScenePapers: React.FC<ScenePapersProps> = (props) => {top: c.h * 0.72,width: `${hlGrow * 40}%`,height: 30,- background: 'oklch(97% 0.028 85)',+ background: paint('oklch(97% 0.028 85)'),opacity: 0.6 * hlFade,borderRight: `2px solid ${AMBER}`,pointerEvents: 'none',@@ -169,24 +174,24 @@ export const ScenePapers: React.FC<ScenePapersProps> = (props) => {left: glazeX,width: 420,transform: 'rotate(14deg)',- opacity: glazeVis * 0.5,+ opacity: paperStyle ? glazeVis * 0.5 : 0,mixBlendMode: 'overlay',background:- 'linear-gradient(90deg, transparent, rgba(255,240,214,0.9) 45%, rgba(255,240,214,0.9) 55%, transparent)',+ paint('linear-gradient(90deg, transparent, rgba(255,240,214,0.9) 45%, rgba(255,240,214,0.9) 55%, transparent)'),pointerEvents: 'none',}}/></PageCam>{/* screen-space counter, top-right */}- <div style={{ position: 'absolute', top: 70, right: 96, textAlign: 'right', pointerEvents: 'none' }}>- <div style={{ fontFamily: MONO, fontSize: 24, letterSpacing: '0.16em', color: muted, textTransform: 'uppercase' }}>+ <div style={{ position: 'absolute', top: 70, right: 96, textAlign: 'right', pointerEvents: 'none', ...(!paperStyle ? {width: 310} : {}) }}>+ <div style={{ fontFamily: MONO, fontSize: paperStyle ? 24 : 44, letterSpacing: '0.16em', color: muted, textTransform: 'uppercase' }}>{title}</div><div style={{ display: 'flex', justifyContent: 'flex-end', marginTop: 6 }}><DigitRoll key={landedCount} value={String(landedCount)} fontSize={counterSize} color={AMBER} /></div>- <div style={{ fontFamily: MONO, fontSize: 20, letterSpacing: '0.12em', color: muted, marginTop: 4, textTransform: 'uppercase' }}>+ <div style={{ fontFamily: MONO, fontSize: paperStyle ? 20 : 44, letterSpacing: '0.12em', color: muted, marginTop: 4, textTransform: 'uppercase' }}>{subtitle}</div></div>diff --git a/template/src/aifl/live/SceneWbr.tsx b/template/src/aifl/live/SceneWbr.tsxindex 0155acd..3fe9847 100644--- a/template/src/aifl/live/SceneWbr.tsx+++ b/template/src/aifl/live/SceneWbr.tsx@@ -1,3 +1,4 @@+import { useVisualTheme, themePaint, sceneDefaults } from '../../themes/visual-theme';import { interpolate, useCurrentFrame, Easing } from 'remotion';import { PageCam, CamKey } from './PageCam';import layout from '../live-layout.json';@@ -8,9 +9,6 @@ const leftRail = layout.wbr.leftRail;const rightRail = layout.wbr.rightRail;const PAGE_H = layout.wbr.pageH;-const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';-const PAPER = '#fdfcfa';-const AMBER_WASH = 'oklch(95% 0.05 85)';// editor-title close-up → ease out to the whole page (both rails on camera)// → tiny breathing hold.@@ -33,7 +31,6 @@ const WIPE = 8;// ---- past weeks stack into the left rail: the captured texture only holds// the live W28 entry, so W27…W22 drop in from above one after another (list// stacking, same vocabulary as the papers shot), landing below it. -----const SANS = 'ui-sans-serif, system-ui, -apple-system, sans-serif';/** One past week per line: `week|date|title` */const PAST_WEEKS_DSL = ['2026 第 27 周|7月3日|2026-W27 · Foundation Lab Weekly',@@ -82,7 +79,14 @@ const memberH2 = new Set<number>();* wash, then the week list (left) and comment sidebar (right) wipe on stage —* the whole page, both rails included, settles into frame. */export const SceneWbr: React.FC<SceneWbrProps> = (props) => {- const { kicker, kickerSize, pastWeeks, amber: AMBER, muted } = { ...SCENE_WBR_DEFAULTS, ...props };+ const theme = useVisualTheme();+ const paperStyle = theme.id === 'ink-press';+ const paint = (css: string) => themePaint(theme, css);+ const MONO = (paperStyle ? 'ui-monospace, SFMono-Regular, Menlo, monospace' : theme.font);+ const PAPER = paint('#fdfcfa');+ const AMBER_WASH = paperStyle ? 'oklch(95% 0.05 85)' : paint('rgba(180,120,50,0.10)');+ const SANS = (paperStyle ? 'ui-sans-serif, system-ui, -apple-system, sans-serif' : theme.font);+ const { kicker, kickerSize, pastWeeks, amber: AMBER, muted } = { ...sceneDefaults(theme, 'wbr', SCENE_WBR_DEFAULTS), ...props };const PAST_WEEKS = parsePastWeeks(pastWeeks);const frame = useCurrentFrame();@@ -275,9 +279,9 @@ export const SceneWbr: React.FC<SceneWbrProps> = (props) => {height: WEEK_H,transform: `translateY(${-44 * air}px)`,opacity: appear,- boxShadow: air > 0.02 ? `0 ${10 * air}px ${20 * air}px rgba(30,25,18,${0.16 * air})` : 'none',+ boxShadow: air > 0.02 ? paint(`0 ${10 * air}px ${20 * air}px rgba(30,25,18,${0.16 * air})`) : 'none',background: PAPER,- borderBottom: '1px solid rgba(31,41,55,0.07)',+ borderBottom: paint('1px solid rgba(31,41,55,0.07)'),padding: '8px 10px 0',boxSizing: 'border-box',fontFamily: SANS,@@ -285,10 +289,10 @@ export const SceneWbr: React.FC<SceneWbrProps> = (props) => {}}><div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'baseline' }}>- <span style={{ fontSize: 13, fontWeight: 500, color: '#1f2937' }}>{w.week}</span>- <span style={{ fontSize: 10, color: '#9ca3af' }}>{w.date}</span>+ <span style={{ fontSize: 13, fontWeight: 500, color: paint('#1f2937') }}>{w.week}</span>+ <span style={{ fontSize: 10, color: paint('#9ca3af') }}>{w.date}</span></div>- <div style={{ marginTop: 2, fontSize: 11, color: '#6b7280', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>+ <div style={{ marginTop: 2, fontSize: 11, color: paint('#6b7280'), whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>{w.title}</div></div>@@ -300,13 +304,13 @@ export const SceneWbr: React.FC<SceneWbrProps> = (props) => {<divstyle={{position: 'absolute',- top: 16, // inside the page's empty top-nav band at full-page framing,- right: 96, // clear of the comment rail's own header+ top: paperStyle ? 16 : 72, // use the empty report-header band for editable themes+ right: paperStyle ? 96 : 320, // clear of the comment rail's headertextAlign: 'right',fontFamily: MONO,fontSize: kickerSize,- letterSpacing: '0.14em',+ letterSpacing: paperStyle ? '0.14em' : '0.08em',color: muted,textTransform: 'uppercase',opacity: kick,diff --git a/template/src/themes/ThemedFilm.tsx b/template/src/themes/ThemedFilm.tsxnew file mode 100644index 0000000..ff1c90a--- /dev/null+++ b/template/src/themes/ThemedFilm.tsx@@ -0,0 +1,7 @@+import { AiflMain } from '../aifl/Main';+import { resolveTheme, VisualThemeProvider } from './visual-theme';++export const ThemedFilm: React.FC<{theme?: string; colors?: Record<string,string>}> = ({theme, colors}) => {+ const selected = resolveTheme(theme);+ return <VisualThemeProvider theme={selected.id} colors={colors}><AiflMain /></VisualThemeProvider>;+};diff --git a/template/src/themes/manifest.tsx b/template/src/themes/manifest.tsxnew file mode 100644index 0000000..db9ddf7--- /dev/null+++ b/template/src/themes/manifest.tsx@@ -0,0 +1,68 @@+import { type FC } from 'react';+import { SCENE_OPEN_DEFAULTS } from '../aifl/live/SceneOpen';+import { SCENE_FLYIN_DEFAULTS } from '../aifl/live/SceneFlyIn';+import { SCENE_DETAIL_DEFAULTS } from '../aifl/live/SceneDetail';+import { SCENE_PAPERS_DEFAULTS } from '../aifl/live/ScenePapers';+import { SCENE_WBR_DEFAULTS } from '../aifl/live/SceneWbr';+import { SCENE_OUTRO_DEFAULTS } from '../aifl/live/SceneOutroLive';+import { TITLE_CARD_DEFAULTS } from '../aifl/PaperTitleCard';+import { CAPTION_DEFAULTS } from '../aifl/Caption';+import { VisualThemeProvider, resolveTheme, sceneDefaults } from './visual-theme';++type Props = Record<string, unknown>;+type Unit = {id: string; component: FC<Props>; props?: Props; cardId?: string; schema?: Props[]};+type Manifest = {background: string; shots: Unit[]; transitions: Unit[]; captions: Unit[]};+const scenes: Record<string, Props> = {+ morning: SCENE_OPEN_DEFAULTS, table: SCENE_FLYIN_DEFAULTS,+ macro: SCENE_DETAIL_DEFAULTS, chart: SCENE_PAPERS_DEFAULTS,+ wbr: SCENE_WBR_DEFAULTS, outro: SCENE_OUTRO_DEFAULTS,+ 'title-card': TITLE_CARD_DEFAULTS, 'caption': CAPTION_DEFAULTS,+ 'flash-cut': {},+};+const styleKey = (key: string) =>+ /Size$/.test(key) || ['ink','amber','muted','paper','accent','color','bottom'].includes(key);++/** Optional presets over the same scene components, with one provider per clip. */+export const withThemes = <T extends Manifest>(paper: T) => {+ const units = [...paper.shots, ...paper.transitions, ...paper.captions];+ const presets = [+ {id: 'ink-press', label: '纸质 · Ink Press'},+ {id: 'modern-light', label: '现代浅色 · Modern Light'},+ {id: 'midnight', label: '暗黑 · Midnight'},+ {id: 'solar-pop', label: '清新鼠尾草 · Sage'},+ {id: 'coral-burst', label: '珊瑚点缀 · Coral'},+ {id: 'color-play', label: '柔和鸢尾 · Iris'},+ {id: 'deep-ocean', label: '深海蓝 · Deep Ocean'},+ {id: 'obsidian-violet', label: '黑曜紫 · Obsidian Violet'},+ {id: 'vintage-kraft', label: '复古牛皮纸 · Vintage Kraft'},+ ].map(({id, label}) => ({+ id, label, palette: id === 'ink-press' ? undefined : Object.fromEntries(['page','surface','field','text','muted','accent','border'].map(k => [k, resolveTheme(id)[k as keyof ReturnType<typeof resolveTheme>]])), background: id === 'ink-press' ? paper.background : resolveTheme(id).page,+ unitDefaults: Object.fromEntries(units.map(u => {+ const key = u.cardId ?? u.id;+ const defaults = id === 'ink-press' ? u.props ?? {} : sceneDefaults(resolveTheme(id), key, scenes[key]);+ return [key, Object.fromEntries(Object.entries(defaults).filter(([k]) => styleKey(k)))];+ })),+ }));+ const bridges = new Map<string, FC<Props>>();+ const wrap = (u: Unit) => {+ const key = u.cardId ?? u.id;+ if (!bridges.has(key)) {+ const Component = u.component;+ const Bridge: FC<Props> = ({__theme, __palette, ...props}) => {+ const colors = typeof __palette === 'object' && __palette !== null ? __palette as Record<string,string> : undefined;+ const theme = resolveTheme(typeof __theme === 'string' ? __theme : undefined, colors);+ return <VisualThemeProvider theme={theme.id} colors={colors}><Component {...props} /></VisualThemeProvider>;+ };+ Bridge.displayName = `Themed-${key}`;+ bridges.set(key, Bridge);+ }+ return {...u, component: bridges.get(key)!, themeKey: key,+ schema: u.schema?.map(f => ({...f,+ label: typeof f.label === 'string' ? f.label.replaceAll('琥珀强调色', '强调色').replaceAll('纸底','背景').replaceAll('墨色','文字颜色') : f.label,+ ...(f.key === 'fontSize' && key === 'caption' ? {max: 96} : {}),+ })),+ };+ };+ return {...paper, themeProp: '__theme', paletteProp: '__palette', defaultTheme: 'ink-press', themes: presets,+ shots: paper.shots.map(wrap), transitions: paper.transitions.map(wrap), captions: paper.captions.map(wrap)};+};diff --git a/template/src/themes/palette-assets.json b/template/src/themes/palette-assets.jsonnew file mode 100644index 0000000..c1848c5--- /dev/null+++ b/template/src/themes/palette-assets.json@@ -0,0 +1 @@+{"pages":{"projects":"<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"palette-page\"><style>*{box-sizing:border-box}html,.palette-page{margin:0;padding:0}.palette-page{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style><main id=\"workspace\" style=\"height:1746px\" data-theme=\"modern-light\" data-page=\"projects\" data-demo=\"true\"><header class=\"nav\" style=\"height:61px\"><div class=\"nav-inner\" style=\"left:408px;width:1104px\"><span class=\"brand-mark\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/></svg></span><strong>AI Foundation Lab</strong><span class=\"nav-link active\">项目</span><span class=\"nav-link\">周报</span><span class=\"nav-link\">论文</span><span class=\"demo-label\">演示工作台</span><span class=\"nav-end\"><span class=\"live-dot\"></span> Research workspace <span class=\"avatar\">FL</span></span></div></header><div class=\"absolute section-top\" style=\"left:408px;top:90px;width:1104px;height:25px;\"><span>全部项目 <span class=\"muted\">/ Research portfolio</span></span><span class=\"muted\">10 个项目 · 演示数据</span></div><div class=\"absolute search\" style=\"left:408px;top:130px;width:1016px;height:44px;\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"10\" r=\"6\"/><path d=\"m15 15 5 5\"/></svg><span>搜索项目名、简介、负责人或标签</span><kbd>⌘ K</kbd></div><div class=\"absolute filter\" style=\"left:1436px;top:130px;width:76px;height:44px;\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M3 5h18M6 11h12M10 17h4\"/></svg><span>筛选</span></div><div class=\"absolute project-section\" style=\"left:408px;top:206px;width:1104px;height:27px;\"><span class=\"section-name\">Agents & Dev Tools</span><span>2 个项目</span></div><div class=\"absolute project-section\" style=\"left:408px;top:575px;width:1104px;height:27px;\"><span class=\"section-name\">Efficient Models</span><span>3 个项目</span></div><div class=\"absolute project-section\" style=\"left:408px;top:968px;width:1104px;height:27px;\"><span class=\"section-name\">Perception & Sensing</span><span>3 个项目</span></div><div class=\"absolute project-section\" style=\"left:408px;top:1361px;width:1104px;height:27px;\"><span class=\"section-name\">Research Infra</span><span>2 个项目</span></div><div class=\"absolute project-card\" style=\"left:408px;top:247px;width:357.328125px;height:288px;--card-index:0\"><div class=\"card-eyebrow\"><span>RESEARCH / 01</span><span class=\"status\">进行中</span></div><h3>Self-healing CI triage router</h3><p class=\"card-desc\">Routing flaky build investigations between agent pools with failure-aware policies.</p><div class=\"card-stats\"><span>负责人</span><strong>Yuki</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Agents & Dev Tools</strong></div><div class=\"card-counts\">研究问题 <b>1</b><span>实验 <b>1</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Agents</span><span>CI</span></div></div><div class=\"absolute project-card\" style=\"left:781.328125px;top:247px;width:357.328125px;height:288px;--card-index:1\"><div class=\"card-eyebrow\"><span>RESEARCH / 02</span><span class=\"status\">进行中</span></div><h3>Screenshot-grounded retrieval agents</h3><p class=\"card-desc\">Retrieval policies for code-plus-screenshot troubleshooting assistants.</p><div class=\"card-stats\"><span>负责人</span><strong>Priya</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Agents & Dev Tools</strong></div><div class=\"card-counts\">研究问题 <b>1</b><span>实验 <b>1</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Multimodal</span><span>Retrieval</span></div></div><div class=\"absolute project-card\" style=\"left:408px;top:616px;width:357.328125px;height:312px;--card-index:2\"><div class=\"card-eyebrow\"><span>RESEARCH / 03</span><span class=\"status\">进行中</span></div><h3>On-device continual tuning PoC</h3><p class=\"card-desc\">Validating how a compact model can learn from on-device corrections without forgetting.</p><div class=\"card-stats\"><span>负责人</span><strong>Lin</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Efficient Models</strong></div><div class=\"card-counts\">研究问题 <b>2</b><span>实验 <b>15</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>EdgeAI</span><span>Continual learning</span></div></div><div class=\"absolute project-card\" style=\"left:781.328125px;top:616px;width:357.328125px;height:312px;--card-index:3\"><div class=\"card-eyebrow\"><span>RESEARCH / 04</span><span class=\"status\">进行中</span></div><h3>Confidence-routed model cascade</h3><p class=\"card-desc\">Calibrating small models to defer to larger ones, reducing cost while holding accuracy.</p><div class=\"card-stats\"><span>负责人</span><strong>Yuki</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Efficient Models</strong></div><div class=\"card-counts\">研究问题 <b>7</b><span>实验 <b>2</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Calibration</span><span>Routing</span></div></div><div class=\"absolute project-card\" style=\"left:1154.65625px;top:616px;width:357.34375px;height:312px;--card-index:4\"><div class=\"card-eyebrow\"><span>RESEARCH / 05</span><span class=\"status\">已完成</span></div><h3>Tabular foundation probes</h3><p class=\"card-desc\">Probing what zero-shot tabular foundation models learn from column headers.</p><div class=\"card-stats\"><span>负责人</span><strong>Marco</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Efficient Models</strong></div><div class=\"card-counts\">研究问题 <b>1</b><span>实验 <b>2</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Tabular</span><span>Interpretability</span></div></div><div class=\"absolute project-card\" style=\"left:408px;top:1009px;width:357.328125px;height:312px;--card-index:5\"><div class=\"card-eyebrow\"><span>RESEARCH / 06</span><span class=\"status\">进行中</span></div><h3>Sensor drift early-warning</h3><p class=\"card-desc\">Forecasting calibration drift in industrial vibration sensors with tiny transformers.</p><div class=\"card-stats\"><span>负责人</span><strong>Lin</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Perception & Sensing</strong></div><div class=\"card-counts\">研究问题 <b>3</b><span>实验 <b>14</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Time series</span><span>Forecasting</span></div></div><div class=\"absolute project-card\" style=\"left:781.328125px;top:1009px;width:357.328125px;height:312px;--card-index:6\"><div class=\"card-eyebrow\"><span>RESEARCH / 07</span><span class=\"status\">进行中</span></div><h3>Dialect-robust speech recognition</h3><p class=\"card-desc\">Comparing ASR models on dialect corpora and evaluating synthetic augmentation.</p><div class=\"card-stats\"><span>负责人</span><strong>Marco</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Perception & Sensing</strong></div><div class=\"card-counts\">研究问题 <b>1</b><span>实验 <b>13</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>ASR</span><span>Evaluation</span></div></div><div class=\"absolute project-card\" style=\"left:1154.65625px;top:1009px;width:357.34375px;height:312px;--card-index:7\"><div class=\"card-eyebrow\"><span>RESEARCH / 08</span><span class=\"status\">进行中</span></div><h3>Warehouse re-ID robustness</h3><p class=\"card-desc\">Stress-testing person re-identification under seasonal shifts and camera changes.</p><div class=\"card-stats\"><span>负责人</span><strong>Yuki</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Perception & Sensing</strong></div><div class=\"card-counts\">研究问题 <b>2</b><span>实验 <b>3</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>ReID</span><span>Robustness</span></div></div><div class=\"absolute project-card\" style=\"left:408px;top:1402px;width:357.328125px;height:312px;--card-index:8\"><div class=\"card-eyebrow\"><span>RESEARCH / 09</span><span class=\"status\">进行中</span></div><h3>nano-lab: automated research loop</h3><p class=\"card-desc\">An autonomous research loop that proposes, runs, and summarizes training experiments.</p><div class=\"card-stats\"><span>负责人</span><strong>Marco</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Research Infra</strong></div><div class=\"card-counts\">研究问题 <b>5</b><span>实验 <b>112</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Agents</span><span>AutoML</span></div></div><div class=\"absolute project-card\" style=\"left:781.328125px;top:1402px;width:357.328125px;height:312px;--card-index:9\"><div class=\"card-eyebrow\"><span>RESEARCH / 10</span><span class=\"status\">进行中</span></div><h3>Long-horizon coding arena</h3><p class=\"card-desc\">Benchmarking coding agents on week-long software tasks with live compute routing.</p><div class=\"card-stats\"><span>负责人</span><strong>Priya</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>Research Infra</strong></div><div class=\"card-counts\">研究问题 <b>5</b><span>实验 <b>7</b></span><span>论文 <b>0</b></span></div><div class=\"card-tags\"><span>Agents</span><span>Benchmark</span></div></div></main></div>","detail":"<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"palette-page\"><style>*{box-sizing:border-box}html,.palette-page{margin:0;padding:0}.palette-page{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style><main id=\"workspace\" style=\"height:1172px\" data-theme=\"modern-light\" data-page=\"detail\" data-demo=\"true\"><header class=\"nav\" style=\"height:61px\"><div class=\"nav-inner\" style=\"left:408px;width:1104px\"><span class=\"brand-mark\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/></svg></span><strong>AI Foundation Lab</strong><span class=\"nav-link active\">项目</span><span class=\"nav-link\">周报</span><span class=\"nav-link\">论文</span><span class=\"demo-label\">演示工作台</span><span class=\"nav-end\"><span class=\"live-dot\"></span> Research workspace <span class=\"avatar\">FL</span></span></div></header><div class=\"absolute muted\" style=\"left:408px;top:94px;width:1104px;height:25px;\">项目 / Research Infra / nano-lab</div><div class=\"absolute detail-title\" style=\"left:408px;top:126px;width:1104px;height:47px;\">nano-lab: automated research loop</div><div class=\"absolute detail-tags\" style=\"left:408px;top:186px;width:1104px;height:30px;\"><span class=\"chip\">Agents</span><span class=\"chip\">AutoML</span><span class=\"demo-note\">虚构研究项目 · 用于视觉演示</span></div><div class=\"absolute description\" style=\"left:408px;top:242px;width:1104px;height:44px;\">An autonomous research loop that proposes, runs, and summarizes language-model training experiments.</div><div class=\"absolute metadata-head\" style=\"left:408px;top:312px;width:1104px;height:35px;\"><b>项目资料</b><span class=\"accent\">编辑资料 ↗</span></div><div class=\"absolute metadata\" style=\"left:408px;top:369px;width:1104px;height:130px;\"><div><span>负责人</span><b>Marco</b></div><div><span>领域</span><b>Research Infra</b></div><div><span>状态</span><b class=\"accent\">进行中</b></div><aside><span>实验记录</span><strong>112</strong><small>固定演示数据</small></aside></div><div class=\"absolute tabs\" style=\"left:408px;top:538px;width:1104px;height:49px;\"><span class=\"selected\">研究问题 (5)</span><span class=\"\">实验 (112)</span><span>资产 (0)</span></div><div class=\"absolute toolbar\" style=\"left:408px;top:600px;width:1104px;height:37px;\"><span class=\"muted\">筛选</span><span class=\"toolbar-field\">全部状态⌄</span><span class=\"muted\">排序</span><span class=\"toolbar-field\">更新时间(最新)⌄</span><span class=\"push muted\">所有记录均为演示</span></div><div class=\"absolute table-head\" style=\"left:408px;top:641px;width:1104px;height:25px;\"><span>研究问题</span><span>状态</span><span>类型</span><span>负责人</span><span>更新</span></div><div class=\"absolute research-row\" style=\"left:408px;top:666px;width:1104px;height:94.5px;\"><div><h4>Can an agent loop discover better LR schedules than a swept baseline?</h4><p>Compare the autonomous loop with a fixed-budget baseline across three seeds.</p></div><span class=\"status\">研究中</span><span>empirical</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:760.5px;width:1104px;height:95px;\"><div><h4>Do discovered schedules transfer across model and dataset scales?</h4><p>Evaluate generalization using two model sizes and held-out task families.</p></div><span class=\"status\">研究中</span><span>empirical</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:855.5px;width:1104px;height:95px;\"><div><h4>Which feedback signals make the experiment loop more reliable?</h4><p>Record quality, cost, and failure modes before selecting the next iteration.</p></div><span class=\"status\">研究中</span><span>empirical</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:950.5px;width:1104px;height:95px;\"><div><h4>How should failed runs inform the next candidate proposal?</h4><p>Link each proposal to the evidence and limitations of previous runs.</p></div><span class=\"status\">研究中</span><span>empirical</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1045.5px;width:1104px;height:94.5px;\"><div><h4>What is the compute budget required for a reproducible improvement?</h4><p>Keep the original configuration and evaluation protocol for review.</p></div><span class=\"status\">研究中</span><span>empirical</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div></main></div>","papers":"<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"palette-page\"><style>*{box-sizing:border-box}html,.palette-page{margin:0;padding:0}.palette-page{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style><main id=\"workspace\" style=\"height:1489px\" data-theme=\"modern-light\" data-page=\"papers\" data-demo=\"true\"><header class=\"nav\" style=\"height:61px\"><div class=\"nav-inner\" style=\"left:408px;width:1104px\"><span class=\"brand-mark\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/></svg></span><strong>AI Foundation Lab</strong><span class=\"nav-link active\">项目</span><span class=\"nav-link\">周报</span><span class=\"nav-link\">论文</span><span class=\"demo-label\">演示工作台</span><span class=\"nav-end\"><span class=\"live-dot\"></span> Research workspace <span class=\"avatar\">FL</span></span></div></header><div class=\"absolute detail-title\" style=\"left:408px;top:94px;width:1104px;height:36px;\">Paper Radar <span class=\"inline-cn\">每日论文雷达</span></div><div class=\"absolute muted\" style=\"left:408px;top:140px;width:1104px;height:28px;\">与当前项目关联的研究线索。以下论文、摘要与关联均为虚构演示内容。</div><div class=\"absolute section-top\" style=\"left:408px;top:182px;width:1104px;height:22px;\"><span class=\"muted\">W28 / RESEARCH DIGEST</span><span class=\"accent\">5 篇关联研究</span></div><div class=\"absolute paper-card\" style=\"left:408px;top:214px;width:1104px;height:224.5px;\"><div class=\"paper-heading\"><span class=\"paper-index\">01</span><h3>Drift-Aware Attention: Forecasting Sensor Calibration Decay with Tiny Transformers</h3><span class=\"paper-demo\">DEMO</span></div><div class=\"paper-meta\">Research team · Fictional paper 001 · 演示资料</div><p class=\"paper-summary\"><span>TL;DR</span>用微型时序模型预测传感器漂移;评测协议与当前项目的预警目标一致。</p><div class=\"paper-link\"><small>关联项目</small><strong>Sensor drift early-warning <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></strong><p>可复用 lead-time 评测设计,并补充跨设备与失效场景的对照。</p></div></div><div class=\"absolute paper-card\" style=\"left:408px;top:454.5px;width:1104px;height:224.5px;\"><div class=\"paper-heading\"><span class=\"paper-index\">02</span><h3>Knowing When to Ask: Sequence-Level Deferral for Model Cascades</h3><span class=\"paper-demo\">DEMO</span></div><div class=\"paper-meta\">Research team · Fictional paper 002 · 演示资料</div><p class=\"paper-summary\"><span>TL;DR</span>研究序列级置信度校准,帮助小模型判断何时将请求交给更大模型。</p><div class=\"paper-link\"><small>关联项目</small><strong>Confidence-routed model cascade <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></strong><p>将分流阈值与项目已有的质量、成本评测表关联,作为下一轮实验候选。</p></div></div><div class=\"absolute paper-card\" style=\"left:408px;top:695px;width:1104px;height:224.5px;\"><div class=\"paper-heading\"><span class=\"paper-index\">03</span><h3>Self-Improving Research Agents Discover Better Learning-Rate Schedules</h3><span class=\"paper-demo\">DEMO</span></div><div class=\"paper-meta\">Research team · Fictional paper 003 · 演示资料</div><p class=\"paper-summary\"><span>TL;DR</span>自动研究代理在闭环中提出并验证学习率调度,记录方案来源与实验结果。</p><div class=\"paper-link\"><small>关联项目</small><strong>nano-lab: automated research loop <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></strong><p>复用候选生成、运行与总结结构,同时保留人工复核节点。</p></div></div><div class=\"absolute paper-card\" style=\"left:408px;top:935.5px;width:1104px;height:224.5px;\"><div class=\"paper-heading\"><span class=\"paper-index\">04</span><h3>Synthetic Dialects Close the Gap: Data Augmentation for Low-Resource ASR</h3><span class=\"paper-demo\">DEMO</span></div><div class=\"paper-meta\">Research team · Fictional paper 004 · 演示资料</div><p class=\"paper-summary\"><span>TL;DR</span>比较合成数据在低资源语音识别中的作用,并单独观察真实测试集表现。</p><div class=\"paper-link\"><small>关联项目</small><strong>Dialect-robust speech recognition <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></strong><p>对照数据配比、方言覆盖范围和误差类型,避免只看汇总指标。</p></div></div><div class=\"absolute paper-card\" style=\"left:408px;top:1176px;width:1104px;height:224.5px;\"><div class=\"paper-heading\"><span class=\"paper-index\">05</span><h3>Week-Long Agents: Memory Scaffolds for Long-Horizon Software Tasks</h3><span class=\"paper-demo\">DEMO</span></div><div class=\"paper-meta\">Research team · Fictional paper 005 · 演示资料</div><p class=\"paper-summary\"><span>TL;DR</span>比较三种记忆框架在长周期软件任务中的完成情况与恢复能力。</p><div class=\"paper-link\"><small>关联项目</small><strong>Long-horizon coding arena <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 12h14M13 6l6 6-6 6\"/></svg></strong><p>将任务拆解、失败恢复和证据保存方法纳入下一轮研究设计。</p></div></div><div class=\"absolute footer-note\" style=\"left:408px;top:1440px;width:1104px;height:24px;\">已显示全部演示记录</div></main></div>","wbr":"<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"palette-page\"><style>*{box-sizing:border-box}html,.palette-page{margin:0;padding:0}.palette-page{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style><main id=\"workspace\" style=\"height:1080px\" data-theme=\"modern-light\" data-page=\"wbr\" data-demo=\"true\"><header class=\"nav\" style=\"height:61px\"><div class=\"nav-inner\" style=\"left:24px;right:24px\"><span class=\"brand-mark\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/></svg></span><strong>AI Foundation Lab</strong><span class=\"nav-link active\">项目</span><span class=\"nav-link\">周报</span><span class=\"nav-link\">论文</span><span class=\"demo-label\">演示工作台</span><span class=\"nav-end\"><span class=\"live-dot\"></span> Research workspace <span class=\"avatar\">FL</span></span></div></header><div class=\"absolute doc-top\" style=\"left:208px;top:61px;width:1424px;height:42px;\"><b>2026 第 28 周</b><span>研究进展</span><span class=\"accent\">已同步</span><span class=\"push demo-note\">虚构演示文档</span></div><div class=\"absolute doc-tools\" style=\"left:208px;top:103px;width:1424px;height:44px;\"><span>↶</span><span>↷</span><i></i><span>标题 1⌄</span><i></i><b>B</b><em>I</em><u>U</u><span>≡</span><span>☷</span><i></i><span>↗</span><span>▦</span></div><div class=\"absolute left-rail\" style=\"left:0px;top:61px;width:208px;height:1019px;\"><div class=\"rail-title\">周报 <span>«</span></div><div class=\"rail-search\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"10\" cy=\"10\" r=\"6\"/><path d=\"m15 15 5 5\"/></svg> 搜索周报正文</div><div class=\"weekly-item\"><b>2026 第 28 周</b><span class=\"accent\">本周</span><p>Foundation Lab Weekly</p><small>演示文档 · 已同步</small></div></div><div class=\"absolute right-rail\" style=\"left:1632px;top:61px;width:288px;height:1019px;\"><div class=\"rail-title\">评论 · 2 <span>»</span></div><div class=\"comment\"><blockquote>“模型分流评测”</blockquote><b><span class=\"avatar\">YL</span> Yuki <small>演示评论</small></b><p>请把质量与成本的对照记录一并关联,便于周五评审。</p><div class=\"comment-reply\">回复… <span>↵</span></div></div><div class=\"comment\"><blockquote>“独立设备数据”</blockquote><b><span class=\"avatar\">LN</span> Lin <small>演示评论</small></b><p>已补充验证计划,下周带上失败案例与样本说明。</p><div class=\"comment-reply\">回复… <span>↵</span></div></div></div><div class=\"absolute weekly-block h1\" style=\"left:576px;top:189px;width:401.203125px;height:28px;\">W28 · Foundation Lab Weekly</div><div class=\"absolute weekly-block h2\" style=\"left:576px;top:242.1875px;width:167px;height:23px;\">Team overview</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:277.21875px;width:665.609375px;height:54.375px;\">本周围绕模型分流、传感器预警与语音识别推进实验。周五评审将逐项核对证据、限制与下一步。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:337.984375px;width:665.609375px;height:27.1875px;\">实验记录模板 v2 已启用;新增结论需关联原始配置和评测记录。</div><div class=\"absolute weekly-block h2\" style=\"left:576px;top:383.5625px;width:26.609375px;height:23px;\">Lin</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:418.59375px;width:665.609375px;height:54.375px;\">Sensor drift early-warning:完成 patch-length 对照实验。下一步在独立设备数据上复核提前量与误报。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:479.359375px;width:665.609375px;height:27.1875px;\">已与协作团队对齐阈值调参节奏,下周验证反馈回路。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:512.9375px;width:665.609375px;height:27.1875px;\">待补充:一个设备批次的标定样本,已列入下周计划。</div><div class=\"absolute weekly-block h2\" style=\"left:576px;top:558.515625px;width:55.96875px;height:23px;\">Marco</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:593.546875px;width:665.609375px;height:27.1875px;\">nano-lab agent loop:完成候选学习率调度的多种子对照。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:627.125px;width:665.609375px;height:27.1875px;\">新增研究问题:调度策略能否跨模型规模复用?</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:660.703125px;width:665.609375px;height:27.1875px;\">下周:将失败实验的原因写回候选生成规则。</div><div class=\"absolute weekly-block h2\" style=\"left:576px;top:706.28125px;width:38.125px;height:23px;\">Yuki</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:741.3125px;width:665.609375px;height:27.1875px;\">Confidence-routed cascade:完成分流阈值校准与质量对照。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:774.890625px;width:665.609375px;height:27.1875px;\">Self-healing CI triage:补充错误路由案例与人工复核记录。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:808.46875px;width:665.609375px;height:27.1875px;\">待讨论:将置信度校准整理为可复用评测组件。</div><div class=\"absolute weekly-block h2\" style=\"left:576px;top:854.046875px;width:44.953125px;height:23px;\">Priya</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:889.078125px;width:665.609375px;height:27.1875px;\">Dialect-robust ASR:继续对比数据增强配比与真实语音误差。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:922.65625px;width:665.609375px;height:27.1875px;\">论文雷达发现 3 条相关研究线索,已关联对应项目。</div><div class=\"absolute weekly-block li\" style=\"left:598.390625px;top:956.234375px;width:665.609375px;height:27.1875px;\">下周整理评测集 v2,并完成本轮实验结论归档。</div></main></div>","experiments":"<div xmlns=\"http://www.w3.org/1999/xhtml\" class=\"palette-page\"><style>*{box-sizing:border-box}html,.palette-page{margin:0;padding:0}.palette-page{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style><main id=\"workspace\" style=\"height:6857px\" data-theme=\"modern-light\" data-page=\"experiments\" data-demo=\"true\"><header class=\"nav\" style=\"height:61px\"><div class=\"nav-inner\" style=\"left:408px;width:1104px\"><span class=\"brand-mark\"><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.6\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\" rx=\"1\"/></svg></span><strong>AI Foundation Lab</strong><span class=\"nav-link active\">项目</span><span class=\"nav-link\">周报</span><span class=\"nav-link\">论文</span><span class=\"demo-label\">演示工作台</span><span class=\"nav-end\"><span class=\"live-dot\"></span> Research workspace <span class=\"avatar\">FL</span></span></div></header><div class=\"absolute muted\" style=\"left:408px;top:94px;width:1104px;height:25px;\">项目 / Research Infra / nano-lab</div><div class=\"absolute detail-title\" style=\"left:408px;top:126px;width:1104px;height:47px;\">nano-lab: automated research loop</div><div class=\"absolute detail-tags\" style=\"left:408px;top:186px;width:1104px;height:30px;\"><span class=\"chip\">Agents</span><span class=\"chip\">AutoML</span><span class=\"demo-note\">虚构研究项目 · 用于视觉演示</span></div><div class=\"absolute description\" style=\"left:408px;top:242px;width:1104px;height:44px;\">An autonomous research loop that proposes, runs, and summarizes language-model training experiments.</div><div class=\"absolute metadata-head\" style=\"left:408px;top:312px;width:1104px;height:35px;\"><b>项目资料</b><span class=\"accent\">编辑资料 ↗</span></div><div class=\"absolute metadata\" style=\"left:408px;top:369px;width:1104px;height:130px;\"><div><span>负责人</span><b>Marco</b></div><div><span>领域</span><b>Research Infra</b></div><div><span>状态</span><b class=\"accent\">进行中</b></div><aside><span>实验记录</span><strong>112</strong><small>固定演示数据</small></aside></div><div class=\"absolute tabs\" style=\"left:408px;top:538px;width:1104px;height:49px;\"><span class=\"\">研究问题 (5)</span><span class=\"selected\">实验 (112)</span><span>资产 (0)</span></div><div class=\"absolute toolbar\" style=\"left:408px;top:600px;width:1104px;height:37px;\"><span class=\"muted\">筛选</span><span class=\"toolbar-field\">全部状态⌄</span><span class=\"muted\">排序</span><span class=\"toolbar-field\">更新时间(最新)⌄</span><span class=\"push muted\">所有记录均为演示</span></div><div class=\"absolute table-head\" style=\"left:408px;top:641px;width:1104px;height:25px;\"><span>研究问题</span><span>状态</span><span>类型</span><span>负责人</span><span>更新</span></div><div class=\"absolute research-row\" style=\"left:408px;top:666px;width:1104px;height:94.5px;\"><div><h4>Run 112 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:760.5px;width:1104px;height:94.5px;\"><div><h4>Run 111 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:855px;width:1104px;height:94.5px;\"><div><h4>Run 110 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:949.5px;width:1104px;height:94.5px;\"><div><h4>Run 109 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1044px;width:1104px;height:94.5px;\"><div><h4>Run 108 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1138.5px;width:1104px;height:94.5px;\"><div><h4>Run 107 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1233px;width:1104px;height:94.5px;\"><div><h4>Run 106 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1327.5px;width:1104px;height:94.5px;\"><div><h4>Run 105 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1422px;width:1104px;height:94.5px;\"><div><h4>Run 104 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1516.5px;width:1104px;height:94.5px;\"><div><h4>Run 103 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1611px;width:1104px;height:94.5px;\"><div><h4>Run 102 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1705.5px;width:1104px;height:94.5px;\"><div><h4>Run 101 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1800px;width:1104px;height:94.5px;\"><div><h4>Run 100 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1894.5px;width:1104px;height:94.5px;\"><div><h4>Run 099 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:1989px;width:1104px;height:94.5px;\"><div><h4>Run 098 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2083.5px;width:1104px;height:94.5px;\"><div><h4>Run 097 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2178px;width:1104px;height:94.5px;\"><div><h4>Run 096 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2272.5px;width:1104px;height:94.5px;\"><div><h4>Run 095 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2367px;width:1104px;height:94.5px;\"><div><h4>Run 094 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2461.5px;width:1104px;height:94.5px;\"><div><h4>Run 093 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2556px;width:1104px;height:94.5px;\"><div><h4>Run 092 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2650.5px;width:1104px;height:94.5px;\"><div><h4>Run 091 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2745px;width:1104px;height:94.5px;\"><div><h4>Run 090 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2839.5px;width:1104px;height:94.5px;\"><div><h4>Run 089 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:2934px;width:1104px;height:94.5px;\"><div><h4>Run 088 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3028.5px;width:1104px;height:94.5px;\"><div><h4>Run 087 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3123px;width:1104px;height:94.5px;\"><div><h4>Run 086 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3217.5px;width:1104px;height:94.5px;\"><div><h4>Run 085 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3312px;width:1104px;height:94.5px;\"><div><h4>Run 084 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3406.5px;width:1104px;height:94.5px;\"><div><h4>Run 083 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3501px;width:1104px;height:94.5px;\"><div><h4>Run 082 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3595.5px;width:1104px;height:94.5px;\"><div><h4>Run 081 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3690px;width:1104px;height:94.5px;\"><div><h4>Run 080 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3784.5px;width:1104px;height:94.5px;\"><div><h4>Run 079 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3879px;width:1104px;height:94.5px;\"><div><h4>Run 078 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:3973.5px;width:1104px;height:94.5px;\"><div><h4>Run 077 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4068px;width:1104px;height:94.5px;\"><div><h4>Run 076 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4162.5px;width:1104px;height:94.5px;\"><div><h4>Run 075 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4257px;width:1104px;height:94.5px;\"><div><h4>Run 074 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4351.5px;width:1104px;height:94.5px;\"><div><h4>Run 073 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4446px;width:1104px;height:94.5px;\"><div><h4>Run 072 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4540.5px;width:1104px;height:94.5px;\"><div><h4>Run 071 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4635px;width:1104px;height:94.5px;\"><div><h4>Run 070 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4729.5px;width:1104px;height:94.5px;\"><div><h4>Run 069 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4824px;width:1104px;height:94.5px;\"><div><h4>Run 068 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:4918.5px;width:1104px;height:94.5px;\"><div><h4>Run 067 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5013px;width:1104px;height:94.5px;\"><div><h4>Run 066 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5107.5px;width:1104px;height:94.5px;\"><div><h4>Run 065 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5202px;width:1104px;height:94.5px;\"><div><h4>Run 064 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5296.5px;width:1104px;height:94.5px;\"><div><h4>Run 063 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5391px;width:1104px;height:94.5px;\"><div><h4>Run 062 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5485.5px;width:1104px;height:94.5px;\"><div><h4>Run 061 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5580px;width:1104px;height:94.5px;\"><div><h4>Run 060 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5674.5px;width:1104px;height:94.5px;\"><div><h4>Run 059 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5769px;width:1104px;height:94.5px;\"><div><h4>Run 058 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5863.5px;width:1104px;height:94.5px;\"><div><h4>Run 057 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:5958px;width:1104px;height:94.5px;\"><div><h4>Run 056 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6052.5px;width:1104px;height:94.5px;\"><div><h4>Run 055 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6147px;width:1104px;height:94.5px;\"><div><h4>Run 054 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6241.5px;width:1104px;height:94.5px;\"><div><h4>Run 053 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6336px;width:1104px;height:94.5px;\"><div><h4>Run 052 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6430.5px;width:1104px;height:94.5px;\"><div><h4>Run 051 · Candidate proposal evaluation</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6525px;width:1104px;height:94.5px;\"><div><h4>Run 050 · Multi-seed reproducibility check</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6619.5px;width:1104px;height:94.5px;\"><div><h4>Run 049 · Failure-case analysis</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div><div class=\"absolute research-row\" style=\"left:408px;top:6714px;width:1104px;height:94.5px;\"><div><h4>Run 048 · Learning-rate schedule comparison</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class=\"status\">已归档</span><span>experiment</span><span>Marco</span><span class=\"muted\">W28 / DEMO</span></div></main></div>"},"clips":{"projects-full.png":{"kind":"projects","x":0,"y":0,"w":1920,"h":1746,"empty":false},"projects-empty.png":{"kind":"projects","x":0,"y":0,"w":1920,"h":1746,"empty":true},"card1.png":{"kind":"projects","x":408,"y":247,"w":357,"h":288,"empty":false},"card2.png":{"kind":"projects","x":781,"y":247,"w":358,"h":288,"empty":false},"card3.png":{"kind":"projects","x":408,"y":616,"w":357,"h":312,"empty":false},"card4.png":{"kind":"projects","x":781,"y":616,"w":358,"h":312,"empty":false},"card5.png":{"kind":"projects","x":1155,"y":616,"w":357,"h":312,"empty":false},"card6.png":{"kind":"projects","x":408,"y":1009,"w":357,"h":312,"empty":false},"card7.png":{"kind":"projects","x":781,"y":1009,"w":358,"h":312,"empty":false},"card8.png":{"kind":"projects","x":1155,"y":1009,"w":357,"h":312,"empty":false},"card9.png":{"kind":"projects","x":408,"y":1402,"w":357,"h":312,"empty":false},"card10.png":{"kind":"projects","x":781,"y":1402,"w":358,"h":312,"empty":false},"float-filter.png":{"kind":"projects","x":1436,"y":130,"w":76,"h":44,"empty":false},"float-search.png":{"kind":"projects","x":408,"y":130,"w":1016,"h":44,"empty":false},"float-section.png":{"kind":"projects","x":408,"y":206,"w":150,"h":16,"empty":false},"float-stats.png":{"kind":"projects","x":429,"y":388,"w":315,"h":56,"empty":false},"nav.png":{"kind":"projects","x":0,"y":0,"w":1920,"h":61,"empty":false},"card4-hires.png":{"kind":"projects","x":781,"y":616,"w":358,"h":312,"empty":false},"detail-full.png":{"kind":"detail","x":0,"y":0,"w":1920,"h":1172,"empty":false},"detail-experiments.png":{"kind":"experiments","x":0,"y":0,"w":1920,"h":6857,"empty":false},"papers-full.png":{"kind":"papers","x":0,"y":0,"w":1920,"h":1489,"empty":false},"wbr-full.png":{"kind":"wbr","x":0,"y":0,"w":1920,"h":1080,"empty":false},"paper1.png":{"kind":"papers","x":408,"y":214,"w":1104,"h":225,"empty":false},"paper2.png":{"kind":"papers","x":408,"y":455,"w":1104,"h":224,"empty":false},"paper3.png":{"kind":"papers","x":408,"y":695,"w":1104,"h":225,"empty":false},"paper4.png":{"kind":"papers","x":408,"y":936,"w":1104,"h":224,"empty":false},"paper5.png":{"kind":"papers","x":408,"y":1176,"w":1104,"h":225,"empty":false}}}diff --git a/template/src/themes/palette-assets.ts b/template/src/themes/palette-assets.tsnew file mode 100644index 0000000..583c566--- /dev/null+++ b/template/src/themes/palette-assets.ts@@ -0,0 +1,24 @@+import assets from './palette-assets.json';++// Bounded cache: color-picker changes must not retain an unlimited number of SVGs.+const cache = new Map<string,string>();+export const paletteAsset = (colors: Record<string,string>, name: string): string | undefined => {+ const clip = assets.clips[name as keyof typeof assets.clips];+ if (!clip) return undefined;+ const keys = ['page','surface','field','text','muted','accent','border'];+ const values = keys.map(k => /^#[0-9a-f]{6}$/i.test(colors[k]) ? colors[k] : '#ffffff');+ const kraft = colors.id === 'vintage-kraft';+ const key = name + values.join('') + (kraft ? ':kraft' : '');+ if (cache.has(key)) return cache.get(key);+ const style = keys.map((k,i) => `--${k}:${values[i]}`).join(';');+ const paperStyle = kraft ? '<style>.project-card,.paper-card,.metadata{border-radius:3px!important;box-shadow:inset 0 0 24px rgba(92,55,23,.09)}.card-tags span,.chip,.status{border-radius:2px!important}</style>' : '';+ const markup = assets.pages[clip.kind as keyof typeof assets.pages] + paperStyle;+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${clip.w*2}" height="${clip.h*2}" viewBox="${clip.x} ${clip.y} ${clip.w} ${clip.h}"><foreignObject x="0" y="0" width="1920" height="5000"><div xmlns="http://www.w3.org/1999/xhtml" style="${style};width:1920px"><style>${clip.empty ? '.project-card{visibility:hidden!important}' : ''}</style>${markup}</div></foreignObject></svg>`;+ // Fixed seed keeps the fine grain attached to the paper as the camera moves.+ const grain = `<defs><filter id="kraft-grain" x="0" y="0" width="100%" height="100%"><feTurbulence type="fractalNoise" baseFrequency=".72" numOctaves="3" seed="17"/><feColorMatrix type="saturate" values="0"/></filter></defs><rect x="${clip.x}" y="${clip.y}" width="${clip.w}" height="${clip.h}" filter="url(#kraft-grain)" opacity=".18" style="mix-blend-mode:multiply"/>`;+ const uri = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(kraft ? svg.replace(/<\/svg>$/, grain + '</svg>') : svg)+ .replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/'/g, '%27');+ if (cache.size >= 128) cache.delete(cache.keys().next().value!);+ cache.set(key,uri);+ return uri;+};diff --git a/template/src/themes/palettes.json b/template/src/themes/palettes.jsonnew file mode 100644index 0000000..ab3cd77--- /dev/null+++ b/template/src/themes/palettes.json@@ -0,0 +1,74 @@+{+ "vintage-kraft": {+ "page": "#c8aa7d",+ "surface": "#dfc69e",+ "field": "#ccb086",+ "text": "#382a20",+ "muted": "#6b513b",+ "accent": "#8b4937",+ "border": "#ac895e"+ },+ "deep-ocean": {+ "page": "#0b1620",+ "surface": "#142735",+ "field": "#1c3443",+ "text": "#e8f1f5",+ "muted": "#9fb6c3",+ "accent": "#7cc8b4",+ "border": "#304957"+ },+ "obsidian-violet": {+ "page": "#14121b",+ "surface": "#211d2c",+ "field": "#2e283d",+ "text": "#f0edf7",+ "muted": "#b3a9c5",+ "accent": "#bca0e8",+ "border": "#41364f"+ },+ "modern-light": {+ "page": "#f4f7fb",+ "surface": "#ffffff",+ "field": "#edf2f8",+ "text": "#142238",+ "muted": "#5c6b82",+ "accent": "#2563eb",+ "border": "#d8e2ef"+ },+ "midnight": {+ "page": "#090f1a",+ "surface": "#111c2c",+ "field": "#162438",+ "text": "#f0f5ff",+ "muted": "#9babbe",+ "accent": "#61d9ef",+ "border": "#293b52"+ },+ "solar-pop": {+ "page": "#f9faf6",+ "surface": "#ffffff",+ "field": "#f0f3e7",+ "text": "#26342b",+ "muted": "#637067",+ "accent": "#527434",+ "border": "#dde4d5"+ },+ "coral-burst": {+ "page": "#fffffe",+ "surface": "#ffffff",+ "field": "#f9f2f3",+ "text": "#1f1235",+ "muted": "#716579",+ "accent": "#d94e59",+ "border": "#e9dfe6"+ },+ "color-play": {+ "page": "#f7f5fb",+ "surface": "#ffffff",+ "field": "#eee9f7",+ "text": "#282039",+ "muted": "#726781",+ "accent": "#7354b5",+ "border": "#e2dbea"+ }+}diff --git a/template/src/themes/visual-theme.tsx b/template/src/themes/visual-theme.tsxnew file mode 100644index 0000000..585b59d--- /dev/null+++ b/template/src/themes/visual-theme.tsx@@ -0,0 +1,91 @@+import { createContext, useContext, type FC, type ReactNode } from 'react';+import { staticFile } from 'remotion';+import palettes from './palettes.json';+import { paletteAsset } from './palette-assets';++export type ThemeId = 'ink-press' | keyof typeof palettes;+const font = '"Segoe UI Variable", "Segoe UI", "Microsoft YaHei", Arial, sans-serif';+export const THEME = {+ id: 'modern-light', page: '#f4f7fb', surface: '#ffffff', field: '#edf2f8',+ text: '#142238', muted: '#5c6b82', accent: '#2563eb', border: '#d8e2ef',+ shadowRgb: '20,34,56', pageRgb: '244,247,251', lightRgb: '239,245,255',+ accentRgb: '37,99,235', stage: '#142238', font,+};+export type VisualTheme = typeof THEME;+const rgb = (hex: string) => [1,3,5].map(i => parseInt(hex.slice(i,i+2),16)).join(',');+export const VISUAL_THEMES: Record<ThemeId, VisualTheme> = {+ 'ink-press': {...THEME, id:'ink-press', page:'#f2eee6'},+ ...Object.fromEntries(Object.entries(palettes).map(([id,p]) => [id, {...THEME,...p,id,+ pageRgb:rgb(p.page),accentRgb:rgb(p.accent),shadowRgb:rgb(p.text),lightRgb:rgb(p.surface),stage:p.field}]))+} as Record<ThemeId, VisualTheme>;+export const resolveTheme = (id?: string, colors?: Record<string, string>): VisualTheme => {+ const base = VISUAL_THEMES[id as ThemeId] ?? VISUAL_THEMES['ink-press'];+ if (base.id === 'ink-press' || !colors) return base;+ const valid = Object.fromEntries(Object.entries(colors).filter(([k,v]) => k in palettes['modern-light'] && /^#[0-9a-f]{6}$/i.test(v)));+ const p = {...base,...valid};+ return {...p,pageRgb:rgb(p.page),accentRgb:rgb(p.accent),shadowRgb:rgb(p.text),lightRgb:rgb(p.surface),stage:p.field};+};+const ThemeContext = createContext(VISUAL_THEMES['ink-press']);+export const VisualThemeProvider: FC<{theme?: string; colors?: Record<string,string>; children: ReactNode}> = ({theme, colors, children}) =>+ <ThemeContext.Provider value={resolveTheme(theme, colors)}>{children}</ThemeContext.Provider>;+export const useVisualTheme = () => useContext(ThemeContext);+export const rgba = (color: string, alpha: number) =>+ `color-mix(in srgb, ${color} ${Math.max(0, Math.min(1, alpha)) * 100}%, transparent)`;+export const themeAsset = (theme: VisualTheme, src: string) => {+ if (src.startsWith('textures/live/') && theme.id !== 'ink-press') {+ const asset = paletteAsset(theme, src.slice('textures/live/'.length));+ if (!asset) throw new Error(`Missing editable texture: ${src}`);+ return asset;+ }+ return staticFile(src);+};+// Roles of the original scene materials. Warm light is illumination, not an+// amber UI accent; unknown RGB colors are left alone instead of guessed.+const INK_RGB_ROLES: Record<string, 'pageRgb' | 'lightRgb' | 'accentRgb' | 'shadowRgb'> = {+ '250,247,242': 'pageRgb',+ '255,190,120': 'lightRgb', '255,214,150': 'lightRgb',+ '255,240,210': 'lightRgb', '255,240,214': 'lightRgb',+ '255,241,214': 'lightRgb', '255,244,224': 'lightRgb',+ '255,246,228': 'lightRgb', '255,248,232': 'lightRgb',+ '255,248,235': 'lightRgb', '255,255,255': 'lightRgb',+ '180,120,50': 'accentRgb',+ '0,0,0': 'shadowRgb', '30,25,18': 'shadowRgb',+ '31,41,55': 'shadowRgb', '40,30,20': 'shadowRgb',+ '60,45,30': 'shadowRgb', '62,48,32': 'shadowRgb', '70,56,38': 'shadowRgb',+};++/** Material adapter for existing Ink Press CSS. Returning the input verbatim keeps+ * the default preset backward compatible, including its original gradients. */+export const themePaint = (theme: VisualTheme, css: string): string => {+ if (theme.id === 'ink-press') return css;+ const hex: Record<string, string> = {+ '#f2eee6': theme.page, '#faf7f2': theme.page, '#f9f6f1': theme.page,+ '#fdfcfa': theme.page, '#fefcf9': theme.field, '#fff': theme.surface,+ '#13110f': theme.text, '#1f2937': theme.text, '#955905': theme.accent,+ '#ae6700': theme.accent, '#b5651d': theme.accent,+ '#65635f': theme.muted, '#575552': theme.muted, '#6b7280': theme.muted, '#9ca3af': theme.muted,+ };+ return css.replace(/#[\da-f]{3,8}\b/gi, c => hex[c.toLowerCase()] ?? c)+ .replace(/oklch\(\s*([\d.]+)%?[^)]+\)/g, (cssColor, lightness) => {+ const l = Number(lightness) <= 1 ? Number(lightness) * 100 : Number(lightness);+ const color = l >= 94 ? theme.page : l >= 80 ? theme.border : l >= 40 ? theme.accent : theme.text;+ const alpha = cssColor.match(/\/\s*([\d.]+)(%)?/);+ return alpha ? rgba(color, Number(alpha[1]) / (alpha[2] ? 100 : 1)) : color;+ })+ .replace(/(rgba?)\(\s*(\d+),\s*(\d+),\s*(\d+)/g, (cssColor, fn, r, g, b) => {+ const role = INK_RGB_ROLES[`${+r},${+g},${+b}`];+ return role ? `${fn}(${theme[role]}` : cssColor;+ });+};++/** Per-preset defaults, shared by direct rendering and the workbench manifest. */+export const sceneDefaults = <T extends Record<string, unknown>>(theme: VisualTheme, key: string, defaults: T): T => {+ if (theme.id === 'ink-press') return defaults;+ const mapped = Object.fromEntries(Object.entries(defaults).map(([k,v]) =>+ [k, typeof v === 'string' && /^(#|oklch|rgba)/.test(v) ? themePaint(theme, v) : v]));+ const sizes: Record<string, Record<string, unknown>> = {+ morning: {wordmarkSize: 116, kickerSize: 44}, outro: {wordmarkSize: 124, taglineSize: 44},+ caption: {fontSize: 36, bottom: 32, color: theme.text}, wbr: {kickerSize: 20},+ };+ return {...mapped, ...sizes[key]} as T;+};diff --git a/template/src/workbench.ts b/template/src/workbench.tsindex 9f36904..eb7e6ba 100644--- a/template/src/workbench.ts+++ b/template/src/workbench.ts@@ -13,6 +13,7 @@// shows exactly what is on screen, and an untouched import renders the original film.// Motion timing (cues, eases, camera keys) is deliberately NOT exposed.import { createElement, type FC } from 'react';+import { withThemes } from './themes/manifest';import {AIFL_SHOTS, AIFL_TOTAL, AiflMain, CAPTIONS, FLASH_CUTS, SFX, TITLE_CARDS, parseWords, sfxDuration,} from './aifl/Main';@@ -157,7 +158,7 @@ const title = (key: keyof typeof TITLE_CARDS, label: string) => {};};-export const WORKBENCH = {+const PAPER_WORKBENCH = {name: 'Ink Press · AIFL promo',fps: 30,width: 1920,@@ -192,7 +193,7 @@ export const WORKBENCH = {from: c.from,duration: c.duration,component: CaptionUnit as FC<Record<string, unknown>>,- props: { text: c.text, bottom: 72, ...D.caption },+ props: { text: c.text, ...D.caption },schema: SCHEMAS.caption,durationProp: 'duration',cardId: 'caption',@@ -209,3 +210,4 @@ export const WORKBENCH = {// the untouched film, registered in the workbench Studio as `ProjOriginal` for frame-by-frame comparisonoriginal: AiflMain as FC<Record<string, unknown>>,};+export const WORKBENCH = withThemes(PAPER_WORKBENCH);diff --git a/template/themes/.gitignore b/template/themes/.gitignorenew file mode 100644index 0000000..fdd6562--- /dev/null+++ b/template/themes/.gitignore@@ -0,0 +1 @@+previews/diff --git a/template/themes/ui.cjs b/template/themes/ui.cjsnew file mode 100644index 0000000..1370930--- /dev/null+++ b/template/themes/ui.cjs@@ -0,0 +1,55 @@+// Fictional research workspace used only to demonstrate the visual themes.+// All geometry is supplied by the retained template's live-layout.json.+const palettes = require('../src/themes/palettes.json');+const escape = s => String(s).replace(/[&<>\"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c]));+const pos = b => `left:${b.x}px;top:${b.y}px;width:${b.w}px;height:${b.h}px;`;+const box = (b,cls,html,extra='') => `<div class="absolute ${cls}" style="${pos(b)}${extra}">${html}</div>`;+const icon = name => ({search:'<circle cx="10" cy="10" r="6"/><path d="m15 15 5 5"/>',filter:'<path d="M3 5h18M6 11h12M10 17h4"/>',arrow:'<path d="M5 12h14M13 6l6 6-6 6"/>',grid:'<rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/>'}[name] || '');+const svg = name => `<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">${icon(name)}</svg>`;+const data = [+ ['Routing flaky build investigations between agent pools with failure-aware policies.','Yuki','Agents & Dev Tools','Agents','CI',1,1],+ ['Retrieval policies for code-plus-screenshot troubleshooting assistants.','Priya','Agents & Dev Tools','Multimodal','Retrieval',1,1],+ ['Validating how a compact model can learn from on-device corrections without forgetting.','Lin','Efficient Models','EdgeAI','Continual learning',2,15],+ ['Calibrating small models to defer to larger ones, reducing cost while holding accuracy.','Yuki','Efficient Models','Calibration','Routing',7,2],+ ['Probing what zero-shot tabular foundation models learn from column headers.','Marco','Efficient Models','Tabular','Interpretability',1,2],+ ['Forecasting calibration drift in industrial vibration sensors with tiny transformers.','Lin','Perception & Sensing','Time series','Forecasting',3,14],+ ['Comparing ASR models on dialect corpora and evaluating synthetic augmentation.','Marco','Perception & Sensing','ASR','Evaluation',1,13],+ ['Stress-testing person re-identification under seasonal shifts and camera changes.','Yuki','Perception & Sensing','ReID','Robustness',2,3],+ ['An autonomous research loop that proposes, runs, and summarizes training experiments.','Marco','Research Infra','Agents','AutoML',5,112],+ ['Benchmarking coding agents on week-long software tasks with live compute routing.','Priya','Research Infra','Agents','Benchmark',5,7],+];+function nav(wide=false){return `<header class="nav" style="height:61px"><div class="nav-inner" style="${wide?'left:24px;right:24px':'left:408px;width:1104px'}"><span class="brand-mark">${svg('grid')}</span><strong>AI Foundation Lab</strong><span class="nav-link active">项目</span><span class="nav-link">周报</span><span class="nav-link">论文</span><span class="demo-label">演示工作台</span><span class="nav-end"><span class="live-dot"></span> Research workspace <span class="avatar">FL</span></span></div></header>`;}+function projectCard(b,i){const d=data[i];return box(b,'project-card',`<div class="card-eyebrow"><span>RESEARCH / ${String(i+1).padStart(2,'0')}</span><span class="status">${i===4?'已完成':'进行中'}</span></div><h3>${escape(b.title)}</h3><p class="card-desc">${escape(d[0])}</p><div class="card-stats"><span>负责人</span><strong>${d[1]}</strong><span>工作区</span><strong>Foundation Lab</strong><span>领域</span><strong>${d[2]}</strong></div><div class="card-counts">研究问题 <b>${d[5]}</b><span>实验 <b>${d[6]}</b></span><span>论文 <b>0</b></span></div><div class="card-tags"><span>${d[3]}</span><span>${d[4]}</span></div>`, `--card-index:${i}`);}+function projects(L){return nav()+box({x:408,y:90,w:1104,h:25},'section-top','<span>全部项目 <span class="muted">/ Research portfolio</span></span><span class="muted">10 个项目 · 演示数据</span>')+box(L.float[1],'search',`${svg('search')}<span>搜索项目名、简介、负责人或标签</span><kbd>⌘ K</kbd>`)+box(L.float[0],'filter',`${svg('filter')}<span>筛选</span>`)+L.projects.sections.slice(1).map((b,i)=>box({...b,w:1104,h:27},'project-section',`<span class="section-name">${escape(b.text)}</span><span>${[2,3,3,2][i]} 个项目</span>`)).join('')+L.projects.cards.map(projectCard).join('');}+const rowTitles=['Can an agent loop discover better LR schedules than a swept baseline?','Do discovered schedules transfer across model and dataset scales?','Which feedback signals make the experiment loop more reliable?','How should failed runs inform the next candidate proposal?','What is the compute budget required for a reproducible improvement?'];+function detail(L,experiments=false){const header=nav()+box({x:408,y:94,w:1104,h:25},'muted','项目 / Research Infra / nano-lab')+box({x:408,y:126,w:1104,h:47},'detail-title','nano-lab: automated research loop')+box({x:408,y:186,w:1104,h:30},'detail-tags','<span class="chip">Agents</span><span class="chip">AutoML</span><span class="demo-note">虚构研究项目 · 用于视觉演示</span>')+box({x:408,y:242,w:1104,h:44},'description','An autonomous research loop that proposes, runs, and summarizes language-model training experiments.')+box({x:408,y:312,w:1104,h:35},'metadata-head','<b>项目资料</b><span class="accent">编辑资料 ↗</span>')+box({x:408,y:369,w:1104,h:130},'metadata',`<div><span>负责人</span><b>Marco</b></div><div><span>领域</span><b>Research Infra</b></div><div><span>状态</span><b class="accent">进行中</b></div><aside><span>实验记录</span><strong>112</strong><small>固定演示数据</small></aside>`)+box({x:408,y:538,w:1104,h:49},'tabs',`<span class="${!experiments?'selected':''}">研究问题 (5)</span><span class="${experiments?'selected':''}">实验 (112)</span><span>资产 (0)</span>`)+box({x:408,y:600,w:1104,h:37},'toolbar','<span class="muted">筛选</span><span class="toolbar-field">全部状态⌄</span><span class="muted">排序</span><span class="toolbar-field">更新时间(最新)⌄</span><span class="push muted">所有记录均为演示</span>')+box({x:408,y:641,w:1104,h:25},'table-head','<span>研究问题</span><span>状态</span><span>类型</span><span>负责人</span><span>更新</span>');+if(experiments)return header+Array.from({length:65},(_,i)=>box({x:408,y:666+i*94.5,w:1104,h:94.5},'research-row',`<div><h4>Run ${String(112-i).padStart(3,'0')} · ${['Learning-rate schedule comparison','Candidate proposal evaluation','Multi-seed reproducibility check','Failure-case analysis'][i%4]}</h4><p>固定演示记录:实验配置、运行摘要与后续研究问题相互关联。</p></div><span class="status">已归档</span><span>experiment</span><span>Marco</span><span class="muted">W28 / DEMO</span>`)).join('');+return header+L.detail.rows.map((b,i)=>box(b,'research-row',`<div><h4>${rowTitles[i]}</h4><p>${['Compare the autonomous loop with a fixed-budget baseline across three seeds.','Evaluate generalization using two model sizes and held-out task families.','Record quality, cost, and failure modes before selecting the next iteration.','Link each proposal to the evidence and limitations of previous runs.','Keep the original configuration and evaluation protocol for review.'][i]}</p></div><span class="status">研究中</span><span>empirical</span><span>Marco</span><span class="muted">W28 / DEMO</span>`)).join('');}+const paperData=[['Drift-Aware Attention: Forecasting Sensor Calibration Decay with Tiny Transformers','Sensor drift early-warning','用微型时序模型预测传感器漂移;评测协议与当前项目的预警目标一致。','可复用 lead-time 评测设计,并补充跨设备与失效场景的对照。'],['Knowing When to Ask: Sequence-Level Deferral for Model Cascades','Confidence-routed model cascade','研究序列级置信度校准,帮助小模型判断何时将请求交给更大模型。','将分流阈值与项目已有的质量、成本评测表关联,作为下一轮实验候选。'],['Self-Improving Research Agents Discover Better Learning-Rate Schedules','nano-lab: automated research loop','自动研究代理在闭环中提出并验证学习率调度,记录方案来源与实验结果。','复用候选生成、运行与总结结构,同时保留人工复核节点。'],['Synthetic Dialects Close the Gap: Data Augmentation for Low-Resource ASR','Dialect-robust speech recognition','比较合成数据在低资源语音识别中的作用,并单独观察真实测试集表现。','对照数据配比、方言覆盖范围和误差类型,避免只看汇总指标。'],['Week-Long Agents: Memory Scaffolds for Long-Horizon Software Tasks','Long-horizon coding arena','比较三种记忆框架在长周期软件任务中的完成情况与恢复能力。','将任务拆解、失败恢复和证据保存方法纳入下一轮研究设计。']];+function papers(L){return nav()+box({x:408,y:94,w:1104,h:36},'detail-title','Paper Radar <span class="inline-cn">每日论文雷达</span>')+box({x:408,y:140,w:1104,h:28},'muted','与当前项目关联的研究线索。以下论文、摘要与关联均为虚构演示内容。')+box({x:408,y:182,w:1104,h:22},'section-top','<span class="muted">W28 / RESEARCH DIGEST</span><span class="accent">5 篇关联研究</span>')+L.papers.cards.map((b,i)=>{const d=paperData[i];return box(b,'paper-card',`<div class="paper-heading"><span class="paper-index">0${i+1}</span><h3>${d[0]}</h3><span class="paper-demo">DEMO</span></div><div class="paper-meta">Research team · Fictional paper ${String(i+1).padStart(3,'0')} · 演示资料</div><p class="paper-summary"><span>TL;DR</span>${d[2]}</p><div class="paper-link"><small>关联项目</small><strong>${d[1]} ${svg('arrow')}</strong><p>${d[3]}</p></div>`);}).join('')+box({x:408,y:1440,w:1104,h:24},'footer-note','已显示全部演示记录');}+const weeklyBlocks=[+ 'W28 · Foundation Lab Weekly','Team overview',+ '本周围绕模型分流、传感器预警与语音识别推进实验。周五评审将逐项核对证据、限制与下一步。',+ '实验记录模板 v2 已启用;新增结论需关联原始配置和评测记录。',+ 'Lin',+ 'Sensor drift early-warning:完成 patch-length 对照实验。下一步在独立设备数据上复核提前量与误报。',+ '已与协作团队对齐阈值调参节奏,下周验证反馈回路。',+ '待补充:一个设备批次的标定样本,已列入下周计划。',+ 'Marco',+ 'nano-lab agent loop:完成候选学习率调度的多种子对照。',+ '新增研究问题:调度策略能否跨模型规模复用?',+ '下周:将失败实验的原因写回候选生成规则。',+ 'Yuki',+ 'Confidence-routed cascade:完成分流阈值校准与质量对照。',+ 'Self-healing CI triage:补充错误路由案例与人工复核记录。',+ '待讨论:将置信度校准整理为可复用评测组件。',+ 'Priya',+ 'Dialect-robust ASR:继续对比数据增强配比与真实语音误差。',+ '论文雷达发现 3 条相关研究线索,已关联对应项目。',+ '下周整理评测集 v2,并完成本轮实验结论归档。',+];+function wbr(L){const left=box(L.wbr.leftRail,'left-rail','<div class="rail-title">周报 <span>«</span></div><div class="rail-search">'+svg('search')+' 搜索周报正文</div><div class="weekly-item"><b>2026 第 28 周</b><span class="accent">本周</span><p>Foundation Lab Weekly</p><small>演示文档 · 已同步</small></div>');const right=box(L.wbr.rightRail,'right-rail','<div class="rail-title">评论 · 2 <span>»</span></div><div class="comment"><blockquote>“模型分流评测”</blockquote><b><span class="avatar">YL</span> Yuki <small>演示评论</small></b><p>请把质量与成本的对照记录一并关联,便于周五评审。</p><div class="comment-reply">回复… <span>↵</span></div></div><div class="comment"><blockquote>“独立设备数据”</blockquote><b><span class="avatar">LN</span> Lin <small>演示评论</small></b><p>已补充验证计划,下周带上失败案例与样本说明。</p><div class="comment-reply">回复… <span>↵</span></div></div>');return nav(true)+box({x:208,y:61,w:1424,h:42},'doc-top','<b>2026 第 28 周</b><span>研究进展</span><span class="accent">已同步</span><span class="push demo-note">虚构演示文档</span>')+box({x:208,y:103,w:1424,h:44},'doc-tools','<span>↶</span><span>↷</span><i></i><span>标题 1⌄</span><i></i><b>B</b><em>I</em><u>U</u><span>≡</span><span>☷</span><i></i><span>↗</span><span>▦</span>')+left+right+L.wbr.blocks.map((b,i)=>box(b,`weekly-block ${b.tag}`,escape(weeklyBlocks[i]))).join('');}+const style=`*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:'Segoe UI Variable','Segoe UI','Microsoft YaHei',sans-serif;font-size:14px;color:var(--text);background:var(--page);-webkit-font-smoothing:antialiased}#workspace{position:relative;width:1920px;overflow:hidden;background:var(--page)}.absolute{position:absolute}.muted{color:var(--muted)}.accent{color:var(--accent)}.push{margin-left:auto}.nav{position:absolute;inset:0 0 auto;background:var(--surface);border-bottom:1px solid var(--border)}.nav-inner{position:absolute;top:0;height:61px;display:flex;align-items:center;gap:21px}.nav strong{font-size:19px;font-weight:680;letter-spacing:-.5px}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:var(--field);border:1px solid var(--border);color:var(--accent);border-radius:7px;margin-right:-12px}.nav-link{font-size:13px;color:var(--muted);height:61px;display:flex;align-items:center}.nav-link.active{color:var(--accent);border-bottom:2px solid var(--accent)}.demo-label{font-size:11px;color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px}.nav-end{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:11px}.live-dot{width:5px;height:5px;background:var(--accent);border-radius:50%}.avatar{display:inline-grid;place-items:center;width:26px;height:26px;background:var(--field);color:var(--accent);border:1px solid var(--border);border-radius:7px;font-size:10px;font-weight:700;margin-left:9px}.section-top{display:flex;justify-content:space-between;align-items:center;font-size:12px}.section-top .muted{font-size:11px}.search,.filter{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--border);border-radius:7px;color:var(--muted);font-size:13px;padding:0 14px}.search kbd{margin-left:auto;background:var(--field);font:11px inherit;border:1px solid var(--border);border-radius:3px;padding:2px 6px}.filter{gap:6px;padding:0 11px;color:var(--text)}.project-section{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.section-name{font-size:12px;font-weight:600;letter-spacing:1px;text-transform:uppercase;line-height:16px}.project-card{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:20px;overflow:hidden}.card-eyebrow{display:flex;justify-content:space-between;align-items:center;position:absolute;left:20px;right:20px;top:16px;color:var(--muted);font-size:9px;letter-spacing:1.1px}.status{display:inline-block;padding:3px 7px;border:1px solid var(--border);background:var(--field);color:var(--accent);font-size:10px;border-radius:4px;white-space:nowrap;letter-spacing:0}.project-card h3{position:absolute;left:20px;right:18px;top:51px;margin:0;font-size:15px;font-weight:650;letter-spacing:-.3px;line-height:20px;white-space:nowrap}.card-desc{position:absolute;left:20px;right:20px;top:82px;margin:0;font-size:13px;line-height:21px;color:var(--muted)}.card-stats{position:absolute;left:20px;right:20px;top:140px;height:56px;display:grid;grid-template-columns:83px 1fr;grid-template-rows:repeat(3,18.666px);font-size:11px;line-height:18.666px;color:var(--muted)}.card-stats strong{font-weight:550;color:var(--text)}.card-counts{position:absolute;left:20px;right:20px;bottom:55px;display:flex;gap:8px;color:var(--muted);font-size:11px;line-height:16px}.card-counts span{margin-left:7px}.card-counts b{font-weight:600;color:var(--text)}.card-tags{position:absolute;left:20px;right:20px;bottom:18px;display:flex;gap:6px}.card-tags span,.chip{display:inline-flex;align-items:center;background:var(--field);color:var(--muted);border:1px solid var(--border);padding:3px 7px;border-radius:4px;font-size:10px;line-height:14px}.detail-title{font-size:30px;line-height:42px;font-weight:650;letter-spacing:-.7px}.detail-tags{display:flex;align-items:center;gap:8px}.chip{font-size:12px;padding:5px 10px}.demo-note{font-size:11px;color:var(--muted);margin-left:12px}.description{font-size:14px;line-height:24px;color:var(--muted)}.metadata-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.metadata-head b{font-weight:500}.metadata{border:1px solid var(--border);border-radius:8px;background:var(--surface);padding:18px 20px}.metadata>div{display:grid;grid-template-columns:145px 1fr;line-height:30px;font-size:13px}.metadata>div>span{color:var(--muted)}.metadata b{font-weight:550}.metadata aside{position:absolute;right:24px;top:18px;display:flex;flex-direction:column;width:120px;border-left:1px solid var(--border);padding-left:24px}.metadata aside span,.metadata aside small{font-size:11px;color:var(--muted)}.metadata aside strong{font-size:31px;font-weight:650;margin:4px 0;color:var(--accent)}.tabs{display:flex;gap:32px;border-bottom:1px solid var(--border);color:var(--muted);font-size:14px}.tabs span{padding:13px 4px}.tabs .selected{color:var(--accent);border-bottom:2px solid var(--accent)}.toolbar{display:flex;align-items:center;gap:12px;font-size:12px}.toolbar-field{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface)}.table-head,.research-row{display:grid;grid-template-columns:670px 90px 96px 74px 1fr;gap:0;align-items:center}.table-head{background:var(--field);color:var(--muted);font-size:11px;padding:0 14px}.research-row{padding:11px 14px;border-bottom:1px solid var(--border);background:var(--surface);font-size:12px}.research-row h4{margin:0 22px 6px 0;font-size:15px;font-weight:600;line-height:20px;letter-spacing:-.2px}.research-row p{margin:0 32px 0 0;color:var(--muted);font-size:12px;line-height:19px}.research-row>.status{justify-self:start}.inline-cn{font-size:17px;font-weight:500;letter-spacing:0;color:var(--muted);margin-left:13px}.paper-card{background:var(--surface);border:1px solid var(--border);border-radius:9px;padding:22px 22px 18px;overflow:hidden}.paper-heading{display:flex;align-items:center;gap:13px}.paper-index{display:grid;place-items:center;width:25px;height:25px;flex-shrink:0;background:var(--field);border:1px solid var(--border);border-radius:5px;color:var(--accent);font-size:11px;font-weight:600}.paper-heading h3{font-size:15px;font-weight:650;margin:0;line-height:22px;letter-spacing:-.2px}.paper-demo{font-size:9px;letter-spacing:1px;color:var(--muted);margin-left:auto}.paper-meta{color:var(--muted);font-size:11px;margin:7px 0 0 38px}.paper-summary{font-size:13px;line-height:21px;margin:19px 0 17px;color:var(--text)}.paper-summary>span{color:var(--accent);font-size:10px;letter-spacing:1px;margin-right:12px}.paper-link{border-top:1px solid var(--border);padding-top:11px}.paper-link small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.paper-link strong{display:flex;align-items:center;gap:8px;color:var(--accent);font-size:13px;font-weight:600}.paper-link p{font-size:12px;color:var(--muted);margin:6px 0 0;line-height:18px}.footer-note{text-align:center;font-size:11px;color:var(--muted)}.left-rail,.right-rail{background:var(--surface)}.left-rail{border-right:1px solid var(--border)}.right-rail{border-left:1px solid var(--border)}.rail-title{height:42px;padding:12px;font-size:12px;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);color:var(--muted)}.rail-search{margin:10px 12px 9px;border:1px solid var(--border);border-radius:5px;background:var(--field);padding:7px 9px;font-size:12px;color:var(--muted);display:flex;align-items:center;gap:7px}.weekly-item{padding:12px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);background:var(--field);font-size:12px}.weekly-item b{font-weight:650}.weekly-item>.accent{font-size:9px;margin-left:8px}.weekly-item p{margin:7px 0 4px;color:var(--muted);font-size:11px;white-space:nowrap}.weekly-item small{font-size:10px;color:var(--muted)}.doc-top{background:var(--surface);display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.doc-top b{color:var(--text);font-weight:600}.doc-tools{background:var(--surface);border-bottom:1px solid var(--border);display:flex;gap:20px;align-items:center;padding:0 20px;color:var(--muted);font-size:14px}.doc-tools i{width:1px;height:18px;background:var(--border)}.weekly-block{margin:0;overflow:visible}.weekly-block.h1{font-size:24px;font-weight:650;letter-spacing:-.65px;line-height:28px;white-space:nowrap}.weekly-block.h2{font-size:18px;font-weight:620;line-height:23px;white-space:nowrap}.weekly-block.li{font-size:15.5px;line-height:27.1875px;color:var(--text)}.weekly-block.li:before{content:'•';position:absolute;left:-19px;top:0;color:var(--accent)}.comment{margin:12px 12px 0;padding:11px;border:1px solid var(--border);border-radius:7px;background:var(--surface);font-size:12px}.comment blockquote{margin:0 0 10px;background:var(--field);border-left:2px solid var(--accent);padding:6px 7px;color:var(--muted);font-size:11px}.comment>b{display:flex;align-items:center;gap:6px;font-weight:600}.comment .avatar{margin:0;width:20px;height:20px;font-size:8px;border-radius:5px}.comment small{font-size:9px;color:var(--muted);font-weight:400}.comment p{font-size:12px;line-height:19px;margin:9px 0 12px}.comment-reply{background:var(--field);border:1px solid var(--border);padding:6px 8px;font-size:10px;color:var(--muted);border-radius:4px;display:flex;justify-content:space-between}`;+const themeStyle = {};+function render(theme,page,L){const p=palettes[theme];if(!p)throw Error('Unknown theme');const h=page==='projects'?L.projects.pageH:page==='papers'?L.papers.pageH:page==='wbr'?L.wbr.pageH:page==='experiments'?L.detail.expPageH:L.detail.pageH;const content=page==='projects'?projects(L):page==='papers'?papers(L):page==='wbr'?wbr(L):detail(L,page==='experiments');return `<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=1920"><title>${theme} · ${page} · 演示工作台</title><style>:root{${Object.entries(p).map(([k,v])=>`--${k}:${v}`).join(';')}}${style}${themeStyle[theme] || ''}.search{background:var(--field)}.weekly-block.h1{font-size:22px}</style></head><body><main id="workspace" style="height:${h}px" data-theme="${theme}" data-page="${page}" data-demo="true">${content}</main></body></html>`;}+module.exports={render,palettes};diff --git a/workbench/package.json b/workbench/package.jsonindex d5069af..291750f 100644--- a/workbench/package.json+++ b/workbench/package.json@@ -4,6 +4,7 @@"version": "0.1.0","type": "module","scripts": {+ "test:themes": "node scripts/test-themes.mjs","gen": "node scripts/gen-index.mjs","prepare": "node scripts/gen-index.mjs","predev": "node scripts/gen-index.mjs",diff --git a/workbench/scripts/test-themes.mjs b/workbench/scripts/test-themes.mjsnew file mode 100644index 0000000..112d28c--- /dev/null+++ b/workbench/scripts/test-themes.mjs@@ -0,0 +1,162 @@+import { createRequire } from 'node:module';+import fs from 'node:fs';+import assert from 'node:assert/strict';+import test from 'node:test';+import { runInNewContext } from 'node:vm';+import ts from 'typescript';++// Run the small pure state/props adapter using the project's existing compiler.+const require = createRequire(import.meta.url);+require.extensions['.ts'] = (mod, filename) => mod._compile(ts.transpileModule(fs.readFileSync(filename, 'utf8'), {+ compilerOptions: {module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2020, esModuleInterop: true, jsx: ts.JsxEmit.ReactJSX},+}).outputText, filename);+require.extensions['.tsx'] = require.extensions['.ts'];+const {switchTheme, themedProps, inheritedProps, selectedTheme, themedBackground, upgradeLegacyTheme} = require('../src/theme.ts');+const card = {themeKey: 'title', schema: [{key:'ink',default:'#111'},{key:'text',default:'Title'}]};+const manifest = {themeProp:'__theme', defaultTheme:'paper', themes:[+ {id:'paper',background:'#fff',unitDefaults:{title:{ink:'#111'}}},+ {id:'dark',background:'#111',unitDefaults:{title:{ink:'#eee'}}},+]};+test('palette edits reach props and background, preserve clip overrides, and reset on preset switch', () => {+ const m={...manifest,paletteProp:'__palette',themes:[{id:'dark',palette:{page:'#111111',text:'#eeeeee',accent:'#999999'},unitDefaults:{title:{ink:'#eeeeee',amber:'#999999'}}}]};+ const colors={page:'#fefefe',text:'#222222',accent:'#2255aa',font:'evil',border:'url(x)'};+ const props=themedProps(m,card,'dark',{ink:'#123456'},colors);+ assert.equal(props.ink,'#123456');+ assert.equal(props.amber,'#2255aa');+ assert.deepEqual(props.__palette,{page:'#fefefe',text:'#222222',accent:'#2255aa'});+ assert.equal(themedBackground({themeId:'dark',themeColors:colors},m),'#fefefe');+ const project={themeId:'dark',themeColors:colors,tracks:[]};+ const reset=switchTheme(project,m,'dark');+ assert.equal(reset.themeColors,undefined);+ assert.equal(reset.tracks,project.tracks);+ assert.equal(JSON.parse(JSON.stringify(project)).themeColors.accent,'#2255aa');+ assert.equal(themedProps(m,{schema:[]},'dark',{},colors).__palette,undefined);+});+test('a theme change preserves the complete edit tree and round-trips in JSON', () => {+ const project = {name:'Edited',tracks:[{id:'t',clips:[{start:17,duration:90,props:{text:'My copy',ink:'#c0ffee'}}]}]};+ const changed = switchTheme(project, manifest, 'dark');+ assert.equal(changed.tracks,project.tracks);+ assert.equal(project.themeId,undefined);+ assert.equal(JSON.parse(JSON.stringify(changed)).themeId,'dark');+ assert.equal(themedBackground(changed,manifest),'#111');+});+test('explicit edits take precedence even when equal to another preset default', () => {+ assert.deepEqual(themedProps(manifest,card,'dark',{ink:'#111',text:'Edited'}),{ink:'#111',text:'Edited',__theme:'dark'});+ assert.equal(themedProps(manifest,card,'dark',{ink:'#c0ffee'}).ink,'#c0ffee');+ assert.deepEqual(inheritedProps(manifest,'title',{ink:'#111',text:'Edited'}),{text:'Edited'});+});+test('old JSON is normalized once, subsequent explicit default-colored edits survive', () => {+ const old={tracks:[{clips:[{cardId:'title',props:{ink:'#111',text:'Edited'}}]}]};+ const upgraded=upgradeLegacyTheme(old,manifest,{title:card});+ assert.equal(upgraded.themeId,'paper');+ assert.deepEqual(upgraded.tracks[0].clips[0].props,{text:'Edited'});+ upgraded.tracks[0].clips[0].props.ink='#111';+ assert.equal(upgradeLegacyTheme(upgraded,manifest,{title:card}),upgraded);+ assert.equal(old.tracks[0].clips[0].props.ink,'#111');+});+test('missing or unknown IDs use the default and invalid switches are no-ops', () => {+ const project={tracks:[]};+ assert.equal(selectedTheme(manifest,'unknown').id,'paper');+ assert.equal(switchTheme(project,manifest,'unknown'),project);+ assert.equal(themedProps(manifest,card).ink,'#111');+});+test('ordinary manifests and non-theme cards retain their original behavior', () => {+ assert.deepEqual(themedProps(null,card,undefined,{text:'Edited'}),{ink:'#111',text:'Edited'});+ assert.deepEqual(themedProps(manifest,{schema:card.schema},'dark'),{ink:'#111',text:'Title'});+ assert.deepEqual(inheritedProps({},'title',{ink:'#111'}),{ink:'#111'});+});+const {parsePalette,paletteFromProject,applyPalette}=require('../src/palettePresets.ts');+test('portable palettes validate schema and round-trip without changing clips',()=>{+ const m={themes:[{id:'dark',label:'Dark',palette:{page:'#111111',text:'#eeeeee'}}]};+ const p={themeId:'dark',themeColors:{text:'#ffffff'},tracks:[]};+ const saved=paletteFromProject(m,p,'My theme');+ assert.deepEqual(parsePalette(JSON.stringify(saved),m),saved);+ assert.equal(applyPalette(p,saved).tracks,p.tracks);+ for(const bad of [{...saved,version:2},{...saved,baseThemeId:'missing'},{...saved,colors:{page:'url(x)',text:'#eeeeee'}},{...saved,colors:{page:'#111111'}}])assert.throws(()=>parsePalette(JSON.stringify(bad),m));+ assert.throws(()=>parsePalette('not json',m));+ assert.throws(()=>parsePalette(' '.repeat(65537),m));+});++const {paletteAsset}=require('../../template/src/themes/palette-assets.ts');+const paletteClips=require('../../template/src/themes/palette-assets.json').clips;+const palettes=require('../../template/src/themes/palettes.json');+test('every editable texture is CSS-url-safe, including procedural kraft grain',()=>{+ const originals=fs.readdirSync(new URL('../../template/public/textures/live/',import.meta.url)).filter(f=>f.endsWith('.png'));+ assert.deepEqual(Object.keys(paletteClips).sort(),originals.sort());+ for(const [id,colors] of Object.entries(palettes))for(const name of originals){+ const uri=paletteAsset({...colors,id},name);+ assert.ok(uri.startsWith('data:image/svg+xml;'));+ assert.doesNotMatch(uri,/[()']/);+ const decoded=decodeURIComponent(uri.slice(uri.indexOf(',')+1));+ assert.ok(decoded.includes('var(--'));+ if(id==='vintage-kraft')assert.ok(decoded.includes('url(#kraft-grain)'));+ }+});++const {resolveTheme,themePaint}=require('../../template/src/themes/visual-theme.tsx');+const {WORKBENCH}=require('../../template/src/workbench.ts');++test('illumination, accents and shadows have distinct roles and preserve opacity',()=>{+ const warmLights=['255,190,120','255,214,150','255,240,210','255,240,214','255,241,214','255,244,224','255,246,228','255,248,232','255,248,235','255,255,255'];+ for(const id of Object.keys(palettes)){+ const theme=resolveTheme(id,{surface:'#eeeeee',accent:'#ff00ff',text:'#123456',page:'#abcdef'});+ for(const rgb of warmLights)assert.equal(themePaint(theme,`rgba(${rgb},0.42)`),'rgba(238,238,238,0.42)');+ assert.equal(themePaint(theme,'rgba(180,120,50,.35)'),'rgba(255,0,255,.35)');+ assert.equal(themePaint(theme,'rgba(40,30,20,0.18)'),'rgba(18,52,86,0.18)');+ assert.equal(themePaint(theme,'rgb(250,247,242)'),'rgb(171,205,239)');+ assert.equal(themePaint(theme,'rgba(220, 130, 50, .7)'),'rgba(220, 130, 50, .7)');+ }+ const original='radial-gradient(rgba(255,241,214,0.42), rgba(180,120,50,.35), rgba(40,30,20,0.18))';+ assert.equal(themePaint(resolveTheme('ink-press'),original),original);+});++test('preset switches preserve weekly copy and share compact caption defaults',()=>{+ const wbr=WORKBENCH.shots.find(u=>u.id==='wbr');+ const weeklyCard={themeKey:'wbr',schema:wbr.schema};+ const imported=inheritedProps(WORKBENCH,'wbr',wbr.props);+ assert.equal(imported.kicker,'Weekly Brief · 2026-W28');+ const caption=WORKBENCH.captions[0];+ const captionCard={themeKey:'caption',schema:caption.schema};+ for(const theme of WORKBENCH.themes){+ assert.equal(theme.unitDefaults.wbr.kicker,undefined);+ assert.equal(themedProps(WORKBENCH,weeklyCard,theme.id,imported).kicker,imported.kicker);+ assert.equal(themedProps(WORKBENCH,weeklyCard,theme.id,{kicker:'Our weekly report'}).kicker,'Our weekly report');+ assert.equal(themedProps(WORKBENCH,weeklyCard,theme.id,{kicker:''}).kicker,'');+ const props=themedProps(WORKBENCH,captionCard,theme.id,inheritedProps(WORKBENCH,'caption',caption.props));+ assert.equal(props.fontSize,theme.id==='ink-press'?22:36);+ assert.equal(props.bottom,theme.id==='ink-press'?72:32);+ assert.equal(themedProps(WORKBENCH,captionCard,theme.id,{fontSize:44,bottom:90}).bottom,90);+ }+});++test('live palette updates preserve selection and use the gesture checkpoint for undo/redo',()=>{+ const project={themeId:'dark',tracks:[{id:'track',clips:[{id:'clip',cardId:'title',props:{text:'Keep me'}}]}]};+ const mod={exports:{}};+ const mockModules={+ './cards/registry':{CARDS:{}}, './demoProject':{demoProject:()=>project},+ './cards/projectCards':{MANIFEST:null}, './cards/manifest':{manifestKey:()=>''},+ './projectImport':{buildProjectFromManifest:()=>project},+ };+ const code=ts.transpileModule(fs.readFileSync(new URL('../src/store.ts',import.meta.url),'utf8'),{+ compilerOptions:{module:ts.ModuleKind.CommonJS,target:ts.ScriptTarget.ES2020},+ }).outputText;+ runInNewContext(code,{+ module:mod,exports:mod.exports,URLSearchParams,+ require:id=>mockModules[id]??(id.startsWith('./')?require(`../src/${id.slice(2)}.ts`):require(id)),+ localStorage:{getItem:()=>null,setItem:()=>{}},+ window:{location:{search:'',pathname:'/'},addEventListener:()=>{}},+ document:{addEventListener:()=>{}},setTimeout:()=>0,clearTimeout:()=>{},+ });+ const store=mod.exports.useStore;+ store.getState().select('clip');+ store.getState().commit();+ for(let i=1;i<=80;i++)store.getState().setThemeColors({accent:`#${i.toString(16).padStart(6,'0')}`});+ assert.equal(store.getState().past.length,1);+ assert.equal(store.getState().selectedClipId,'clip');+ assert.equal(store.getState().project.tracks,project.tracks);+ assert.equal(store.getState().project.themeColors.accent,'#000050');+ store.getState().undo();+ assert.equal(store.getState().project.themeColors,undefined);+ store.getState().redo();+ assert.equal(store.getState().project.themeColors.accent,'#000050');+});diff --git a/workbench/src/cards/manifest.ts b/workbench/src/cards/manifest.tsindex 6dead94..2f7fa6a 100644--- a/workbench/src/cards/manifest.ts+++ b/workbench/src/cards/manifest.ts@@ -7,6 +7,8 @@ import type { PropField } from "./types";* 时间量一律用**绝对帧**,与 Main.tsx 里 <Sequence from durationInFrames> 一一对应。 */export type ManifestUnit = {+ /** Key into a theme's unitDefaults; omitted for components without theme support. */+ themeKey?: string;/** 唯一 id(镜头 id / 转场序号…),导入后作为 clip 标签的一部分 */id: string;/** 时间轨上显示名(缺省 id) */@@ -40,6 +42,12 @@ export type ManifestAudio = {};export type WorkbenchManifest = {+ /** Optional visual presets. Existing manifests require no changes. */+ themes?: ManifestTheme[];+ defaultTheme?: string;+ /** Prop injected into themed components in both preview and export. */+ themeProp?: string;+ paletteProp?: string;name: string;fps: number;width: number;@@ -66,6 +74,14 @@ export type WorkbenchManifest = {original?: React.ComponentType<Record<string, unknown>>;};+export type ManifestTheme = {+ palette?: Record<string, string>;+ id: string;+ label: string;+ background?: string;+ unitDefaults?: Record<string, Record<string, unknown>>;+};+export const UNIT_KINDS = ["shot", "transition", "caption", "overlay"] as const;export type UnitKind = (typeof UNIT_KINDS)[number];@@ -122,10 +138,12 @@ const canonical = (m: WorkbenchManifest): string => {[cardOf.get(u) ?? "", u.id, u.label ?? "", u.from, u.duration, u.durationProp ?? "",(u.component as { displayName?: string }).displayName ?? "", JSON.stringify(u.props ?? {}),+ ...(u.themeKey ? [u.themeKey] : []),].join("|");const audio = (kind: string, a: ManifestAudio) => [kind, a.from, a.duration ?? "", a.src, a.volume, a.label ?? ""].join("|");return [m.name, m.fps, m.width, m.height, m.total, m.background ?? "", (m.order ?? []).join(","),+ ...(m.themes ? [JSON.stringify(m.themes), m.defaultTheme ?? '', m.themeProp ?? ''] : []),...UNIT_KINDS.flatMap((kind) => unitsOf(m, kind).map(unit)),...(m.sfx ?? []).map((a) => audio("sfx", a)),...(m.bgm ?? []).map((a) => audio("bgm", a)),diff --git a/workbench/src/cards/projectCards.ts b/workbench/src/cards/projectCards.tsindex 695985f..b7c45d3 100644--- a/workbench/src/cards/projectCards.ts+++ b/workbench/src/cards/projectCards.ts@@ -46,6 +46,7 @@ const build = (m: WorkbenchManifest | null) => {width: m.width,height: m.height,component: first.component,+ themeKey: first.themeKey,schema: first.schema ?? [],durationProp: first.durationProp,accent: first.accent ?? KIND_ACCENT[kind],diff --git a/workbench/src/cards/types.ts b/workbench/src/cards/types.tsindex e91474f..d2eb418 100644--- a/workbench/src/cards/types.ts+++ b/workbench/src/cards/types.ts@@ -36,6 +36,7 @@ export type PropField =| { type: "boolean"; key: string; label: string; default: boolean };export interface CardDef {+ themeKey?: string;id: string;/** 中文名(面板展示) */name: string;diff --git a/workbench/src/palettePresets.ts b/workbench/src/palettePresets.tsnew file mode 100644index 0000000..66a50cf--- /dev/null+++ b/workbench/src/palettePresets.ts@@ -0,0 +1,25 @@+import type { WorkbenchManifest } from './cards/manifest';+import type { ProjectData } from './types';+import { selectedTheme, validThemeColors } from './theme';++export type PalettePreset = {format:'shotcraft-palette';version:1;name:string;baseThemeId:string;colors:Record<string,string>};+export const paletteFromProject = (m:WorkbenchManifest | null,p:ProjectData,name:string):PalettePreset => {+ const theme=selectedTheme(m,p.themeId);+ if(!theme?.palette)throw Error('请先选择支持配色的主题。');+ return {format:'shotcraft-palette',version:1,name:name.trim().slice(0,60)||`${theme.label.split(' · ')[0]} · 自定义`,baseThemeId:theme.id,colors:{...theme.palette,...validThemeColors(m,p.themeId,p.themeColors)}};+};+export const parsePalette = (text:string,m:WorkbenchManifest | null):PalettePreset => {+ if(text.length>65536)throw Error('配色文件过大,请选择小于 64 KB 的 JSON。');+ let value:unknown;+ try{value=JSON.parse(text)}catch{throw Error('文件不是有效的 JSON。')}+ if(!value||typeof value!=='object')throw Error('配色文件格式不正确。');+ const p=value as Partial<PalettePreset>;+ if(p.format!=='shotcraft-palette'||p.version!==1||typeof p.name!=='string'||!p.name.trim()||p.name.length>60)throw Error('请选择 ShotCraft 导出的配色 JSON(版本 1)。');+ const theme=m?.themes?.find(t=>t.id===p.baseThemeId);+ if(!theme?.palette)throw Error('当前工程不支持这份配色的基础主题。');+ if(!p.colors||typeof p.colors!=='object'||Array.isArray(p.colors))throw Error('配色缺少颜色字段。');+ const keys=Object.keys(theme.palette);+ if(Object.keys(p.colors).length!==keys.length||keys.some(k=>typeof p.colors?.[k]!=='string'||!/^#[0-9a-f]{6}$/i.test(p.colors[k])))throw Error('颜色字段必须完整,并使用 #RRGGBB 格式。');+ return {format:'shotcraft-palette',version:1,name:p.name.trim(),baseThemeId:theme.id,colors:Object.fromEntries(keys.map(k=>[k,p.colors![k]]))};+};+export const applyPalette = (p:ProjectData,preset:PalettePreset):ProjectData => ({...p,themeId:preset.baseThemeId,themeColors:{...preset.colors}});diff --git a/workbench/src/panels/Inspector.tsx b/workbench/src/panels/Inspector.tsxindex 8eb35a6..bdc037c 100644--- a/workbench/src/panels/Inspector.tsx+++ b/workbench/src/panels/Inspector.tsx@@ -3,6 +3,8 @@ import type { PropField } from "../cards/types";import { cardFps, inOffsetFps, sourceLength } from "../cards/types";import { CARDS } from "../cards/registry";import { findClip, useStore } from "../store";+import { MANIFEST } from '../cards/projectCards';+import { themedProps } from '../theme';/** 单个属性控件:按 schema 字段类型渲染 */const PropControl: React.FC<{@@ -180,7 +182,7 @@ export const Inspector: React.FC = () => {<Row key={field.key} label={field.label}><PropControlfield={field}- value={clip.props[field.key] ?? field.default}+ value={themedProps(MANIFEST, card, project.themeId, clip.props, project.themeColors)[field.key] ?? field.default}onChange={(v) => updateClipProps(clip.id, { [field.key]: v })}onBegin={begin}/>diff --git a/workbench/src/panels/LibraryPanel.tsx b/workbench/src/panels/LibraryPanel.tsxindex b618c01..e4f23eb 100644--- a/workbench/src/panels/LibraryPanel.tsx+++ b/workbench/src/panels/LibraryPanel.tsx@@ -1,7 +1,8 @@import React, { useEffect, useRef, useState } from "react";import { Player, type PlayerRef } from "@remotion/player";import type { CardDef } from "../cards/types";-import { cardFps, cardSize, defaultsOf } from "../cards/types";+import { cardFps, cardSize } from "../cards/types";+import { themedProps } from '../theme';import { CARD_LIST } from "../cards/registry";import { DEMO_CATEGORIES } from "../cards/demoCards";import { MANIFEST } from "../cards/projectCards";@@ -10,11 +11,13 @@ import { sfxUsage } from "../projectImport";import { BGM_LIB, MEDIA_ITEMS, SFX_LIB } from "../mediaManifest";import { PROJ_DIR, PROJ_HAS_MANIFEST, PROJ_LINKED } from "../projMeta";import { setDragPayload } from "../dnd";+import { ThemePanel } from './ThemePanel';const TABS = [{ id: "media", label: "素材" },{ id: "cards", label: "动效库" },{ id: "sfx", label: "音效" },+ { id: "themes", label: "主题" },] as const;type TabId = (typeof TABS)[number]["id"];@@ -79,6 +82,8 @@ const LazyLoopVideo: React.FC<{ src: string }> = ({ src }) => {* 曾经默认自动循环:十几个 1080p 场景同时跑、闪白转场卡每 0.3s 白一次、字卡每 1.8s 淡出重来,* 首屏像在闪光灯下;大图反复解码还刷出一串 EncodingError。 */const LazyCardLoop: React.FC<{ card: CardDef }> = ({ card }) => {+ const themeId = useStore(s => s.project.themeId);+ const themeColors = useStore(s => s.project.themeColors);const { ref, visible } = useVisible();const { width, height } = cardSize(card);const player = useRef<PlayerRef>(null);@@ -115,7 +120,7 @@ const LazyCardLoop: React.FC<{ card: CardDef }> = ({ card }) => {<Playerref={player}component={card.component}- inputProps={defaultsOf(card)}+ inputProps={themedProps(MANIFEST, card, themeId, {}, themeColors)}durationInFrames={total}compositionWidth={width}compositionHeight={height}@@ -250,7 +255,11 @@ export const LibraryPanel: React.FC = () => {<buttonkey={t.id}className={`lib-tab${tab === t.id ? " on" : ""}`}- onClick={() => setTab(t.id)}+ aria-pressed={tab === t.id}+ onClick={() => {+ setTab(t.id);+ if (t.id === 'themes') setPreview(null);+ }}>{t.label}</button>@@ -258,6 +267,7 @@ export const LibraryPanel: React.FC = () => {</div><div className="library-list">+ {tab === 'themes' && <ThemePanel />}{tab === "media" && (<>{MANIFEST ? (@@ -382,11 +392,13 @@ export const LibraryPanel: React.FC = () => {</div><div className="lib-foot dim">+ {tab === 'themes' ? '切换主题可撤销 · 随工程自动保存' : <>动效 {motionCards.length} 卡({motionCards.filter((c) => c.schema.length > 0).length} 张可调参)· 音效库 {SFX_LIB.length}{PROJ_LINKED && PROJ_HAS_MANIFEST ? ` · 成片单元 ${projectCards.length}` : ""}<br />点击预览 · 拖拽到时间轨添加+ </>}</div></div>);diff --git a/workbench/src/panels/ThemePanel.tsx b/workbench/src/panels/ThemePanel.tsxnew file mode 100644index 0000000..7970a2a--- /dev/null+++ b/workbench/src/panels/ThemePanel.tsx@@ -0,0 +1,123 @@+import { useEffect, useRef, useState } from 'react';+import { MANIFEST } from '../cards/projectCards';+import { useStore } from '../store';+import { selectedTheme, switchTheme, validThemeColors } from '../theme';+import { applyPalette, paletteFromProject, parsePalette, type PalettePreset } from '../palettePresets';++const savedKey = `shotcraft:palettes:${MANIFEST?.name ?? 'default'}`;+type SavedPalette = {id:string;preset:PalettePreset};+const readSaved = ():SavedPalette[] => {+ try {+ const items:unknown=JSON.parse(localStorage.getItem(savedKey) ?? '[]');+ if(!Array.isArray(items))return [];+ return items.slice(0,50).flatMap(item=>{+ try{return typeof item?.id==='string' ? [{id:item.id,preset:parsePalette(JSON.stringify(item.preset),MANIFEST)}] : []}catch{return []}+ });+ }catch{return []}+};++const fields = [['page','背景'],['surface','卡片'],['text','文字'],['muted','次要文字'],['accent','强调色'],['field','浅色填充'],['border','边框']] as const;+const ColorField = ({label,value,onChange}: {label:string;value:string;onChange:(value:string,begin?:boolean)=>void}) => {+ const [draft,setDraft] = useState(value);+ const picker = useRef<HTMLInputElement>(null);+ const editing = useRef(false);+ const endEdit = () => { editing.current = false; };+ useEffect(() => {+ // React onChange also fires for every native input event. Native change+ // marks the end of a picker gesture, even when the input retains focus.+ const input = picker.current!;+ input.addEventListener('change', endEdit);+ return () => input.removeEventListener('change', endEdit);+ }, []);+ useEffect(()=>setDraft(value),[value]);+ const valid = /^#[0-9a-f]{6}$/i.test(draft);+ const commit = () => { if(valid && draft !== value) onChange(draft); else setDraft(value); };+ return <label className="theme-color-row"><span>{label}</span>+ <input ref={picker} type="color" aria-label={`${label}取色`} value={value}+ onClick={endEdit} onBlur={endEdit}+ onKeyDown={e=>{if(!e.repeat && (e.key==='Enter' || e.key===' '))endEdit();}}+ onChange={e=>{onChange(e.target.value,!editing.current);editing.current=true;}} />+ <input type="text" aria-label={`${label}色值`} value={draft} maxLength={7} spellCheck={false}+ aria-invalid={!valid} onChange={e=>setDraft(e.target.value)} onBlur={commit}+ onKeyDown={e=>{if(e.key==='Enter')e.currentTarget.blur();if(e.key==='Escape')setDraft(value);}} />+ </label>;+};++export const ThemePanel = () => {+ const project = useStore(s=>s.project);+ const [saved,setSaved] = useState(readSaved);+ const [name,setName] = useState('');+ const [message,setMessage] = useState('');+ const fileInput = useRef<HTMLInputElement>(null);+ const colorHistory = useRef<ReturnType<typeof useStore.getState>["past"] | null>(null);+ const persist = (next:SavedPalette[]) => {+ try{localStorage.setItem(savedKey,JSON.stringify(next));setSaved(next);return true}+ catch{setMessage('保存失败:浏览器存储不可用,请导出配色备份。');return false}+ };+ const apply = (preset:PalettePreset) => {+ const s=useStore.getState();s.setPreview(null);s.setProject(applyPalette(s.project,preset));setName(preset.name);setMessage(`已应用「${preset.name}」`);+ };+ const themes = MANIFEST?.themes ?? [];+ const current = selectedTheme(MANIFEST,project.themeId);+ const custom = validThemeColors(MANIFEST,project.themeId,project.themeColors);+ const modified = Object.keys(custom).length > 0;+ const palette = {...current?.palette,...custom};+ const updateColor = (key:string,value:string,begin=true) => {+ const store = useStore.getState();+ const base = selectedTheme(MANIFEST,store.project.themeId)?.palette;+ const colors = validThemeColors(MANIFEST,store.project.themeId,store.project.themeColors);+ if(!base?.[key] || !/^#[0-9a-f]{6}$/i.test(value) || value.toLowerCase()===(colors[key] ?? base[key]).toLowerCase()) return;+ const next = {...colors,[key]:value};+ if(value.toLowerCase()===base[key].toLowerCase()) delete next[key];+ // Undo/redo or another edit ends the current gesture's history group.+ if(begin || colorHistory.current!==store.past) store.commit();+ store.setThemeColors(Object.keys(next).length ? next : undefined);+ colorHistory.current=useStore.getState().past;+ };+ return <section className="theme-panel" aria-label="影片主题">+ <div className="theme-panel-heading">预设主题</div>+ <p className="theme-panel-hint">选择一套风格,再调整配色。</p>+ {themes.length ? <div className="theme-options">{themes.map(theme=>{+ const active=theme.id===current?.id;+ const colors=theme.palette ?? {page:theme.background ?? '#f2eee6',text:'#13110f',accent:'#955905'};+ return <button key={theme.id} className={`theme-option${active?' active':''}`} aria-label={theme.label} aria-pressed={active}+ onClick={()=>{const store=useStore.getState();store.setPreview(null);if(!active)store.setProject(switchTheme(store.project,MANIFEST,theme.id));}}>+ <span className="theme-palette" aria-hidden="true">{[colors.page,colors.surface ?? colors.page,colors.accent].map((c,i)=><span key={i} style={{background:c}} />)}</span>+ <span className="theme-option-label"><strong>{theme.label.split(' · ')[0]}</strong><span>{active?'✓':''}</span></span>+ </button>;+ })}</div> : <p className="theme-panel-empty">当前工程尚未提供主题。</p>}+ {!!saved.length && <div className="saved-palettes"><div className="theme-panel-heading">我的主题</div>{saved.map(item=><div key={item.id} className="saved-palette">+ <button onClick={()=>apply(item.preset)} title={item.preset.name}><span style={{background:item.preset.colors.accent}} />{item.preset.name}</button>+ <button aria-label={`删除 ${item.preset.name}`} onClick={()=>{if(persist(saved.filter(p=>p.id!==item.id)))setMessage(`已删除「${item.preset.name}」`);}}>×</button>+ </div>)}</div>}+ <div className="theme-editor" aria-label="替换配色">+ <div className="theme-editor-heading"><span className="theme-panel-heading">替换配色</span><button className="theme-reset" disabled={!modified} onClick={()=>{const s=useStore.getState();s.setPreview(null);s.setProject({...s.project,themeColors:undefined});}}>恢复预设</button></div>+ <input className="palette-name" aria-label="配色名称" placeholder="配色名称(可选)" value={name} maxLength={60} onChange={e=>setName(e.target.value)} />+ <div className="palette-actions">+ <button className="btn" disabled={!current?.palette} onClick={()=>{+ if(saved.length>=50){setMessage('已保存 50 套配色,请先删除不再使用的主题。');return;}+ const preset=paletteFromProject(MANIFEST,useStore.getState().project,name);+ if(persist([...saved,{id:crypto.randomUUID(),preset}])){setName(preset.name);setMessage(`已保存「${preset.name}」,仅保存在此浏览器。`);}+ }}>保存配色</button>+ <button className="btn" onClick={()=>fileInput.current?.click()}>导入配色</button>+ <button className="btn" disabled={!current?.palette} onClick={()=>{+ const preset=paletteFromProject(MANIFEST,useStore.getState().project,name);+ const url=URL.createObjectURL(new Blob([JSON.stringify(preset,null,2)],{type:'application/json'}));+ const a=document.createElement('a');a.href=url;a.download=`${preset.name.replace(/[\\/:*?"<>|]/g,'-')}.palette.json`;a.click();setTimeout(()=>URL.revokeObjectURL(url),1000);+ setMessage('配色已导出为 JSON。');+ }}>导出配色</button>+ </div>+ <input ref={fileInput} type="file" hidden accept=".json,application/json" aria-label="导入配色文件" onChange={async e=>{+ const file=e.target.files?.[0];e.target.value='';if(!file)return;+ try{if(file.size>65536)throw Error('配色文件不能超过 64 KB。');apply(parsePalette(await file.text(),MANIFEST));setMessage('已导入并应用,点击「保存配色」可加入我的主题。');}+ catch(error){setMessage(error instanceof Error?error.message:'导入失败。');}+ }} />+ {!!message && <p className="theme-panel-hint" role="status">{message}</p>}+ {current?.palette ? <>+ <p className="theme-panel-hint">{modified?'已自定义 · ':'点击色块或输入 HEX · '}切换预设会重置配色</p>+ {fields.filter(([key])=>palette[key]).map(([key,label])=><ColorField key={`${current.id}:${key}`} label={label} value={palette[key]} onChange={(value,begin)=>updateColor(key,value,begin)} />)}+ <p className="theme-panel-note">同步预览与导出,可撤销。单独调整过的镜头颜色优先保留。</p>+ </> : <p className="theme-panel-note">{themes.length?'纸质主题保留原始截图质感。选择其他预设后,可调整整套配色。':'工程提供可编辑配色后,会在这里显示。'}</p>}+ </div>+ </section>;+};diff --git a/workbench/src/preview/Composition.tsx b/workbench/src/preview/Composition.tsxindex 5ac5513..e5086de 100644--- a/workbench/src/preview/Composition.tsx+++ b/workbench/src/preview/Composition.tsx@@ -2,7 +2,8 @@ import React from "react";import { AbsoluteFill, Freeze, Sequence, useCurrentFrame } from "remotion";import type { ProjectData } from "../types";import { CARDS } from "../cards/registry";-import { defaultsOf } from "../cards/types";+import { MANIFEST } from '../cards/projectCards';+import { themedProps, themedBackground } from '../theme';/** 时间重映射:clip 本地帧 → 卡片源帧(inOffset + f × speed)。* 卡片全部是 frame 的纯函数(tween 均 clamp),因此变速/裁入/超时长定格都安全。@@ -21,7 +22,7 @@ export const MainComposition: React.FC<{ project: ProjectData }> = ({ project })// UI 中 tracks[0] 是最上层轨 → 最后渲染(覆盖在上)const ordered = [...project.tracks].reverse();return (- <AbsoluteFill style={{ background: project.background ?? "#0e0e10" }}>+ <AbsoluteFill style={{ background: themedBackground(project, MANIFEST) ?? "#0e0e10" }}>{ordered.map((track) =>!track.hidden &&@@ -30,7 +31,7 @@ export const MainComposition: React.FC<{ project: ProjectData }> = ({ project })if (!card) return null;const Comp = card.component;const duration = Math.max(1, Math.round(clip.duration));- const props: Record<string, unknown> = { ...defaultsOf(card), ...clip.props };+ const props: Record<string, unknown> = themedProps(MANIFEST, card, project.themeId, clip.props, project.themeColors);// 成片组件按 `duration`/`dur` 算出场淡出:注入 clip 的源时长,拉长/裁短后淡出跟着挪if (card.durationProp)props[card.durationProp] = Math.max(1, Math.round(clip.inOffset + duration * clip.speed));diff --git a/workbench/src/preview/PreviewPanel.tsx b/workbench/src/preview/PreviewPanel.tsxindex acbfbf8..519be1e 100644--- a/workbench/src/preview/PreviewPanel.tsx+++ b/workbench/src/preview/PreviewPanel.tsx@@ -6,13 +6,17 @@ import { projectDuration, useStore } from "../store";import type { PreviewItem } from "../store";import { fmtFrames } from "../time";import { CARDS } from "../cards/registry";-import { cardFps, cardSize, defaultsOf } from "../cards/types";+import { cardFps, cardSize } from "../cards/types";+import { MANIFEST } from '../cards/projectCards';+import { themedProps } from '../theme';/** 素材库点击预览:占据画面区,循环播放;主工程 Player 保持挂载(display:none) */const ItemPreview: React.FC<{ item: NonNullable<PreviewItem>; onClose: () => void }> = ({item,onClose,}) => {+ const themeId = useStore(s => s.project.themeId);+ const themeColors = useStore(s => s.project.themeColors);let body: React.ReactNode = null;let title = "";if (item.kind === "card") {@@ -23,7 +27,7 @@ const ItemPreview: React.FC<{ item: NonNullable<PreviewItem>; onClose: () => voibody = (<Playercomponent={card.component}- inputProps={defaultsOf(card)}+ inputProps={themedProps(MANIFEST, card, themeId, {}, themeColors)}durationInFrames={Math.max(2, card.durationInFrames)}compositionWidth={width}compositionHeight={height}diff --git a/workbench/src/projectImport.ts b/workbench/src/projectImport.tsindex 7246b09..f6db3df 100644--- a/workbench/src/projectImport.ts+++ b/workbench/src/projectImport.ts@@ -3,6 +3,7 @@ import { uid } from "./types";import type { ManifestAudio, WorkbenchManifest } from "./cards/manifest";import { manifestKey } from "./cards/manifest";import { MANIFEST, cardIdOfUnit, unitsOf } from "./cards/projectCards";+import { inheritedProps } from './theme';const baseClip = (): Omit<ClipData, "id" | "cardId" | "start" | "duration"> => ({inOffset: 0, speed: 1, opacity: 1, scale: 1, x: 0, y: 0, props: {},@@ -63,7 +64,7 @@ export const buildProjectFromManifest = (m: WorkbenchManifest = MANIFEST!): ProjcardId: cardIdOfUnit(u),start: Math.max(0, Math.round(u.from)),duration: Math.max(2, Math.min(Math.round(u.duration), m.total - Math.max(0, Math.round(u.from)))),- props: { ...(u.props ?? {}) },+ props: inheritedProps(m, u.themeKey, u.props),label: u.label ?? u.id,})),};@@ -84,6 +85,7 @@ export const buildProjectFromManifest = (m: WorkbenchManifest = MANIFEST!): Proj];return {+ ...(m.themes ? {themeId: m.defaultTheme ?? m.themes[0]?.id} : {}),name: m.name,fps: m.fps,width: m.width,diff --git a/workbench/src/store.ts b/workbench/src/store.tsindex db78295..62be83c 100644--- a/workbench/src/store.ts+++ b/workbench/src/store.ts@@ -7,6 +7,7 @@ import { demoProject } from "./demoProject";import { MANIFEST } from "./cards/projectCards";import { manifestKey } from "./cards/manifest";import { buildProjectFromManifest } from "./projectImport";+import { upgradeLegacyTheme } from './theme';export { projectDuration } from "./types";@@ -31,7 +32,8 @@ const loadSaved = (): ProjectData | null => {* 旧存档压进撤销栈(⌘Z 可找回改动);是这一版的保留用户改动* - 否则读存档;没有存档时用演示工程 */const loadInitial = (): { project: ProjectData; past: ProjectData[]; imported: boolean } => {- const saved = loadSaved();+ const raw = loadSaved();+ const saved = raw ? upgradeLegacyTheme(raw, MANIFEST, CARDS) : null;const params = new URLSearchParams(window.location.search);if (params.get("import") === "project" && MANIFEST) {window.history.replaceState(null, "", window.location.pathname);@@ -77,6 +79,8 @@ interface WorkbenchState {redo: () => void;setProject: (p: ProjectData) => void;+ /** Live palette edit; the caller commits once at the start of a gesture. */+ setThemeColors: (colors: ProjectData["themeColors"]) => void;select: (id: string | null) => void;setPlayhead: (f: number) => void;setPlaying: (b: boolean) => void;@@ -151,8 +155,10 @@ export const useStore = create<WorkbenchState>((set, get) => ({setProject: (p) => {get().commit();- set({ project: p, selectedClipId: null });+ set({ project: upgradeLegacyTheme(p, MANIFEST, CARDS), selectedClipId: null });},+ setThemeColors: (themeColors) =>+ set((s) => ({ project: { ...s.project, themeColors }, previewItem: null })),select: (id) => set({ selectedClipId: id }),setPlayhead: (f) => set({ playhead: Math.max(0, Math.round(f)) }),setPlaying: (b) => set({ playing: b }),diff --git a/workbench/src/styles.css b/workbench/src/styles.cssindex 38b7f37..2d265f3 100644--- a/workbench/src/styles.css+++ b/workbench/src/styles.css@@ -384,3 +384,45 @@ body {}::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.26); }::-webkit-scrollbar-corner { background: transparent; }+.theme-panel { padding: 5px 2px; }+.theme-panel-heading { font-size: 13px; font-weight: 600; }+.theme-panel-hint, .theme-panel-note, .theme-panel-empty { color: var(--text-dim); font-size: 11px; line-height: 1.7; }+.theme-panel-hint { margin: 5px 0 14px; }+.theme-options { display: flex; flex-direction: column; gap: 10px; }+.theme-option { width: 100%; padding: 9px; color: var(--text); font: inherit; text-align: left; background: var(--inset); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }+.theme-option:hover { border-color: var(--text-dim); }+.theme-option.active { border-color: var(--accent); }+.theme-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }+.theme-palette { display: flex; height: 42px; overflow: hidden; border-radius: 5px; border: 1px solid rgba(128, 128, 128, .2); }+.theme-palette > span { flex: 1; }+.theme-palette > span:first-child { flex: 2.5; }+.theme-option-label { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px; margin-top: 9px; font-size: 11px; }+.theme-option-label strong { font-size: 12px; font-weight: 500; }+.theme-option-label > span { color: var(--text-dim); font-size: 10px; }+.theme-option.active .theme-option-label > span { color: var(--accent); }+.theme-panel-note { margin-top: 16px; }++/* Presets and palette editing share the existing sidebar. */+.theme-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }+.theme-option { padding: 6px; }+.theme-palette { height: 26px; }+.theme-option-label { margin-top: 6px; gap: 2px; }+.theme-option-label strong { font-size: 11px; }+.theme-editor { margin-top: 20px; padding-top: 15px; border-top: 1px solid var(--line); }+.theme-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 5px; }+.theme-reset { background: none; border: 0; color: var(--accent); font: inherit; font-size: 10px; cursor: pointer; padding: 3px 0; }+.theme-reset:disabled { color: var(--text-dim); opacity: .5; cursor: default; }+.theme-color-row { display: grid; grid-template-columns: minmax(0,1fr) 24px 74px; gap: 6px; align-items: center; margin: 9px 0; font-size: 11px; }+.theme-color-row input[type=color] { width: 24px; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; }+.theme-color-row input[type=text] { width: 100%; min-width: 0; background: var(--inset); border: 1px solid var(--line); border-radius: 4px; color: var(--text); padding: 5px; font: 11px monospace; }+.theme-color-row input:focus-visible,.theme-reset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }+.theme-color-row input[aria-invalid=true] { border-color: var(--danger); }+.saved-palettes { margin-top:16px; }+.saved-palette { display:flex; align-items:center; gap:4px; margin-top:6px; }+.saved-palette button { background:var(--inset); color:var(--text); border:1px solid var(--line); border-radius:5px; padding:6px; font:inherit; font-size:11px; cursor:pointer; }+.saved-palette button:first-child { flex:1; min-width:0; text-align:left; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }+.saved-palette button span { display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; }+.palette-name { width:100%; margin-top:12px; padding:6px; background:var(--inset); color:var(--text); border:1px solid var(--line); border-radius:4px; font:11px sans-serif; }+.palette-actions { display:flex; gap:4px; margin-top:7px; }+.palette-actions .btn { flex:1; min-width:0; padding:5px 2px; font-size:10px; }+.palette-name:focus-visible,.saved-palette button:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }diff --git a/workbench/src/theme.ts b/workbench/src/theme.tsnew file mode 100644index 0000000..115d874--- /dev/null+++ b/workbench/src/theme.ts@@ -0,0 +1,48 @@+import type { WorkbenchManifest } from './cards/manifest';+import type { CardDef } from './cards/types';+import { defaultsOf } from './cards/types';+import type { ProjectData } from './types';++export const selectedTheme = (m: WorkbenchManifest | null, id?: string) =>+ m?.themes?.find(t => t.id === id) ?? m?.themes?.find(t => t.id === m.defaultTheme) ?? m?.themes?.[0];++/** Same precedence in the inspector, all players, and the exported film. */+export const themedProps = (m: WorkbenchManifest | null, card: CardDef, id?: string, overrides: Record<string, unknown> = {}, colors?: Record<string, string>) => {+ const theme = selectedTheme(m, id);+ const palette = validThemeColors(m, id, colors);+ const aliases: Record<string,string> = {paper:"page",ink:"text",color:"text",muted:"muted",amber:"accent",accent:"accent"};+ const custom = Object.fromEntries(Object.entries(theme?.unitDefaults?.[card.themeKey ?? ""] ?? {}).filter(([k]) => palette[aliases[k]]).map(([k]) => [k,palette[aliases[k]]]));+ return {...defaultsOf(card),+ ...(card.themeKey ? theme?.unitDefaults?.[card.themeKey] : {}), ...(card.themeKey ? custom : {}), ...overrides,+ ...(card.themeKey && m?.themeProp ? {[m.themeProp]: theme?.id} : {}),+ ...(card.themeKey && m?.paletteProp && Object.keys(palette).length ? {[m.paletteProp]: palette} : {}),+ };+};++/** Omit inherited style values on import so future theme changes stay lightweight.+ * Explicit values differing from the default preset remain per-clip overrides. */+export const inheritedProps = (m: WorkbenchManifest, key: string | undefined, props: Record<string, unknown> = {}) => {+ const defaults = key ? selectedTheme(m)?.unitDefaults?.[key] : undefined;+ return Object.fromEntries(Object.entries(props).filter(([k,v]) => !defaults || !(k in defaults) || defaults[k] !== v));+};++/** Upgrade pre-theme JSON once. Never infer inheritance again after this marker+ * is saved: a user can explicitly choose a color equal to another preset. */+export const upgradeLegacyTheme = (project: ProjectData, m: WorkbenchManifest | null, cards: Record<string, CardDef>): ProjectData => {+ if (project.themeId !== undefined || !m?.themes?.length) return project;+ return {...project, themeId: selectedTheme(m)?.id, tracks: project.tracks.map(track => ({...track,+ clips: track.clips.map(clip => ({...clip, props: inheritedProps(m, cards[clip.cardId]?.themeKey, clip.props)})),+ }))};+};++export const switchTheme = (project: ProjectData, m: WorkbenchManifest | null, id: string): ProjectData => {+ if (!m?.themes?.some(t => t.id === id)) return project;+ return {...project, themeId: id, themeColors: undefined};+};+export const themedBackground = (project: ProjectData, m: WorkbenchManifest | null) =>+ validThemeColors(m, project.themeId, project.themeColors).page ?? (project.themeId ? selectedTheme(m, project.themeId)?.background ?? project.background : project.background);++export const validThemeColors = (m: WorkbenchManifest | null, id?: string, colors?: Record<string,string>) => {+ const palette = selectedTheme(m,id)?.palette;+ return Object.fromEntries(Object.entries(colors ?? {}).filter(([k,v]) => palette && Object.prototype.hasOwnProperty.call(palette,k) && typeof v === 'string' && /^#[0-9a-f]{6}$/i.test(v)));+};diff --git a/workbench/src/types.ts b/workbench/src/types.tsindex 7c49b99..940650f 100644--- a/workbench/src/types.ts+++ b/workbench/src/types.ts@@ -32,6 +32,9 @@ export interface TrackData {}export interface ProjectData {+ /** Visual preset; absent means the manifest's default, preserving older JSON. */+ themeId?: string;+ themeColors?: Record<string, string>;name: string;fps: number;width: number;