Files
probably-rendering-one-more…/apps/studio/src/lib/layout-images-client.ts
T
codex-bot dba9785379
studio CI and deployment / verify-and-deploy (pull_request) Successful in 5m33s
waterfall-wiki CI and deployment / verify-and-deploy (pull_request) Successful in 16m52s
Build Studio visual layout library with recoverable design CRUD
2026-10-28 14:45:37 +08:00

7 lines
365 B
TypeScript

/** References in the retained toolbox are internal Wiki media, displayed as derivatives. */
export function referencePreview(source:string){
const path=new URL(source,'http://wiki.internal').pathname;
if(!/^\/api\/media\/[0-9a-f-]{36}$/.test(path))throw Error('Invalid reference media');
return '/api/preview?'+new URLSearchParams({source:path,width:'960'});
}