char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Aleksander Grygierui: Linting & Formatting scripts (#26819)92d1bb0c9

char/aliceai-t5-moe
534 B11 linesraw
1/**
2 * Mounts svg markup inside an open shadow root on the host element.
3 * The shadow boundary scopes the svg <style> and its animations to the host,
4 * so model authored css can not reach the surrounding page. The caller passes
5 * markup that is already sanitized, this only isolates and sizes it.
6 */
7export function mountSvgShadow(host: HTMLElement, markup: string, style: string): void {
8	const root = host.shadowRoot ?? host.attachShadow({ mode: 'open' });
9
10	root.innerHTML = markup ? `<style>${style}</style>${markup}` : '';
11}