wrapper as a newline', async () => {
- const screen = render(ChatFormInputRichHarness, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(screen.container);
- const div = document.createElement('div');
-
- div.textContent = 'second line';
- root.appendChild(div);
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe(`${SOURCE}\nsecond line`);
- });
-
- it('serializes a Firefox full
wrap as lines, badge included', async () => {
- const screen = render(ChatFormInputRichHarness, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(screen.container);
- const first = document.createElement('div');
-
- while (root.firstChild) first.appendChild(root.firstChild);
- const second = document.createElement('div');
-
- second.textContent = 'second line';
- root.appendChild(first);
- root.appendChild(second);
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe(`${SOURCE}\nsecond line`);
- });
-
- it('serializes a
as a newline', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'here' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- root.appendChild(document.createElement('br'));
- root.appendChild(document.createTextNode('second line'));
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe('here\nsecond line');
- });
-
- it('ignores a trailing
(browser caret placeholder)', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- root.appendChild(document.createElement('br'));
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe('abc');
- });
-
- it('serializes one newline per empty-line
', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- for (let i = 0; i < 2; i++) {
- const div = document.createElement('div');
-
- div.appendChild(document.createElement('br'));
- root.appendChild(div);
- }
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe('abc\n\n');
- });
-
- it('treats a
-only buffer as empty for the placeholder', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
- const div = document.createElement('div');
-
- div.appendChild(document.createElement('br'));
- root.replaceChildren(div);
- fireInput(root);
- await tick();
-
- expect(screen.component.getValue()).toBe('');
- expect(root.dataset.empty).toBe('true');
- });
-
- it('maps the caret across block boundaries in both directions', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc\ndef' });
-
- await tick();
-
- // Rebuild into the Chromium block shape; the source is unchanged,
- // so no re-render fires.
- const root = editableIn(screen.container);
- const div = document.createElement('div');
-
- div.textContent = 'def';
- root.replaceChildren(document.createTextNode('abc'), div);
- fireInput(root);
- await tick();
- expect(screen.component.getValue()).toBe('abc\ndef');
-
- const divText = div.firstChild;
-
- if (!divText) throw new Error('div text missing');
-
- setCaret(divText, 2);
- expect(screen.component.getCaretOffset()).toBe(6);
-
- screen.component.setCaretOffset(6);
- const selection = window.getSelection();
-
- expect(selection?.anchorNode).toBe(divText);
- expect(selection?.anchorOffset).toBe(2);
-
- // The boundary newline itself: offset 3 is the end of "abc", offset
- // 4 the start of the "def" line.
- screen.component.setCaretOffset(4);
- expect(window.getSelection()?.anchorNode).toBe(divText);
- expect(window.getSelection()?.anchorOffset).toBe(0);
-
- screen.component.setCaretOffset(3);
- expect(window.getSelection()?.anchorNode).toBe(root.firstChild);
- expect(window.getSelection()?.anchorOffset).toBe(3);
- });
-});
diff --git a/tools/ui/tests/client/chat-form-input-rich-undo.svelte.test.ts b/tools/ui/tests/client/chat-form-input-rich-undo.svelte.test.ts
deleted file mode 100644
index 00f07f482037..000000000000
--- a/tools/ui/tests/client/chat-form-input-rich-undo.svelte.test.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-// Guards the editing-key contract of the ChatFormInputRich:
-// undo/redo is replayed from source snapshots (the token rebuilds destroy
-// the native undo stack), and Tab is NOT intercepted (WCAG 2.1.2 no
-// keyboard trap), matching the plain textarea.
-
-import ChatFormInputRichHarness from './components/ChatFormInputRichHarness.svelte';
-import { tick } from 'svelte';
-import { describe, expect, it } from 'vitest';
-import { render } from 'vitest-browser-svelte';
-
-const SOURCE = 'see [docs](file:///a/b)';
-
-function editableIn(container: HTMLElement): HTMLElement {
- const el = container.querySelector('[role="textbox"]');
-
- if (!(el instanceof HTMLElement)) throw new Error('ChatFormInputRich not rendered');
-
- return el;
-}
-
-function type(root: HTMLElement, text: string, inputType = 'insertText') {
- root.appendChild(document.createTextNode(text));
- root.dispatchEvent(new InputEvent('input', { bubbles: true, inputType }));
-}
-
-function keydown(root: HTMLElement, init: KeyboardEventInit) {
- const event = new KeyboardEvent('keydown', { bubbles: true, cancelable: true, ...init });
-
- root.dispatchEvent(event);
-
- return event;
-}
-
-describe('ChatFormInputRich undo/redo', () => {
- it('undoes and redoes an edit across a badge-containing buffer', async () => {
- const screen = render(ChatFormInputRichHarness, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- type(root, ' more');
- await tick();
- expect(screen.component.getValue()).toBe(`${SOURCE} more`);
-
- const undoEvent = keydown(root, { ctrlKey: true, key: 'z' });
-
- await tick();
- expect(undoEvent.defaultPrevented).toBe(true);
- expect(screen.component.getValue()).toBe(SOURCE);
-
- const redoEvent = keydown(root, { ctrlKey: true, key: 'z', shiftKey: true });
-
- await tick();
- expect(redoEvent.defaultPrevented).toBe(true);
- expect(screen.component.getValue()).toBe(`${SOURCE} more`);
- });
-
- it('redoes with Ctrl+Y as well', async () => {
- const screen = render(ChatFormInputRichHarness, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- type(root, ' more');
- await tick();
- keydown(root, { key: 'z', metaKey: true });
- await tick();
- expect(screen.component.getValue()).toBe(SOURCE);
-
- keydown(root, { ctrlKey: true, key: 'y' });
- await tick();
- expect(screen.component.getValue()).toBe(`${SOURCE} more`);
- });
-
- it('coalesces a typing burst into one undo step', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- type(root, 'd');
- type(root, 'e');
- await tick();
- expect(screen.component.getValue()).toBe('abcde');
-
- keydown(root, { ctrlKey: true, key: 'z' });
- await tick();
- expect(screen.component.getValue()).toBe('abc');
- });
-
- it('keeps a newline as its own undo step', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- type(root, 'd');
- type(root, '\n', 'insertLineBreak');
- await tick();
- expect(screen.component.getValue()).toBe('abcd\n');
-
- keydown(root, { ctrlKey: true, key: 'z' });
- await tick();
- expect(screen.component.getValue()).toBe('abcd');
-
- keydown(root, { ctrlKey: true, key: 'z' });
- await tick();
- expect(screen.component.getValue()).toBe('abc');
- });
-
- it('is a no-op when there is nothing to undo', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
- const event = keydown(root, { ctrlKey: true, key: 'z' });
-
- await tick();
-
- expect(event.defaultPrevented).toBe(true);
- expect(screen.component.getValue()).toBe('abc');
- });
-
- it('abandons the redo branch after a fresh edit', async () => {
- const screen = render(ChatFormInputRichHarness, { value: 'abc' });
-
- await tick();
-
- const root = editableIn(screen.container);
-
- type(root, 'd');
- await tick();
- keydown(root, { ctrlKey: true, key: 'z' });
- await tick();
- expect(screen.component.getValue()).toBe('abc');
-
- type(root, 'e');
- await tick();
- keydown(root, { ctrlKey: true, key: 'z', shiftKey: true });
- await tick();
- expect(screen.component.getValue()).toBe('abce');
- });
-});
-
-describe('ChatFormInputRich Tab key', () => {
- it('does not trap Tab (focus can leave the editable)', async () => {
- const screen = render(ChatFormInputRichHarness, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(screen.container);
- const event = keydown(root, { key: 'Tab' });
-
- expect(event.defaultPrevented).toBe(false);
- });
-});
diff --git a/tools/ui/tests/client/chat-form-input-rich.svelte.test.ts b/tools/ui/tests/client/chat-form-input-rich.svelte.test.ts
deleted file mode 100644
index d3403030d5cd..000000000000
--- a/tools/ui/tests/client/chat-form-input-rich.svelte.test.ts
+++ /dev/null
@@ -1,804 +0,0 @@
-// Guards the clipboard contract of the ChatFormInputRich:
-// copy/cut expose the markdown SOURCE of the selection (each badge
-// contributes its full `[name](file://...)` link) and pasting such
-// markdown re-renders the badges.
-
-import ChatFormInputRich from '$lib/components/app/chat/ChatForm/ChatFormInput/ChatFormInputRich.svelte';
-import { rangeToTextOffset, serializeContent, textOffsetToRange } from '$lib/utils';
-import { tick } from 'svelte';
-import { describe, expect, it, vi } from 'vitest';
-import { userEvent } from 'vitest/browser';
-import { render } from 'vitest-browser-svelte';
-
-const SOURCE = 'hello [docs](file:///a/b) world';
-const BADGE_SELECTOR = '[data-mention-badge="true"]';
-
-function editableIn(container: HTMLElement): HTMLElement {
- const el = container.querySelector('[role="textbox"]');
-
- if (!(el instanceof HTMLElement)) throw new Error('ChatFormInputRich not rendered');
-
- return el;
-}
-
-function setSelection(root: HTMLElement, place: (range: Range, root: HTMLElement) => void) {
- const range = document.createRange();
-
- place(range, root);
- const selection = window.getSelection();
-
- if (!selection) throw new Error('no selection');
-
- selection.removeAllRanges();
- selection.addRange(range);
-}
-
-function clipboardEvent(type: 'copy' | 'cut' | 'paste', text = '') {
- const data = new DataTransfer();
-
- if (text) data.setData('text/plain', text);
-
- const event = new ClipboardEvent(type, { bubbles: true, cancelable: true, clipboardData: data });
-
- return { data, event };
-}
-
-describe('ChatFormInputRich clipboard', () => {
- it('copy exposes the markdown source of the selection', async () => {
- const { container } = render(ChatFormInputRich, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- setSelection(root, (range) => range.selectNodeContents(root));
-
- const { data, event } = clipboardEvent('copy');
-
- root.dispatchEvent(event);
-
- expect(event.defaultPrevented).toBe(true);
- expect(data.getData('text/plain')).toBe(SOURCE);
- });
-
- it('cut exposes the markdown source and removes the slice', async () => {
- const { container } = render(ChatFormInputRich, { value: SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- setSelection(root, (range) => {
- const badge = root.querySelector(BADGE_SELECTOR);
-
- if (!badge) throw new Error('badge not rendered');
-
- range.setStartBefore(badge);
- range.setEndAfter(badge);
- });
-
- const { data, event } = clipboardEvent('cut');
-
- root.dispatchEvent(event);
-
- expect(event.defaultPrevented).toBe(true);
- expect(data.getData('text/plain')).toBe('[docs](file:///a/b)');
- expect(root.querySelector(BADGE_SELECTOR)).toBeNull();
- expect(root.textContent).toBe('hello world');
- });
-
- it('paste of markdown mention links re-renders badges', async () => {
- const { container } = render(ChatFormInputRich, { value: 'hello ' });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- range.selectNodeContents(root);
- range.collapse(false);
- });
-
- const { event } = clipboardEvent('paste', '[docs](file:///a/b) world');
-
- root.dispatchEvent(event);
- await tick();
-
- expect(event.defaultPrevented).toBe(true);
- const badge = root.querySelector(BADGE_SELECTOR);
-
- expect(badge).not.toBeNull();
- expect(badge!.getAttribute('data-mention-name')).toBe('docs');
- expect(root.textContent).toContain('world');
- });
-
- it('paste without mention links keeps the DOM untouched', async () => {
- const { container } = render(ChatFormInputRich, { value: 'hello ' });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- range.selectNodeContents(root);
- range.collapse(false);
- });
- const firstChild = root.firstChild;
- const { event } = clipboardEvent('paste', 'plain text');
-
- root.dispatchEvent(event);
- await tick();
-
- expect(event.defaultPrevented).toBe(true);
- expect(root.querySelector(BADGE_SELECTOR)).toBeNull();
- // no rebuild: the live text node is the same instance
- expect(root.firstChild).toBe(firstChild);
- });
-});
-
-describe('ChatFormInputRich code spans', () => {
- it('renders inline code from the initial value', async () => {
- const { container } = render(ChatFormInputRich, { value: 'run `npm test` now' });
-
- await tick();
-
- const root = editableIn(container);
- const code = root.querySelector('code[data-code-token="code_inline"]');
-
- expect(code).not.toBeNull();
- expect(code!.textContent).toBe('`npm test`');
- });
-
- it('renders a fenced code block with a language', async () => {
- const source = 'before\n```js\nconst a = 1;\n```\nafter';
- const { container } = render(ChatFormInputRich, { value: source });
-
- await tick();
-
- const root = editableIn(container);
- const code = root.querySelector('code[data-code-token="code_block"]');
-
- expect(code).not.toBeNull();
- expect(code!.textContent).toBe('```js\nconst a = 1;\n```');
- });
-
- it('copy exposes the markdown source of a selection spanning code', async () => {
- const source = 'run `npm test` now';
- const { container } = render(ChatFormInputRich, { value: source });
-
- await tick();
-
- const root = editableIn(container);
-
- setSelection(root, (range) => range.selectNodeContents(root));
-
- const { data, event } = clipboardEvent('copy');
-
- root.dispatchEvent(event);
-
- expect(event.defaultPrevented).toBe(true);
- expect(data.getData('text/plain')).toBe(source);
- });
-
- it('paste of a code span renders the styled element', async () => {
- const { container } = render(ChatFormInputRich, { value: 'run ' });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- range.selectNodeContents(root);
- range.collapse(false);
- });
-
- const { event } = clipboardEvent('paste', '`npm test` now');
-
- root.dispatchEvent(event);
- await tick();
-
- expect(event.defaultPrevented).toBe(true);
- const code = root.querySelector('code[data-code-token="code_inline"]');
-
- expect(code).not.toBeNull();
- expect(code!.textContent).toBe('`npm test`');
- expect(root.textContent).toContain('now');
- });
-
- it('highlights a fenced block content and stays byte-exact', async () => {
- const source = '```js\nconst a = 1;\n```';
- const { container } = render(ChatFormInputRich, { value: source });
-
- await tick();
-
- const root = editableIn(container);
- const code = root.querySelector('code[data-code-token="code_block"]');
-
- expect(code).not.toBeNull();
- expect(code!.querySelector('.hljs-keyword')).not.toBeNull();
- expect(code!.textContent).toBe(source);
- });
-
- it('does not highlight inline code', async () => {
- const { container } = render(ChatFormInputRich, { value: 'run `const` now' });
-
- await tick();
-
- const root = editableIn(container);
-
- expect(root.querySelector('[class*="hljs-"]')).toBeNull();
- });
-});
-
-describe('ChatFormInputRich code block escape hatches', () => {
- const BLOCK_SOURCE = '```js\nconst a = 1;\n```';
- const BLOCK_SELECTOR = 'code[data-code-token="code_block"]';
-
- function blockIn(root: HTMLElement): HTMLElement {
- const el = root.querySelector(BLOCK_SELECTOR);
-
- if (!(el instanceof HTMLElement)) throw new Error('code block not rendered');
-
- return el;
- }
-
- // Caret at the very start/end of the block's text (across highlight spans)
- function placeCaretInBlock(root: HTMLElement, where: 'start' | 'end') {
- const code = blockIn(root);
- const walker = document.createTreeWalker(code, NodeFilter.SHOW_TEXT);
-
- let target: Node | null = null;
-
- for (let n = walker.nextNode(); n; n = walker.nextNode()) {
- target = where === 'start' ? (target ?? n) : n;
- }
-
- if (!target) throw new Error('no text inside code block');
-
- setSelection(root, (range) => {
- range.setStart(target!, where === 'start' ? 0 : (target!.textContent ?? '').length);
- range.collapse(true);
- });
- }
-
- function caretContainer(): Node {
- const selection = window.getSelection();
-
- if (!selection || selection.rangeCount === 0) throw new Error('no selection');
-
- return selection.getRangeAt(0).startContainer;
- }
-
- it('pads a trailing code block with a br hatch that stays invisible to copy', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- // no permanent empty line above a leading block
- expect(root.firstChild).toBe(blockIn(root));
- expect(root.lastChild?.nodeName).toBe('BR');
-
- setSelection(root, (range) => range.selectNodeContents(root));
- const { data, event } = clipboardEvent('copy');
-
- root.dispatchEvent(event);
-
- expect(data.getData('text/plain')).toBe(BLOCK_SOURCE);
- });
-
- it('escapes a trailing code block with ArrowDown and types after it', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- await userEvent.keyboard('{ArrowDown}');
- expect(blockIn(root).contains(caretContainer())).toBe(false);
-
- await userEvent.keyboard('x');
- await tick();
-
- expect(blockIn(root).textContent).toBe(BLOCK_SOURCE);
- // the DOM holds no separator newline (it would render as a
- // phantom empty line); serialization synthesizes it so the
- // markdown source keeps the text below the block
- expect(root.textContent).toBe(BLOCK_SOURCE + 'x');
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\nx');
- // the stale trailing hatch is removed once real text follows the block
- expect(root.lastChild?.nodeName).not.toBe('BR');
- });
-
- it('escapes a leading code block with ArrowUp and types before it', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'start');
-
- await userEvent.keyboard('{ArrowUp}');
- expect(blockIn(root).contains(caretContainer())).toBe(false);
- // the transient hatch line exists while the caret sits on it
- expect(root.firstChild?.nodeName).toBe('BR');
-
- await userEvent.keyboard('y');
- await tick();
-
- expect(blockIn(root).textContent).toBe(BLOCK_SOURCE);
- expect(root.textContent).toBe('y' + BLOCK_SOURCE);
- expect(serializeContent(root)).toBe('y\n' + BLOCK_SOURCE);
- // the typed text consumed the hatch
- expect(root.firstChild?.nodeName).not.toBe('BR');
- });
-
- it('escapes a leading code block with ArrowLeft from its first character', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'start');
-
- await userEvent.keyboard('{ArrowLeft}');
- expect(blockIn(root).contains(caretContainer())).toBe(false);
- expect(root.firstChild?.nodeName).toBe('BR');
- });
-
- it('removes the transient leading hatch when the caret moves back into the block', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'start');
-
- await userEvent.keyboard('{ArrowUp}');
- expect(root.firstChild?.nodeName).toBe('BR');
-
- await userEvent.keyboard('{ArrowDown}');
- await tick();
-
- expect(blockIn(root).contains(caretContainer())).toBe(true);
- expect(root.firstChild).toBe(blockIn(root));
- });
-
- it('extends the selection out of the block with Shift+ArrowDown', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- await userEvent.keyboard('{Shift>}{ArrowDown}{/Shift}');
-
- const selection = window.getSelection();
-
- expect(selection).not.toBeNull();
- expect(selection!.isCollapsed).toBe(false);
- expect(blockIn(root).contains(selection!.getRangeAt(0).endContainer)).toBe(false);
- });
-
- it('line-separates text typed right after the closing fence', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- // no arrow keys: the caret sits at the block's end edge, where the
- // post-rebuild restore lands it, and the typed text renders on the
- // line below the block
- await userEvent.keyboard('x');
- await tick();
-
- // the text stays on the caret's line in the DOM (no phantom empty
- // line); the source gets the separator newline
- expect(root.textContent).toBe(BLOCK_SOURCE + 'x');
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\nx');
- });
-
- it('does not double the newline when Shift+Enter already added one', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- await userEvent.keyboard('{Shift>}{Enter}{/Shift}');
- await userEvent.keyboard('x');
- await tick();
-
- expect(root.textContent).toBe(BLOCK_SOURCE + 'x');
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\nx');
- });
-
- it('moves a caret stuck before the inserted newline onto the new line', async () => {
- const { container } = render(ChatFormInputRich, {
- value: BLOCK_SOURCE + '\ntext after the code block'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
-
- // post-break DOM some browsers produce: the inserted newline plus
- // the artificial trailing one, with the caret stuck BEFORE the
- // inserted one (visually at the end of the old line)
- root.appendChild(document.createTextNode('\n'));
- root.appendChild(document.createTextNode('\n'));
- setSelection(root, (range) => {
- range.setStart(root.childNodes[2], 0);
- range.collapse(true);
- });
-
- root.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertLineBreak' }));
- await tick();
-
- const selection = window.getSelection();
-
- expect(rangeToTextOffset(root, selection!.getRangeAt(0))).toBe(
- (BLOCK_SOURCE + '\ntext after the code block\n').length
- );
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ntext after the code block\n\n');
- });
-
- it('appends the artificial trailing newline when the browser did not add one', async () => {
- const { container } = render(ChatFormInputRich, {
- value: BLOCK_SOURCE + '\ntext after the code block'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
-
- // post-break DOM some browsers produce: a lone trailing \n (or a
- //
the hatch sync strips). Collapsed by the renderer, so the
- // caret looks stuck on the old line and the next typed character
- // would consume the newline.
- root.appendChild(document.createTextNode('\n'));
- setSelection(root, (range) => {
- range.setStart(root.childNodes[2], 1);
- range.collapse(true);
- });
-
- root.dispatchEvent(new InputEvent('input', { bubbles: true, inputType: 'insertLineBreak' }));
- await tick();
-
- const selection = window.getSelection();
-
- expect(rangeToTextOffset(root, selection!.getRangeAt(0))).toBe(
- (BLOCK_SOURCE + '\ntext after the code block\n').length
- );
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ntext after the code block\n\n');
- });
-
- it('lands the caret on the new line with a single Shift+Enter after text below a block', async () => {
- const { container } = render(ChatFormInputRich, {
- value: BLOCK_SOURCE + '\ntext after the code block'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- const text = root.childNodes[1];
-
- range.setStart(text, (text.textContent ?? '').length);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Shift>}{Enter}{/Shift}');
- await tick();
-
- const selection = window.getSelection();
-
- expect(rangeToTextOffset(root, selection!.getRangeAt(0))).toBe(
- (BLOCK_SOURCE + '\ntext after the code block\n').length
- );
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ntext after the code block\n\n');
-
- // the next typed character lands on the new line
- await userEvent.keyboard('x');
- await tick();
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ntext after the code block\nx');
- });
-
- it('lets Backspace at the text start move into the block without a source fight', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- await userEvent.keyboard('{ArrowDown}');
- await userEvent.keyboard('create');
- await tick();
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ncreate');
-
- // Backspace at the start of the text line: the separator newline
- // is structural (synthesized while text follows the block), so
- // the caret just moves to the block's edge - nothing is re-added
- await userEvent.keyboard('{Home}');
- await userEvent.keyboard('{Backspace}');
- await tick();
-
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\ncreate');
- expect(caretContainer()).toBe(root);
- });
-
- it('lets forward Delete eat the text after a block normally', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- placeCaretInBlock(root, 'end');
-
- await userEvent.keyboard('{ArrowDown}');
- await userEvent.keyboard('create');
- await tick();
-
- await userEvent.keyboard('{Home}');
- await userEvent.keyboard('{Delete}');
- await tick();
-
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\nreate');
- });
-
- it('renders text after a block without a phantom empty line', async () => {
- const { container } = render(ChatFormInputRich, {
- value: BLOCK_SOURCE + '\nhello'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- expect(root.textContent).toBe(BLOCK_SOURCE + 'hello');
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\nhello');
- });
-
- it('keeps an intentional blank line after a block out of the separator', async () => {
- const { container } = render(ChatFormInputRich, {
- value: BLOCK_SOURCE + '\n\nhello'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- expect(root.textContent).toBe(BLOCK_SOURCE + '\nhello');
- expect(serializeContent(root)).toBe(BLOCK_SOURCE + '\n\nhello');
- });
-
- it('re-highlights while typing inside a block and keeps the caret', async () => {
- const { container } = render(ChatFormInputRich, { value: BLOCK_SOURCE });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
-
- // caret at the start of the block content (after the opening fence)
- setSelection(root, (range) => {
- const target = textOffsetToRange(root, 6);
-
- range.setStart(target.startContainer, target.startOffset);
- range.collapse(true);
- });
-
- await userEvent.keyboard('x');
- await tick();
-
- const code = blockIn(root);
-
- expect(serializeContent(root)).toBe('```js\nxconst a = 1;\n```');
- expect(code.textContent).toBe('```js\nxconst a = 1;\n```');
- expect(code.querySelector('.hljs-number')).not.toBeNull();
-
- const selection = window.getSelection();
-
- expect(code.contains(selection!.getRangeAt(0).startContainer)).toBe(true);
- expect(rangeToTextOffset(root, selection!.getRangeAt(0))).toBe(7);
- });
-});
-
-describe('ChatFormInputRich Enter in code blocks', () => {
- const BLOCK_SOURCE = '```js\nconst a = 1;\n```';
-
- it('adds a line instead of submitting on plain Enter inside a block', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: BLOCK_SOURCE
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
-
- // caret at the start of the block content (after the opening fence)
- setSelection(root, (range) => {
- const target = textOffsetToRange(root, 6);
-
- range.setStart(target.startContainer, target.startOffset);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Enter}');
- await tick();
-
- // consumed locally: the parent's submit handler never sees it
- expect(onKeydown).not.toHaveBeenCalled();
- expect(serializeContent(root)).toBe('```js\n\nconst a = 1;\n```');
-
- const code = root.querySelector('code[data-code-token="code_block"]');
- const selection = window.getSelection();
-
- expect(code!.contains(selection!.getRangeAt(0).startContainer)).toBe(true);
- expect(rangeToTextOffset(root, selection!.getRangeAt(0))).toBe(7);
- });
-
- it('adds a line after a still-open fence (no closing ``` yet)', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: '```js\nconst a = 1;'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
-
- // caret at the start of the block content (after the opening fence)
- setSelection(root, (range) => {
- const target = textOffsetToRange(root, 6);
-
- range.setStart(target.startContainer, target.startOffset);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Enter}');
- await tick();
-
- expect(onKeydown).not.toHaveBeenCalled();
- expect(serializeContent(root)).toBe('```js\n\nconst a = 1;');
- });
-
- it('forwards plain Enter to the parent when the caret is outside a block', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: BLOCK_SOURCE + '\nafter'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- range.selectNodeContents(root);
- range.collapse(false);
- });
-
- await userEvent.keyboard('{Enter}');
-
- expect(onKeydown).toHaveBeenCalledTimes(1);
- expect(onKeydown.mock.calls[0][0].defaultPrevented).toBe(false);
- });
-
- it('forwards plain Enter on the trailing hatch line after a block', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: BLOCK_SOURCE
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- // root-level caret between the block and its trailing br hatch
- setSelection(root, (range) => {
- range.setStart(root, 1);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Enter}');
-
- expect(onKeydown).toHaveBeenCalledTimes(1);
- });
-
- it('forwards Ctrl+Enter inside a block so explicit submit survives', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: BLOCK_SOURCE
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- setSelection(root, (range) => {
- const target = textOffsetToRange(root, 6);
-
- range.setStart(target.startContainer, target.startOffset);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Control>}{Enter}{/Control}');
-
- expect(onKeydown).toHaveBeenCalledWith(
- expect.objectContaining({ ctrlKey: true, key: 'Enter' })
- );
- expect(serializeContent(root)).toBe(BLOCK_SOURCE);
- });
-
- it('forwards Enter inside an inline code span', async () => {
- const onKeydown = vi.fn();
- const { container } = render(ChatFormInputRich, {
- onKeydown,
- value: 'run `npm test` now'
- });
-
- await tick();
-
- const root = editableIn(container);
-
- root.focus();
- const code = root.querySelector('code[data-code-token="code_inline"]')!;
-
- setSelection(root, (range) => {
- range.setStart(code.firstChild!, 3);
- range.collapse(true);
- });
-
- await userEvent.keyboard('{Enter}');
-
- expect(onKeydown).toHaveBeenCalledTimes(1);
- });
-});
diff --git a/tools/ui/tests/client/chat-form-input.svelte.test.ts b/tools/ui/tests/client/chat-form-input.svelte.test.ts
new file mode 100644
index 000000000000..dfc37c149eca
--- /dev/null
+++ b/tools/ui/tests/client/chat-form-input.svelte.test.ts
@@ -0,0 +1,113 @@
+// Guards the chat form input contract: a live-preview markdown editor whose value
+// stays the exact markdown source, with mention links shown as badges while their
+// block is edited and every block rendered once the editor loses focus. The form's
+// key and paste handlers run first and win when they handle the event.
+
+import { EditorView } from '@codemirror/view';
+import ChatFormInput from '$lib/components/app/chat/ChatForm/ChatFormInput/ChatFormInput.svelte';
+import { tick } from 'svelte';
+import { describe, expect, it, vi } from 'vitest';
+import { userEvent } from 'vitest/browser';
+import { render } from 'vitest-browser-svelte';
+
+const MENTION = '[notes.md](file:///tmp/notes.md)';
+
+function editorIn(container: HTMLElement): EditorView {
+ const el = container.querySelector
('.cm-content');
+ const view = el && EditorView.findFromDOM(el);
+
+ if (!view) throw new Error('editor not rendered');
+
+ return view;
+}
+
+async function settle() {
+ await tick();
+ await new Promise((resolve) => requestAnimationFrame(() => resolve(null)));
+}
+
+describe('ChatFormInput', () => {
+ it('keeps the typed markdown byte-exact in the value', async () => {
+ const screen = render(ChatFormInput, { value: '' });
+ const editor = editorIn(screen.container);
+
+ await userEvent.click(editor.contentDOM);
+ await userEvent.keyboard('## Title{Shift>}{Enter}{Enter}{/Shift}- **bold** `code`');
+ await settle();
+
+ expect(editor.state.doc.toString()).toBe('## Title\n\n- **bold** `code`');
+ });
+
+ it('shows a mention link as a badge in the block being edited', async () => {
+ const screen = render(ChatFormInput, { value: `see ${MENTION} ok` });
+ const editor = editorIn(screen.container);
+
+ editor.focus();
+ editor.dispatch({ selection: { anchor: 0 } });
+ await settle();
+
+ const line = screen.container.querySelector('.cm-line');
+
+ expect(line?.textContent).toContain('notes.md');
+ expect(line?.textContent).not.toContain('file://');
+ expect(editor.state.doc.toString()).toBe(`see ${MENTION} ok`);
+ });
+
+ it('steps over a mention badge as one unit', async () => {
+ const screen = render(ChatFormInput, { value: `a ${MENTION}` });
+ const editor = editorIn(screen.container);
+
+ editor.focus();
+ editor.dispatch({ selection: { anchor: editor.state.doc.length } });
+ await settle();
+
+ await userEvent.keyboard('{Backspace}');
+ await settle();
+
+ expect(editor.state.doc.toString()).toBe('a ');
+ });
+
+ it('renders every block like a chat message once blurred', async () => {
+ const screen = render(ChatFormInput, { value: '# Title\n\nSome **bold** text' });
+ const editor = editorIn(screen.container);
+
+ editor.contentDOM.blur();
+ await vi.waitFor(() => {
+ expect(screen.container.querySelector('.cm-md-block h1')?.textContent).toBe('Title');
+ expect(screen.container.querySelector('.cm-md-block strong')?.textContent).toBe('bold');
+ });
+ });
+
+ it('lets the form handle a key first and keeps it from the editor', async () => {
+ const onKeydown = vi.fn((event: KeyboardEvent) => {
+ if (event.key === 'Enter') event.preventDefault();
+ });
+ const screen = render(ChatFormInput, { onKeydown, value: 'hello' });
+ const editor = editorIn(screen.container);
+
+ editor.focus();
+ editor.dispatch({ selection: { anchor: 5 } });
+ await userEvent.keyboard('{Enter}');
+ await settle();
+
+ expect(onKeydown).toHaveBeenCalled();
+ expect(editor.state.doc.toString()).toBe('hello');
+ });
+
+ it('leaves a paste the form handles out of the editor', async () => {
+ const onPaste = vi.fn((event: ClipboardEvent) => event.preventDefault());
+ const screen = render(ChatFormInput, { onPaste, value: '' });
+ const editor = editorIn(screen.container);
+ const clipboardData = new DataTransfer();
+
+ clipboardData.setData('text/plain', 'pasted');
+ editor.focus();
+ editor.contentDOM.dispatchEvent(
+ new ClipboardEvent('paste', { bubbles: true, cancelable: true, clipboardData })
+ );
+ await settle();
+
+ expect(onPaste).toHaveBeenCalled();
+ expect(editor.state.doc.toString()).toBe('');
+ });
+});
diff --git a/tools/ui/tests/client/components/ChatFormInputRichHarness.svelte b/tools/ui/tests/client/components/ChatFormInputRichHarness.svelte
deleted file mode 100644
index 58768a1e88a3..000000000000
--- a/tools/ui/tests/client/components/ChatFormInputRichHarness.svelte
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
diff --git a/tools/ui/tests/client/components/ChatFormTestWrapper.svelte b/tools/ui/tests/client/components/ChatFormTestWrapper.svelte
index 7ec8bf7f8b6e..c2ae59fa5b20 100644
--- a/tools/ui/tests/client/components/ChatFormTestWrapper.svelte
+++ b/tools/ui/tests/client/components/ChatFormTestWrapper.svelte
@@ -2,11 +2,11 @@
import ChatForm from '$lib/components/app/chat/ChatForm/ChatForm.svelte';
import * as Tooltip from '$lib/components/ui/tooltip';
- let { onSubmit }: { onSubmit?: () => void } = $props();
+ let { expandable = false, onSubmit }: { expandable?: boolean; onSubmit?: () => void } = $props();
let value = $state('');
-
+
diff --git a/tools/ui/tests/client/components/ConversationRowHarness.svelte b/tools/ui/tests/client/components/ConversationRowHarness.svelte
new file mode 100644
index 000000000000..4c670bec2c54
--- /dev/null
+++ b/tools/ui/tests/client/components/ConversationRowHarness.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
+
diff --git a/tools/ui/tests/client/conversation-row-hold-mobile.svelte.test.ts b/tools/ui/tests/client/conversation-row-hold-mobile.svelte.test.ts
new file mode 100644
index 000000000000..2e0ed19e6cd7
--- /dev/null
+++ b/tools/ui/tests/client/conversation-row-hold-mobile.svelte.test.ts
@@ -0,0 +1,94 @@
+// Guards the phone shape of a conversation row's actions: holding the row opens its menu
+// anchored below it, while a tap still opens the chat and a drift is a scroll.
+
+import ConversationRowHarness from './components/ConversationRowHarness.svelte';
+import { ROW_LONG_PRESS_MS, ROW_LONG_PRESS_SLOP_PX } from '$lib/constants';
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
+import { page } from 'vitest/browser';
+import { render } from 'vitest-browser-svelte';
+
+const PHONE = { height: 844, width: 390 };
+const DESKTOP = { height: 900, width: 1280 };
+const conversation: DatabaseConversation = {
+ currNode: null,
+ id: 'conv-1',
+ lastModified: Date.now(),
+ name: 'Rust borrow checker help'
+};
+
+function touch(row: Element, type: string, dy = 0) {
+ const rect = row.getBoundingClientRect();
+
+ row.dispatchEvent(
+ new PointerEvent(type, {
+ bubbles: true,
+ cancelable: true,
+ clientX: rect.left + 20,
+ clientY: rect.top + 10 + dy,
+ isPrimary: true,
+ pointerId: 1,
+ pointerType: 'touch'
+ })
+ );
+}
+
+function wait(ms: number) {
+ return new Promise((resolve) => setTimeout(resolve, ms));
+}
+
+describe('conversation row on a phone', () => {
+ beforeEach(async () => {
+ await page.viewport(PHONE.width, PHONE.height);
+ });
+
+ afterEach(async () => {
+ await page.viewport(DESKTOP.width, DESKTOP.height);
+ });
+
+ it('shows no three-dot trigger', async () => {
+ const screen = render(ConversationRowHarness, { conversation });
+ const row = screen.getByRole('button', { name: conversation.name });
+
+ await row.hover();
+
+ expect(screen.getByRole('button', { name: 'More actions' }).query()).toBeNull();
+ });
+
+ it('opens the actions menu on a hold, without opening the chat', async () => {
+ const onSelect = vi.fn();
+ const screen = render(ConversationRowHarness, { conversation, onSelect });
+ const row = screen.getByRole('button', { name: conversation.name }).element();
+
+ touch(row, 'pointerdown');
+ await wait(ROW_LONG_PRESS_MS + 50);
+ touch(row, 'pointerup');
+ (row as HTMLElement).click();
+
+ await expect.element(page.getByRole('menuitem', { name: 'Delete' })).toBeVisible();
+ expect(onSelect).not.toHaveBeenCalled();
+ });
+
+ it('treats a drift as a scroll, not a hold', async () => {
+ const screen = render(ConversationRowHarness, { conversation });
+ const row = screen.getByRole('button', { name: conversation.name }).element();
+
+ touch(row, 'pointerdown');
+ touch(row, 'pointermove', ROW_LONG_PRESS_SLOP_PX * 2);
+ await wait(ROW_LONG_PRESS_MS + 50);
+
+ expect(page.getByRole('menuitem').query()).toBeNull();
+ });
+
+ it('opens the chat on a tap', async () => {
+ const onSelect = vi.fn();
+ const screen = render(ConversationRowHarness, { conversation, onSelect });
+ const row = screen.getByRole('button', { name: conversation.name }).element();
+
+ touch(row, 'pointerdown');
+ touch(row, 'pointerup');
+ (row as HTMLElement).click();
+
+ expect(onSelect).toHaveBeenCalledWith(conversation.id);
+ expect(page.getByRole('menuitem').query()).toBeNull();
+ });
+});
diff --git a/tools/ui/tests/client/haptics.svelte.test.ts b/tools/ui/tests/client/haptics.svelte.test.ts
new file mode 100644
index 000000000000..acea10517b8c
--- /dev/null
+++ b/tools/ui/tests/client/haptics.svelte.test.ts
@@ -0,0 +1,51 @@
+// Guards hapticTap's three paths: nothing without touch, a short vibration where the browser
+// vibrates (Android), and a toggled hidden switch where it does not (iOS), which leaves no
+// element behind.
+
+import { HAPTIC_TAP_MS } from '$lib/constants';
+import { hapticTap } from '$lib/utils';
+import { afterEach, describe, expect, it, vi } from 'vitest';
+
+function setCoarsePointer(coarse: boolean) {
+ vi.spyOn(window, 'matchMedia').mockImplementation(
+ (query: string) => ({ matches: coarse, media: query }) as MediaQueryList
+ );
+}
+
+afterEach(() => {
+ vi.restoreAllMocks();
+ vi.unstubAllGlobals();
+});
+
+describe('hapticTap', () => {
+ it('does nothing without a touch screen', () => {
+ setCoarsePointer(false);
+ const vibrate = vi.fn();
+
+ vi.stubGlobal('navigator', { ...navigator, vibrate });
+ hapticTap();
+
+ expect(vibrate).not.toHaveBeenCalled();
+ });
+
+ it('vibrates briefly where the browser can', () => {
+ setCoarsePointer(true);
+ const vibrate = vi.fn();
+
+ vi.stubGlobal('navigator', { ...navigator, vibrate });
+ hapticTap();
+
+ expect(vibrate).toHaveBeenCalledWith(HAPTIC_TAP_MS);
+ });
+
+ it('toggles a hidden switch where it cannot, and removes it', () => {
+ setCoarsePointer(true);
+ vi.stubGlobal('navigator', { ...navigator, vibrate: undefined });
+ const clicks = vi.spyOn(HTMLLabelElement.prototype, 'click');
+
+ hapticTap();
+
+ expect(clicks).toHaveBeenCalledTimes(1);
+ expect(document.querySelector('input[switch]')).toBeNull();
+ });
+});
diff --git a/tools/ui/tests/client/stick-to-bottom-affordance.svelte.test.ts b/tools/ui/tests/client/stick-to-bottom-affordance.svelte.test.ts
new file mode 100644
index 000000000000..1af2f46a1048
--- /dev/null
+++ b/tools/ui/tests/client/stick-to-bottom-affordance.svelte.test.ts
@@ -0,0 +1,67 @@
+// Guards when StickToBottom offers the way back down: not for a small step up from the
+// bottom, which still reads as near it, only once the reader is well above it, and
+// never once they are back at the bottom.
+
+import { createStickToBottom } from '$lib/hooks/use-stick-to-bottom.svelte';
+import { afterEach, describe, expect, it } from 'vitest';
+
+let cleanup: (() => void)[] = [];
+
+afterEach(() => {
+ cleanup.forEach((fn) => fn());
+ cleanup = [];
+});
+
+function setup() {
+ const container = document.createElement('div');
+ const content = document.createElement('div');
+
+ container.style.cssText = 'height: 200px; overflow-y: auto;';
+ content.style.height = '1000px';
+ container.append(content);
+ document.body.append(container);
+
+ const stick = createStickToBottom();
+
+ stick.attach(container, content);
+ stick.scrollToBottom();
+ stick.handleScroll();
+ cleanup.push(() => {
+ stick.detach();
+ container.remove();
+ });
+
+ return { container, stick };
+}
+
+function scrollTo(
+ container: HTMLElement,
+ stick: ReturnType,
+ top: number
+) {
+ container.scrollTop = top;
+ stick.handleScroll();
+}
+
+describe('StickToBottom affordance', () => {
+ it('is not offered a small step above the bottom', () => {
+ const { container, stick } = setup();
+
+ scrollTo(container, stick, container.scrollTop - 100);
+
+ expect(stick.atBottom).toBe(false);
+ expect(stick.farFromBottom).toBe(false);
+ });
+
+ it('is offered well above the bottom and withdrawn back at it', () => {
+ const { container, stick } = setup();
+ const bottom = container.scrollTop;
+
+ scrollTo(container, stick, 0);
+ expect(stick.farFromBottom).toBe(true);
+
+ scrollTo(container, stick, bottom);
+ expect(stick.farFromBottom).toBe(false);
+ expect(stick.atBottom).toBe(true);
+ });
+});
diff --git a/tools/ui/tests/client/stick-to-bottom.svelte.test.ts b/tools/ui/tests/client/stick-to-bottom.svelte.test.ts
new file mode 100644
index 000000000000..bb69deca2a2f
--- /dev/null
+++ b/tools/ui/tests/client/stick-to-bottom.svelte.test.ts
@@ -0,0 +1,89 @@
+// Guards the follow rules of StickToBottom: right after a press, growth of the
+// content stays put (the reader expanded something), while growth of an element
+// passed to followGrowthOf - the chat form expanding on the reader's click - is
+// still followed, so the latest message stays in view above it.
+
+import { createStickToBottom } from '$lib/hooks/use-stick-to-bottom.svelte';
+import { afterEach, describe, expect, it } from 'vitest';
+
+let cleanup: (() => void)[] = [];
+
+afterEach(() => {
+ cleanup.forEach((fn) => fn());
+ cleanup = [];
+});
+
+function setup() {
+ const container = document.createElement('div');
+ const content = document.createElement('div');
+ const form = document.createElement('div');
+
+ container.style.cssText = 'height: 200px; overflow-y: auto;';
+ content.style.height = '600px';
+ form.style.height = '50px';
+ container.append(content, form);
+ document.body.append(container);
+
+ const stick = createStickToBottom();
+
+ stick.attach(container, content);
+ stick.scrollToBottom();
+ // as the container's scroll handler does, so a later move up reads as the reader's
+ stick.handleScroll();
+ cleanup.push(() => {
+ stick.detach();
+ container.remove();
+ });
+
+ return { container, content, form, stick };
+}
+
+function press(container: HTMLElement) {
+ container.dispatchEvent(new PointerEvent('pointerdown', { bubbles: true }));
+}
+
+async function resizeObserved() {
+ // ResizeObserver reports in the next rendering steps
+ await new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)));
+}
+
+function distanceFromBottom(el: HTMLElement) {
+ return el.scrollHeight - el.clientHeight - el.scrollTop;
+}
+
+describe('StickToBottom', () => {
+ it('keeps the viewport when the content grows right after a press', async () => {
+ const { container, content } = setup();
+
+ press(container);
+ content.style.height = '900px';
+ await resizeObserved();
+
+ expect(distanceFromBottom(container)).toBeGreaterThan(200);
+ });
+
+ it('follows a followed element growing right after a press', async () => {
+ const { container, form, stick } = setup();
+
+ cleanup.push(stick.followGrowthOf(form));
+ await resizeObserved();
+
+ press(container);
+ form.style.height = '350px';
+ await resizeObserved();
+
+ expect(distanceFromBottom(container)).toBeLessThanOrEqual(1);
+ });
+
+ it('leaves a reader who scrolled away where they are', async () => {
+ const { container, form, stick } = setup();
+
+ cleanup.push(stick.followGrowthOf(form));
+ container.scrollTop = 0;
+ stick.handleScroll();
+ form.style.height = '350px';
+ await resizeObserved();
+
+ expect(container.scrollTop).toBe(0);
+ });
+});
diff --git a/tools/ui/tests/stories/BrandGuidelines.mdx b/tools/ui/tests/stories/BrandGuidelines.mdx
new file mode 100644
index 000000000000..b1e1207bb831
--- /dev/null
+++ b/tools/ui/tests/stories/BrandGuidelines.mdx
@@ -0,0 +1,24 @@
+import { Markdown, Meta, Unstyled } from '@storybook/addon-docs/blocks';
+import brandMd from '../../BRAND.md?raw';
+
+export const [, ...body] = brandMd.split(/^# .*$/m);
+
+
+
+
+
+
+# Brand guidelines
+
+
+
+**Written for agents first.** This is the brand book for Llama and llama.cpp: how posts, posters, release images, video thumbnails and link previews are made. The Llama design system in Claude, which Claude Design reads, is exported from this page and from **Communications** by `npm run export:design-system`.
+
+
+
+Rendered from `tools/ui/BRAND.md`. Everything it describes is drawn under **Communications**, **Brand** and **Philosophy** in this Storybook, which win where the two disagree.
+
+
{body.join('')}
+
+
+
diff --git a/tools/ui/tests/stories/ChatMessage.stories.svelte b/tools/ui/tests/stories/ChatMessage.stories.svelte
deleted file mode 100644
index bec9cbcd3e18..000000000000
--- a/tools/ui/tests/stories/ChatMessage.stories.svelte
+++ /dev/null
@@ -1,416 +0,0 @@
-
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', true);
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
- const { conversationsStore } = await import('$lib/stores/conversations/index.svelte');
-
- settingsStore.updateConfig('showMessageStats', true);
- settingsStore.updateConfig('showRawOutputSwitch', false);
- // The toggle reads the before size from the branch, so the story needs
- // the summarized turn in the active message list.
- conversationsStore.activeMessages = [preCompactionAssistant, compactionMessage];
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
- const { chatActivityStore } = await import('$lib/stores/chat/activity.svelte');
- const { chatStore } = await import('$lib/stores/chat/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
-
- // The summary request reports its prompt progress through the shared
- // processing state; seed one so the story shows the prefill detail.
- chatActivityStore.markCompacting('conv-1', compactionPendingMessage.id);
- chatStore.processing.setActiveConversation('conv-1');
- chatStore.processing.setState('conv-1', {
- contextTotal: 32768,
- contextUsed: 10000,
- hasNextToken: false,
- outputTokensMax: -1,
- outputTokensUsed: 0,
- progressPercent: 42,
- promptProgress: { cache: 0, processed: 4200, time_ms: 6000, total: 10000 },
- promptTokens: 0,
- speculative: false,
- status: 'preparing',
- temperature: 0.8,
- tokensDecoded: 0,
- tokensPerSecond: 0,
- tokensRemaining: -1,
- topP: 0.95
- });
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
- const { chatActivityStore } = await import('$lib/stores/chat/activity.svelte');
- const { chatStore } = await import('$lib/stores/chat/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
-
- // Prompt processing is over, so only the generated tokens are reported.
- chatActivityStore.markCompacting('conv-1', compactionGeneratingMessage.id);
- chatStore.processing.setActiveConversation('conv-1');
- chatStore.processing.setState('conv-1', {
- contextTotal: 32768,
- contextUsed: 45200,
- hasNextToken: true,
- outputTokensMax: -1,
- outputTokensUsed: 128,
- promptTokens: 42200,
- speculative: false,
- status: 'generating',
- temperature: 0.8,
- tokensDecoded: 128,
- tokensPerSecond: 25,
- tokensRemaining: -1,
- topP: 0.95
- });
- }}
-/>
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- // Phase 1: Stream reasoning content in chunks
- let reasoningText =
- 'I need to think about this carefully. Let me break down the problem:\n\n1. The user is asking for help with something complex\n2. I should provide a thorough and helpful response\n3. I need to consider multiple approaches\n4. The best solution would be to explain step by step\n\nThis approach will ensure clarity and understanding.';
- let reasoningChunk = 'I';
- let i = 0;
-
- while (i < reasoningText.length) {
- const chunkSize = Math.floor(Math.random() * 5) + 3; // Random 3-7 characters
- const chunk = reasoningText.slice(i, i + chunkSize);
-
- reasoningChunk += chunk;
-
- // Update the reactive state directly
- streamingMessage.thinking = reasoningChunk;
-
- i += chunkSize;
- await new Promise((resolve) => setTimeout(resolve, 50));
- }
-
- const regularText =
- "Based on my analysis, here's the solution:\n\n**Step 1:** First, we need to understand the requirements clearly.\n\n**Step 2:** Then we can implement the solution systematically.\n\n**Step 3:** Finally, we test and validate the results.\n\nThis approach ensures we cover all aspects of the problem effectively.";
-
- let contentChunk = '';
-
- i = 0;
-
- while (i < regularText.length) {
- const chunkSize = Math.floor(Math.random() * 5) + 3; // Random 3-7 characters
- const chunk = regularText.slice(i, i + chunkSize);
-
- contentChunk += chunk;
-
- // Update the reactive state directly
- streamingMessage.content = contentChunk;
-
- i += chunkSize;
- await new Promise((resolve) => setTimeout(resolve, 50));
- }
-
- streamingMessage.timestamp = Date.now();
- }}
->
-
-
-
-
-
- {
- const { settingsStore } = await import('$lib/stores/settings/index.svelte');
-
- settingsStore.updateConfig('showRawOutputSwitch', false);
- // Import the chat store to simulate loading state
- const { chatStore } = await import('$lib/stores/chat/index.svelte');
-
- // Set loading state to true to trigger the processing UI
- chatStore.isLoading = true;
-
- // Simulate the processing state hook behavior
- // This will show the "Generating..." text and parameter details
- await new Promise((resolve) => setTimeout(resolve, 100));
- }}
-/>
diff --git a/tools/ui/tests/stories/ChatScreenForm.stories.svelte b/tools/ui/tests/stories/ChatScreenForm.stories.svelte
deleted file mode 100644
index b41ccf0a1986..000000000000
--- a/tools/ui/tests/stories/ChatScreenForm.stories.svelte
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
- {
- const textarea = await canvas.findByRole('textbox');
- const submitButton = await canvas.findByRole('button', { name: 'Send' });
-
- // Expect the input to be focused after the component is mounted
- await expect(textarea).toHaveFocus();
-
- // Expect the submit button to be disabled
- await expect(submitButton).toBeDisabled();
-
- const text = 'What is the meaning of life?';
-
- await userEvent.clear(textarea);
- await userEvent.type(textarea, text);
-
- await expect(textarea).toHaveValue(text);
-
- const fileInput = document.querySelector('input[type="file"]');
-
- await expect(fileInput).not.toHaveAttribute('accept');
- }}
-/>
-
-
-
- {
- const jpgAttachment = canvas.getByAltText('1.jpg');
- const svgAttachment = canvas.getByAltText('hf-logo.svg');
- const pdfFileExtension = canvas.getByText('PDF');
- const pdfAttachment = canvas.getByText('example.pdf');
- const pdfSize = canvas.getByText('342.82 KB');
-
- await expect(jpgAttachment).toBeInTheDocument();
- await expect(jpgAttachment).toHaveAttribute('src', jpgAsset);
-
- await expect(svgAttachment).toBeInTheDocument();
- await expect(svgAttachment).toHaveAttribute('src', svgAsset);
-
- await expect(pdfFileExtension).toBeInTheDocument();
- await expect(pdfAttachment).toBeInTheDocument();
- await expect(pdfSize).toBeInTheDocument();
- }}
-/>
diff --git a/tools/ui/tests/stories/DesignGuidelines.mdx b/tools/ui/tests/stories/DesignGuidelines.mdx
new file mode 100644
index 000000000000..06c345a448aa
--- /dev/null
+++ b/tools/ui/tests/stories/DesignGuidelines.mdx
@@ -0,0 +1,30 @@
+import { Markdown, Meta, Source, Unstyled } from '@storybook/addon-docs/blocks';
+import designMd from '../../DESIGN.md?raw';
+
+export const [, tokens, guidelines] = designMd.split(/^---$/m);
+
+
+
+
+
+
+# Design guidelines
+
+
+
+**Written for agents first.** This is the how of Llama UI, in a form an agent can follow when it builds or changes the UI: the tokens, the roles and the rules, precise rather than persuasive. People can read it too, but the why behind it is in the **Philosophy** section.
+
+
+
+Rendered from `tools/ui/DESIGN.md`. The implementation lives in `src/app.css`, and every token and surface below can be seen under **UI** in this Storybook, and the logo, type and colours under **Brand**.
+
+
{guidelines}
+
+## Tokens
+
+The machine-readable half of `tools/ui/DESIGN.md`, in the [DESIGN.md format](https://github.com/google-labs-code/design.md). Check it with `npx @google/design.md lint DESIGN.md`.
+
+
+
+
+
diff --git a/tools/ui/tests/stories/Introduction.mdx b/tools/ui/tests/stories/Introduction.mdx
deleted file mode 100644
index d4c0c792164c..000000000000
--- a/tools/ui/tests/stories/Introduction.mdx
+++ /dev/null
@@ -1,44 +0,0 @@
-import { Meta } from '@storybook/addon-docs/blocks';
-
-
-
-# llama.cpp Web UI
-
-Welcome to the **llama-ui** component library! This Storybook showcases the components used in the modern web interface for the llama-server.
-
-## 🚀 About This Project
-
-Llama UI is a modern web interface for the llama-server, built with SvelteKit and ShadCN UI. Features include:
-
-- **Real-time chat conversations** with AI assistants
-- **Multi-conversation management** with persistent storage
-- **Advanced parameter tuning** for model behavior
-- **File upload support** for multimodal interactions
-- **Responsive design** that works on desktop and mobile
-
-## 🎨 Design System
-
-The UI is built using:
-
-- **SvelteKit** - Modern web framework with excellent performance
-- **Tailwind CSS** - Utility-first CSS framework for rapid styling
-- **ShadCN/UI** - High-quality, accessible component library
-- **Lucide Icons** - Beautiful, consistent icon set
-
-## 🔧 Development
-
-This Storybook serves as both documentation and a development environment for the UI components. Each story demonstrates:
-
-- **Component variations** - Different states and configurations
-- **Interactive examples** - Live components you can interact with
-- **Usage patterns** - How components work together
-- **Styling consistency** - Unified design language
-
-## 🚀 Getting Started
-
-To explore the components:
-
-1. **Browse the sidebar** to see all available components
-2. **Click on stories** to see different component states
-3. **Use the controls panel** to interact with component props
-4. **Check the docs tab** for detailed component information
diff --git a/tools/ui/tests/stories/MarkdownContent.stories.svelte b/tools/ui/tests/stories/MarkdownContent.stories.svelte
deleted file mode 100644
index b3203e335969..000000000000
--- a/tools/ui/tests/stories/MarkdownContent.stories.svelte
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {
- const { canvasElement } = context;
-
- // Wait for component to render
- await new Promise((resolve) => setTimeout(resolve, 100));
-
- // Find all links in the rendered content
- const links = (canvasElement as HTMLElement).querySelectorAll(
- 'a[href]'
- ) as NodeListOf;
- const linkList = Array.from(links) as HTMLAnchorElement[];
-
- // Test that we have the expected number of links
- expect(links.length).toBeGreaterThan(0);
-
- // Test each link for proper attributes
- links.forEach((link: HTMLAnchorElement) => {
- const href = link.getAttribute('href');
-
- // Test that external links have proper security attributes
- if (href && (href.startsWith('http://') || href.startsWith('https://'))) {
- expect(link.getAttribute('target')).toBe('_blank');
- expect(link.getAttribute('rel')).toBe('noopener noreferrer');
- }
- });
-
- // Test specific links exist
- const hugginFaceLink = linkList.find(
- (link) => link.getAttribute('href') === 'https://huggingface.co'
- );
-
- expect(hugginFaceLink).toBeTruthy();
- expect(hugginFaceLink?.textContent).toBe('Hugging Face Homepage');
-
- const githubLink = linkList.find(
- (link) => link.getAttribute('href') === 'https://github.com/ggml-org/llama.cpp'
- );
-
- expect(githubLink).toBeTruthy();
- expect(githubLink?.textContent).toBe('GitHub Repository');
-
- const openaiLink = linkList.find((link) => link.getAttribute('href') === 'https://openai.com');
-
- expect(openaiLink).toBeTruthy();
- expect(openaiLink?.textContent).toBe('OpenAI Website');
-
- const googleLink = linkList.find(
- (link) => link.getAttribute('href') === 'https://www.google.com'
- );
-
- expect(googleLink).toBeTruthy();
- expect(googleLink?.textContent).toBe('Google Search');
-
- // Test inline links (auto-linked URLs)
- const exampleLink = linkList.find(
- (link) => link.getAttribute('href') === 'https://example.com'
- );
-
- expect(exampleLink).toBeTruthy();
-
- const pythonDocsLink = linkList.find(
- (link) => link.getAttribute('href') === 'https://docs.python.org'
- );
-
- expect(pythonDocsLink).toBeTruthy();
-
- console.log(`✅ URL Links test passed - Found ${links.length} links with proper attributes`);
- }}
-/>
diff --git a/tools/ui/tests/stories/ModelsManager.stories.svelte b/tools/ui/tests/stories/ModelsManager.stories.svelte
index 77e53f8e3b1f..42bcb8aba117 100644
--- a/tools/ui/tests/stories/ModelsManager.stories.svelte
+++ b/tools/ui/tests/stories/ModelsManager.stories.svelte
@@ -14,7 +14,7 @@
parameters: {
layout: 'fullscreen'
},
- title: 'Components/ModelsManager'
+ title: 'UI/Blocks/Models/ModelsManager'
});
const option = (model: string, name: string, contextLength?: number): ModelOption => ({
@@ -71,7 +71,7 @@
const isFavorite = (picked: ModelOption) => modelsStore.favoriteModelIds.has(picked.model);
-
+
-
-
-
- (selectedId = picked.id)}
- {selectedId}
- />
-
-
-
-
-
- (selectedId = picked.id)}
- {selectedId}
- />
-
-
diff --git a/tools/ui/tests/stories/ModelsSelector.stories.svelte b/tools/ui/tests/stories/ModelsSelector.stories.svelte
index 5c59b21a2052..9122d746eb0f 100644
--- a/tools/ui/tests/stories/ModelsSelector.stories.svelte
+++ b/tools/ui/tests/stories/ModelsSelector.stories.svelte
@@ -1,8 +1,6 @@
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Server model states
-
-
-
{}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('model-idle', 'Model (idle)', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('model-loading', 'Model (loading)', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('model-loaded', 'Model (loaded)', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('model-sleeping', 'Model (sleeping)', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('model-failed', 'Model (failed)', 'meta')}
- />
-
-
-
-
-
-
- Selection states
-
-
-
{}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('normal-model', 'Normal Model', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('selected-model', 'Selected Model', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('highlighted-model', 'Highlighted Model', 'meta')}
- />
-
- {}}
- onMouseEnter={() => {}}
- onSelect={() => {}}
- option={mockModel('fav-model', 'Favorite Model', 'Qwen')}
- />
-
-
diff --git a/tools/ui/tests/stories/PwaRefreshAlert.stories.svelte b/tools/ui/tests/stories/PwaRefreshAlert.stories.svelte
deleted file mode 100644
index 2a0a0b4bbf6a..000000000000
--- a/tools/ui/tests/stories/PwaRefreshAlert.stories.svelte
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
console.log('reload') }}
- name="Default"
- play={async ({ canvas }) => {
- const title = canvas.getByText('Update available');
-
- await expect(title).toBeInTheDocument();
-
- const description = canvas.getByText(/A new version is available/);
-
- await expect(description).toBeInTheDocument();
-
- const button = canvas.getByRole('button', { name: 'Reload' });
-
- await expect(button).toBeInTheDocument();
- }}
-/>
-
- console.log('reload') }}
- name="Hidden"
- play={async ({ canvas }) => {
- const title = canvas.queryByText('Update available');
-
- await expect(title).not.toBeInTheDocument();
- }}
-/>
-
- console.log('reload')
- }}
- name="ClickReload"
- play={async ({ canvas, userEvent }) => {
- const button = canvas.getByRole('button', { name: 'Reload' });
-
- await expect(button).toBeInTheDocument();
-
- await userEvent.click(button);
-
- const title = canvas.queryByText('Update available');
-
- await expect(title).not.toBeInTheDocument();
-
- const reloadBtn = canvas.queryByRole('button', { name: 'Reload' });
-
- await expect(reloadBtn).not.toBeInTheDocument();
- }}
-/>
diff --git a/tools/ui/tests/stories/SidebarNavigation.stories.svelte b/tools/ui/tests/stories/SidebarNavigation.stories.svelte
index 1a638e6942f6..fcb8fb084d4c 100644
--- a/tools/ui/tests/stories/SidebarNavigation.stories.svelte
+++ b/tools/ui/tests/stories/SidebarNavigation.stories.svelte
@@ -1,16 +1,14 @@
@@ -67,46 +65,3 @@
-
- {
- const { conversationsStore } = await import('$lib/stores/conversations/index.svelte');
-
- waitFor(() =>
- setTimeout(() => {
- conversationsStore.conversations = mockConversations;
- }, 0)
- );
-
- // Expand sidebar first, then click Search in the expanded button list
- const logoTrigger = screen.getByRole('button', { name: /expand navigation/i });
-
- await userEvent.click(logoTrigger);
- const searchTrigger = screen.getByText('Search');
-
- await userEvent.click(searchTrigger);
-
- await expect(await screen.findByRole('combobox')).toHaveFocus();
- }}
->
-
-
-
-
-
- {
- // Mock empty conversations store
- const { conversationsStore } = await import('$lib/stores/conversations/index.svelte');
-
- conversationsStore.conversations = [];
- }}
->
-
-
-
-
diff --git a/tools/ui/tests/stories/a11y/ActionIcon.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ActionIcon.a11y.stories.svelte
index f94e7a792bea..29472385ff41 100644
--- a/tools/ui/tests/stories/a11y/ActionIcon.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ActionIcon.a11y.stories.svelte
@@ -10,7 +10,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/ActionIcon/Accessibility'
+ title: 'UI/Actions/ActionIcon/Accessibility'
});
diff --git a/tools/ui/tests/stories/a11y/ChatMessageStatistics.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ChatMessageStatistics.a11y.stories.svelte
index ec3c269df2b6..cdc3dbb6b768 100644
--- a/tools/ui/tests/stories/a11y/ChatMessageStatistics.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ChatMessageStatistics.a11y.stories.svelte
@@ -9,7 +9,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/ChatMessageStatistics/Accessibility'
+ title: 'UI/Blocks/Chat/ChatMessageStatistics/Accessibility'
});
diff --git a/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
index c56bfd7678bd..37283f2284f5 100644
--- a/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ChatScreenForm.a11y.stories.svelte
@@ -10,7 +10,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/ChatScreen/ChatScreenForm/Accessibility'
+ title: 'UI/Blocks/Chat/ChatScreen/ChatScreenForm/Accessibility'
});
@@ -18,10 +18,10 @@
args={{ class: 'max-w-[56rem] w-[calc(100vw-2rem)]' }}
name="AddButtonSingleTabStop"
play={async ({ canvas, userEvent }) => {
- const textarea = await canvas.findByRole('textbox');
+ const editor = await canvas.findByRole('textbox');
- await userEvent.clear(textarea);
- await userEvent.type(textarea, 'What is the meaning of life?');
+ await userEvent.clear(editor);
+ await userEvent.type(editor, 'What is the meaning of life?');
const trigger = await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT });
diff --git a/tools/ui/tests/stories/a11y/ModelsManager.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ModelsManager.a11y.stories.svelte
index 3b981d0630b3..602f9803d3d4 100644
--- a/tools/ui/tests/stories/a11y/ModelsManager.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ModelsManager.a11y.stories.svelte
@@ -10,7 +10,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/ModelsManager/Accessibility'
+ title: 'UI/Blocks/Models/ModelsManager/Accessibility'
});
const option: ModelOption = {
diff --git a/tools/ui/tests/stories/a11y/ScrollCarousel.a11y.stories.svelte b/tools/ui/tests/stories/a11y/ScrollCarousel.a11y.stories.svelte
index f1a04a9acefc..f90329cd82d8 100644
--- a/tools/ui/tests/stories/a11y/ScrollCarousel.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/ScrollCarousel.a11y.stories.svelte
@@ -10,7 +10,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/ScrollCarousel/Accessibility'
+ title: 'UI/Blocks/App/ScrollCarousel/Accessibility'
});
@@ -36,9 +36,9 @@
before
-
+
-
+
after
diff --git a/tools/ui/tests/stories/a11y/SidebarNavigationConversationItem.a11y.stories.svelte b/tools/ui/tests/stories/a11y/SidebarNavigationConversationItem.a11y.stories.svelte
index 170352bcebb8..1efc9b11cea8 100644
--- a/tools/ui/tests/stories/a11y/SidebarNavigationConversationItem.a11y.stories.svelte
+++ b/tools/ui/tests/stories/a11y/SidebarNavigationConversationItem.a11y.stories.svelte
@@ -17,7 +17,7 @@
layout: 'centered'
},
tags: ['!dev'],
- title: 'Components/SidebarNavigationConversationItem/Accessibility'
+ title: 'UI/Blocks/Navigation/SidebarNavigationConversationItem/Accessibility'
});
diff --git a/tools/ui/tests/stories/app/PwaRefreshAlert.stories.svelte b/tools/ui/tests/stories/app/PwaRefreshAlert.stories.svelte
new file mode 100644
index 000000000000..a419144f162e
--- /dev/null
+++ b/tools/ui/tests/stories/app/PwaRefreshAlert.stories.svelte
@@ -0,0 +1,31 @@
+
+
+ console.log('reload') }}
+ name="Default"
+ play={async ({ canvas }) => {
+ const title = canvas.getByText('Update available');
+
+ await expect(title).toBeInTheDocument();
+
+ const description = canvas.getByText(/A new version is available/);
+
+ await expect(description).toBeInTheDocument();
+
+ const button = canvas.getByRole('button', { name: 'Reload' });
+
+ await expect(button).toBeInTheDocument();
+ }}
+/>
diff --git a/tools/ui/tests/stories/app/ServerSplash.stories.svelte b/tools/ui/tests/stories/app/ServerSplash.stories.svelte
new file mode 100644
index 000000000000..7f637d20abc6
--- /dev/null
+++ b/tools/ui/tests/stories/app/ServerSplash.stories.svelte
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+ console.log('retry')}
+ />
+
+
+
diff --git a/tools/ui/tests/stories/architecture/Channels.stories.svelte b/tools/ui/tests/stories/architecture/Channels.stories.svelte
new file mode 100644
index 000000000000..0a9fd7b9440f
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Channels.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/Channels.svx b/tools/ui/tests/stories/architecture/Channels.svx
new file mode 100644
index 000000000000..ebf4729e75bf
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Channels.svx
@@ -0,0 +1,80 @@
+
+
+
+
+Architecture · Distribution · Llama Chat
+
+# One build, three channels
+
+Llama Chat is a SvelteKit app built with `adapter-static`: plain HTML, JS and CSS in one `dist` folder. Each release builds it once and ships the same folder three ways. Only the thing serving it changes.
+
+
+They carry the UI and nothing else: no llama-server, no models, no inference. On first open they are connected to nothing; you add a llama-server by URL, or pair one, before you can chat. Only the bundled channel comes with its own server.
+
+
+
+
+## How the channels differ
+
+The app works out its mode at runtime: if same-origin `/props` answers as llama.cpp it runs bundled; otherwise it runs hosted and opens on "add or pair a server". No build flags.
+
+| | Bundled in llama-server | npx llama-chat | chat.llama.app |
+| --- | --- | --- | --- |
+| Served by | llama-server, or `llama serve` in the macOS and Windows apps (the same server) | a static file server in the package (UI only) | the static host |
+| Origin | the server's own address | `http://localhost:` | `https://chat.llama.app` |
+| Comes with a server | yes, it is the server | no: UI only, add a llama-server | no: UI only, add a llama-server |
+| Needs | llama-server, or a native app | Node | a browser |
+| Reaches servers | its own, same origin; others via Providers | localhost and plain `http://` LAN servers by URL | `https://` and localhost by URL; anything else by pairing |
+| Response headers | set in `server-http.cpp` | set by the CLI | what the host allows |
+| Chats stored | per server address | per localhost port | at chat.llama.app |
+| Best for | "I run llama-server" or a native app | a server elsewhere on my network, offline use | trying it with no install, phones, pairing |
+
+Why npx still matters next to the hosted site: an `https://` page cannot call a plain `http://` server on the LAN (browsers block it as mixed content). A page served from `http://localhost` can.
+
+## The npx command
+
+Bare `npx llama-chat` starts it. One job, no verb, like `npx serve` or `npx http-server`; a required `start` would turn many first runs into a help screen.
+
+```bash
+# serve and open the browser
+npx llama-chat
+
+# connect to a server on launch
+npx llama-chat --server http://192.168.1.20:8080
+
+# reachable from other devices, no browser
+npx llama-chat --host 0.0.0.0 --port 3000 --no-open
+```
+
+| Flag | Default | What it does |
+| --- | --- | --- |
+| `--server ` | none | Adds and selects that llama-server, so the UI starts connected. Without it, the UI opens on the add-server screen |
+| `--port ` | a fixed port | Fixed, so the origin and the chats stored under it stay the same between runs |
+| `--host ` | `127.0.0.1` | `0.0.0.0` to open it to the LAN |
+| `--open` / `--no-open` | open | Opens the default browser once it listens |
+| `--version`, `--help` | | As usual |
+
+- **Package:** unscoped `llama-chat` with `"bin": {"llama-chat": "./bin/cli.js"}`, so the command is short. `@ggml/llama-chat` stays the import name.
+- **What it runs:** a static file server (`node:http`) for `dist` and nothing else: no llama-server, no models, no Vite or SvelteKit. 404 for unknown paths: the hash router needs no fallback.
+- **Headers:** the same set llama-server sends, so the app behaves the same in both.
+- **Later verbs** (`doctor`, `update`) keep the bare command as the default; `start` is an accepted alias, not the documented form.
+
+## The hosted site
+
+The static `dist` deploys as is: relative paths and the hash router work at the domain root. The host sends the same response headers llama-server does, so the app behaves the same in every channel; hashed assets can be cached for good, while `sw.js`, the manifest and `version.json` are never cached.
+
+## Release flow
+
+One CI job per llama.cpp release, after the build:
+
+1. Upload `dist` to the Hugging Face bucket `ggml-org/llama-ui` (`b`), which llama-server's CMake build embeds.
+2. Publish `llama-chat` to npm: `dist` plus the CLI, versioned with the release.
+3. Deploy `dist` to chat.llama.app.
+
+chat.llama.app always runs the latest UI against servers of any version, so it needs feature detection through `/props` and a minimum-server-version message.
diff --git a/tools/ui/tests/stories/architecture/Chat.stories.svelte b/tools/ui/tests/stories/architecture/Chat.stories.svelte
new file mode 100644
index 000000000000..1958bed58d94
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Chat.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/Chat.svx b/tools/ui/tests/stories/architecture/Chat.svx
new file mode 100644
index 000000000000..1ec086e76879
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Chat.svx
@@ -0,0 +1,101 @@
+
+
+
+
+Architecture · ui/apps/chat · on the Llama UI stack
+
+# Llama Chat
+
+The first app on Llama UI, and the reference for the line between library and app. It runs local models through llama-server, with tools, MCP servers, projects, a prompt library, a models manager and several servers.
+
+## Its areas
+
+
+
+
+`/chat/[id]`
+
+Tabs, branching, regenerate, reasoning blocks, right-click message actions, expandable composer.
+
+
+
+
+`/projects/[id]`
+
+Instructions, context files, a working directory; chats inside.
+
+
+
+
+`/library`
+
+Prompts: reusable system messages.
+
+
+
+
+`/models`
+
+Manager, Discover from Hugging Face, downloads, configuration pane.
+
+
+
+
+`/servers`
+
+llama.cpp servers by URL or paired by code/QR.
+
+
+
+
+`/mcp-servers …`
+
+MCP servers and resources, settings sections, conversation search.
+
+
+
+
+## How a message travels
+
+The agentic loop lives in the browser. It streams from the active server and runs any tool the model calls: in the browser, on llama-server, or on an MCP server.
+
+
+
+## Layers in the code
+
+`tools/ui/src` runs one way: routes, components, hooks, stores, services, then storage or the server. Tags show where each layer lands: UI and UX go to `ui/lib`; everything that decides what happens stays in `ui/apps/chat`.
+
+
+/ /chat/[id] /projects/[projectId]/chat/[id] /library /models /servers /mcp-servers /settings /search
+chat (ChatScreen, ChatForm, ChatMessages, ChatTabs), navigation, projects, models (manager, Discover, configuration), servers, mcp, settings, dialogs. Their presentational parts (model selector, model card, badges, quant rows) move to the library as Model UI.
+shadcn-svelte on bits-ui: alert, button, card, context-menu, dialog, drawer, dropdown-menu, input, popover, select, switch, table, tabs, tooltip and more.
+use-chat-screen-active-model, use-processing-state, use-context-gauge, use-models-selector, use-tools-panel. Interaction hooks go with their components; hooks that read app stores stay in the app.
+chat, conversations, agentic, tools, permissions, mcp, models, models-discover, servers, remote-access, projects, groups, prompts, tabs, settings.
+chat, models, props, database, mcp, tools, sandbox, servers, huggingface, settings, conversation-transfer.
+"Matte Glass" tokens in three tiers: primitives, semantic (light and dark), components. Documented in DESIGN.md and Storybook.
+IndexedDB for conversations, projects, groups, prompts; localStorage for settings and permissions; llama-server /v1, /props, /models, /tools, /slots.
+
+
+## What Chat keeps, what it hands off
+
+
+All business logic: conversations, tabs, groups, search, the agentic loop with tools, MCP and permission gates, projects, the models manager, Discover, downloads, model configuration and Servers.
+Presentation only: thread, composer, tool-call blocks, permission prompt, model selector, model card, capability badges. They take data in and report what the user did out.
+
+
+## Parts other apps reuse
+
+
+Any app with a conversation reuses the thread and composer, and the Markdown renderer and editor with them.
+An app that runs its own loop shows tool calls and permission prompts with the same library components.
+The model selector, model card and badges serve every app and llama.app. Other apps call llama-server's OpenAI-compatible endpoints themselves; the full manager and Servers stay in Chat.
+
diff --git a/tools/ui/tests/stories/architecture/Frame.svelte b/tools/ui/tests/stories/architecture/Frame.svelte
new file mode 100644
index 000000000000..0c9ddc486d27
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Frame.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+ {@render children()}
+
diff --git a/tools/ui/tests/stories/architecture/Stack.stories.svelte b/tools/ui/tests/stories/architecture/Stack.stories.svelte
new file mode 100644
index 000000000000..6a99c1c2fbd8
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Stack.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/Stack.svx b/tools/ui/tests/stories/architecture/Stack.svx
new file mode 100644
index 000000000000..46c23af4aeea
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/Stack.svx
@@ -0,0 +1,79 @@
+
+
+
+
+Architecture · Llama UI and the apps
+
+# One library, many apps
+
+Llama UI is the design system and component library: UI and UX, no business logic. [Llama Chat](/chat/) is one application built on it, the WebUI we ship today. Other apps can follow on the same parts. The llama.app website uses the same library, so models look and behave the same everywhere. Splitting library from apps lets anyone build their own app on the Llama stack, and lets Chat ship in more places.
+
+
+
+
+
+
+Components, design tokens and the logic inside them: multi-step flows, drag to reorder, keyboard navigation, validation as you type, formatting a file size, checking whether a model fits in memory.
+Talking to llama-server, storing conversations and notes, the agentic loop and tool permissions, managing models and servers. Components get data in and report what the user did out.
+
+
+
+
+
+Today the library and the Chat app share one folder.
+
+```text
+today
+tools/ui/ lib + Chat, mixed
+
+proposed
+ui/
+├── lib/ @ggml/llama-ui
+│ → ui.llama.app
+└── apps/
+ ├── chat/ @ggml/llama-chat
+ │ + npx llama-chat
+ │ → chat.llama.app
+ ├── / other apps of ours
+ └── / many, any use case
+```
+
+Stays in the llama.cpp repo. npm packages give outside projects a clean import without a separate GitHub repo. The llama.app website stays in ggml-org/llama-pages and installs @ggml/llama-ui.
+
+
+
+
+The library draws the parts and handles interaction. The app owns the state and talks to llama-server. Llama Chat is the polished version of this. Examples in `ui/apps` stay small and developer-facing.
+
+```svelte
+
+
+
+
+
+ send(model, text, messages)} />
+```
+
+Illustrative only. Component names and API are not final; the first example app in ui/apps would pin this down.
+
+
+
diff --git a/tools/ui/tests/stories/architecture/architecture.css b/tools/ui/tests/stories/architecture/architecture.css
new file mode 100644
index 000000000000..093dcf220ec7
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/architecture.css
@@ -0,0 +1,99 @@
+/*
+ * The Architecture pages. Their parts name colours and fonts themselves (--bg, --fg, --app, --lib …); here those
+ * point at Llama UI's tokens, and the pages' global styles are scoped to .architecture so no other story sees them.
+ * Diagram hues are the brand's art colours: apps in cinder, the library in the skies, the backend in grey.
+ */
+.architecture {
+ --bg: var(--surface-page);
+ --surface: var(--surface-raised);
+ --fg: var(--fg-default);
+ --muted: var(--fg-muted);
+ --line: var(--line-default);
+ --rule: var(--edge-rest-side);
+ --display: var(--font-sans);
+ --sans: var(--font-sans);
+ --mono: var(--font-mono);
+
+ /* apps, library, backends: a strong colour for lines and labels, a soft one for fills */
+ --app: color-mix(in oklab, var(--art-cinder) 80%, black);
+ --app-bg: color-mix(in oklab, var(--art-cinder) 12%, var(--surface-page));
+ --lib: var(--art-night-sky);
+ --lib-bg: color-mix(in oklab, var(--art-day-sky) 24%, var(--surface-page));
+ --be: var(--neutral-600);
+ --be-bg: var(--surface-muted);
+
+ font-size: 15px;
+ line-height: 1.6;
+}
+
+.dark .architecture {
+ --app: var(--art-cinder);
+ --app-bg: color-mix(in oklab, var(--art-cinder) 16%, var(--surface-page));
+ --lib: var(--art-day-sky);
+ --lib-bg: color-mix(in oklab, var(--art-night-sky) 55%, var(--surface-page));
+ --be: var(--neutral-300);
+}
+
+/* the Editorial's text column, a little wider for pages of tables and cards; every block that isn't running text
+ (cards, diagrams, tables) takes the wide column */
+.architecture .editorial.editorial {
+ --text: min(44rem, calc(100% - 32px));
+}
+.architecture .editorial > :not(p, ul, ol, h1, h2, h3, h4, blockquote, hr, .kicker, .lead) {
+ grid-column: wide;
+}
+.architecture .editorial > h3 {
+ font-size: 20px;
+ font-weight: 600;
+ margin-top: 32px;
+}
+.architecture .editorial > blockquote {
+ padding: 14px 18px;
+ border-left: 2px solid var(--art-cinder);
+ color: var(--fg-default);
+}
+
+/* tables in the Markdown: hairline rows, labels in Mono, scrolling sideways on a phone */
+.architecture .editorial > table {
+ display: block;
+ overflow-x: auto;
+ border-collapse: collapse;
+ font-size: 15px;
+ line-height: 1.5;
+}
+.architecture .editorial > table :is(th, td) {
+ min-width: 8rem;
+ padding: 10px 14px 10px 0;
+ border-bottom: 1px solid var(--line-default);
+ text-align: left;
+ vertical-align: top;
+}
+.architecture .editorial > table th {
+ color: var(--fg-muted);
+ font: 500 11px / 1.4 var(--font-mono);
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+}
+.architecture .editorial > table td:first-child {
+ font-weight: 600;
+}
+
+/* code blocks */
+.architecture pre {
+ margin: 0;
+ padding: 14px 16px;
+ overflow-x: auto;
+ border-radius: var(--radius-panel, 10px);
+ background: var(--surface-code);
+ font: 12.5px / 1.6 var(--font-mono);
+}
+.architecture pre code {
+ padding: 0;
+ background: none;
+ font-size: inherit;
+}
+
+/* links drawn in the diagrams underline only the text that says so, not the whole box */
+.architecture .editorial svg a {
+ text-decoration: none;
+}
diff --git a/tools/ui/tests/stories/architecture/lib/components/channels/ReleaseDiagram.svelte b/tools/ui/tests/stories/architecture/lib/components/channels/ReleaseDiagram.svelte
new file mode 100644
index 000000000000..242eb1d88396
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/channels/ReleaseDiagram.svelte
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+ ONCE PER LLAMA.CPP RELEASE
+
+
+
+ Build
+
+ vite build · adapter-static
+
+ one dist/, hash router,
+
+ relative paths
+
+
+
+
+
+
+
+
+
+
+
+ same dist
+
+ CHANNEL
+
+
+
+ Bundled in llama-server
+
+ via the HF bucket; native apps: llama serve in the llama binary
+
+
+
+ npx llama-chat
+
+ npm package llama-chat: the UI only, served from localhost; add your server
+
+
+
+ chat.llama.app
+
+ the UI only, nothing to install; it uses the server you add
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/chat/Layer.svelte b/tools/ui/tests/stories/architecture/lib/components/chat/Layer.svelte
new file mode 100644
index 000000000000..f8107d610827
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/chat/Layer.svelte
@@ -0,0 +1,74 @@
+
+
+
+
+
{name} {tag}
+
+
{@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/chat/Layers.svelte b/tools/ui/tests/stories/architecture/lib/components/chat/Layers.svelte
new file mode 100644
index 000000000000..163ea1b7d267
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/chat/Layers.svelte
@@ -0,0 +1,14 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/chat/MessageFlow.svelte b/tools/ui/tests/stories/architecture/lib/components/chat/MessageFlow.svelte
new file mode 100644
index 000000000000..1d1969342f2e
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/chat/MessageFlow.svelte
@@ -0,0 +1,183 @@
+
+
+
+
+
+
+
+
+
+ IN THE BROWSER
+
+
+
+ ACTIVE LLAMA-SERVER
+
+
+
+ EXTERNAL
+
+
+
+ Compose
+
+ Live-preview Markdown
+
+ editor, attachments,
+
+ @ MCP resources,
+
+ project + cwd chips
+
+
+
+ Agentic loop
+
+ chatStore + agenticStore
+
+ Streams the reply, runs each tool call the model
+
+ makes, feeds the result back, repeats.
+
+ Permission gates: once, always, deny.
+
+ model, server and tools from the chat
+
+
+
+ Chat completions
+
+ /v1/chat/completions
+
+ Streamed. Local, by URL,
+
+ or a --connect tunnel.
+
+
+
+
+
+
+
+
+
+ Render + save
+
+ Markdown, reasoning,
+
+ KaTeX, Mermaid, code
+
+ IndexedDB (Dexie)
+
+
+
+
+
+ Browser tools
+
+ run_javascript in a sandbox,
+
+ read_media, get_datetime,
+
+ project tools
+
+
+
+
+
+ Server tools
+
+ read, write, edit file; grep,
+
+ glob, exec_shell_command
+
+ in the working directory
+
+
+
+ MCP servers
+
+ Their tools, plus resources
+
+ you @-mention in a message
+
+
+
+
+
+ tool calls
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/AppsBand.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/AppsBand.svelte
new file mode 100644
index 000000000000..14729877a171
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/AppsBand.svelte
@@ -0,0 +1,63 @@
+
+
+
+
+APPS · llama.cpp/ui/apps · BUSINESS LOGIC LIVES HERE
+
+
+
+
+ Llama Chat
+
+ ui/apps/chat ↗
+
+ Tools, MCP, projects;
+
+ manages models, servers.
+
+
+
+Other apps
+ui/apps/<app>
+More first-party apps on the same parts, once Chat is in place.
+Each keeps its own business logic and talks to llama-server.
+
+
+Platform examples
+ui/apps/<example>
+Many, any use case.
+For developers, unpolished.
+
+
+llama.app website
+ggml-org/llama-pages
+Model catalog and model
+pages from the same parts.
+
+
+Your app
+npm i @ggml/llama-ui
+Outside the repo: third-party tools and partner products
+built on the same library and design language.
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/ArchitectureDiagram.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/ArchitectureDiagram.svelte
new file mode 100644
index 000000000000..104676d6e30d
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/ArchitectureDiagram.svelte
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/BrandBand.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/BrandBand.svelte
new file mode 100644
index 000000000000..9f1106e5fc35
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/BrandBand.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
+THE ONE SHARED DEPENDENCY · BRAND + DESIGN LANGUAGE
+llama.cpp apps and examples · ui.llama.app docs · llama.app website · promotional content ·
+ native apps, within menubar and platform constraints
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/Legend.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/Legend.svelte
new file mode 100644
index 000000000000..e79c20b1d369
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/Legend.svelte
@@ -0,0 +1,33 @@
+
+
+ Llama UI UI and UX only, no
+ business logic
+
+ Apps own the business logic
+
+ Backends and docs
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/LibraryBand.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/LibraryBand.svelte
new file mode 100644
index 000000000000..5f8a9195ac75
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/LibraryBand.svelte
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+IMPORT
+
+
+LIBRARY · llama.cpp/ui/lib · NO BUSINESS LOGIC
+Llama UI
+@ggml/llama-ui
+UI and UX only: components, tokens, interaction logic.
+
+Design tokens
+Colour, type, spacing,
+themes, brand assets
+
+Components
+Buttons, forms, dialogs
+Svelte + shadcn-svelte
+
+Model UI
+Catalog, model card,
+quant picker, fit check
+
+UX patterns
+Thread, composer,
+attachments
+
+UX logic
+Flows, interactions,
+small computations
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/Note.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/Note.svelte
new file mode 100644
index 000000000000..a68c94cdc05b
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/Note.svelte
@@ -0,0 +1,22 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/Rule.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/Rule.svelte
new file mode 100644
index 000000000000..efcefa6649f4
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/Rule.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
{@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/RuleSide.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/RuleSide.svelte
new file mode 100644
index 000000000000..4a9ca32da5f0
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/RuleSide.svelte
@@ -0,0 +1,29 @@
+
+
+
+
+
{title}
+
+
{@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/ShipsRow.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/ShipsRow.svelte
new file mode 100644
index 000000000000..3e171484f6bb
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/ShipsRow.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+WHERE LLAMA CHAT SHIPS
+
+chat.llama.app
+Hosted static build;
+user adds their own server
+
+npx llama-chat
+UI only, from npm;
+you add a server
+
+llama-server
+Built-in web UI,
+same as today
+
+macOS + Windows apps
+llama binary: llama serve
+is llama-server + this UI
+
+
+
+
+
+
+
+
+LLAMA CHAT: BUILD + PUBLISH
diff --git a/tools/ui/tests/stories/architecture/lib/components/stack/SideColumn.svelte b/tools/ui/tests/stories/architecture/lib/components/stack/SideColumn.svelte
new file mode 100644
index 000000000000..03eccb026533
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/stack/SideColumn.svelte
@@ -0,0 +1,39 @@
+
+
+
+KEY
+Library (one package)
+Apps built on the library
+Backends and docs
+Lives outside the llama.cpp repo
+
+
+INFERENCE BACKEND
+Every app talks to it the same way
+
+llama-server
+by URL: https:// or localhost
+
+llama-server --connect
+paired by code/QR, WebRTC
+
+
+
+DOCS
+ui.llama.app
+Storybook for the library:
+every component and state,
+usage docs, visual tests.
+Agents can prototype UI
+variants and screenshot them.
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/ui/Callout.svelte b/tools/ui/tests/stories/architecture/lib/components/ui/Callout.svelte
new file mode 100644
index 000000000000..c0a4da641528
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/ui/Callout.svelte
@@ -0,0 +1,32 @@
+
+
+
+
+ {#if title}{title} {/if}
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/ui/Card.svelte b/tools/ui/tests/stories/architecture/lib/components/ui/Card.svelte
new file mode 100644
index 000000000000..6f66ee2fb192
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/ui/Card.svelte
@@ -0,0 +1,76 @@
+
+
+
+
+ {#if kicker || planned}
+
+ {#if kicker}{kicker} {/if}
+
+ {#if planned}Not built yet {/if}
+
+ {/if}
+
+ {#if title}
{title} {/if}
+
+ {#if children}
{@render children()}
{/if}
+
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/ui/Cards.svelte b/tools/ui/tests/stories/architecture/lib/components/ui/Cards.svelte
new file mode 100644
index 000000000000..fe6b913b6c90
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/ui/Cards.svelte
@@ -0,0 +1,25 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/architecture/lib/components/ui/Figure.svelte b/tools/ui/tests/stories/architecture/lib/components/ui/Figure.svelte
new file mode 100644
index 000000000000..2d17c3a23f58
--- /dev/null
+++ b/tools/ui/tests/stories/architecture/lib/components/ui/Figure.svelte
@@ -0,0 +1,31 @@
+
+
+
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/Assets.stories.svelte b/tools/ui/tests/stories/brand/Assets.stories.svelte
new file mode 100644
index 000000000000..a65b9c91b008
--- /dev/null
+++ b/tools/ui/tests/stories/brand/Assets.stories.svelte
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/ColorPalette.stories.svelte b/tools/ui/tests/stories/brand/ColorPalette.stories.svelte
new file mode 100644
index 000000000000..615721e26318
--- /dev/null
+++ b/tools/ui/tests/stories/brand/ColorPalette.stories.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/Communications.stories.svelte b/tools/ui/tests/stories/brand/Communications.stories.svelte
new file mode 100644
index 000000000000..baa179a876ff
--- /dev/null
+++ b/tools/ui/tests/stories/brand/Communications.stories.svelte
@@ -0,0 +1,164 @@
+
+
+
+ {#snippet template(args)}
+ {@const copy = args as ModelDropCopy & { overlay: boolean }}
+ {@const slides = [
+ { id: 'Cover', note: 'the headline and what is inside', slide: 0 },
+ ...copy.models.map((m, i) => ({ id: m.name, note: 'its own slide', slide: i + 1 }))
+ ]}
+
+ {#each ['portrait', 'square', 'story'] as const as format (format)}
+ {#each tones as tone (tone)}
+
+
+ {#snippet children(s)}
+
+ {/snippet}
+
+
+ {/each}
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const copy = args as WhatsNewCopy & { overlay: boolean }}
+
+ {#each tones as tone (tone)}
+
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const copy = args as LinkPreviewCopy & { overlay: boolean }}
+
+ {#each ['day', 'night'] as const as tone (tone)}
+
+
+
+ {/each}
+
+ {#each tones as tone (tone)}
+
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const copy = args as ReceiptCopy & { overlay: boolean }}
+
+ {#each ['poster', 'portrait', 'square', 'story'] as const as format (format)}
+ {#each tones as tone (tone)}
+
+
+
+ {/each}
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const copy = args as AgentsCopy & { overlay: boolean }}
+
+ {#each tones as tone (tone)}
+
+
+ {#snippet motif()} {/snippet}
+
+
+ {/each}
+
+ {/snippet}
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsDirection.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsDirection.stories.svelte
new file mode 100644
index 000000000000..ffb9b9a32acd
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsDirection.stories.svelte
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ seedChatStory()} name="Mood board">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsElements.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsElements.stories.svelte
new file mode 100644
index 000000000000..481d979f6ca4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsElements.stories.svelte
@@ -0,0 +1,247 @@
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+
+
+
+
+ {/each}
+
+
+
+
+
+ {#each tones as tone (tone)}
+
+
+
+
Fresh drops
+
+
+
route a ticket moderate content
+
+
+
+
Every modality Index leader
+
+
+
+
+ {/each}
+
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+
+
+
+
+
+
+
+
+ {/each}
+
+
+
+
+ {#snippet template(args)}
+ {@const tone = args.tone as Ground}
+
+ {#each ideas as m (m.name)}
+
+
+
+
+
+ {/each}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#each machines as m (m.name)}
+ {#each [false, true] as flat (flat)}
+
+
+
+
+
+ {/each}
+ {/each}
+
+ {/snippet}
+
+
+
+
+ {#each ['day', 'night'] as const as tone (tone)}
+
+
+
+
+
+ {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsFoundations.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsFoundations.stories.svelte
new file mode 100644
index 000000000000..7bc6278ea53a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsFoundations.stories.svelte
@@ -0,0 +1,133 @@
+
+
+
+
+ {#each formats as key (key)}
+ {@const f = FORMATS[key] as PostFormat}
+ {@const g = grid(f)}
+
+
+
+
{f.width} × {f.height}
+
+
+ u = {g.unit.toFixed(1)} px · margin 2 u · {g.columns} columns · gutter ½ u · {g.shape}
+
+
+ {#if f.safe}
+ safe area: top {f.safe.top}, bottom {f.safe.bottom}
+
{/if}
+
+
+
+ {/each}
+
+
+
+
+
+ {#each grounds as ground (ground)}
+
+
+
+
+ Your AI. On your computer.
+
+
+
+ Lockups: {GROUNDS[ground].lockups}
+
+
+ {/each}
+
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+ {#each scale as [cls, name, size, sample] (cls)}
+
{name} {size}
+
+
{sample}
+ {/each}
+
+
+
+ {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsKeyVisuals.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsKeyVisuals.stories.svelte
new file mode 100644
index 000000000000..f8862ef3c5c7
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsKeyVisuals.stories.svelte
@@ -0,0 +1,218 @@
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['square', 'portrait', 'story', 'poster', 'landscape', 'billboard'] as const as format (format)}
+
+
+ {#snippet motif()} {/snippet}
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['og', 'landscape', 'square', 'portrait', 'story', 'billboard'] as const as format (format)}
+
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['square', 'portrait', 'story', 'landscape'] as const as format (format)}
+
+
+ {#snippet motif()} {/snippet}
+
+ {#snippet cards()}
+
+ {#each modelDrop.models.slice(0, format === 'story' ? 1 : 2) as model (model.name)} {/each}
+ {/snippet}
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['landscape', 'square', 'portrait'] as const as format (format)}
+
+
+ {#snippet lead()}
+
+ {/snippet}
+
+ {#snippet side()}
+
+
+ {/snippet}
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['square', 'portrait', 'story', 'poster', 'landscape', 'billboard'] as const as format (format)}
+
+
+
+ {/each}
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as Args}
+
+ {#each ['poster', 'portrait', 'square', 'story', 'landscape'] as const as format (format)}
+
+
+
+ {/each}
+
+ {/snippet}
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsMacAppStore.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsMacAppStore.stories.svelte
new file mode 100644
index 000000000000..eb352dfa7ded
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsMacAppStore.stories.svelte
@@ -0,0 +1,175 @@
+
+
+
+ {#snippet template(args)}
+ {@const { apps, chats, hardware, menu, openers, overlay, phone, size, tone } =
+ args as MacAppStoreCopy & ArtArgs}
+
+
+
+ {#snippet children(o)}
+
+
+
+ {/snippet}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#snippet children(c)}
+
+
+
+ {/snippet}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/snippet}
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsMicrosoftStore.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsMicrosoftStore.stories.svelte
new file mode 100644
index 000000000000..d89aa6d36e41
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsMicrosoftStore.stories.svelte
@@ -0,0 +1,315 @@
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as ArtArgs}
+
+
+
+
+
+
+
+
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const { overlay, tone } = args as ArtArgs}
+
+
+
+
+
+ {/snippet}
+
+
+
+ {#snippet template(args)}
+ {@const {
+ apps,
+ chats,
+ gpu,
+ models,
+ openers,
+ overlay,
+ privacy,
+ quick,
+ speed,
+ tone,
+ tray,
+ verdicts
+ } = args as MicrosoftStoreCopy & ArtArgs}
+
+
+
+ {#snippet children(o)}
+
+
+
+ {/snippet}
+
+
+
+
+
+ {#snippet children(c)}
+
+
+
+ {/snippet}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
What Llama sends about you
+
+ {#each sends as [what, value] (what)}
+
{what} {value}
+ {/each}
+
+
+ your prompts and replies none
+
+
+
+ With downloads and update checks, only the app’s version, the Windows build and the
+ processor: llama-win/0.14.1 (10.0.26100; x64)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/snippet}
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsMicrosoftStoreScenes.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsMicrosoftStoreScenes.stories.svelte
new file mode 100644
index 000000000000..1e0fe937a80c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsMicrosoftStoreScenes.stories.svelte
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ // at a phone's width the form is fixed to the window's bottom; a download's copy would place it against the
+ // whole picture, so here it sticks to the bottom instead, as it does on a wider screen
+ const style = context.canvasElement.ownerDocument.createElement('style');
+
+ style.textContent =
+ '.chat-screen > div:has(> .chat-screen-form-wrapper) { position: sticky !important; }';
+ context.canvasElement.ownerDocument.head.append(style);
+ await pinOnceIn(/Could you arrange a repair/)(context);
+ const unpinScroll = unpin;
+
+ unpin = () => {
+ unpinScroll();
+ style.remove();
+ };
+ }}
+>
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsModules.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsModules.stories.svelte
new file mode 100644
index 000000000000..0a8516bd040e
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsModules.stories.svelte
@@ -0,0 +1,153 @@
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+
+
+
+
+
+
+
+
+ {/each}
+
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#each whatsNew.family.models as model (model.name)} {/each}
+
+
+
+
+ {/each}
+
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+
+
+
+
+
+
+
+
+
+ {/each}
+
+
+
+
+
+ {#each ['day', 'night'] as const as tone (tone)}
+
+
+
+
+
+ {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/CommunicationsSwag.stories.svelte b/tools/ui/tests/stories/brand/CommunicationsSwag.stories.svelte
new file mode 100644
index 000000000000..0e0ec4b1d8b6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/CommunicationsSwag.stories.svelte
@@ -0,0 +1,17 @@
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/LlamaMono.stories.svelte b/tools/ui/tests/stories/brand/LlamaMono.stories.svelte
new file mode 100644
index 000000000000..7aa08f1b7e94
--- /dev/null
+++ b/tools/ui/tests/stories/brand/LlamaMono.stories.svelte
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/LlamaSans.stories.svelte b/tools/ui/tests/stories/brand/LlamaSans.stories.svelte
new file mode 100644
index 000000000000..9f1fe67de811
--- /dev/null
+++ b/tools/ui/tests/stories/brand/LlamaSans.stories.svelte
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/Logo.stories.svelte b/tools/ui/tests/stories/brand/Logo.stories.svelte
new file mode 100644
index 000000000000..13c2964865fa
--- /dev/null
+++ b/tools/ui/tests/stories/brand/Logo.stories.svelte
@@ -0,0 +1,50 @@
+
+
+
+
+ {#each sizes as size (size.label)}
+
+
+
+ {/each}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/LogoUsage.stories.svelte b/tools/ui/tests/stories/brand/LogoUsage.stories.svelte
new file mode 100644
index 000000000000..341204a3e797
--- /dev/null
+++ b/tools/ui/tests/stories/brand/LogoUsage.stories.svelte
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/TypeTester.stories.svelte b/tools/ui/tests/stories/brand/TypeTester.stories.svelte
new file mode 100644
index 000000000000..a46b52b19077
--- /dev/null
+++ b/tools/ui/tests/stories/brand/TypeTester.stories.svelte
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/TypographyOverview.stories.svelte b/tools/ui/tests/stories/brand/TypographyOverview.stories.svelte
new file mode 100644
index 000000000000..9bf0588d7acd
--- /dev/null
+++ b/tools/ui/tests/stories/brand/TypographyOverview.stories.svelte
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/AssetGrid.svelte b/tools/ui/tests/stories/brand/assets/AssetGrid.svelte
new file mode 100644
index 000000000000..96a48235b81c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/AssetGrid.svelte
@@ -0,0 +1,491 @@
+
+
+
+
+
+
+ {section === 'logo' ? 'Logo assets' : section === 'social' ? 'Social profiles' : 'App icons'}
+
+
+
+ {section === 'logo'
+ ? 'The Llama icon and the Llama and llama.cpp lockups, each on its background and transparent'
+ : section === 'social'
+ ? 'Profile pictures and banners for X, LinkedIn and YouTube, at each platform’s size'
+ : 'The icon for the web app, a PWA, Apple’s platforms, Android and Windows, and as the native apps ship it, at each platform’s size and in its shape'},
+ to download as SVG, WebP or PNG. They come from
+ ggml-org/llama.brand , under CC BY-NC 4.0 with the permissions in its BRAND-USAGE.md: use them as they are to
+ refer to Llama.app and Llama.cpp, without changing the mark.
+
+
+
+ {#each groups as group (group.title)}
+
+
+
{group.title}
+
+
{group.note}
+
+
+ {#each group.rows as row, i (row.label ?? i)}
+
+ {#if row.label}
+
{row.label}
+ {/if}
+
+
+
+ {#each row.assets as asset (asset.path)}
+
+
+
+
+
+
+ {asset.label}
+
+
+
+ {#each downloads(asset) as file (file.name)}
+ event.stopPropagation()}
+ size="sm"
+ variant="ghost"> {file.label}
+ {/each}
+
+
+
+ {/each}
+
+
+ {/each}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/OpticalCentre.svelte b/tools/ui/tests/stories/brand/assets/OpticalCentre.svelte
new file mode 100644
index 000000000000..d8c148915d37
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/OpticalCentre.svelte
@@ -0,0 +1,550 @@
+
+
+
+
+
+ {#each [shown] as panel (panel.key)}
+
+
+
{panel.label}
+
+
{panel.note}
+
+
+
+ {#each [['#FAFAFA', '#111111'], ['#111111', '#FAFAFA']] as [ground, ink] (ground)}
+
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+ {/each}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#each panel.gaps as g, i (g.kind + g.name)}
+
+
+ {round(g.gap)}
+ {/each}
+
+
+ {#each [{ at: [0.08, panel.y / 2], value: panel.y }, { at: [0.92, (placement.size + panel.y + side) / 2], value: placement.size - panel.y - side }] as m (m.at[0])}
+ {round(m.value)}
+ {/each}
+
+ {#each [{ value: panel.x, x: panel.x / 2 }, { value: placement.size - panel.x - side, x: (placement.size + panel.x + side) / 2 }] as m (m.x)}
+ {round(m.value)}
+ {/each}
+
+
+
+
+
+ {/each}
+
+
+
+ {#each tiles as tile, i (tile.name)}
+ step}
+ n={String(i + 1).padStart(2, '0')}
+ onclick={() => (from = { at: i })}
+ title={titles[tile.name]}
+ view="0 0 {placement.size} {placement.size}"
+ >
+ {#snippet drawing()}
+
+
+
+
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+ {#if tile.name === 'measured'}
+ {#each gaps(tile.x, tile.y) as g (g.kind + g.name)}
+
+ {/each}
+ {:else}
+
+ {/if}
+ {/snippet}
+
+ {#if tile.name === 'centred'}
+ At the exact centre of the square, the icon reads low: its weight sits in the wide foot.
+ {:else if tile.name === 'lifted'}
+ Up 1/{lift} of its height, it looks centred.
+ {:else if tile.name === 'nudged'}
+ Left 1/{nudge} of its width: where the files place it, in the avatars and the PWA icon.
+ {:else}
+ Each gap between the crop and the icon's outer points, filled by a circle touching both.
+ {/if}
+
+ {/each}
+
+
+
+ The icon fills {Math.round((side / placement.size) * 100)}% of the side; the numbers are pixels
+ at {placement.size}
+ × {placement.size}. Each circle fills the gap between the circle crop and one of the icon’s
+ outer points: orange at the rounded corners (the blade’s top left, the foot’s bottom right),
+ grey at the sharp corners (the blade’s top right, the foot’s bottom left), blue at the tips in
+ the middle (the blade’s left, the foot’s right). No placement evens all three pairs, since the
+ tips are even only without a sideways nudge; lifted 1/{lift} and nudged 1/{nudge} left, the files
+ keep every pair within a few pixels.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-dark.png
new file mode 100644
index 000000000000..7914e3c8f35e
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-light.png
new file mode 100644
index 000000000000..a725476d0522
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-background-432x432-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-dark.png
new file mode 100644
index 000000000000..ef900c18afe8
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-light.png
new file mode 100644
index 000000000000..75026a6a2ca4
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-adaptive-foreground-432x432-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-monochrome-432x432.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-monochrome-432x432.png
new file mode 100644
index 000000000000..75026a6a2ca4
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-monochrome-432x432.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-dark.png
new file mode 100644
index 000000000000..cb62e16e439b
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-light.png
new file mode 100644
index 000000000000..c13fe774e701
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/android/android-play-512x512-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-dark.png
new file mode 100644
index 000000000000..574bddb9b970
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-light.png
new file mode 100644
index 000000000000..cec02328b8c1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/apple-touch-icon-180x180-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-dark.png
new file mode 100644
index 000000000000..236a1ac05255
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-light.png
new file mode 100644
index 000000000000..ba3e987419b3
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/ios-1024x1024-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-dark.png
new file mode 100644
index 000000000000..36048c5dde3f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-light.png
new file mode 100644
index 000000000000..4c5981d6e674
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/apple/macos-1024x1024-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-dark.png
new file mode 100644
index 000000000000..ce54bf558112
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-light.png
new file mode 100644
index 000000000000..fc0f74bf7747
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-512x512-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-dark.png
new file mode 100644
index 000000000000..cb62e16e439b
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-light.png
new file mode 100644
index 000000000000..c13fe774e701
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/pwa/pwa-maskable-512x512-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/apple-touch-icon-180x180.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/apple-touch-icon-180x180.png
new file mode 100644
index 000000000000..c153cd93f438
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/apple-touch-icon-180x180.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon-dark.png
new file mode 100644
index 000000000000..9c607d5ed779
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon.png
new file mode 100644
index 000000000000..ba4dd5fe2ccf
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/favicon.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/maskable-icon-512x512.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/maskable-icon-512x512.png
new file mode 100644
index 000000000000..612c091d68f2
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/maskable-icon-512x512.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/pwa-512x512.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/pwa-512x512.png
new file mode 100644
index 000000000000..922ba3d908ff
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/web/pwa-512x512.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-dark.png
new file mode 100644
index 000000000000..5e80e82f03ba
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-light.png
new file mode 100644
index 000000000000..fea51ab939f7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-app-icon-256x256-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-dark.png
new file mode 100644
index 000000000000..b519fee6aa33
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-light.png
new file mode 100644
index 000000000000..a1b357041f62
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-150x150-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-dark.png
new file mode 100644
index 000000000000..f74919130cf7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-light.png
new file mode 100644
index 000000000000..b8969b5cb321
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/app/windows/windows-tile-wide-310x150-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark-bg.png
new file mode 100644
index 000000000000..233a834815b8
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark.png
new file mode 100644
index 000000000000..c833df2cf190
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light-bg.png
new file mode 100644
index 000000000000..ad4fafbc641f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light.png
new file mode 100644
index 000000000000..a22c210fe088
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/icon/icon-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark-bg.png
new file mode 100644
index 000000000000..45c2bcb68c23
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark.png
new file mode 100644
index 000000000000..21094ee306ea
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light-bg.png
new file mode 100644
index 000000000000..e6372da2397f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light.png
new file mode 100644
index 000000000000..b259c7437bfb
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama-cpp/logo-llama-cpp-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark-bg.png
new file mode 100644
index 000000000000..b9ba3e1da2e6
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark.png
new file mode 100644
index 000000000000..5a121dd5463f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light-bg.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light-bg.png
new file mode 100644
index 000000000000..46c727b42720
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light-bg.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light.png
new file mode 100644
index 000000000000..275afec17268
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/lockup/llama/logo-llama-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-dark.png
new file mode 100644
index 000000000000..65167d3b374c
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-light.png
new file mode 100644
index 000000000000..0854588f71c1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-avatar-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-dark.png
new file mode 100644
index 000000000000..40053dca8347
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-light.png
new file mode 100644
index 000000000000..dabf8dbfe65e
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-cpp-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-dark.png
new file mode 100644
index 000000000000..e5ebe17db1d3
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-light.png
new file mode 100644
index 000000000000..2fe1f543cc75
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-cover-llama-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-dark.png
new file mode 100644
index 000000000000..792b005b9af0
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-light.png
new file mode 100644
index 000000000000..903de110655f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-cpp-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-dark.png
new file mode 100644
index 000000000000..39191ce30421
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-light.png
new file mode 100644
index 000000000000..138cc9350999
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/linkedin/linkedin-page-cover-llama-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-dark.png
new file mode 100644
index 000000000000..65167d3b374c
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-light.png
new file mode 100644
index 000000000000..0854588f71c1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-avatar-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-dark.png
new file mode 100644
index 000000000000..650a52ffb609
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-light.png
new file mode 100644
index 000000000000..29192e994c99
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-cpp-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-dark.png
new file mode 100644
index 000000000000..8d6167a43b8c
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-light.png
new file mode 100644
index 000000000000..527151a75a9d
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/x/x-header-llama-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-dark.png
new file mode 100644
index 000000000000..0e45a86d2cfb
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-light.png
new file mode 100644
index 000000000000..a887953f4eab
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-avatar-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-dark.png
new file mode 100644
index 000000000000..ecba583f0f89
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-light.png
new file mode 100644
index 000000000000..60d198d32745
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-cpp-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-dark.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-dark.png
new file mode 100644
index 000000000000..01996be4739d
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-dark.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-light.png b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-light.png
new file mode 100644
index 000000000000..94bc8bf0ebae
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/png/social/youtube/youtube-banner-llama-light.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-dark.svg
new file mode 100644
index 000000000000..8a55c36f9a53
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-light.svg
new file mode 100644
index 000000000000..ccfc297877a1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-background-432x432-light.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-dark.svg
new file mode 100644
index 000000000000..f3e78067b979
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-light.svg
new file mode 100644
index 000000000000..70393a35e87b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-adaptive-foreground-432x432-light.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-monochrome-432x432.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-monochrome-432x432.svg
new file mode 100644
index 000000000000..70393a35e87b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-monochrome-432x432.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-dark.svg
new file mode 100644
index 000000000000..e10bf9bff523
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-light.svg
new file mode 100644
index 000000000000..5d4c0b7df114
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/android/android-play-512x512-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-dark.svg
new file mode 100644
index 000000000000..69895999ec6f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-light.svg
new file mode 100644
index 000000000000..4210cdc6eb72
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/apple-touch-icon-180x180-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-dark.svg
new file mode 100644
index 000000000000..3d4332f0620e
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-light.svg
new file mode 100644
index 000000000000..4c8bff63780e
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/ios-1024x1024-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-dark.svg
new file mode 100644
index 000000000000..9807f59430c6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-light.svg
new file mode 100644
index 000000000000..1b6e493af157
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/apple/macos-1024x1024-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-dark.svg
new file mode 100644
index 000000000000..40a1335a572c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-light.svg
new file mode 100644
index 000000000000..0d3ea7d132a6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-512x512-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-dark.svg
new file mode 100644
index 000000000000..e10bf9bff523
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-light.svg
new file mode 100644
index 000000000000..5d4c0b7df114
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/pwa/pwa-maskable-512x512-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/apple-touch-icon-180x180.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/apple-touch-icon-180x180.svg
new file mode 100644
index 000000000000..3eeacd929597
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/apple-touch-icon-180x180.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon-dark.svg
new file mode 100644
index 000000000000..597d56e9aba4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon.svg
new file mode 100644
index 000000000000..04f7cb9ed169
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/favicon.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/maskable-icon-512x512.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/maskable-icon-512x512.svg
new file mode 100644
index 000000000000..6c4bcf64768c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/maskable-icon-512x512.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/pwa-512x512.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/pwa-512x512.svg
new file mode 100644
index 000000000000..436a2eea0f11
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/web/pwa-512x512.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-dark.svg
new file mode 100644
index 000000000000..f0fb80c3fc8f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-light.svg
new file mode 100644
index 000000000000..5e9ba8c4f7b5
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-app-icon-256x256-light.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-dark.svg
new file mode 100644
index 000000000000..643e9d3544db
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-light.svg
new file mode 100644
index 000000000000..981af97cadf9
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-150x150-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-dark.svg
new file mode 100644
index 000000000000..4c5e2454d0e6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-light.svg
new file mode 100644
index 000000000000..612ce24ac940
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/app/windows/windows-tile-wide-310x150-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark-bg.svg
new file mode 100644
index 000000000000..ff1f10f3682b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark.svg
new file mode 100644
index 000000000000..5175cdf63853
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light-bg.svg
new file mode 100644
index 000000000000..e50315690a2b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light.svg
new file mode 100644
index 000000000000..a33cdcec05f6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/icon/icon-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark-bg.svg
new file mode 100644
index 000000000000..dffbba97fa0c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark.svg
new file mode 100644
index 000000000000..979c5c5c08c0
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light-bg.svg
new file mode 100644
index 000000000000..32dbc6685337
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light.svg
new file mode 100644
index 000000000000..a3f5662ee29f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark-bg.svg
new file mode 100644
index 000000000000..89c74b8b721b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark.svg
new file mode 100644
index 000000000000..eca2bde6f1c6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-dark.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light-bg.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light-bg.svg
new file mode 100644
index 000000000000..ad009f639406
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light-bg.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light.svg
new file mode 100644
index 000000000000..16631e1f6e4f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/lockup/llama/logo-llama-light.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-dark.svg
new file mode 100644
index 000000000000..9890d5b12d64
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-light.svg
new file mode 100644
index 000000000000..3ba51a5cd288
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-avatar-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-dark.svg
new file mode 100644
index 000000000000..c112d418cf38
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-light.svg
new file mode 100644
index 000000000000..7086e24781db
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-cpp-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-dark.svg
new file mode 100644
index 000000000000..3146bbb001de
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-light.svg
new file mode 100644
index 000000000000..2387aaeced36
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-cover-llama-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-dark.svg
new file mode 100644
index 000000000000..ea2fa5a93d27
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-light.svg
new file mode 100644
index 000000000000..dfbcd215bf21
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-cpp-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-dark.svg
new file mode 100644
index 000000000000..30eb9d347308
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-light.svg
new file mode 100644
index 000000000000..8b11bc39fedc
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/linkedin/linkedin-page-cover-llama-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-dark.svg
new file mode 100644
index 000000000000..9890d5b12d64
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-light.svg
new file mode 100644
index 000000000000..3ba51a5cd288
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-avatar-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-dark.svg
new file mode 100644
index 000000000000..251cc045ff5d
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-light.svg
new file mode 100644
index 000000000000..b1bfdc755c90
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-cpp-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-dark.svg
new file mode 100644
index 000000000000..b76787712cf7
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-light.svg
new file mode 100644
index 000000000000..1f7cfdf08fd0
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/x/x-header-llama-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-dark.svg
new file mode 100644
index 000000000000..56a8f5cd98a4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-light.svg
new file mode 100644
index 000000000000..1b222e183ec4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-avatar-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-dark.svg
new file mode 100644
index 000000000000..7a29db995039
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-light.svg
new file mode 100644
index 000000000000..9515b21274f4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-cpp-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-dark.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-dark.svg
new file mode 100644
index 000000000000..4fa736aa13d8
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-dark.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-light.svg b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-light.svg
new file mode 100644
index 000000000000..23876744d65c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/assets/files/logo/svg/social/youtube/youtube-banner-llama-light.svg
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-dark.webp
new file mode 100644
index 000000000000..8a549d0b84be
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-light.webp
new file mode 100644
index 000000000000..2f2bdf8c8a5f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-background-432x432-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-dark.webp
new file mode 100644
index 000000000000..b54a90c3bc9a
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-light.webp
new file mode 100644
index 000000000000..4df51641e3c1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-adaptive-foreground-432x432-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-monochrome-432x432.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-monochrome-432x432.webp
new file mode 100644
index 000000000000..4df51641e3c1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-monochrome-432x432.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-dark.webp
new file mode 100644
index 000000000000..5a460191e2a7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-light.webp
new file mode 100644
index 000000000000..9d0133b3aaac
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/android/android-play-512x512-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-dark.webp
new file mode 100644
index 000000000000..430333f8718b
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-light.webp
new file mode 100644
index 000000000000..9c0e6d3b4e00
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/apple-touch-icon-180x180-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-dark.webp
new file mode 100644
index 000000000000..6f6435d2d798
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-light.webp
new file mode 100644
index 000000000000..d5779a0e8f9f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/ios-1024x1024-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-dark.webp
new file mode 100644
index 000000000000..595990a4c3ae
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-light.webp
new file mode 100644
index 000000000000..63ffe7847648
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/apple/macos-1024x1024-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-dark.webp
new file mode 100644
index 000000000000..1cd4251c91c7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-light.webp
new file mode 100644
index 000000000000..ef89e8e960f3
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-512x512-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-dark.webp
new file mode 100644
index 000000000000..5a460191e2a7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-light.webp
new file mode 100644
index 000000000000..9d0133b3aaac
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/pwa/pwa-maskable-512x512-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/apple-touch-icon-180x180.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/apple-touch-icon-180x180.webp
new file mode 100644
index 000000000000..46c707ce86b0
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/apple-touch-icon-180x180.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon-dark.webp
new file mode 100644
index 000000000000..ca25b554f94d
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon.webp
new file mode 100644
index 000000000000..37183d934858
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/favicon.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/maskable-icon-512x512.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/maskable-icon-512x512.webp
new file mode 100644
index 000000000000..a66c807e694a
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/maskable-icon-512x512.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/pwa-512x512.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/pwa-512x512.webp
new file mode 100644
index 000000000000..a6d0b33babab
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/web/pwa-512x512.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-dark.webp
new file mode 100644
index 000000000000..97ae8b37a1d8
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-light.webp
new file mode 100644
index 000000000000..b39bc3fc70a8
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-app-icon-256x256-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-dark.webp
new file mode 100644
index 000000000000..6e42aea92a34
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-light.webp
new file mode 100644
index 000000000000..266002fa6ddb
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-150x150-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-dark.webp
new file mode 100644
index 000000000000..14d7864a53be
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-light.webp
new file mode 100644
index 000000000000..987f9bb4ccd7
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/app/windows/windows-tile-wide-310x150-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark-bg.webp
new file mode 100644
index 000000000000..27d34a522251
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark.webp
new file mode 100644
index 000000000000..acd07bd9a6a1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light-bg.webp
new file mode 100644
index 000000000000..b3e017561e34
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light.webp
new file mode 100644
index 000000000000..58abedba3be2
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/icon/icon-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark-bg.webp
new file mode 100644
index 000000000000..58620142ff0e
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark.webp
new file mode 100644
index 000000000000..3f32eaa9aec5
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light-bg.webp
new file mode 100644
index 000000000000..734ad2192919
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light.webp
new file mode 100644
index 000000000000..cb49dd29e877
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama-cpp/logo-llama-cpp-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark-bg.webp
new file mode 100644
index 000000000000..c0602c941a4e
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark.webp
new file mode 100644
index 000000000000..a860d48c8f26
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light-bg.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light-bg.webp
new file mode 100644
index 000000000000..7f639892b9b4
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light-bg.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light.webp
new file mode 100644
index 000000000000..5451f6b639dc
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/lockup/llama/logo-llama-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-dark.webp
new file mode 100644
index 000000000000..613d16cfa5c3
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-light.webp
new file mode 100644
index 000000000000..f71e6f6b7446
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-avatar-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-dark.webp
new file mode 100644
index 000000000000..889d20cf68a9
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-light.webp
new file mode 100644
index 000000000000..83fae14ba048
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-cpp-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-dark.webp
new file mode 100644
index 000000000000..1ac69645a41b
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-light.webp
new file mode 100644
index 000000000000..d24de1a9e268
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-cover-llama-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-dark.webp
new file mode 100644
index 000000000000..396111b34d03
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-light.webp
new file mode 100644
index 000000000000..a0b50b8d933b
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-cpp-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-dark.webp
new file mode 100644
index 000000000000..33e0b9129b76
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-light.webp
new file mode 100644
index 000000000000..c603633c788f
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/linkedin/linkedin-page-cover-llama-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-dark.webp
new file mode 100644
index 000000000000..613d16cfa5c3
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-light.webp
new file mode 100644
index 000000000000..f71e6f6b7446
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-avatar-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-dark.webp
new file mode 100644
index 000000000000..c23b089229ce
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-light.webp
new file mode 100644
index 000000000000..fa1dfd17fdad
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-cpp-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-dark.webp
new file mode 100644
index 000000000000..c135d0a3eb99
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-light.webp
new file mode 100644
index 000000000000..bb95ddd07fa1
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/x/x-header-llama-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-dark.webp
new file mode 100644
index 000000000000..b26b521797e5
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-light.webp
new file mode 100644
index 000000000000..7d5a708f77c9
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-avatar-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-dark.webp
new file mode 100644
index 000000000000..5b865f36c600
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-light.webp
new file mode 100644
index 000000000000..adfe691aee53
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-cpp-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-dark.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-dark.webp
new file mode 100644
index 000000000000..3526fa3150ed
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-dark.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-light.webp b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-light.webp
new file mode 100644
index 000000000000..7dcf07ca42f2
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/logo/webp/social/youtube/youtube-banner-llama-light.webp differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/macos/icon_512x512@2x.png b/tools/ui/tests/stories/brand/assets/files/native/macos/icon_512x512@2x.png
new file mode 100644
index 000000000000..159c775028fa
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/macos/icon_512x512@2x.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/Square150x150Logo.scale-400.png b/tools/ui/tests/stories/brand/assets/files/native/windows/Square150x150Logo.scale-400.png
new file mode 100644
index 000000000000..748ca35a5e0e
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/Square150x150Logo.scale-400.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/Square44x44Logo.scale-400.png b/tools/ui/tests/stories/brand/assets/files/native/windows/Square44x44Logo.scale-400.png
new file mode 100644
index 000000000000..970ef0295c72
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/Square44x44Logo.scale-400.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/Wide310x150Logo.scale-400.png b/tools/ui/tests/stories/brand/assets/files/native/windows/Wide310x150Logo.scale-400.png
new file mode 100644
index 000000000000..3ea942195659
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/Wide310x150Logo.scale-400.png differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/llama-white.ico b/tools/ui/tests/stories/brand/assets/files/native/windows/llama-white.ico
new file mode 100644
index 000000000000..2578ffdc4e31
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/llama-white.ico differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/llama.ico b/tools/ui/tests/stories/brand/assets/files/native/windows/llama.ico
new file mode 100644
index 000000000000..ee4478beb7df
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/llama.ico differ
diff --git a/tools/ui/tests/stories/brand/assets/files/native/windows/llama_256.png b/tools/ui/tests/stories/brand/assets/files/native/windows/llama_256.png
new file mode 100644
index 000000000000..98008c0fd4be
Binary files /dev/null and b/tools/ui/tests/stories/brand/assets/files/native/windows/llama_256.png differ
diff --git a/tools/ui/tests/stories/brand/colors/BrandSwatches.svelte b/tools/ui/tests/stories/brand/colors/BrandSwatches.svelte
new file mode 100644
index 000000000000..2df98f5e5e4c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/colors/BrandSwatches.svelte
@@ -0,0 +1,116 @@
+
+
+
+
+
+ Palette
+
+
+ The colours and gradients the brand’s designs use: the logo, the specimen boards, the posters
+ and the social assets. The UI’s own tokens are in UI / Foundations / Colors.
+
+
+
+ {#each groups as group (group.title)}
+
+
+
{group.title}
+
+
{group.note}
+
+
+
+ {#each group.swatches as s (s.name)}
+
+
+ {s.name}
+
+
+
+ {#if s.token}
+ --{s.token}
+
+ {declared.get(s.token)}
+ {:else}
+ {isGradient(s) ? 'gradient' : s.value}
+ {/if}
+
+ {#if s.note}{s.note} {/if}
+
+
+ {/each}
+
+
+ {/each}
+
diff --git a/tools/ui/tests/stories/brand/communications/Boards.svelte b/tools/ui/tests/stories/brand/communications/Boards.svelte
new file mode 100644
index 000000000000..40293def27e3
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/Boards.svelte
@@ -0,0 +1,485 @@
+
+
+
+
+
+
+
+
Llama Sans UI
+
+
Published in 2026
+
+
For llama.cpp
+
+
+
+
{upper}
+
+
{lower}
+
+
{figures}
+
+
+
+ {#each rows as w, i (i)}
+
+ The Llama Sans design keeps a quiet, even colour from labels to long reading. Aa
+
+ {/each}
+
+
+ Abcdefg
+
+
+
+
+
+
{upper}
+
+
{lower}
+
+
{figures}
+
+
+ Llama Sans
+
+
+
Designed for the llama.cpp web UI
+
+
Published by ggml in 2026
+
+
+
+
+
+
+
Llama Sans Display ABCDEFGHIJKLMN OPQRSTUVWXYZ
+
+
Published in 2026 abcdefghijklmn opqrstuvwxyz()&?!
+
+
+ The Display version tightens tracking and kerning for headlines. Aa
+
+
+
+ ABCDE FGHIJK LMNOP QRSTU
+
+
+
+
+ {#each wall as w (w.caption)}
+
+
+
+
+
+
{w.caption} 26
+
+ {/each}
+
+
+
+
+ Explorations in light
+
+ An exhibition of type
+
+
+
+
+ Set in Llama Sans Display & UI 11 26
+
+
+
+
+
+
+
+ Llama Sans
+
+ A quiet classic
+
+
+
+
+ Llama Sans
+
+
+ The Llama Sans design is a neo-grotesk with an even stroke, round bowls and open, angle-cut
+ terminals. It was drawn to carry an interface without asking for attention, and to read as
+ calmly in a long article as in a button.
+
+
+ Draft 0.6 · 975 glyphs
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/PaletteRow.svelte b/tools/ui/tests/stories/brand/communications/PaletteRow.svelte
new file mode 100644
index 000000000000..da4299abbe67
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/PaletteRow.svelte
@@ -0,0 +1,602 @@
+
+
+
+
+
+ {#each palette.swatches as s (s.name)}
+
+ {s.name}{s.value.startsWith('var(')
+ ? s.value.slice(4, -1)
+ : s.value.includes('gradient')
+ ? 'gradient'
+ : s.value}
+
+ {/each}
+
+
+
+
+ 128K
+
+ 128K
+
+ 128K
+
+ Tokens of context
+
+
+
+ +
+
+ 4-bit Q4
+
+ Once upon a token
+
+ At home 70B
+
+
+
+ LOCAL
+
+ No. 04 · November 2026
+
+ Small models, big ideas.
+
+ Quantization, explained Running 70B at home The GGUF story
+
+
+
+
+
+
Badges
+
+
+ Loaded
+
+ Q4_K_M
+
+ GGUF
+
+ Failed
+
+
+
+
+ {#snippet icon()} {/snippet}
+ 42.7 t/s
+
+
+
+ {#snippet icon()} {/snippet}
+ 1.2 s
+
+
+
+ {#snippet icon()} {/snippet}
+ 128K ctx
+
+
+
+
+
+
+
+
+
+
+ GGUF
+
+
+
+
+
+
+
+
+ {#each branches as b (b.y)}
+
+
+ {#each b.nodes as x (x)} {/each}
+ {/each}
+
+
+
+ One file with a model's weights and tokenizer, quantised to fit the machine at hand.
+
+
+
+
+ {#each dots as row, i (i)}
+
+ {#each row as t, j (j)}{#if t === '·'} {:else}{t} {/if}{/each}
+
+ {/each}
+
+
+
+ If it fits in memory
+
+
+
+ it runs.
+
+
+
+
+
Llama Open chat
+
+
localhost:9931
+
+
Installed models
+
+ {#each [['Qwen 2.5 7B', '4.68 GB'], ['Gemma 2 9B', '5.4 GB']] as [m, s] (m)}
+
+ {m}{s}
+
+ {/each}
+
+
Recommended
+
+
+ Llama 3.2 3B2.02 GB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/Principles.svelte b/tools/ui/tests/stories/brand/communications/Principles.svelte
new file mode 100644
index 000000000000..0747bc208feb
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/Principles.svelte
@@ -0,0 +1,241 @@
+
+
+
+
+
+ Principles
+
+
+ {#each principles as [title, body] (title)}
+ {title} {body}
+ {/each}
+
+
+
+
+ Speaking for the three layers
+
+
+ Application, inference and model, as Philosophy › Ideology sets them out, with the harness
+ bridging the first two. A piece is about one of them, and sounds like it.
+
+
+
+ {#each stack as [name, voice], i (name)}
+
+ {stack.length - i} {name} {voice}
+
+ {/each}
+
+
+
+
+ The voice, by example
+
+
+
Before {voice.before}
+
+
After {voice.after}
+
+
+ {voice.why}
+
+
+
+ From atoms to pieces
+
+
+ {#each layers as [name, body], i (name)}
+ {i} {name} {body}
+ {/each}
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Bulletin.svelte b/tools/ui/tests/stories/brand/communications/layouts/Bulletin.svelte
new file mode 100644
index 000000000000..6b87f174b627
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Bulletin.svelte
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+
{@render lead()}
+
+ {#if side}
{@render side()}
{/if}
+
+
+ {#if footer} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Numeral.svelte b/tools/ui/tests/stories/brand/communications/layouts/Numeral.svelte
new file mode 100644
index 000000000000..2622bcc00428
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Numeral.svelte
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+
+
+ {#if footer} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Product.svelte b/tools/ui/tests/stories/brand/communications/layouts/Product.svelte
new file mode 100644
index 000000000000..ce14208b5c12
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Product.svelte
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+ {#if caption}
{caption}
{/if}
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Receipt.svelte b/tools/ui/tests/stories/brand/communications/layouts/Receipt.svelte
new file mode 100644
index 000000000000..dfc79be76bc1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Receipt.svelte
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
{headline}
+
+
+ {title}
+
+ {#each rows as [label, value], i (label)}
+
+
{label}
+
+ {value}
+
+ {/each}
+
+
+
+ {#if footer} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Roster.svelte b/tools/ui/tests/stories/brand/communications/layouts/Roster.svelte
new file mode 100644
index 000000000000..b6940a7fa487
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Roster.svelte
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+ {#if motif}
{@render motif()}
{/if}
+
+
+ {#if label}
+
+
{label}
+
+ {#if link}
{link} {/if}
+
+ {/if}
+
+ {@render cards()}
+
+ {#if footer} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/Statement.svelte b/tools/ui/tests/stories/brand/communications/layouts/Statement.svelte
new file mode 100644
index 000000000000..045a0d4925c8
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/Statement.svelte
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+ {#if motif}
{@render motif()}
{/if}
+
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+ {#if command}
{/if}
+
+
+
+ {#if footer} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/layouts/layout.ts b/tools/ui/tests/stories/brand/communications/layouts/layout.ts
new file mode 100644
index 000000000000..4730ff8a9150
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/layouts/layout.ts
@@ -0,0 +1,17 @@
+// What every key visual takes: its format and ground, the grid overlay, and the top and bottom rows.
+import type { FormatKey, Ground } from '../posts/post';
+
+export interface Header {
+ brand: 'icon' | 'Llama' | 'llama.cpp';
+ kicker?: string;
+ pill?: string;
+ url?: string;
+}
+
+export interface LayoutProps {
+ footer?: [string, string];
+ format: FormatKey;
+ header: Header;
+ overlay?: boolean;
+ tone: Ground;
+}
diff --git a/tools/ui/tests/stories/brand/communications/palettes.ts b/tools/ui/tests/stories/brand/communications/palettes.ts
new file mode 100644
index 000000000000..e6bebecb78d8
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/palettes.ts
@@ -0,0 +1,55 @@
+// Colour for communications (posters, the site, social): a neutral base of the design system's greys, and the Llama
+// palette (the day sky, the night sky, sand and cinder) on top of it. The UI itself
+// stays neutral and uses colour only for status (in the tokens; see DESIGN.md). Cinder, the accent orange, is also the .cpp of the
+// llama.cpp logotype.
+
+export interface Palette {
+ name: string;
+ note: string;
+ /** the swatches to show, in order */
+ swatches: { name: string; value: string }[];
+ /** the roles, as CSS custom properties for the posters */
+ roles: {
+ accent: string; // the one accent: a mark, a highlight, one sticker (never in UI chrome)
+ accentInk: string; // text on the accent
+ deep: string; // the dark field (the night sky)
+ deepInk: string;
+ deepTone: string; // a flat colour from the dark field, for small shapes
+ field: string; // a quiet background (sage)
+ ink: string; // text on the light surfaces
+ line: string;
+ soft: string; // the light field (mist)
+ softInk: string;
+ surface: string; // the plain light surface (neutral)
+ warm: string; // a warm light surface (sand)
+ };
+}
+
+/** The base on its own: the design system's greys only, every role neutral. */
+export const basePalette: Palette = {
+ name: 'Base',
+ note: "The design system's greys alone: every surface, field and accent neutral",
+ roles: {
+ accent: 'var(--neutral-700)',
+ accentInk: 'var(--neutral-50)',
+ deep: 'linear-gradient(160deg, var(--neutral-900) 0%, var(--neutral-925) 55%, var(--neutral-950) 100%)',
+ deepInk: 'var(--neutral-50)',
+ deepTone: 'var(--neutral-800)',
+ field: 'var(--neutral-200)',
+ ink: 'var(--neutral-950)',
+ line: 'rgb(0 0 0 / 0.12)',
+ soft: 'linear-gradient(160deg, var(--neutral-200) 0%, var(--neutral-150) 100%)',
+ softInk: 'var(--neutral-950)',
+ surface: 'var(--neutral-50)',
+ warm: 'var(--neutral-150)'
+ },
+ swatches: [
+ { name: 'Neutral 50', value: 'var(--neutral-50)' },
+ { name: 'Neutral 100', value: 'var(--neutral-100)' },
+ { name: 'Neutral 200', value: 'var(--neutral-200)' },
+ { name: 'Neutral 500', value: 'var(--neutral-500)' },
+ { name: 'Neutral 700', value: 'var(--neutral-700)' },
+ { name: 'Neutral 900', value: 'var(--neutral-900)' },
+ { name: 'Neutral 950', value: 'var(--neutral-950)' }
+ ]
+};
diff --git a/tools/ui/tests/stories/brand/communications/posts/AgentsDiagram.svelte b/tools/ui/tests/stories/brand/communications/posts/AgentsDiagram.svelte
new file mode 100644
index 000000000000..a919e9b89da3
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/AgentsDiagram.svelte
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+ Llama
+
+ {endpoint}
+
+
+
+
+
+ {#each agents as agent, i (agent.name)}
+
+ {/each}
+
+
+
+
+ {#each agents as agent, i (agent.name)}
+
+ {/each}
+
+
+
+ {#each agents as agent (agent.name)}
+
+ {agent.name}
+
+ {agent.note}
+
+ {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/AppIcon.svelte b/tools/ui/tests/stories/brand/communications/posts/AppIcon.svelte
new file mode 100644
index 000000000000..68e7ed14297b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/AppIcon.svelte
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/AppPanel.svelte b/tools/ui/tests/stories/brand/communications/posts/AppPanel.svelte
new file mode 100644
index 000000000000..2f675b6a65b6
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/AppPanel.svelte
@@ -0,0 +1,381 @@
+
+
+
+
+ {#if platform === 'windows'}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
10:24 06/11/2026
+
+ {:else}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Fri 6 Nov 10:24
+
+ {/if}
+
+
+
+
Llama
+
+
localhost:9931
+
+
Open chat
+
+
+
Installed models
+
+ {#each installed as m (m.name)}
+
+ {m.name[0]}
+
+ {m.name} {m.params} {m.size}
+
+
+
+ {/each}
+
+
Recommended for this {platform === 'windows' ? 'PC' : 'Mac'}
+
+
+
g
+
+
gemma-4 12B 7.22 GB
+
+
+
+
+
+
+
+ Browse models Full catalog on the web
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/BranchMotif.svelte b/tools/ui/tests/stories/brand/communications/posts/BranchMotif.svelte
new file mode 100644
index 000000000000..bd64b388e121
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/BranchMotif.svelte
@@ -0,0 +1,134 @@
+
+
+
+
+ {#each branches.filter((b) => !b.chosen) as b, i (i)}
+
+ {/each}
+
+ {#each branches.filter((b) => b.chosen) as b, i (i)}
+
+ {/each}
+
+ {#each nodes as n, i (i)}
+
+ {/each}
+
+ {values[0]}
+
+ {values[1]}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/Command.svelte b/tools/ui/tests/stories/brand/communications/posts/Command.svelte
new file mode 100644
index 000000000000..775fd6c35977
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/Command.svelte
@@ -0,0 +1,37 @@
+
+
+
+{#if prompt}$ {/if}{command}
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/Curve.svelte b/tools/ui/tests/stories/brand/communications/posts/Curve.svelte
new file mode 100644
index 000000000000..1b28d5bd5908
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/Curve.svelte
@@ -0,0 +1,76 @@
+
+
+
+
+ {#each [0.25, 0.5, 0.75, 1] as r (r)} {/each}
+
+
+
+
+
+
+
+ {label}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/DotGrid.svelte b/tools/ui/tests/stories/brand/communications/posts/DotGrid.svelte
new file mode 100644
index 000000000000..06c1bf7bc332
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/DotGrid.svelte
@@ -0,0 +1,38 @@
+
+
+
+
+ {#if at} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/Downloadable.svelte b/tools/ui/tests/stories/brand/communications/posts/Downloadable.svelte
new file mode 100644
index 000000000000..4b191fceb524
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/Downloadable.svelte
@@ -0,0 +1,80 @@
+
+
+
+
+ {@render children()}
+
+
+ {#each formats as { format, label } (format)}
+ download(format)}
+ size="sm"
+ variant="ghost"
+ >
+ {#if busy === format} {:else} {/if}{label}
+
+ {/each}
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/Figure.svelte b/tools/ui/tests/stories/brand/communications/posts/Figure.svelte
new file mode 100644
index 000000000000..4e01f139e1a0
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/Figure.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/HeadlineBlock.svelte b/tools/ui/tests/stories/brand/communications/posts/HeadlineBlock.svelte
new file mode 100644
index 000000000000..d8e4e695c7f1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/HeadlineBlock.svelte
@@ -0,0 +1,49 @@
+
+
+
+
+ {#if label}
{label}
{/if}
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+ {#if chips.length}
+
+ {#each chips as chip (chip)}
{chip} {/each}
+
+ {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/LinkPreview.svelte b/tools/ui/tests/stories/brand/communications/posts/LinkPreview.svelte
new file mode 100644
index 000000000000..69469ea02dc2
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/LinkPreview.svelte
@@ -0,0 +1,40 @@
+
+
+
+{#if kind === 'og'}
+
+{:else}
+
+{/if}
diff --git a/tools/ui/tests/stories/brand/communications/posts/ModelCard.svelte b/tools/ui/tests/stories/brand/communications/posts/ModelCard.svelte
new file mode 100644
index 000000000000..36b9b3b32513
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/ModelCard.svelte
@@ -0,0 +1,170 @@
+
+
+
+
+{#snippet repo(id: string)}{id.slice(0, id.indexOf('/') + 1)} {id.slice(
+ id.indexOf('/') + 1
+ )}{/snippet}
+
+
+ {#if model.tag}
+ {model.tag}
+ {/if}
+
+ {#if model.about || aside}
+
+ {model.about} {#if aside}{aside} {/if}
+
+ {/if}
+
+
+ {model.name} {#if model.badge}{model.badge} {/if}
+
+
+ {#if model.stats?.length}
+
+ {#each model.stats as stat (stat.value)}{stat.value} {stat.label} {/each}
+
+ {/if}
+
+ {#if model.description}{model.description}
{/if}
+
+ {#if model.meta?.length || (model.repo && !model.stats?.length)}
+
+
+ {#if model.meta?.length}{#each model.meta as fact, i (fact)}{i ? ' · ' : ''}{fact} {/each} {/if}
+
+ {#if model.repo}{@render repo(model.repo)} {/if}
+
+ {:else if model.repo}
+ {@render repo(model.repo)}
+ {/if}
+
+ {#if children}{@render children()}{/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/ModelDropPost.svelte b/tools/ui/tests/stories/brand/communications/posts/ModelDropPost.svelte
new file mode 100644
index 000000000000..256cface6207
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/ModelDropPost.svelte
@@ -0,0 +1,123 @@
+
+
+
+{#if slide === 0}
+
+ {#snippet motif()} {/snippet}
+
+ {#snippet cards()}
+
+ {#each copy.models as m (m.name)}
+
+ {m.name}
+
+ {#if m.tag}{m.tag} {/if}
+
+ {/each}
+
+ {/snippet}
+
+{:else if model}
+
+
+
+
+
+
+
{copy.section}
+
+
{copy.url}
+
+
+
+
+
+{/if}
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/PostChip.svelte b/tools/ui/tests/stories/brand/communications/posts/PostChip.svelte
new file mode 100644
index 000000000000..95300de1dcd9
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/PostChip.svelte
@@ -0,0 +1,41 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/PostFooter.svelte b/tools/ui/tests/stories/brand/communications/posts/PostFooter.svelte
new file mode 100644
index 000000000000..2d21c0b0bcac
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/PostFooter.svelte
@@ -0,0 +1,28 @@
+
+
+
+
+ {left}
+
+ {#if right}{right} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/PostFrame.svelte b/tools/ui/tests/stories/brand/communications/posts/PostFrame.svelte
new file mode 100644
index 000000000000..e7e82dc8e053
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/PostFrame.svelte
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ {@render children()}
+
+ {#if overlay}
+
+ {#if safe.top}
{/if}
+
+ {#if safe.bottom}
{/if}
+
+
+ {#each Array(g.columns) as _, i (i)} {/each}
+
+
+ {/if}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/PostHeader.svelte b/tools/ui/tests/stories/brand/communications/posts/PostHeader.svelte
new file mode 100644
index 000000000000..88636758412c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/PostHeader.svelte
@@ -0,0 +1,99 @@
+
+
+
+
+ {#if brand === 'icon'}
+ {ICON}
+ {:else if brand === 'Llama'}
+ {LOCKUP}Llama
+ {:else}
+ {LOCKUP}llama.cpp
+ {/if}
+
+ {#if kicker}{kicker} {/if}
+
+ {#if pill}
+ {#if brand !== 'icon'} {/if}
+
+ {pill}
+ {/if}
+
+ {#if url}{url} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/ProductShot.svelte b/tools/ui/tests/stories/brand/communications/posts/ProductShot.svelte
new file mode 100644
index 000000000000..d129389d719a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/ProductShot.svelte
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/QuantBlocks.svelte b/tools/ui/tests/stories/brand/communications/posts/QuantBlocks.svelte
new file mode 100644
index 000000000000..5993171abc56
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/QuantBlocks.svelte
@@ -0,0 +1,49 @@
+
+
+
+
+ {#each blocks as b, i (i)}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/StatCard.svelte b/tools/ui/tests/stories/brand/communications/posts/StatCard.svelte
new file mode 100644
index 000000000000..31155060c9c5
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/StatCard.svelte
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+ {#if note}{note}
{/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/Variants.svelte b/tools/ui/tests/stories/brand/communications/posts/Variants.svelte
new file mode 100644
index 000000000000..3c213613eec7
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/Variants.svelte
@@ -0,0 +1,37 @@
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/WhatsNewPost.svelte b/tools/ui/tests/stories/brand/communications/posts/WhatsNewPost.svelte
new file mode 100644
index 000000000000..01cd87f7f14d
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/WhatsNewPost.svelte
@@ -0,0 +1,62 @@
+
+
+
+
+ {#snippet lead()}
+
+
+ {#each copy.family.models as model (model.name)} {/each}
+
+
+ {/snippet}
+
+ {#snippet side()}
+ {#each copy.models as model (model.name)} {/each}
+ {/snippet}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/grounds.css b/tools/ui/tests/stories/brand/communications/posts/grounds.css
new file mode 100644
index 000000000000..565ab9850fb1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/grounds.css
@@ -0,0 +1,153 @@
+/*
+ Communications' grounds and type scale. A ground sets a piece's background and its inks as variables, which every
+ element and module reads (--p-bg, --p-base (a flat colour of the ground, for shapes that hide what is behind
+ them), --p-ink, --p-muted, --p-line, --p-card, --p-inset, --p-solid, --p-solid-ink,
+ --p-link). The type scale is in units (--u, a 24th of the format's short side), so a headline is the same weight of
+ the piece in a square post and on a billboard.
+*/
+
+.ground {
+ --sans: 'Llama Sans', var(--font-sans);
+ --mono: 'Llama Mono', var(--font-mono);
+ background: var(--p-bg);
+ color: var(--p-ink);
+ font: 400 calc(var(--u) * 0.62) / 1.4 var(--sans);
+ /* figures, meta lines and repo ids keep their columns */
+ font-variant-numeric: tabular-nums;
+ /* the text stack's rhythm, in every layout: a label to its headline, a headline to its lede, and the lede to what
+ follows it (a command, chips, a caption) */
+ --stack-label: calc(var(--u) * 0.6);
+ --stack: calc(var(--u) * 1.2);
+ --stack-after: calc(var(--u) * 1.6);
+}
+
+.ground-light {
+ --p-base: #fafafa;
+ --p-bg: #fafafa;
+ --p-ink: #111111;
+ --p-muted: rgb(17 17 17 / 0.62);
+ --p-line: rgb(17 17 17 / 0.1);
+ --p-card: #ffffff;
+ --p-inset: var(--neutral-100);
+ --p-solid: #111111;
+ --p-solid-ink: #fafafa;
+ --p-link: var(--art-night-sky);
+}
+.ground-dark {
+ --p-base: #111111;
+ --p-bg: #111111;
+ --p-ink: #fafafa;
+ --p-muted: rgb(250 250 250 / 0.62);
+ --p-line: rgb(250 250 250 / 0.13);
+ --p-card: rgb(250 250 250 / 0.04);
+ --p-inset: rgb(250 250 250 / 0.06);
+ --p-solid: #fafafa;
+ --p-solid-ink: #111111;
+ --p-link: var(--art-day-sky);
+}
+.ground-sand {
+ --p-base: var(--sand-50);
+ --p-bg: var(--sand-50);
+ --p-ink: var(--sand-900);
+ --p-muted: color-mix(in oklab, var(--sand-900) 66%, transparent);
+ --p-line: color-mix(in oklab, var(--sand-900) 12%, transparent);
+ --p-card: var(--sand-100);
+ --p-inset: var(--sand-200);
+ --p-solid: var(--sand-900);
+ --p-solid-ink: var(--sand-50);
+ --p-link: var(--art-night-sky);
+}
+/* the day sky: llama.app's hero, deeper blue at the top and light at the horizon */
+.ground-day {
+ --p-base: #d0e4f7;
+ --p-bg:
+ radial-gradient(ellipse at 15% 10%, #dcecfb 0%, transparent 55%),
+ radial-gradient(ellipse at 90% 95%, #e8f2fc 0%, transparent 50%),
+ linear-gradient(160deg, #c4ddf6 0%, #d0e4f7 55%, #dfecf9 100%);
+ --p-ink: #111111;
+ --p-muted: rgb(17 17 17 / 0.62);
+ --p-line: rgb(17 17 17 / 0.1);
+ --p-card: rgb(255 255 255 / 0.9);
+ --p-inset: rgb(17 17 17 / 0.05);
+ --p-solid: #111111;
+ --p-solid-ink: #fafafa;
+ --p-link: var(--art-night-sky);
+}
+/* the night sky: darkest at the top, lifting a little towards the horizon, with a faint glow there; the steps are
+ small, so it reads as one dark blue */
+.ground-night {
+ --p-base: #13213a;
+ --p-bg:
+ radial-gradient(ellipse 120% 60% at 50% 115%, rgb(46 70 104 / 0.35) 0%, transparent 70%),
+ linear-gradient(180deg, #0f1a2b 0%, #13213a 55%, #182a45 100%);
+ --p-ink: #fafafa;
+ --p-muted: rgb(250 250 250 / 0.66);
+ --p-line: rgb(250 250 250 / 0.14);
+ --p-card: rgb(17 26 42 / 0.82);
+ --p-inset: rgb(250 250 250 / 0.07);
+ --p-solid: #fafafa;
+ --p-solid-ink: #111111;
+ --p-link: var(--art-day-sky);
+}
+/* the type scale, at a low specificity so a layout sets its own margins */
+:where(.ground) :where(.t-label) {
+ margin: 0;
+ color: var(--p-muted);
+ font: 500 calc(var(--u) * 0.54) / 1 var(--mono);
+ letter-spacing: 0.12em;
+ text-transform: uppercase;
+}
+:where(.ground) :where(.t-body) {
+ margin: 0;
+ font-size: calc(var(--u) * 0.62);
+ line-height: 1.4;
+ text-wrap: pretty;
+}
+/* a lede keeps to about 40 characters a line, so it doesn't run up to what stands beside it */
+:where(.ground) :where(.t-lede) {
+ max-width: calc(var(--u) * 17);
+ margin: 0;
+ color: var(--p-muted);
+ font-size: calc(var(--u) * 0.84);
+ line-height: 1.3;
+ text-wrap: pretty;
+}
+:where(.ground) :where(.t-headline, .t-display, .t-figure) {
+ margin: 0;
+ font-family: var(--sans);
+ font-weight: 700;
+ white-space: pre-line;
+ text-wrap: balance;
+}
+:where(.ground) :where(.t-headline) {
+ font-size: calc(var(--u) * 2);
+ line-height: 0.98;
+ letter-spacing: -0.02em;
+}
+:where(.ground) :where(.t-display) {
+ font-size: calc(var(--u) * 3.2);
+ line-height: 0.92;
+ letter-spacing: -0.035em;
+}
+:where(.ground) :where(.t-figure) {
+ font-size: calc(var(--u) * 5);
+ line-height: 0.85;
+ letter-spacing: -0.04em;
+}
+:where(.ground) :where(.t-mono) {
+ margin: 0;
+ font: 400 calc(var(--u) * 0.58) / 1.2 var(--mono);
+}
+
+/* a box a motif fills: the SVG takes the box's size, whatever the format, rather than growing with its width */
+.fill {
+ position: relative;
+ min-width: 0;
+ min-height: 0;
+}
+.fill > svg {
+ position: absolute;
+ inset: 0;
+ width: 100%;
+ height: 100%;
+}
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/Gpu.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/Gpu.svelte
new file mode 100644
index 000000000000..964c9e57d049
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/Gpu.svelte
@@ -0,0 +1,73 @@
+
+
+
+
+ {#if !flat}
+ {/if}
+
+ {#each fingers as u (u)}
+
+ {/each}
+
+
+
+
+
+ {#each fans as cu (cu)}
+
+
+
+
+ {#each blade(cu) as b, i (i)} {/each}
+
+
+ {/each}
+
+ {#each fins as u (u)}
+ {#if !flat} {/if}
+ {/each}
+
+ {#each [0.2, 0.42, 0.64] as v (v)}
+ {#if !flat} {/if}
+ {/each}
+
+
+
+ 24 GB
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/GradientDescent.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/GradientDescent.svelte
new file mode 100644
index 000000000000..07fd4e2cd5ac
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/GradientDescent.svelte
@@ -0,0 +1,81 @@
+
+
+
+
+ {#each mesh as l, i (i)}
+
+ {/each}
+
+
+
+ {#each steps as [cx, cy], i (i)}
+ {@const last = i === steps.length - 1}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/Laptop.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/Laptop.svelte
new file mode 100644
index 000000000000..3927fb304c44
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/Laptop.svelte
@@ -0,0 +1,70 @@
+
+
+
+
+ {#if !flat}
+ {/if}
+
+
+
+
+
+
+
+
+
+ {#each lines as [u, t, w] (t)}
+
+ {/each}
+
+
+
+
+
+ {#each keys as [u, v] (u + '-' + v)}
+ {#if !flat} {/if}
+ {/each}
+
+ {#if !flat} {/if}
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/NeuralNet.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/NeuralNet.svelte
new file mode 100644
index 000000000000..0b874ab9d1be
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/NeuralNet.svelte
@@ -0,0 +1,88 @@
+
+
+
+
+ {#each frames as f, i (i)}
+
+ {/each}
+
+ {#each edges as [a, b], i (i)}
+
+ {/each}
+
+
+
+ {#each nodes as n, i (i)}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/Server.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/Server.svelte
new file mode 100644
index 000000000000..165ee95707c3
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/Server.svelte
@@ -0,0 +1,55 @@
+
+
+
+
+ {#if !flat}
+ {/if}
+
+ {#each units as unit, i (i)}
+ {@const d = pens[i]}
+
+
+ {#each bays as u (u)}
+
+
+
+ {/each}
+
+ {#each [1.62, 1.68, 1.74, 1.8, 1.86, 1.92, 1.98] as u (u)}
+
+ {/each}
+
+
+
+
+ {/each}
+
+ {#each rails as rail, i (i)}
+
+ {/each}
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/Solid.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/Solid.svelte
new file mode 100644
index 000000000000..e30dfe77a568
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/Solid.svelte
@@ -0,0 +1,13 @@
+
+
+
+{#each faces(box, view).filter((f) => !flat || f.name === 'front') as f (f.name)}
+
+
+
+{/each}
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/Tensor.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/Tensor.svelte
new file mode 100644
index 000000000000..9234d94aa994
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/Tensor.svelte
@@ -0,0 +1,131 @@
+
+
+
+
+ {#each cubes as cube, i (i)}
+ {#each cube.visible as face, j (j)}
+
+
+
+ {/each}
+ {/each}
+
+ [3, 3, 3]
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/VectorSpace.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/VectorSpace.svelte
new file mode 100644
index 000000000000..e0e82fe63f9e
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/VectorSpace.svelte
@@ -0,0 +1,99 @@
+
+
+
+
+ {#each grid as [s, e], i (i)}
+
+ {/each}
+
+ {#each axes as axis (axis.join())}
+ {@const e = p(axis)}
+
+ {/each}
+
+ {#each cloud as [cx, cy, d], i (i)}
+
+ {/each}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationLarge.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationLarge.svelte
new file mode 100644
index 000000000000..a49d044d04bc
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationLarge.svelte
@@ -0,0 +1,49 @@
+
+
+
+
+ {#if !flat}
+ {/if}
+
+
+
+
+
+
+
+ {#each lattice as [u, v] (u + '-' + v)}
+
+ {/each}
+
+ {#if !flat} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationSmall.svelte b/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationSmall.svelte
new file mode 100644
index 000000000000..9597ef7af774
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/WorkstationSmall.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+ {#if !flat}
+ {/if}
+
+
+
+ {#if !flat} {/if}
+
+ {#each mesh as [u, v] (u + '-' + v)}
+
+ {/each}
+
+ {#each [0.2, 0.42] as u (u)}
+ {#if !flat} {/if}
+ {/each}
+
+ {#if !flat} {/if}
+
+ {#if !flat} {/if}
+
+ {#if !flat} {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/box.ts b/tools/ui/tests/stories/brand/communications/posts/motifs/box.ts
new file mode 100644
index 000000000000..9bc685d7db0a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/box.ts
@@ -0,0 +1,113 @@
+// Boxes for the machine motifs: a box's three faces the viewer sees (its top, its front and its right side, with the
+// camera turned as in `device`), shaded by which way they face, and a way to draw on a face in its own units, so a
+// fan, a vent or a key sits flat on the surface it belongs to.
+import { type Point3, project, pts, type View } from './project';
+
+/** the camera every machine is drawn with: from the front left, a little above, nearly without perspective */
+export const device = (scale: number, cy = 160): View => ({
+ cx: 200,
+ cy,
+ distance: 30,
+ pitch: 0.5,
+ scale,
+ yaw: -0.6
+});
+
+/** the camera for a machine's flat version: straight at its front, without perspective */
+export const front = (scale: number, cy = 160): View => ({
+ cx: 200,
+ cy,
+ distance: 1000,
+ pitch: 0,
+ scale,
+ yaw: 0
+});
+
+export interface Box {
+ max: Point3;
+ min: Point3;
+}
+
+export type FaceName = 'front' | 'right' | 'top';
+
+/** how light each face is: the ink laid over the ground, from the top (lightest) to the right side (darkest) */
+export const SHADE: Record = { front: 0.14, right: 0.3, top: 0.04 };
+
+/** a point on a face, `u` across and `v` up (on the top, `v` runs away from the front), in world units from its corner */
+export function on(b: Box, face: FaceName, u: number, v: number): Point3 {
+ const [x0, y0, z0] = b.min;
+ const [x1, y1] = b.max;
+
+ if (face === 'front') return [x0 + u, y0 + v, z0];
+
+ if (face === 'right') return [x1, y0 + v, z0 + u];
+
+ return [x0 + u, y1, z0 + v];
+}
+
+/** a face's size, across and up */
+export function size(b: Box, face: FaceName): [number, number] {
+ const [dx, dy, dz] = [b.max[0] - b.min[0], b.max[1] - b.min[1], b.max[2] - b.min[2]];
+
+ return face === 'front' ? [dx, dy] : face === 'right' ? [dz, dy] : [dx, dz];
+}
+
+/** a drawing pen for a box under a view: points, lines, rectangles and circles on its faces, as SVG points */
+export function pen(b: Box, view: View) {
+ const at = (face: FaceName, u: number, v: number) => project(on(b, face, u, v), view);
+
+ return {
+ /** a point on a face */
+ at: (face: FaceName, u: number, v: number) => at(face, u, v).slice(0, 2) as [number, number],
+ /** a circle on a face, as polygon points */
+ circle: (face: FaceName, u: number, v: number, r: number, n = 36) =>
+ pts(
+ Array.from({ length: n }, (_, i) => {
+ const a = (i / n) * Math.PI * 2;
+
+ return at(face, u + r * Math.cos(a), v + r * Math.sin(a));
+ })
+ ),
+ /** the whole face, as polygon points */
+ face: (face: FaceName) => {
+ const [w, h] = size(b, face);
+
+ return pts([at(face, 0, 0), at(face, w, 0), at(face, w, h), at(face, 0, h)]);
+ },
+ /** a line on a face, as polyline points */
+ line: (face: FaceName, u0: number, v0: number, u1: number, v1: number) =>
+ pts([at(face, u0, v0), at(face, u1, v1)]),
+ /** a path of points on a face */
+ path: (face: FaceName, list: [number, number][]) => pts(list.map(([u, v]) => at(face, u, v))),
+ /** a rectangle on a face */
+ rect: (face: FaceName, u: number, v: number, w: number, h: number) =>
+ pts([at(face, u, v), at(face, u + w, v), at(face, u + w, v + h), at(face, u, v + h)])
+ };
+}
+
+/** the faces a box shows, back to front, as polygon points with their shade */
+export function faces(b: Box, view: View) {
+ const p = pen(b, view);
+
+ return (['top', 'front', 'right'] as FaceName[]).map((name) => ({
+ name,
+ points: p.face(name),
+ shade: SHADE[name]
+ }));
+}
+
+/** a soft shadow on the floor under a box, a little larger than it */
+export function shadow(b: Box, view: View, grow = 0.12) {
+ const y = b.min[1];
+
+ return pts(
+ (
+ [
+ [b.min[0] - grow, y, b.min[2] - grow],
+ [b.max[0] + grow, y, b.min[2] - grow],
+ [b.max[0] + grow, y, b.max[2] + grow],
+ [b.min[0] - grow, y, b.max[2] + grow]
+ ] as Point3[]
+ ).map((q) => project(q, view))
+ );
+}
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/motif.css b/tools/ui/tests/stories/brand/communications/posts/motifs/motif.css
new file mode 100644
index 000000000000..6be162a036c1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/motif.css
@@ -0,0 +1,70 @@
+/*
+ The motifs' shared drawing: lines in the ground's ink, round caps, labels in Llama Mono in the muted ink, and one
+ cinder detail per motif. Each motif is an SVG that fills its box (see .fill in grounds.css).
+*/
+.motif-svg {
+ display: block;
+ width: 100%;
+ height: 100%;
+ overflow: visible;
+}
+.motif-svg .ink {
+ fill: none;
+ stroke: var(--p-ink);
+ stroke-width: 7;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+}
+.motif-svg .thin {
+ fill: none;
+ stroke: var(--p-ink);
+ stroke-width: 3;
+ stroke-linecap: round;
+ opacity: 0.3;
+}
+.motif-svg .solid {
+ fill: var(--p-ink);
+}
+.motif-svg .soft {
+ fill: var(--p-inset);
+}
+.motif-svg .accent {
+ fill: var(--art-cinder);
+}
+.motif-svg .accent-line {
+ fill: none;
+ stroke: var(--art-cinder);
+ stroke-width: 7;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+}
+.motif-svg text {
+ fill: var(--p-muted);
+ font: 500 24px var(--mono);
+}
+
+/* the machines: faces filled with the ground's flat colour, then shaded with ink; edges in ink */
+.motif-svg .face {
+ fill: var(--p-base);
+}
+.motif-svg .shade {
+ fill: var(--p-ink);
+ stroke: var(--p-ink);
+ stroke-width: 2.2;
+ stroke-linejoin: round;
+}
+.motif-svg .detail {
+ fill: none;
+ stroke: var(--p-ink);
+ stroke-width: 1.6;
+ stroke-linecap: round;
+ stroke-linejoin: round;
+}
+.motif-svg .hole {
+ fill: var(--p-ink);
+ opacity: 0.55;
+}
+.motif-svg .floor {
+ fill: var(--p-ink);
+ opacity: 0.06;
+}
diff --git a/tools/ui/tests/stories/brand/communications/posts/motifs/project.ts b/tools/ui/tests/stories/brand/communications/posts/motifs/project.ts
new file mode 100644
index 000000000000..ff0d3cbe4cbf
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/motifs/project.ts
@@ -0,0 +1,47 @@
+// A small 3D projection for the motifs: points in a unit space (y up) turned by a yaw and a pitch and drawn with a
+// gentle perspective into a 400 × 300 SVG, with their depth, so lines and dots can fade and shrink with distance.
+
+export type Point3 = [number, number, number];
+
+export interface View {
+ cx: number;
+ cy: number;
+ /** the camera's distance; larger is flatter */
+ distance: number;
+ /** how far the camera looks down onto the scene, in radians */
+ pitch: number;
+ scale: number;
+ /** the turn around the vertical axis, in radians */
+ yaw: number;
+}
+
+/** a point on the page and its depth: 0 at the centre, positive away from the viewer */
+export function project([x, y, z]: Point3, v: View): [number, number, number] {
+ const x1 = x * Math.cos(v.yaw) - z * Math.sin(v.yaw);
+ const z1 = x * Math.sin(v.yaw) + z * Math.cos(v.yaw);
+ // a positive pitch looks down onto the scene: what is higher comes nearer
+ const y1 = y * Math.cos(v.pitch) + z1 * Math.sin(v.pitch);
+ const z2 = -y * Math.sin(v.pitch) + z1 * Math.cos(v.pitch);
+ const f = v.distance / (v.distance + z2);
+
+ return [v.cx + x1 * v.scale * f, v.cy - y1 * v.scale * f, z2];
+}
+
+/** how far back a depth is, from 0 (nearest) to 1 (farthest), over a range */
+export const far = (depth: number, range = 1.6) =>
+ Math.min(1, Math.max(0, (depth + range / 2) / range));
+
+/** a points list for a polyline or polygon */
+export const pts = (list: number[][]) =>
+ list.map(([x, y]) => `${x.toFixed(1)},${y.toFixed(1)}`).join(' ');
+
+/** a repeatable pseudo-random sequence, for scattering points the same way on every render */
+export function random(seed: number) {
+ let s = seed;
+
+ return () => {
+ s = (s * 1103515245 + 12345) % 2147483648;
+
+ return s / 2147483648;
+ };
+}
diff --git a/tools/ui/tests/stories/brand/communications/posts/post.ts b/tools/ui/tests/stories/brand/communications/posts/post.ts
new file mode 100644
index 000000000000..47244366c5bd
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/posts/post.ts
@@ -0,0 +1,524 @@
+// The social post and link preview templates: their formats, tones and the copy they ship with. The copy is the
+// stories' args, so it can be rewritten in Storybook's controls before a post is exported.
+
+/**
+ * The grounds a piece is set on. The neutrals (light, dark) take either lockup; the day sky (llama.app's hero) and
+ * the night sky, and sand take the Llama lockup only. Cinder is never a ground: it is the one accent on top of them
+ */
+export type Ground = 'dark' | 'day' | 'light' | 'night' | 'sand';
+/** the older name, kept for the post templates */
+export type PostTone = Ground;
+
+export const GROUNDS: Record = {
+ dark: { lockups: 'Llama, llama.cpp', name: 'Dark', note: 'Ink, for the developer side' },
+ day: {
+ lockups: 'Llama',
+ name: 'Day sky',
+ note: "llama.app's hero: deeper at the top, light at the horizon"
+ },
+ light: { lockups: 'Llama, llama.cpp', name: 'Light', note: 'The default: neutral 50 with ink' },
+ night: {
+ lockups: 'Llama',
+ name: 'Night sky',
+ note: 'Darkest at the top, a faint glow at the horizon'
+ },
+ sand: { lockups: 'Llama', name: 'Sand', note: 'The warm neutral, with its own ink' }
+};
+
+export interface PostFormat {
+ height: number;
+ name: string;
+ /** the pixels at the top and bottom the platform covers with its own bars */
+ safe?: { bottom: number; top: number };
+ /** where it goes */
+ use?: string;
+ width: number;
+}
+
+export const FORMATS = {
+ billboard: { height: 800, name: 'Billboard 3:1', use: 'Banners, screens at events', width: 2400 },
+ landscape: { height: 900, name: 'Landscape 16:9', use: 'X, Bluesky, slides', width: 1600 },
+ /** the Mac App Store's screenshots: 16:10 at the largest size Apple takes, a 1440 × 900 screen at 2x */
+ macScreenshot: {
+ height: 1800,
+ name: 'Mac App Store screenshot 16:10',
+ use: 'Mac App Store screenshots, up to ten',
+ width: 2880
+ },
+ /** the Microsoft Store's listing: artwork, screenshots and logos; the Store may lay text over the bottom quarter */
+ msHero: {
+ height: 1080,
+ name: 'Super hero art 16:9',
+ safe: { bottom: 270, top: 0 },
+ use: 'The top of the Microsoft Store listing',
+ width: 1920
+ },
+ msPoster: {
+ height: 1080,
+ name: 'Poster art 2:3',
+ use: 'The Microsoft Store’s main logo',
+ width: 720
+ },
+ msScreenshot: {
+ height: 1080,
+ name: 'Store screenshot 16:9',
+ safe: { bottom: 270, top: 0 },
+ use: 'Microsoft Store screenshots, four or more',
+ width: 1920
+ },
+ msTile: { height: 300, name: 'App tile icon', use: 'The Microsoft Store’s tile', width: 300 },
+ og: { height: 630, name: 'Open Graph', use: 'Link previews on llama.app', width: 1200 },
+ portrait: { height: 1350, name: 'Portrait 4:5', use: 'Instagram, LinkedIn', width: 1080 },
+ poster: { height: 1754, name: 'Poster A-series', use: 'Print, at 150 dpi', width: 1240 },
+ repo: { height: 640, name: 'GitHub social preview', use: 'The repo’s link preview', width: 1280 },
+ square: { height: 1080, name: 'Square', use: 'Instagram, LinkedIn, X', width: 1080 },
+ story: {
+ height: 1920,
+ name: 'Story 9:16',
+ safe: { bottom: 320, top: 220 },
+ use: 'Instagram and TikTok stories, Shorts',
+ width: 1080
+ }
+} satisfies Record;
+
+export type FormatKey = keyof typeof FORMATS;
+
+export type Shape = 'square' | 'tall' | 'wide';
+
+export interface Grid {
+ /** the column count: six on square and tall formats, twelve on wide ones */
+ columns: number;
+ /** the space between columns, half a unit */
+ gutter: number;
+ /** the margin on every side, two units (plus the safe area) */
+ margin: number;
+ shape: Shape;
+ /**
+ * the unit: a 24th of the short side, or a 48th of the long side on a format wider than 2:1. Every size in a piece
+ * (type, spacing, radii) is a multiple of it
+ */
+ unit: number;
+}
+
+/**
+ * The grid for a format: one unit tied to its short side, so a layout scales across formats rather than being redrawn.
+ * `unit` fixes it instead, for a specimen tile sized to its content
+ */
+export function grid({ height, width }: PostFormat, unit?: number): Grid {
+ unit ??= Math.max(Math.min(width, height) / 24, Math.max(width, height) / 48);
+ const shape: Shape = width / height >= 1.5 ? 'wide' : height / width >= 1.3 ? 'tall' : 'square';
+
+ return { columns: shape === 'wide' ? 12 : 6, gutter: unit / 2, margin: unit * 2, shape, unit };
+}
+
+/** the lockup glyph, U+E002: the icon with the lockup's gap built in, typed straight before the name */
+export const LOCKUP = '';
+/** the icon on its own, U+E001: the capital form, for a header without the name */
+export const ICON = '';
+
+export interface Stat {
+ label: string;
+ value: string;
+}
+
+export interface Model {
+ /** a short line over the name: the maker and what it is for */
+ about?: string;
+ /** the tag over the name, in cinder when `accent` */
+ accent?: boolean;
+ /** a Mono tag at the card's top right: its modality or kind */
+ badge?: string;
+ description?: string;
+ /** Mono facts under the description: size, quant, licence */
+ meta?: string[];
+ name: string;
+ repo?: string;
+ stats?: Stat[];
+ tag?: string;
+}
+
+export interface ModelDropCopy {
+ chips: string[];
+ headline: string;
+ kicker: string;
+ lede: string;
+ models: Model[];
+ section: string;
+ url: string;
+}
+
+export const modelDrop: ModelDropCopy = {
+ chips: ['route a ticket', 'moderate content', 'pick an agent’s next step'],
+ headline: 'Decision models, running locally, a click away.',
+ kicker: 'From the llama.cpp team & Hugging Face',
+ lede: 'Give a model a document and typed questions. Get back a calibrated probability for every option, lightning fast.',
+ models: [
+ {
+ accent: true,
+ description:
+ 'From vLLM-SR’s Decision 3.0 family, #1 on the Jev Decision Index. Reads text, JSON, images and video.',
+ meta: ['9B', '6.6 GB Q4_K_M', 'Apache-2.0'],
+ name: 'd3-flash',
+ repo: 'ggml-org/vllm-d3-flash-GGUF',
+ tag: 'Decision Index leader'
+ },
+ {
+ description:
+ 'Liquid AI’s omni decision model. Text, images, audio and video, even spoken questions, in 2B.',
+ meta: ['2B', '1.85 GB Q8_0', 'runs on a laptop'],
+ name: 'd1-Omni-2B',
+ repo: 'LiquidAI/d1-Omni-2B-GGUF',
+ tag: 'Every modality'
+ }
+ ],
+ section: 'Fresh drops',
+ url: 'llama.app/models'
+};
+
+export interface WhatsNewCopy {
+ family: { about: string; aside: string; models: Model[]; name: string };
+ footer: [string, string];
+ headline: string;
+ lede: string;
+ models: Model[];
+ pill: string;
+ url: string;
+}
+
+export const whatsNew: WhatsNewCopy = {
+ family: {
+ about: 'Liquid AI · small and multimodal',
+ aside: 'Built for on-device',
+ models: [
+ {
+ badge: 'text',
+ description: 'Small chat model in 16 languages. Runs on CPU or GPU.',
+ name: 'LFM3-1.7B'
+ },
+ {
+ badge: 'omni',
+ description: 'A small model that can see, watch, hear and talk back.',
+ name: 'LFM3-Omni-2B'
+ },
+ {
+ badge: 'audio',
+ description: 'Takes text and audio, outputs text or speech.',
+ name: 'LFM3-Audio-2B'
+ },
+ {
+ badge: 'decision',
+ description: 'Yes/no, choice and score answers over text, image and video.',
+ name: 'd1-2B'
+ }
+ ],
+ name: 'LFM3'
+ },
+ footer: ['By the llama.cpp team and Hugging Face', 'Free · Open source · Works offline'],
+ headline: 'New in Llama.\nOn your computer.',
+ lede: 'Liquid AI’s LFM3 family, Mistral Large 4 and Recursive’s Flint now run in the Llama app. Pick one from Models and start chatting.',
+ models: [
+ {
+ about: 'Mistral AI · frontier scale',
+ description:
+ 'The 2-bit quant fits in 512 GB of unified memory. Strong in cybersecurity and agentic coding.',
+ name: 'Mistral Large 4',
+ repo: 'ggml-org/Mistral-Large-4-1T-A52B-GGUF',
+ stats: [
+ { label: 'params, ~52B active', value: '1T' },
+ { label: 'context, image input', value: '1M' }
+ ]
+ },
+ {
+ about: 'Recursive · for coding agents',
+ description:
+ 'Investigates codebases, fixes bugs and writes tests, with reasoning and tool use.',
+ name: 'Flint',
+ repo: 'ggml-org/Flint-GGUF',
+ stats: [
+ { label: 'active of 39.8B', value: '2.5B' },
+ { label: 'SWE-bench Verified', value: '74.2%' }
+ ]
+ }
+ ],
+ pill: 'New models available today',
+ url: 'llama.app'
+};
+
+export interface LinkPreviewCopy {
+ caption: string;
+ command: string;
+ headline: string;
+ repoHeadline: string;
+ repoLede: string;
+}
+
+export const linkPreview: LinkPreviewCopy = {
+ caption: 'Llama · Your AI, on your computer',
+ command: 'llama-server -hf ggml-org/gemma-4-E4B-it-GGUF',
+ headline: 'Your AI.\nOn your computer.',
+ repoHeadline: 'LLM inference\nin C/C++',
+ repoLede: 'Run open models on your own hardware, from a laptop to a server.'
+};
+
+export interface ReceiptCopy {
+ footer: [string, string];
+ headline: string;
+ rows: [string, string][];
+ title: string;
+}
+
+/** an early llama.app ad, said plainly: the headline states it, the receipt makes the point about paying per token */
+export const openModels: ReceiptCopy = {
+ footer: ['Free AI for everyone', 'Open source · Works offline'],
+ headline: '100,000+ open models.\nOne computer: yours.',
+ rows: [
+ ['tokens generated', '1,284,902'],
+ ['account', 'none'],
+ ['total', '$0.00']
+ ],
+ title: 'Your AI bill, today'
+};
+
+export interface AgentsCopy {
+ agents: { name: string; note: string }[];
+ command: string;
+ endpoint: string;
+ footer: [string, string];
+ headline: string;
+ lede: string;
+ url: string;
+}
+
+/**
+ * Llama serving agents, after Merve's post: the endpoint any agent can point at, and how four of them connect. Her
+ * copy, but for the lede's onboarding sentence, which the Hermes card says; it is set large for a phone and tracked
+ * tighter to fit
+ */
+export const agentsPost: AgentsCopy = {
+ agents: [
+ { name: 'OpenClaw', note: 'OpenAI-compatible API' },
+ { name: 'Hermes', note: 'Set up during onboarding' },
+ { name: 'Pi', note: '/login llama.cpp' },
+ { name: 'Codex', note: '~/.codex/config.toml' }
+ ],
+ command: 'base_url = "http://127.0.0.1:9931/v1"',
+ endpoint: ':9931/v1',
+ footer: ['By the llama.cpp team and Hugging Face', 'Free · Open source · Works offline'],
+ headline: 'Any agent.\nOn your computer.',
+ lede: 'Llama serves open models at an OpenAI-compatible endpoint. Point your coding agent at it and keep working, even offline.',
+ url: 'llama.app/docs/agents'
+};
+
+export interface StoreLine {
+ headline: string;
+ lede?: string;
+}
+
+/** a version of a screenshot's copy: one of several to compare, or to A/B test in a Store product page experiment */
+export interface StoreVariant extends StoreLine {
+ /** a short name for it, A, B and so on */
+ id: string;
+ /** what it leans on */
+ note: string;
+}
+
+/**
+ * The Microsoft Store listing, in the order the Store shows it (ten screenshots, its most): each one practical thing
+ * the app does on Windows, said so that what we stand for comes through (yours, private, for everyone) without
+ * preaching it, and only what the app already does (its release notes, its README). The opener and the chat come in
+ * several versions, the opener's mostly leading with privacy; all in the voice: sentence case, full stops, no
+ * superlatives
+ */
+export interface MicrosoftStoreCopy {
+ apps: StoreLine;
+ /** the chat, each version with its own conversation (a Store scene) */
+ chats: (StoreVariant & { scene: 'chat' | 'document' | 'screenshot' })[];
+ gpu: StoreLine;
+ models: StoreLine;
+ openers: StoreVariant[];
+ privacy: StoreLine;
+ quick: StoreLine;
+ speed: StoreLine & { figureLabel: string; value: string };
+ tray: StoreLine;
+ verdicts: StoreLine;
+}
+
+export const microsoftStore: MicrosoftStoreCopy = {
+ apps: {
+ headline: 'Works with the apps\nyou already use.',
+ lede: 'Any app that speaks the OpenAI API can use your models, right on your PC.'
+ },
+ chats: [
+ {
+ headline: 'Help with everyday things,\neven offline.',
+ id: 'A',
+ lede: 'Your conversations stay on your PC.',
+ note: 'Writing',
+ scene: 'chat'
+ },
+ {
+ headline: 'Your documents\nstay on your PC.',
+ id: 'B',
+ lede: 'Summarize a lease, a bill or a letter, even offline.',
+ note: 'Documents',
+ scene: 'document'
+ },
+ {
+ headline: 'Ask about what’s\non your screen.',
+ id: 'C',
+ lede: 'Share a screenshot for a plain answer. It never leaves your PC.',
+ note: 'Screenshots',
+ scene: 'screenshot'
+ }
+ ],
+ gpu: {
+ headline: 'Runs on the graphics card\nyou already have.',
+ lede: 'NVIDIA, AMD or Intel, or on the processor alone.'
+ },
+ models: {
+ headline: 'The models you choose\nstay yours.',
+ lede: 'Each one is a file on your PC: open its folder, run it or delete it. No one else can change it.'
+ },
+ openers: [
+ {
+ headline: 'Your AI.\nOn your PC.',
+ id: 'A',
+ lede: 'Free and open source. No account, no subscription.',
+ note: 'Ownership'
+ },
+ {
+ headline: 'Chat with AI,\nprivately.',
+ id: 'B',
+ lede: 'It runs on your PC. Your conversations stay with you.',
+ note: 'Privacy, as what you do'
+ },
+ {
+ headline: 'Run your own AI.\nLocal and private.',
+ id: 'C',
+ lede: 'On your PC, even offline. No account, no subscription.',
+ note: 'Privacy, with ownership'
+ },
+ {
+ headline: 'Local AI.\nFree and private.',
+ id: 'D',
+ lede: 'Run open models from Hugging Face on your PC.',
+ note: 'Privacy, with price'
+ },
+ {
+ headline: 'Private AI,\nright on your PC.',
+ id: 'E',
+ lede: 'Your conversations stay on it. Free, and it works offline.',
+ note: 'Privacy, with place'
+ }
+ ],
+ privacy: {
+ headline: 'No telemetry.\nNone.',
+ lede: 'No events, no analytics, no install ID. Your prompts and replies stay on your PC.'
+ },
+ quick: {
+ headline: 'A quick chat,\nfrom any app.',
+ lede: 'Esc hides it, and your conversation waits for the next time.'
+ },
+ speed: {
+ figureLabel: 'faster, with the same answers',
+ headline: 'Faster replies,\nsame answers.',
+ lede: 'Models that can draft ahead do it on their own. Nothing to set up.',
+ value: 'Up to 2×'
+ },
+ tray: {
+ headline: 'Good models to start with,\nright in the tray.',
+ lede: 'Llama runs the server for you. Pick one, or search all of Hugging Face.'
+ },
+ verdicts: {
+ headline: 'Know before\nyou download.',
+ lede: 'Every version says whether it fits your PC, from what it needs and what your PC has.'
+ }
+};
+
+/**
+ * The Mac App Store listing: the same voice as the Microsoft Store's, for Llama for Mac and what it does that the
+ * Windows app doesn't (its menu bar, a Safari web app in the Dock, its models reached from a phone), from its release
+ * notes and README. It claims nothing about telemetry: the Mac app reports crashes
+ */
+export interface MacAppStoreCopy {
+ apps: StoreLine;
+ chats: (StoreVariant & { scene: 'chat' | 'document' })[];
+ hardware: StoreLine;
+ menu: StoreLine;
+ openers: StoreVariant[];
+ phone: StoreLine;
+ size: StoreLine & { figureLabel: string; value: string };
+}
+
+export const macAppStore: MacAppStoreCopy = {
+ apps: {
+ headline: 'Works with the apps\nyou already use.',
+ lede: 'Any app that speaks the OpenAI API can use your models, right on your Mac.'
+ },
+ chats: [
+ {
+ headline: 'Chat in a window\nof its own.',
+ id: 'A',
+ lede: 'Add Llama to the Dock as a Safari web app. Your conversations stay on your Mac.',
+ note: 'Writing',
+ scene: 'chat'
+ },
+ {
+ headline: 'Your documents\nstay on your Mac.',
+ id: 'B',
+ lede: 'Summarize a lease, a bill or a letter, even offline.',
+ note: 'Documents',
+ scene: 'document'
+ }
+ ],
+ hardware: {
+ headline: 'Runs on the Mac\nyou already have.',
+ lede: 'Recommended for your Mac lists the models that fit its memory.'
+ },
+ menu: {
+ headline: 'Lives in your\nmenu bar.',
+ lede: 'Llama runs the server for you and suggests a first model that fits your Mac.'
+ },
+ openers: [
+ {
+ headline: 'Your AI.\nOn your Mac.',
+ id: 'A',
+ lede: 'Free and open source. No account, no subscription.',
+ note: 'Ownership'
+ },
+ {
+ headline: 'Chat with AI,\nprivately.',
+ id: 'B',
+ lede: 'It runs on your Mac. Your conversations stay with you.',
+ note: 'Privacy, as what you do'
+ },
+ {
+ headline: 'Run your own AI.\nLocal and private.',
+ id: 'C',
+ lede: 'On your Mac, even offline. No account, no subscription.',
+ note: 'Privacy, with ownership'
+ },
+ {
+ headline: 'Local AI.\nFree and private.',
+ id: 'D',
+ lede: 'Run open models from Hugging Face on your Mac.',
+ note: 'Privacy, with price'
+ },
+ {
+ headline: 'Private AI,\nright on your Mac.',
+ id: 'E',
+ lede: 'Your conversations stay on it. Free, and it works offline.',
+ note: 'Privacy, with place'
+ }
+ ],
+ phone: {
+ headline: 'Your models,\non your phone too.',
+ lede: 'Scan the code in the menu. Over Tailscale, only your own devices can reach them.'
+ },
+ size: {
+ figureLabel: 'a native Mac app',
+ headline: 'Small, and\nmade for the Mac.',
+ lede: 'It shares one llama.cpp with your terminal, and your models with your other tools.',
+ value: '4 MB'
+ }
+};
diff --git a/tools/ui/tests/stories/brand/communications/store/MacMenu.svelte b/tools/ui/tests/stories/brand/communications/store/MacMenu.svelte
new file mode 100644
index 000000000000..c92ce26903b8
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/MacMenu.svelte
@@ -0,0 +1,417 @@
+
+
+
+
+
+{#snippet title(row: Row)}
+
+ {row.name}{#if row.params}{row.params} {/if}{#if row.quant}{row.quant} {/if}{#if row.vision} {/if}
+
+{/snippet}
+
+{#snippet modelRow(row: Row, trailing: 'chevron' | 'install', progress?: number)}
+
+
{@html row.logo}
+
+
+ {@render title(row)}
+
+ {row.subtitle}
+
+
+ {#if trailing === 'chevron'}
+
+ {:else if progress !== undefined}
+
{Math.round(progress * 100)}%
+
+
+ {:else}
+
+ {/if}
+
+{/snippet}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/StoreArt.svelte b/tools/ui/tests/stories/brand/communications/store/StoreArt.svelte
new file mode 100644
index 000000000000..7f5c2e2c6b4b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/StoreArt.svelte
@@ -0,0 +1,77 @@
+
+
+
+
+ {#if kind === 'hero'}
+
+ {:else}
+
+ {ICON}
+
+ {#if kind === 'poster'}Llama {/if}
+
+ {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/StoreScreenshot.svelte b/tools/ui/tests/stories/brand/communications/store/StoreScreenshot.svelte
new file mode 100644
index 000000000000..520a1fd25f27
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/StoreScreenshot.svelte
@@ -0,0 +1,638 @@
+
+
+
+{#snippet quickChat(sceneName: Scene)}
+
+ {ICON}
+
+ {SCENE_MODEL_ID}
+
+
+
+
+ Esc to dismiss
+{/snippet}
+
+{#snippet taskbar(zoom: number, bottom: number)}
+
+{/snippet}
+
+{#snippet macBar()}
+
+{/snippet}
+
+{#snippet macMenu(network: boolean)}
+
+{/snippet}
+
+
+
+
+
+
{headline}
+
+ {#if lede}
{lede}
{/if}
+
+ {#if kind === 'overlay'}
+
Alt +Space
+ {/if}
+
+
+ {#if kind === 'window' && mac}
+
+
+ {:else if kind === 'desktop' && mac}
+ {@render macBar()}
+
+ {@render macMenu(false)}
+ {:else if kind === 'phone'}
+
+ {@render macBar()}
+
+ {@render macMenu(true)}
+
+
+
+
10:24
+
+
+
+
100.101.42.7
+
+
+ {:else if kind === 'window'}
+
+
+ {@render quickChat(scene)}
+
+ {:else if kind === 'desktop'}
+
+
+
+ {@render taskbar(desk, deskEdge)}
+ {:else if kind === 'overlay'}
+
+
+
+
+
+
+ {#each [92, 100, 96, 74, 0, 100, 88, 97, 60] as w, i (i)} {/each}
+
+
+
+
+ {#if floatHeight}
+
+ {@render quickChat('quick')}
+
+ {/if}
+
+
+
+ {@render taskbar(bar, below)}
+ {:else if kind === 'card'}
+
+
+
+ {:else if kind === 'brand'}
+
{LOCKUP}Llama
+ {:else if children}
+
{@render children()}
+ {/if}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/WindowsTray.svelte b/tools/ui/tests/stories/brand/communications/store/WindowsTray.svelte
new file mode 100644
index 000000000000..822620693c88
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/WindowsTray.svelte
@@ -0,0 +1,584 @@
+
+
+
+{#snippet models()}
+
+
+ Models
+
+
+ {#each installed as m (m.name)}
+
+
+
+
+ {m.name}
+
+
+ {#each m.tags as tag (tag)}{tag} {/each}
+
+
+
+ {m.size}
+
+
+
+
+
+
+
+
+
+
+
+ {/each}
+
+
Browse more
+
+ {#each catalog as m (m.name)}
+
+
+ {@html m.logo}
+
+
+
+ {m.name}| {m.sizes}
+
+ {m.about}
+
+
+
+
+ {/each}
+
+{/snippet}
+
+{#snippet details()}
+
+
Models
+
+
+ {@html liquid}
+
+
+ LFM 2.5
+
+ Liquid AI’s reasoning mixture-of-experts model with 24B parameters and 2B active, built
+ for fast on-device agents.
+
+
+
+
Choose a model size
+
+
24B-A2B
+
+
Choose a version
+
+ {#each versions as v (v.quant)}
+
+
+
+ {v.label}
+
+ {v.quant} · {v.size}
+
+
+ {#if v.fit === 'yes'} {:else}?{/if}
+
+
+ {/each}
+
+{/snippet}
+
+{#snippet body()}
+ {#if view === 'details'}{@render details()}{:else}{@render models()}{/if}
+{/snippet}
+
+{#if card}
+ {@render body()}
+{:else}
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+
+
+
+ {@render body()}
+
+
+
+
+
Search models …
+
+
+
+ 0.14.1.0 - version: 0.8.0-dev (build 12019, commit 1052f7e1d)
+
+
+{/if}
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/assets/low-disk-space.png b/tools/ui/tests/stories/brand/communications/store/assets/low-disk-space.png
new file mode 100644
index 000000000000..9efb91e0d2ac
Binary files /dev/null and b/tools/ui/tests/stories/brand/communications/store/assets/low-disk-space.png differ
diff --git a/tools/ui/tests/stories/brand/communications/store/assets/qr-network.svg b/tools/ui/tests/stories/brand/communications/store/assets/qr-network.svg
new file mode 100644
index 000000000000..2c42cff1c7c1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/assets/qr-network.svg
@@ -0,0 +1 @@
+
diff --git a/tools/ui/tests/stories/brand/communications/store/logos/gemma.svg b/tools/ui/tests/stories/brand/communications/store/logos/gemma.svg
new file mode 100644
index 000000000000..c750e840316c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/logos/gemma.svg
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/logos/gpt.svg b/tools/ui/tests/stories/brand/communications/store/logos/gpt.svg
new file mode 100644
index 000000000000..187c7768d1d2
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/logos/gpt.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/logos/liquid.svg b/tools/ui/tests/stories/brand/communications/store/logos/liquid.svg
new file mode 100644
index 000000000000..6df35fc6d911
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/logos/liquid.svg
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/logos/meta.svg b/tools/ui/tests/stories/brand/communications/store/logos/meta.svg
new file mode 100644
index 000000000000..045f3adb6a7f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/logos/meta.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/logos/qwen.svg b/tools/ui/tests/stories/brand/communications/store/logos/qwen.svg
new file mode 100644
index 000000000000..efff7e958ca8
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/logos/qwen.svg
@@ -0,0 +1,3 @@
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/store/scenes.ts b/tools/ui/tests/stories/brand/communications/store/scenes.ts
new file mode 100644
index 000000000000..4368a84353c1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/store/scenes.ts
@@ -0,0 +1,162 @@
+// The app scenes the Microsoft Store screenshots show: the real Llama Chat, seeded with everyday content rather than
+// the test fixtures' developer questions: a note to write, a lease to read, a notification to understand, and a line
+// to make friendlier, asked from another app through Alt + Space. The scenes are stories of their own, framed in Llama
+// for Windows' quick chat by StoreScreenshot.
+import lowDiskSpace from './assets/low-disk-space.png?inline';
+import { AttachmentType, MessageRole, MessageType } from '$lib/enums';
+import { DatabaseService } from '$lib/services/database.service';
+import { conversationsStore } from '$lib/stores';
+
+/** the model the chat runs: a small one from llama.app's catalog, the kind an ordinary PC runs well */
+export const SCENE_MODEL_ID = 'ggml-org/gemma-4-E4B-it-GGUF:Q4_K_M';
+export const SCENE_MODEL = 'gemma-4-E4B-it-Q4_K_M.gguf';
+export const SCENE_MODEL_PATH = `C:\\Users\\sam\\Llama\\models\\${SCENE_MODEL}`;
+
+/** a scene's story id, for the screenshots' window */
+export const SCENES = {
+ chat: 'communications-applications-store-scenes--chat',
+ document: 'communications-applications-store-scenes--document',
+ quick: 'communications-applications-store-scenes--quick-chat',
+ screenshot: 'communications-applications-store-scenes--screenshot'
+} as const;
+
+export type Scene = keyof typeof SCENES;
+
+/** the scenes as Llama for Mac shows them: the same conversations in light mode, in a Safari web app */
+export const MAC_SCENES = {
+ chat: 'communications-applications-store-scenes--chat-on-mac',
+ document: 'communications-applications-store-scenes--document-on-mac',
+ phone: 'communications-applications-store-scenes--chat-on-a-phone'
+} as const;
+
+export type MacScene = keyof typeof MAC_SCENES;
+
+const minutesAgo = (minutes: number) => Date.now() - minutes * 60_000;
+
+/** a question and its answer, as the app stores a conversation */
+function exchange(
+ id: string,
+ name: string,
+ question: Partial,
+ answer: string,
+ predicted: number
+): ExportedConversation {
+ // message ids are the database's keys across every conversation, so each scene's carry its conversation's id
+ const key = (messageId: string) => `${id}-${messageId}`;
+ const turn = (
+ messageId: string,
+ parent: string | null,
+ children: string[],
+ fields: Partial
+ ): DatabaseMessage => ({
+ children: children.map(key),
+ content: '',
+ convId: id,
+ id: key(messageId),
+ parent: parent && key(parent),
+ role: MessageRole.USER,
+ timestamp: minutesAgo(2),
+ toolCalls: '',
+ type: MessageType.TEXT,
+ ...fields
+ });
+
+ return {
+ conv: { currNode: key('a1'), id, lastModified: minutesAgo(1), name },
+ messages: [
+ turn('root', null, ['u1'], { role: MessageRole.SYSTEM, type: MessageType.ROOT }),
+ turn('u1', 'root', ['a1'], question),
+ turn('a1', 'u1', [], {
+ content: answer,
+ model: SCENE_MODEL_ID,
+ role: MessageRole.ASSISTANT,
+ timestamp: minutesAgo(1),
+ timings: {
+ predicted_ms: predicted * 70,
+ predicted_n: predicted,
+ prompt_ms: 140,
+ prompt_n: 46
+ }
+ })
+ ]
+ };
+}
+
+// the lease the document scene attaches, as the chat extracts a PDF's text; the answer flags what is in it
+const lease = `RESIDENTIAL LEASE AGREEMENT
+
+Term. This lease begins on 1 December 2026 and runs for twelve (12) months.
+
+Rent. The tenant pays EUR 1,150 per month, due on the 1st. The deposit is two months' rent.
+
+Renewal. This lease renews automatically for another twelve months unless either party gives written notice at least ninety (90) days before the end of the term.
+
+Repairs. The tenant pays for any single repair under EUR 200.
+
+Entry. The landlord may enter with 24 hours' notice.`;
+
+/** the conversations, one per scene that has one */
+export const sceneConversations: Record = {
+ chat: exchange(
+ 'store-scene-chat',
+ 'A note to the landlord',
+ { content: 'My heater is broken. Can you help me write a polite note to my landlord?' },
+ 'Of course:\n\n*Hi Anna, the heater in my flat has not worked since Monday. Could you arrange a repair this week? Thank you, Sam*',
+ 41
+ ),
+ document: exchange(
+ 'store-scene-document',
+ 'Lease agreement',
+ {
+ content: 'Summarize this and flag anything unusual.',
+ extra: [
+ {
+ base64Data: '',
+ content: lease,
+ name: 'lease-agreement.pdf',
+ processedAsImages: false,
+ size: 184_320,
+ type: AttachmentType.PDF
+ }
+ ]
+ },
+ "A standard 12-month lease, with two things to watch: it **renews automatically** unless you give **90 days' notice**, and **you pay for repairs under EUR 200**.",
+ 38
+ ),
+ quick: exchange(
+ 'store-scene-quick',
+ 'A friendlier line',
+ { content: 'Make this sound friendlier: "Send me the report by Friday."' },
+ '"Could you send me the report by Friday? Thanks so much!"',
+ 14
+ ),
+ screenshot: exchange(
+ 'store-scene-screenshot',
+ 'Low disk space',
+ {
+ content: 'What does this mean, and how do I fix it?',
+ extra: [
+ {
+ base64Url: lowDiskSpace,
+ name: 'notification.png',
+ type: AttachmentType.IMAGE
+ }
+ ]
+ },
+ 'Drive C:, where Windows and your apps live, is nearly full, so updates can fail and apps slow down. Open **Settings → System → Storage**: turn on **Storage Sense**, and check **Cleanup recommendations** for files you can remove.',
+ 64
+ )
+};
+
+/** the id of a scene's conversation */
+export const sceneConversationId = (scene: Scene) => sceneConversations[scene].conv.id;
+
+/** writes a scene's conversation to IndexedDB and opens it, as the chat route does */
+export async function openSceneConversation(scene: Scene): Promise {
+ const conversation = sceneConversations[scene];
+
+ await DatabaseService.deleteConversation(conversation.conv.id).catch(() => {});
+ await DatabaseService.importConversations([structuredClone(conversation)]);
+ await conversationsStore.loadConversations();
+ await conversationsStore.loadConversation(conversation.conv.id);
+}
diff --git a/tools/ui/tests/stories/brand/communications/swag/Swag.svelte b/tools/ui/tests/stories/brand/communications/swag/Swag.svelte
new file mode 100644
index 000000000000..894d17eb565d
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/swag/Swag.svelte
@@ -0,0 +1,310 @@
+
+
+
+
+
+ Swag
+
+
+ Prints for t-shirts and hoodies, as the Swag Creator previews them on 3D garments. Every print
+ comes from llama.brand except the quantized L, which is drawn in code, so it stays exact at
+ any size.
+
+
+
+
+
+
L · Quantized
+
+
+ The Llama icon as a model is quantized: the true outline at the top, and half the precision
+ at each step down, on llama.cpp's everyday ladder. It is printed only at the centre, the one
+ size its detail reads at.
+
+
+
+ {#each QUANTIZATION_LAYERS as layer (layer.label)}
+
+ {layer.label}
+
+ {precision(layer.splits)}, {layer.rows} rows
+
+ {/each}
+
+
+
+
+ {#each ['light', 'dark'] as const as tone (tone)}
+
+
+ {@html quantized(tone, `feature-${tone}`)}
+
+
+
+ {tone === 'light' ? 'Dark ink, for light fabric' : 'Light ink, for dark fabric'}
+
+
+ {/each}
+
+
+
+
+ Print sheet
+
+
+ Each print on the three fabrics, at its placement. The ink follows the fabric: dark on white
+ and melange, light on black.
+
+
+
+ {#each SHEET as item (item.artwork.id)}
+
+
+ {item.artwork.label}
+
+
+ {item.placement.label} · {size(item.placement.width, item.artwork.printScale?.width)} ×
+ {size(item.placement.height, item.artwork.printScale?.height)} cm
+
+
+
+ {#each FABRICS as fabric (fabric.id)}
+
+
+
+ {fabric.label}
+
+ {/each}
+
+ {/each}
+
+
+
+
+ Placements
+
+
+
+
+
+ {#each PLACEMENTS as p (p.id)}
+
+
{p.label}
+
+
+ {p.width} × {p.height} cm, {p.top} cm below the neckline{p.x
+ ? `, ${p.x} cm to the wearer's left`
+ : ', centred'}
+
+
+ {/each}
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/swag/Tee.svelte b/tools/ui/tests/stories/brand/communications/swag/Tee.svelte
new file mode 100644
index 000000000000..fb116155f5f3
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/swag/Tee.svelte
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+
+
+ {#if guides}
+ {#each PLACEMENTS as p (p.id)}
+ {@const a = area(p)}
+
+ {/each}
+ {:else if box && artwork}
+ {#if artwork.src}
+
+ {:else}
+
+ {@html quantized(fabric.tone, `q${uid}`)}
+
+ {/if}
+ {/if}
+
+
+
diff --git a/tools/ui/tests/stories/brand/communications/swag/prints.ts b/tools/ui/tests/stories/brand/communications/swag/prints.ts
new file mode 100644
index 000000000000..d242d837177c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/swag/prints.ts
@@ -0,0 +1,70 @@
+// The swag prints, fabrics and placements, as the Swag Creator (ggml-org/swag-creator, src/lib/prints.ts and
+// garments.ts) defines them: every print but the quantized L comes from llama.brand, and placements are measured as a
+// print shop does, in centimetres from the centre front of the neckline.
+import iconDark from '../../assets/files/logo/svg/icon/icon-dark.svg?url';
+import iconLight from '../../assets/files/logo/svg/icon/icon-light.svg?url';
+import llamaDark from '../../assets/files/logo/svg/lockup/llama/logo-llama-dark.svg?url';
+import llamaLight from '../../assets/files/logo/svg/lockup/llama/logo-llama-light.svg?url';
+import llamaCppDark from '../../assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-dark.svg?url';
+import llamaCppLight from '../../assets/files/logo/svg/lockup/llama-cpp/logo-llama-cpp-light.svg?url';
+import type { Tone } from './quantized';
+
+export interface Artwork {
+ id: string;
+ label: string;
+ /** the placements it may be printed at; any when omitted */
+ placements?: string[];
+ /** scales the placement's print area for this artwork */
+ printScale?: { height: number; width: number };
+ /** a llama.brand file per tone; the quantized L is drawn in code instead */
+ src?: Record;
+}
+
+export const ARTWORKS: Artwork[] = [
+ { id: 'icon', label: 'Llama icon', src: { dark: iconDark, light: iconLight } },
+ { id: 'llama-logo', label: 'Llama logo', src: { dark: llamaDark, light: llamaLight } },
+ {
+ id: 'llama-cpp-logo',
+ label: 'llama.cpp logo',
+ src: { dark: llamaCppDark, light: llamaCppLight }
+ },
+ // its detail only reads at the large centre size; the legend makes it 1.5 times wider than tall
+ {
+ id: 'quantized',
+ label: 'L · Quantized',
+ placements: ['center'],
+ printScale: { height: 0.8, width: 1.2 }
+ }
+];
+
+export interface Fabric {
+ id: string;
+ label: string;
+ /** how the fabric reads, for a flat swatch */
+ swatch: string;
+ /** which print variant reads on it: `light` has dark ink */
+ tone: Tone;
+}
+
+export const FABRICS: Fabric[] = [
+ { id: 'white', label: 'White', swatch: '#f5f5f3', tone: 'light' },
+ { id: 'melange', label: 'Melange', swatch: '#bdbdbb', tone: 'light' },
+ { id: 'black', label: 'Black', swatch: '#1c1c1c', tone: 'dark' }
+];
+
+export interface Placement {
+ height: number;
+ id: string;
+ label: string;
+ /** distance from the neckline down to the print's top edge */
+ top: number;
+ width: number;
+ /** the print centre's offset; positive is the wearer's left, the viewer's right */
+ x: number;
+}
+
+export const PLACEMENTS: Placement[] = [
+ { height: 5, id: 'collar', label: 'Below collar', top: 5, width: 8, x: 0 },
+ { height: 2.5, id: 'left-chest', label: 'Left chest', top: 10, width: 5, x: 11.5 },
+ { height: 17, id: 'center', label: 'Center', top: 12, width: 17, x: 0 }
+];
diff --git a/tools/ui/tests/stories/brand/communications/swag/quantized.ts b/tools/ui/tests/stories/brand/communications/swag/quantized.ts
new file mode 100644
index 000000000000..098d5cbe110f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/communications/swag/quantized.ts
@@ -0,0 +1,134 @@
+// The quantized L, the one swag print drawn in code rather than taken from llama.brand. Ported from the Swag Creator
+// (huggingface.co/spaces/ggml-org/swag-creator, src/lib/artworks/generative.ts): the same 40 px grid, the same layer
+// ladder and the same legend, with two changes for the design system: the legend's accent is cinder (art-cinder,
+// #EE6C1E; the app uses #F65E00) and it is set in Llama Mono. The geometry stays as the app draws it.
+
+export type Tone = 'dark' | 'light';
+
+const SIZE = 600;
+const PIXEL = 40;
+const LEGEND_WIDTH = 900;
+const ACCENT = '#EE6C1E';
+/** The icon's two pieces, verbatim from llama.brand icon/icon-*.svg */
+const STROKE_PATH =
+ 'M240 392H0L199.602 46.0254C216.032 17.5463 246.411 3.25756e-05 279.29 0H466.154L240 392Z';
+const FOOT_PATH =
+ 'M600 392L504.249 558L504.137 557.929C487.252 584.069 458.193 600 426.864 600H120L240 392H600Z';
+
+type Point = [number, number];
+
+/** polygon approximations of the pieces, for deciding which cells fall inside */
+const STROKE: Point[] = [
+ [240, 392],
+ [0, 392],
+ [199.6, 46],
+ [216, 17.5],
+ [246.4, 0],
+ [279.3, 0],
+ [466.2, 0]
+];
+const FOOT: Point[] = [
+ [600, 392],
+ [504.2, 558],
+ [487.3, 584.1],
+ [458.2, 600],
+ [426.9, 600],
+ [120, 600],
+ [240, 392]
+];
+
+export interface QuantizationLayer {
+ label: string;
+ /** how many rows of base pixels the layer covers, top to bottom */
+ rows: number;
+ /** squares per base pixel side, or `smooth` for the true vector outline */
+ splits: 'smooth' | number;
+}
+
+/** llama.cpp's everyday ladder, F16 → Q8 → Q4 → Q2: the true logo at the top, half the precision each step down */
+export const QUANTIZATION_LAYERS: QuantizationLayer[] = [
+ { label: '16-bit', rows: 4, splits: 'smooth' },
+ { label: '8-bit', rows: 4, splits: 4 },
+ { label: '4-bit', rows: 4, splits: 2 },
+ { label: '2-bit', rows: 3, splits: 1 }
+];
+
+/** the artwork's size in its own units: the L and the legend beside it, 1.5 times wider than tall */
+export const QUANTIZED_SIZE = { height: SIZE, width: LEGEND_WIDTH };
+
+const ink = (tone: Tone) => (tone === 'light' ? '#111111' : '#FAFAFA');
+
+function insidePolygon([x, y]: Point, polygon: Point[]) {
+ let inside = false;
+
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
+ const [xi, yi] = polygon[i];
+ const [xj, yj] = polygon[j];
+
+ if (yi > y !== yj > y && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi) inside = !inside;
+ }
+
+ return inside;
+}
+
+const insideL = (point: Point) => insidePolygon(point, STROKE) || insidePolygon(point, FOOT);
+
+/**
+ * The quantized L's markup, for an with viewBox 0 0 900 600: `light` has dark ink for light fabric, `dark` light
+ * ink for dark fabric. `id` keeps its clip paths apart when several sit on one page.
+ */
+export function quantized(tone: Tone, id: string, layers = QUANTIZATION_LAYERS) {
+ // a grey close to the ink fills the gaps, which keeps the squares apart without a flickering grid
+ const gapColor = tone === 'light' ? '#4d4d4d' : '#c4c4c4';
+ const guide = tone === 'light' ? '#999999' : '#808080';
+ const sections = layers.map((layer, index) => {
+ const from = layers.slice(0, index).reduce((sum, { rows }) => sum + rows, 0) * PIXEL;
+
+ return { ...layer, from, to: Math.min(SIZE, from + layer.rows * PIXEL) };
+ });
+ const dash = `stroke="${guide}" stroke-width="4" stroke-dasharray="14 10"`;
+ const lines = sections
+ .slice(1)
+ .map(({ from }) => ` `);
+ const labels = sections.map(
+ ({ from, label, to }) =>
+ `${label} `
+ );
+ const layersMarkup = sections
+ .map(({ from, splits, to }, index) => {
+ if (splits === 'smooth') {
+ const clip = `${id}-layer-${index}`;
+
+ return ` `;
+ }
+
+ const cell = PIXEL / splits;
+ // finer squares get proportionally thinner gaps, so they don't fade into grey
+ const gap = cell >= 10 ? Math.max(1.5, cell / 12) : cell * 0.18;
+ const squares: string[] = [];
+
+ for (let y = from; y < to; y += PIXEL) {
+ for (let x = 0; x < SIZE; x += PIXEL) {
+ if (!insideL([x + PIXEL / 2, y + PIXEL / 2])) continue;
+
+ for (let i = 0; i < splits; i++) {
+ for (let j = 0; j < splits; j++) {
+ const sx = x + i * cell;
+ const sy = y + j * cell;
+
+ squares.push(
+ ` `,
+ ` `
+ );
+ }
+ }
+ }
+ }
+
+ return squares.join('');
+ })
+ .join('');
+
+ // lines first, so the pixels sit on top of them
+ return `${lines.join('')}${layersMarkup} ${labels.join('')}`;
+}
diff --git a/tools/ui/tests/stories/brand/fonts/LlamaMono.woff2 b/tools/ui/tests/stories/brand/fonts/LlamaMono.woff2
new file mode 100644
index 000000000000..f43b2588dc35
Binary files /dev/null and b/tools/ui/tests/stories/brand/fonts/LlamaMono.woff2 differ
diff --git a/tools/ui/tests/stories/brand/fonts/OFL.txt b/tools/ui/tests/stories/brand/fonts/OFL.txt
new file mode 100644
index 000000000000..04e95fc55085
--- /dev/null
+++ b/tools/ui/tests/stories/brand/fonts/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2024 The Geist Project Authors (https://github.com/vercel/geist-font)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+https://openfontlicense.org
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
\ No newline at end of file
diff --git a/tools/ui/tests/stories/brand/fonts/fonts.css b/tools/ui/tests/stories/brand/fonts/fonts.css
new file mode 100644
index 000000000000..8d9409b2fd94
--- /dev/null
+++ b/tools/ui/tests/stories/brand/fonts/fonts.css
@@ -0,0 +1,8 @@
+/* Llama Mono for the brand showcases (logo and type); Llama Sans is the design system's own (src/app.css) */
+@font-face {
+ font-family: 'Llama Mono';
+ src: url('./LlamaMono.woff2') format('woff2');
+ font-weight: 400 700;
+ font-style: normal;
+ font-display: block;
+}
diff --git a/tools/ui/tests/stories/brand/llama-mono/Diff.svelte b/tools/ui/tests/stories/brand/llama-mono/Diff.svelte
new file mode 100644
index 000000000000..589abdc75a9f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/Diff.svelte
@@ -0,0 +1,291 @@
+
+
+
+{#snippet code(l: Line)}
+
+ {#each l.segs as [hi, t], i (i)}{t} {/each}
+{/snippet}
+
+{#each ['light', 'dark'] as const as tone (tone)}
+
+
+ common/common.h +3 −2
+
+
+
+
{hunk}
+
+ {#each lines as l, i (i)}
+
+ {l.old ?? ''}
+
+ {l.new ?? ''}
+
+ {sign(l.kind)}
+
+ {@render code(l)}
+
+ {/each}
+
+
+{/each}
+
+
+ common/common.h · split old · new
+
+
+ {#each rows as [a, b], i (i)}
+
+ {a?.old ?? ''}
+
+ {#if a}{@render code(a)}{/if}
+
+
+
+ {b?.new ?? ''}
+
+ {#if b}{@render code(b)}{/if}
+
+ {/each}
+
+
+
+
+
+ Over the line it replaces. With every character in the same cell, 2048 sits right over the
+ 512 it changes, and the eye finds the edit by its place in the line.
+
+
+
+ Marks in their own cell. The + and −, and both line numbers, take cells of their own before
+ the code, so its indentation stays exactly as written.
+
+
+
+ Words, not only lines. The changed words get a stronger tint than their line, in the same greens
+ and reds on both grounds; colour never carries the change alone, the sign does.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/KeyVisuals.svelte b/tools/ui/tests/stories/brand/llama-mono/KeyVisuals.svelte
new file mode 100644
index 000000000000..021cf6010af4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/KeyVisuals.svelte
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+ {#each terminal as l, i (i)}
+
+ {#if l.kind === 'prompt'}$ {/if}{l.text}
+
+ {/each}
+
+
$
+
+
+
+
+
+
+ 0O
+
+ 1lI|
+
+ Every one of them keeps its own shape, and every one the same cell.
+
+
+
+
+
+ eval
+
+ 86.4
+
+ tokens / s
+
+
+ {#each bars as b, i (i)} {/each}
+
+
+
+ prompt
+
+ 1 024 t · 0.31 s
+
+ eval
+
+ 512 t · 5.93 s
+
+
+
+
+ model.gguf
+
+
+ {#each hex as [a, b, ascii], i (i)}
+
+ {(i * 8).toString(16).padStart(4, '0')}
+
+ {a}
+
+ {b}
+
+ {ascii}
+
+ {/each}
+
+
+ One file, the whole model llama.cpp
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/LlamaCppLogo.svelte b/tools/ui/tests/stories/brand/llama-mono/LlamaCppLogo.svelte
new file mode 100644
index 000000000000..5fe279e719e0
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/LlamaCppLogo.svelte
@@ -0,0 +1,280 @@
+
+
+
+
+
+ {#each ['dark', 'light'] as const as tone (tone)}
+
+ {LOCKUP}llama.cpp
+
+ {/each}
+
+
+
+ Typed
+
+
+
+ {LOCKUP} llama .cpp
+
+
+
+ {#each parts as p (p.label)}
+ {p.label}{p.note}
+ {/each}
+
+
+
+
+
+ The files
+
+
+ {#each files as f (f.name)}
+
+
+
+ {f.name}.svg
+
+ {/each}
+
+
+
+
+ Sizes
+
+
+ {#each sizes as size (size)}
+
+ {size} px
+
+ {LOCKUP}llama.cpp
+
+ {/each}
+
+
+
+
+ Never
+
+
+
+ {LOCKUP}LLAMA.CPP
+
+ In capitals: it's a command, typed as one
+
+
+
+ {LOCKUP}llama.cpp
+
+ In Llama Sans: that's the app's lockup, Llama
+
+
+
+ {LOCKUP}llama.cpp
+
+ On colour: llama.cpp stays on neutral grounds
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/Logs.svelte b/tools/ui/tests/stories/brand/llama-mono/Logs.svelte
new file mode 100644
index 000000000000..9cad3592fc2f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/Logs.svelte
@@ -0,0 +1,129 @@
+
+
+
+
+ llama-server · request log
+
+
+ {#each log as [time, level, source, message], i (i)}{time} {level} {source.padEnd(6)} {message}
+{/each}
+
+
+
+ llama-bench · Markdown output
+
+ {bench}
+
+
+
+
+ Columns without a table. A log has no grid, only spaces; it's the fixed cell that turns them
+ into columns, so the times, the levels and the slots line up down the page.
+
+
+
+ Figures that compare. Every digit is the same width, so 38.47 sits over 41.93 and a reader
+ compares numbers by their position, without reading them.
+
+
+
+ Levels in their own cell. I, W and E take one cell before the source, so a warning stands out
+ by its colour without pushing its message out of line.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/MonoInterface.svelte b/tools/ui/tests/stories/brand/llama-mono/MonoInterface.svelte
new file mode 100644
index 000000000000..293fa789032a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/MonoInterface.svelte
@@ -0,0 +1,216 @@
+
+
+
+
+
+
+
+ Llama Mono · beside Llama Sans
+
+
+ User Interface
+
+
+ The design system's own components, at their real sizes. Llama Mono takes what a person
+ types, copies or compares: code and commands, model files and quants, endpoints, live
+ numbers and shortcuts. Llama Sans keeps the prose and the labels, so the two read as one
+ family.
+
+
+
+
+
+
+
+
+ Run it with every layer on the GPU: --n-gpu-layers 99
+ offloads all that fits, and --ctx-size sets how many tokens it
+ keeps in view.
+
+
+
+
+ bash
+
+
+ {#if copied} Copied{:else} Copy{/if}
+
+
+
+
{command}
+
+
+
+ 512 tokens · 13.3 s · 38.4 t/s
+
+
+
+
+
+
+
+ Gemma 3 12B Instruct
+
+ ggml-org/gemma-3-12b-it-GGUF
+
+
+
+
+ Q4_K_M
+
+ 7.3 GB
+
+ ctx 131072
+
+ Loaded
+
+
+
+ {#each [['Prompt', '312.4', 't/s'], ['Generation', '38.4', 't/s'], ['Memory', '7.9', 'GB']] as [label, value, unit] (label)}
+
+
{label}
+
+
+ {value}{unit}
+
+
+ {/each}
+
+
+
+
+
+
+ gemma-3-12b-it-Q4_K_M.gguf
+
+
+
+
+
+
+ Connection
+
+ Any OpenAI-compatible endpoint
+
+
+
+
+ Base URL
+
+
+
+
+
+
+
+ {#each shortcuts as s (s.label)}
+
+ {s.label}
+
+
+ {#each s.keys as k (k)}{k} {/each}
+
+
+ {/each}
+
+
+
+
+
+
+
+ Response
+
+ POST /v1/chat/completions · 200 · 13.4 s
+
+
+
+ {response}
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/MonoOverview.svelte b/tools/ui/tests/stories/brand/llama-mono/MonoOverview.svelte
new file mode 100644
index 000000000000..7ce7e92a5d57
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/MonoOverview.svelte
@@ -0,0 +1,185 @@
+
+
+
+
+
+ Llama Mono is Llama Sans set in a fixed cell: built from Geist Mono with the same weights, the
+ tailless a, the narrow t, the angle-cut terminals, the rounder curves and the deeper stem joins.
+ Every glyph keeps a 600-unit cell, so columns line up in a terminal, a diff or a table of
+ numbers.
+
+
+
+ Where a Llama Sans change would make a letter wider or narrower, the drawing moves back to the
+ centre of its cell instead. The l keeps its serifs and G and S keep their width, so the letters
+ code needs to tell apart stay apart. The Llama icon sits in the font at U+E000, sized to the
+ cell.
+
+
+
+
+
+
+
+ {#each distinctions as d (d)}{d} {/each}
+
+
+
+
+
+ {#each ligatures as l (l)}{l} {/each}
+
+
+
+ Each ligature keeps one cell per character, so the columns after it stay in line.
+
+
+
+
+
+ {#each weights as w (w.weight)}
+
+ {w.name} {w.weight}
+
+ llama-server --port 9931
+
+ {/each}
+
+
+
+
+
+ {#each charset as row (row)}
{row}
{/each}
+
+
+
+
+
+
+
+ Llama Mono is released under the SIL Open Font License 1.1. It is derived from Geist Mono, ©
+ 2024 The Geist Project Authors. The Llama icon at U+E000 is the ggml-org mark, licensed
+ separately under CC BY-NC 4.0.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/MonoPage.svelte b/tools/ui/tests/stories/brand/llama-mono/MonoPage.svelte
new file mode 100644
index 000000000000..9f659a00155f
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/MonoPage.svelte
@@ -0,0 +1,63 @@
+
+
+
+
+
+ {kicker}
+
+ {title}
+
+ {intro}
+
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-mono/Terminal.svelte b/tools/ui/tests/stories/brand/llama-mono/Terminal.svelte
new file mode 100644
index 000000000000..b3b9fc5ed698
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-mono/Terminal.svelte
@@ -0,0 +1,194 @@
+
+
+
+
+
+
+ llama-server · zsh · 100×24
+
+
+
+ {#each server as line, i (i)}{#each line as [c, t], j (j)}{t} {/each}
+{/each}
+
+
+
+ llama-cli · zsh · 100×24
+
+
+ {#each cli as line, i (i)}{#each line as [c, t], j (j)}{t} {/each}{#if i === cli.length - 1} {/if}
+{/each}
+
+
+
+
+
+ One cell each. The icon in the prompt, the box-drawing in a TUI and every digit take the same
+ 600 units, so a log column, a progress bar or a table of numbers stays in line however it is filled.
+
+
+
+ Weight for structure. The command is SemiBold, its output Regular, and what's only context
+ (the build, the system info) steps back in grey, so the eye finds the command first.
+
+
+
+ Colour for meaning. Yellow is a warning and green is good news; cinder is the one accent, and
+ here it's only the cursor.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/SpecimenFrame.svelte b/tools/ui/tests/stories/brand/llama-sans/SpecimenFrame.svelte
new file mode 100644
index 000000000000..4560eab6dba4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/SpecimenFrame.svelte
@@ -0,0 +1,52 @@
+
+
+
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/CompareSwitch.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/CompareSwitch.svelte
new file mode 100644
index 000000000000..56d54afc8b42
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/CompareSwitch.svelte
@@ -0,0 +1,62 @@
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/Controls.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/Controls.svelte
new file mode 100644
index 000000000000..660a662680e4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/Controls.svelte
@@ -0,0 +1,249 @@
+
+
+
+
Weight
+
+
+ {#each styles as s (s.weight)}
+
+ (weight = s.weight)}
+ type="radio"
+ />
+
+ {s.name} {s.weight}
+
+ {/each}
+
+
+
+
Version
+
+
+ {#each variants as v (v)}
+
+
+
+ {v}
+
+ {/each}
+
+
+
press V
+
+
(more = !more)}
+ type="button"
+ >
+ {more ? 'Less' : 'More'}
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/DisplayGallery.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/DisplayGallery.svelte
new file mode 100644
index 000000000000..e11f40471701
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/DisplayGallery.svelte
@@ -0,0 +1,490 @@
+
+
+
+
+
+
+
+
+
+
ABCDEFGHIJKLMN OPQRSTUVWXYZ
+
+
abcdefghijklmn opqrstuvwxyz()&?!
+
+
0123456789.,:;“”/–
+
+
+
+ {#each ladder as px (px)}
+ {px} Aa
+ {/each}
+
+
+ Abcdefg
+
+
+
+
+ One axis · 400 to 700
+
+
+ {#each weights as w (w)}{w} Llama Sans {/each}
+
+
+
+
+
+ 128K
+
+ 128K
+
+ 128K
+
+ Tokens of context
+
+
+
+
+ +
+
+ Q4 4-bit
+
+
+ Once upon a token
+
+
+ 70B at home
+
+
+
+
+
+ Sample tour · 2026 Display 400 & 700
+
+
+
+ {#each dates as [date, city, venue] (date)}
+ {date} {city} {venue}
+ {/each}
+
+
+
+
+
+ LOCAL
+
+ No. 04 · November 2026
+
+ Small models, big ideas.
+
+
+ Quantization, explained
+
+ Running 70B at home
+
+ The GGUF story
+
+
+
+
+
+ {#each stickers as [label, tone], i (i)} 2}
+ class="sticker s-{tone}">{label} {/each}
+
+
+
+
+
+ {#each [[230, 'baseline'], [230 - 0.53 * 220, 'x-height 530'], [230 - 0.71 * 220, 'cap 710']] as [y, label] (label)}
+
+
+ {label}
+ {/each}
+
+ ag
+
+
+
+
+
+ Run it yourself.
+
+ llama.cpp Inference on your own hardware
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/GlyphGrid.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/GlyphGrid.svelte
new file mode 100644
index 000000000000..8ad63e141503
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/GlyphGrid.svelte
@@ -0,0 +1,120 @@
+
+
+
+ {#each sets as set (set.title)}
+
+ {set.title}
+
+
+ {#each set.cells as c (c.ch)}
+
+
+ {#each lines as y, i (i)}
+
+ {/each}
+
+
+
+
+
+
+
+
+ {c.ch} {c.adv}
+
+ {/each}
+
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/Masthead.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/Masthead.svelte
new file mode 100644
index 000000000000..722a6a8650c1
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/Masthead.svelte
@@ -0,0 +1,57 @@
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/Metrics.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/Metrics.svelte
new file mode 100644
index 000000000000..02f4a15f5272
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/Metrics.svelte
@@ -0,0 +1,99 @@
+
+
+
+
+
+
UPM
+
+ {metrics.upm}
+
+
+
+
Cap height
+
+ {metrics.cap}
+
+
+
+
x-height
+
+ {metrics.x}
+
+
+
+
Ascender
+
+ {metrics.asc}
+
+
+
+
Descender
+
+ {metrics.dsc}
+
+
+
+
Weight axis
+
+ {axis.min}–{axis.max}
+
+
+
+
Optical size axis
+
+ 16–40
+
+
+
+
Stems {styles.map((s) => s.weight).join(' · ')}
+
+ {styles.map((s) => s.stem).join(' · ')}
+
+
+
+
Display
+
+ opsz 40 · tracking −22 · kerning 115% · set at line-height 1.15
+
+
+
+
UI
+
+ opsz 16 · tracking +3 · kerning after SF Pro · line 1.25, cap-centred
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/Note.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/Note.svelte
new file mode 100644
index 000000000000..281186cb8cd2
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/Note.svelte
@@ -0,0 +1,33 @@
+
+
+
+
+
{term}
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/Notes.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/Notes.svelte
new file mode 100644
index 000000000000..48c7e71dbd9c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/Notes.svelte
@@ -0,0 +1,22 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/ProseGallery.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/ProseGallery.svelte
new file mode 100644
index 000000000000..39b1ed053f69
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/ProseGallery.svelte
@@ -0,0 +1,403 @@
+
+
+
+
+
+
+
+ Llamas have carried loads across the Andes for thousands of years. Social and steady-footed,
+ they walk in strings of a dozen or more, each carrying about a quarter of its own weight over ground
+ no cart could cross.
+
+
+ Llama
+
+
+
+
+ Q4
+
+
+ 4-bit
+
+ Q4_K_M4.5 bits per weight
+
+
+
+
+
+
+
+
+ {#each steps as s, i (s)}
+ {String(i + 1).padStart(2, '0')} {s}
+ {/each}
+
+
+
+
+
+
+ llama.cpp docs
+
+
+ Getting started
+
+ Run a model
+
+ Build from source
+
+ Quantize
+
+ Server & API
+
+
+
+
+
Run a model
+
+
+ Download a model in GGUF format, then point llama-cli at it. The first run maps the
+ weights into memory, so later runs start in under a second.
+
+
+
llama-cli -m models/qwen2.5-7b-q4_k_m.gguf -p "Hello"
+
+
+ Tip. Add -ngl 99 to offload every layer to the GPU when it fits in memory.
+
+
+
Next
+
+
+ Serve the model over an OpenAI-compatible API with llama-server.
+
+ Shrink it further with llama-quantize, from Q8_0 down to Q2_K.
+
+
+
+
+
+
+ Reading sizes
+
+ {#each sizes as px (px)}
+
+ {px} Steady letters keep long reading easy on the eye.
+
+ {/each}
+
+
+
+
+ Sample figures · Q4_K_M · tokens per second
+
+
+ Model Params (B) Size (GB) Tok/s
+
+
+ {#each models as [m, p, s, r] (m)}{m} {p} {s} {r} {/each}
+
+
+
+
+
+
+ The llama.cpp letter · No. 12
+
+ This month in local inference
+
+ Hi everyone,
+
+
+ Three things landed since the last letter: faster prompt processing on Apple silicon, a new
+ server dashboard, and sampling presets you can share as a single file. Thank you to the 41
+ people who sent patches.
+
+
+ — The maintainers
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseDisplay.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseDisplay.svelte
new file mode 100644
index 000000000000..55878a123b77
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseDisplay.svelte
@@ -0,0 +1,187 @@
+
+
+
+
+
+ Llama Sans Display
+
+ Quiet letters for loud ideas.
+
+
+ Tight tracking, firm kerning and 1.15 em lines, made for headlines that hold together.
+
+
+
+
+ Editorial headings
+
+ The shape of a sentence
+
+ Why round bowls read calmer
+
+ Terminals, apertures and the space between
+
+
+ Three heading sizes, one set of outlines. Each line sits on a 1.15 em line-height, so stacked
+ headings close up without extra CSS.
+
+
+
+
+
+
+
+ “Type is a voice with the volume turned down. Display turns it back up.”
+
+
+
+
+ AVATAR
+
+ Wave Typo
+
+ Kerning at 115% · pairs like AV, Wa and Ty close up
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseProse.svelte b/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseProse.svelte
new file mode 100644
index 000000000000..86cd130eba0a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/components/ShowcaseProse.svelte
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+ Notes on type · 4 min read
+
+ One face for the interface and the page
+
+
+ The labels on a button and the paragraphs of an article can share a font. Spacing does most
+ of the work; line height does the rest.
+
+
+
+
+
+ At reading sizes the eye moves along a line in small jumps, taking in a few letters at a
+ time. If those letters sit too close, words start to blur into each other; too far apart,
+ and they stop reading as words at all. UI is spaced like the system fonts at their text
+ sizes, and its kerning follows them too, so pairs like “To” and “AV” stay tidy without
+ pinching.
+
+
+
+ Line spacing comes from the page, not the font. Set paragraphs to line-height: 1.5 and long passages keep an even grey texture instead of dark bands, while buttons and chips keep
+ the font’s own tight, centred line.
+
+
+
+ Good text type disappears. You notice the words, not the letters.
+
+
+
A few things the same font covers:
+
+
+ Articles, documentation and long-form writing on screens.
+
+ Small sizes, from captions at 13 px to body copy at 16–20 px.
+
+ Mixed figures and letters, like 4 November 2026 or 974 glyphs.
+
+
+
+ Aa
+
+ Figure 1. Display’s outlines, spaced for reading and interfaces.
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/data/specimen.json b/tools/ui/tests/stories/brand/llama-sans/lib/data/specimen.json
new file mode 100644
index 000000000000..3e2246c28864
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/data/specimen.json
@@ -0,0 +1,1951 @@
+{
+ "glyphCount": 977,
+ "metrics": { "upm": 1000, "cap": 710, "x": 530, "asc": 710, "dsc": -155 },
+ "axis": { "min": 400, "max": 700 },
+ "styles": [
+ { "weight": 400, "name": "Regular", "stem": 86 },
+ { "weight": 500, "name": "Medium", "stem": 104 },
+ { "weight": 600, "name": "SemiBold", "stem": 118 },
+ { "weight": 700, "name": "Bold", "stem": 131 }
+ ],
+ "waterfall": [
+ { "weight": 400, "name": "Regular" },
+ { "weight": 500, "name": "Medium" },
+ { "weight": 600, "name": "SemiBold" },
+ { "weight": 700, "name": "Bold" }
+ ],
+ "variants": ["Display", "UI"],
+ "compare": null,
+ "grid": {
+ "variant": "UI",
+ "width": 1382,
+ "height": 965,
+ "guides": { "base": 770, "x": 240, "cap": 60, "asc": 60, "dsc": 925 },
+ "groups": [
+ {
+ "title": "Uppercase",
+ "chars": [
+ "A",
+ "B",
+ "C",
+ "D",
+ "E",
+ "F",
+ "G",
+ "H",
+ "I",
+ "J",
+ "K",
+ "L",
+ "M",
+ "N",
+ "O",
+ "P",
+ "Q",
+ "R",
+ "S",
+ "T",
+ "U",
+ "V",
+ "W",
+ "X",
+ "Y",
+ "Z"
+ ]
+ },
+ {
+ "title": "Lowercase",
+ "chars": [
+ "a",
+ "b",
+ "c",
+ "d",
+ "e",
+ "f",
+ "g",
+ "h",
+ "i",
+ "j",
+ "k",
+ "l",
+ "m",
+ "n",
+ "o",
+ "p",
+ "q",
+ "r",
+ "s",
+ "t",
+ "u",
+ "v",
+ "w",
+ "x",
+ "y",
+ "z"
+ ]
+ },
+ { "title": "Figures", "chars": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] },
+ {
+ "title": "Punctuation & symbols",
+ "chars": [
+ ".",
+ ",",
+ ":",
+ ";",
+ "!",
+ "?",
+ "'",
+ "\"",
+ "-",
+ "–",
+ "—",
+ "(",
+ ")",
+ "[",
+ "]",
+ "/",
+ "&",
+ "@",
+ "#",
+ "%",
+ "*",
+ "+",
+ "=",
+ "$",
+ "€"
+ ]
+ },
+ { "title": "Llama icon · U+E000, U+E001, U+E002", "chars": ["", "", ""] }
+ ],
+ "cells": {
+ "400": [
+ {
+ "ch": "A",
+ "adv": 671,
+ "dx": 356,
+ "d": "M378 770 634 60H750L1006 770H912L841 568H543L472 770ZM572 484H812L692 135Z"
+ },
+ {
+ "ch": "B",
+ "adv": 683,
+ "dx": 350,
+ "d": "M444 770V60H688Q814 60 877 106Q940 152 940 251Q940 297 920 332Q898 371 858 388Q836 398 813 402Q877 411 918 448Q970 497 970 575Q970 672 907 721Q844 770 728 770ZM530 686H728Q801 686 841 656Q880 626 880 570Q880 514 841 482Q801 451 728 451H530ZM530 367H688Q766 367 808 337Q850 308 850 255Q850 199 810 171Q769 144 688 144H530Z"
+ },
+ {
+ "ch": "C",
+ "adv": 706,
+ "dx": 338,
+ "d": "M704 786Q609 786 537 741Q495 716 466 680Q437 643 419 600Q401 556 393 510Q385 463 385 416Q385 301 425 217Q465 134 537 89Q609 44 704 44Q833 44 904 109Q972 171 995 277L906 291Q891 216 842 172Q793 128 704 128Q636 128 585 162Q543 190 519 232Q495 273 485 321Q475 369 475 416Q475 506 504 570Q532 631 584 666Q637 702 704 702Q797 702 848 653Q898 605 912 524L1002 536Q988 608 952 663Q924 705 885 732Q846 760 800 773Q753 786 704 786Z"
+ },
+ {
+ "ch": "D",
+ "adv": 697,
+ "dx": 342,
+ "d": "M436 770V60H656Q820 60 909 152Q997 245 997 416Q997 586 910 678Q823 770 662 770ZM522 686H656Q781 686 844 618Q907 551 907 416Q907 279 844 211Q781 144 656 144H522Z"
+ },
+ {
+ "ch": "E",
+ "adv": 606,
+ "dx": 388,
+ "d": "M482 770V60H928V144H568V373H916V455H568V686H936V770Z"
+ },
+ { "ch": "F", "adv": 593, "dx": 394, "d": "M488 770V60H934V144H574V382H916V464H574V770Z" },
+ {
+ "ch": "G",
+ "adv": 733,
+ "dx": 324,
+ "d": "M704 786Q599 786 524 738Q469 702 436 650Q402 598 386 538Q371 477 371 416Q371 309 411 225Q451 141 526 92Q601 44 706 44Q795 44 857 75Q916 105 952 156Q988 208 1002 269L910 283Q896 215 849 171Q802 128 706 128Q621 128 568 168Q529 197 506 238Q484 279 475 325Q466 371 466 416Q466 497 491 561Q516 626 569 664Q623 702 706 702Q772 702 820 673Q869 645 895 596Q921 547 922 493H708V411H1006V770H939L935 650Q925 670 912 688Q888 719 854 741Q821 763 782 774Q744 786 704 786Z"
+ },
+ {
+ "ch": "H",
+ "adv": 716,
+ "dx": 333,
+ "d": "M427 770V60H513V371H870V60H956V770H870V455H513V770Z"
+ },
+ { "ch": "I", "adv": 273, "dx": 554, "d": "M648 770V60H734V770Z" },
+ {
+ "ch": "J",
+ "adv": 600,
+ "dx": 391,
+ "d": "M686 786Q620 786 569 754Q532 732 508 698Q485 664 473 624Q461 583 460 541L548 538Q550 616 585 658Q621 702 686 702Q754 702 791 655Q827 608 827 522V60H913V522Q913 603 885 662Q866 702 836 730Q806 757 768 772Q730 786 686 786Z"
+ },
+ {
+ "ch": "K",
+ "adv": 643,
+ "dx": 370,
+ "d": "M464 770V60H550V413L869 60H978L700 368L997 770H892L642 432L550 533V770Z"
+ },
+ { "ch": "L", "adv": 583, "dx": 400, "d": "M494 770V60H580V686H935V770Z" },
+ {
+ "ch": "M",
+ "adv": 880,
+ "dx": 251,
+ "d": "M345 770V60H465L692 676L918 60H1038V770H952V220L749 770H634L431 220V770Z"
+ },
+ {
+ "ch": "N",
+ "adv": 746,
+ "dx": 318,
+ "d": "M412 770V60H534L885 684V60H971V770H843L498 158V770Z"
+ },
+ {
+ "ch": "O",
+ "adv": 742,
+ "dx": 320,
+ "d": "M691 786Q590 786 518 741Q476 716 447 680Q418 643 400 600Q383 556 375 510Q367 463 367 416Q367 301 406 217Q445 134 518 89Q590 44 691 44Q793 44 866 89Q907 115 936 152Q965 188 982 232Q1000 275 1008 322Q1016 369 1016 416Q1016 531 977 614Q938 697 866 741Q793 786 691 786ZM691 702Q765 702 818 668Q859 641 883 600Q907 558 916 510Q926 463 926 416Q926 326 898 261Q870 197 818 162Q765 128 691 128Q618 128 566 162Q524 190 500 232Q477 273 467 321Q457 369 457 416Q457 506 485 570Q513 634 566 668Q618 702 691 702Z"
+ },
+ {
+ "ch": "P",
+ "adv": 653,
+ "dx": 364,
+ "d": "M458 770V60H713Q832 60 898 117Q964 174 964 275Q964 343 934 392Q911 431 875 453Q839 475 797 484Q755 494 713 494H544V770ZM544 410H713Q793 410 834 376Q874 342 874 275Q874 210 834 177Q793 144 713 144H544Z"
+ },
+ {
+ "ch": "Q",
+ "adv": 736,
+ "dx": 323,
+ "d": "M873 839 814 763Q785 775 754 780Q722 786 691 786Q589 786 518 736Q466 701 434 649Q401 597 386 537Q370 477 370 416Q370 312 408 228Q445 144 517 94Q589 44 691 44Q795 44 867 94Q919 130 951 182Q983 234 998 294Q1013 355 1013 416Q1013 474 999 532Q985 590 955 641Q925 692 877 728L965 839ZM691 702Q708 702 726 700Q744 698 760 691L657 562H749L825 662Q862 633 884 592Q905 552 914 506Q923 461 923 416Q923 337 898 272Q872 207 821 167Q769 128 691 128Q613 128 562 167Q524 197 502 238Q480 278 470 324Q460 370 460 416Q460 494 486 559Q511 624 563 663Q614 702 691 702Z"
+ },
+ {
+ "ch": "R",
+ "adv": 675,
+ "dx": 354,
+ "d": "M448 770V60H717Q792 60 846 86Q901 113 930 164Q959 215 959 275Q959 307 948 336Q936 366 915 390Q894 413 866 427Q853 434 839 438Q877 445 903 465Q940 495 946 561L966 770H879L861 570Q857 526 830 505Q802 484 740 484H534V770ZM534 400H728Q793 400 831 367Q869 334 869 273Q869 211 830 177Q791 144 717 144H534Z"
+ },
+ {
+ "ch": "S",
+ "adv": 680,
+ "dx": 351,
+ "d": "M709 786Q621 786 556 755Q494 726 456 674Q419 621 410 558L506 547Q514 594 537 627Q556 655 584 671Q612 687 644 694Q677 702 711 702Q764 702 802 689Q837 677 858 651Q879 625 879 590Q879 557 862 531Q846 506 799 484Q752 463 661 442Q574 421 522 396Q470 371 447 335Q424 299 424 246Q424 186 454 140Q478 105 514 84Q550 63 592 54Q634 44 676 44Q760 44 820 73Q876 101 911 150Q946 198 957 255L861 266Q854 229 833 199Q807 161 764 144Q721 128 674 128Q604 128 562 159Q520 191 520 242Q520 275 537 296Q553 318 596 334Q639 351 719 370Q814 392 871 422Q927 453 951 493Q975 533 975 584Q975 646 941 691Q915 726 877 747Q839 768 796 777Q752 786 709 786Z"
+ },
+ { "ch": "T", "adv": 555, "dx": 414, "d": "M649 770V144H428V60H956V144H735V770Z" },
+ {
+ "ch": "U",
+ "adv": 692,
+ "dx": 345,
+ "d": "M692 786Q610 786 550 754Q506 731 478 694Q451 658 438 614Q424 569 424 522V60H510V522Q510 608 558 655Q605 702 692 702Q778 702 826 655Q873 608 873 522V60H959V522Q959 603 927 662Q903 706 866 733Q829 760 784 773Q739 786 692 786Z"
+ },
+ {
+ "ch": "V",
+ "adv": 670,
+ "dx": 356,
+ "d": "M635 770 378 60H472L692 676L911 60H1005L748 770Z"
+ },
+ {
+ "ch": "W",
+ "adv": 948,
+ "dx": 217,
+ "d": "M444 770 257 60H351L497 652L642 60H740L886 652L1031 60H1126L939 770H831L691 220L551 770Z"
+ },
+ {
+ "ch": "X",
+ "adv": 609,
+ "dx": 386,
+ "d": "M403 770 636 414 405 60H507L692 346L875 60H975L744 412L979 770H877L690 480L503 770Z"
+ },
+ {
+ "ch": "Y",
+ "adv": 579,
+ "dx": 402,
+ "d": "M649 770V480L398 60H500L692 392L884 60H986L735 480V770Z"
+ },
+ {
+ "ch": "Z",
+ "adv": 547,
+ "dx": 418,
+ "d": "M448 770V682L828 144H461V60H926V148L546 686H936V770Z"
+ },
+ {
+ "ch": "a",
+ "adv": 566,
+ "dx": 408,
+ "d": "M633 782Q551 782 503 744Q454 706 454 638Q454 570 494 531Q534 492 621 476L809 436Q809 402 801 380Q793 357 778 341Q746 308 683 308Q628 308 596 332Q562 359 550 409H461Q473 325 536 274Q593 228 683 228Q785 228 839 285Q893 343 893 444V770H809V680Q803 694 794 705Q775 731 748 748Q721 765 691 774Q661 782 633 782ZM641 708Q694 708 732 687Q769 667 789 630Q809 594 809 552V509L637 546Q583 556 563 576Q542 597 542 630Q542 667 569 687Q595 708 641 708Z"
+ },
+ {
+ "ch": "b",
+ "adv": 598,
+ "dx": 392,
+ "d": "M717 782Q667 782 622 758Q577 735 553 690L550 770H474V60H558V329Q574 298 600 276Q625 253 656 240Q686 228 717 228Q787 228 838 262Q878 289 902 328Q925 368 935 414Q945 459 945 505Q945 590 917 652Q890 713 837 748Q784 782 717 782ZM712 702Q779 702 818 649Q857 596 857 505Q857 413 818 360Q779 308 714 308Q665 308 630 331Q602 350 586 378Q571 407 564 440Q558 473 558 505Q558 565 577 609Q594 652 630 677Q665 702 712 702Z"
+ },
+ {
+ "ch": "c",
+ "adv": 549,
+ "dx": 416,
+ "d": "M705 782Q631 782 577 748Q535 722 510 683Q485 644 474 598Q462 552 462 505Q462 421 492 359Q512 317 544 288Q577 259 618 244Q659 228 705 228Q766 228 814 249Q861 271 890 312Q920 354 929 405L842 417Q833 365 796 336Q759 308 705 308Q632 308 591 360Q550 413 550 505Q550 597 591 649Q632 702 705 702Q759 702 796 672Q832 642 842 584L929 595Q919 650 891 690Q870 721 840 742Q811 762 776 772Q742 782 705 782Z"
+ },
+ {
+ "ch": "d",
+ "adv": 598,
+ "dx": 392,
+ "d": "M662 782Q593 782 543 748Q503 721 480 682Q457 642 448 596Q438 550 438 505Q438 420 465 358Q491 297 544 262Q596 228 662 228Q694 228 726 240Q757 251 783 274Q809 296 825 329V60H909V770H833L830 690Q814 721 788 742Q761 762 728 772Q696 782 662 782ZM679 702Q726 702 759 678Q785 658 800 630Q814 601 820 568Q825 536 825 505Q825 443 808 399Q792 357 758 332Q724 308 679 308Q609 308 568 360Q526 413 526 505Q526 596 568 649Q609 702 679 702Z"
+ },
+ {
+ "ch": "e",
+ "adv": 564,
+ "dx": 409,
+ "d": "M698 782Q623 782 569 748Q527 722 502 683Q477 644 466 598Q455 551 455 505Q455 421 485 359Q504 318 536 288Q568 259 608 244Q648 228 694 228Q763 228 816 260Q858 286 882 326Q907 366 918 412Q928 459 928 506V531H543Q548 616 589 659Q629 702 698 702Q744 702 781 678Q818 655 831 609L916 631Q894 695 841 736Q782 782 698 782ZM543 457H836Q830 380 792 344Q753 308 694 308Q633 308 594 345Q554 383 543 457Z"
+ },
+ {
+ "ch": "f",
+ "adv": 398,
+ "dx": 492,
+ "d": "M626 770V314H554V240H626V192Q626 133 660 96Q694 60 766 60H850L820 134H772Q745 134 728 152Q710 170 710 198V240H843V314H710V770Z"
+ },
+ {
+ "ch": "g",
+ "adv": 597,
+ "dx": 392,
+ "d": "M675 937Q639 937 605 928Q571 919 541 900Q511 882 489 854Q467 826 456 790L540 769Q552 809 584 832Q614 854 675 854Q747 854 786 824Q824 794 824 736V635Q810 669 786 693Q762 717 732 730Q701 742 669 742Q602 742 550 709Q511 685 486 650Q462 614 450 572Q438 529 438 485Q438 409 467 351Q486 314 516 286Q546 258 584 243Q622 228 665 228Q698 228 730 241Q763 254 789 278Q815 303 828 339V240H908V734Q908 796 880 842Q858 878 825 899Q792 920 753 928Q714 937 675 937ZM673 662Q741 662 782 614Q823 567 824 485Q825 430 807 390Q788 351 752 330Q716 308 673 308Q603 308 565 355Q526 403 526 485Q526 567 566 614Q605 662 673 662Z"
+ },
+ {
+ "ch": "h",
+ "adv": 584,
+ "dx": 399,
+ "d": "M481 770V60H565V329Q567 324 569 319Q577 297 589 283Q614 253 650 240Q687 228 725 228Q782 228 822 253Q851 272 868 300Q886 329 894 362Q902 396 902 429V770H818V453Q818 376 791 339Q763 302 707 302Q643 302 604 341Q565 380 565 454V770Z"
+ },
+ { "ch": "i", "adv": 247, "dx": 568, "d": "M650 770V240H734V770ZM648 157V59H736V157Z" },
+ {
+ "ch": "j",
+ "adv": 263,
+ "dx": 560,
+ "d": "M557 925V848H600Q626 848 642 835Q658 822 658 788V240H742V792Q742 865 711 895Q680 925 608 925ZM656 157V59H744V157Z"
+ },
+ {
+ "ch": "k",
+ "adv": 593,
+ "dx": 394,
+ "d": "M476 770V60H560V525L818 240H930L721 465L939 770H837L664 522L560 632V770Z"
+ },
+ { "ch": "l", "adv": 247, "dx": 568, "d": "M734 770H650V60H734Z" },
+ {
+ "ch": "m",
+ "adv": 880,
+ "dx": 251,
+ "d": "M333 770V240H410L412 345Q420 325 431 306Q453 271 486 250Q519 228 561 228Q630 228 674 266Q706 294 720 338Q728 313 742 293Q764 260 800 244Q835 228 875 228Q932 228 971 251Q1002 270 1019 299Q1036 328 1043 362Q1050 396 1050 429V770H966V447Q966 375 938 338Q910 302 855 302Q818 302 791 320Q769 334 756 356Q743 378 738 403Q733 428 733 453V770H649V453Q649 382 624 342Q599 302 540 302Q503 302 476 320Q454 334 441 356Q428 378 422 403Q417 428 417 453V770Z"
+ },
+ {
+ "ch": "n",
+ "adv": 584,
+ "dx": 399,
+ "d": "M481 770V240H558L560 343Q562 335 565 328Q574 304 586 288Q611 258 648 243Q684 228 723 228Q784 228 824 255Q852 274 869 302Q886 331 894 364Q902 396 902 429V770H818V453Q818 404 807 370Q795 336 768 319Q740 302 705 302Q644 302 605 340Q565 379 565 453V770Z"
+ },
+ {
+ "ch": "o",
+ "adv": 576,
+ "dx": 403,
+ "d": "M692 782Q619 782 564 748Q522 722 497 683Q472 644 460 598Q449 552 449 505Q449 420 479 358Q499 316 532 287Q564 258 605 243Q646 228 692 228Q765 228 820 262Q861 288 886 327Q911 366 922 412Q934 458 934 505Q934 589 904 651Q884 693 852 722Q820 751 779 766Q738 782 692 782ZM692 702Q765 702 806 649Q846 597 846 505Q846 413 806 360Q765 308 692 308Q619 308 578 360Q537 413 537 505Q537 597 578 649Q619 702 692 702Z"
+ },
+ {
+ "ch": "p",
+ "adv": 598,
+ "dx": 392,
+ "d": "M474 925V240H552L553 333Q565 310 581 291Q607 261 642 244Q676 228 716 228Q795 228 846 267Q882 295 904 334Q925 373 935 417Q945 461 945 505Q945 578 921 641Q896 704 846 743Q795 782 716 782Q680 782 644 768Q609 753 583 724Q568 709 558 689V925ZM708 702Q777 702 817 650Q857 598 857 505Q857 412 817 360Q777 308 708 308Q662 308 629 330Q600 349 585 378Q570 407 564 440Q558 473 558 505Q558 570 576 614Q593 656 628 679Q663 702 708 702Z"
+ },
+ {
+ "ch": "q",
+ "adv": 598,
+ "dx": 392,
+ "d": "M909 925H825V689Q815 709 801 724Q774 753 738 768Q703 782 667 782Q588 782 538 743Q501 715 480 676Q458 637 448 593Q438 549 438 505Q438 432 463 369Q487 306 538 267Q588 228 667 228Q707 228 742 244Q777 260 803 290Q818 310 830 333L831 240H909ZM675 702Q722 702 756 680Q784 661 799 632Q814 603 820 570Q825 536 825 505Q825 440 807 396Q789 355 754 332Q720 308 675 308Q606 308 566 360Q526 412 526 505Q526 598 566 650Q606 702 675 702Z"
+ },
+ {
+ "ch": "r",
+ "adv": 382,
+ "dx": 500,
+ "d": "M582 770V240H656L659 347Q663 331 668 316Q679 287 696 271Q729 240 785 240H837L807 320H786Q746 320 720 334Q699 346 687 364Q675 383 670 406Q666 428 666 450V770Z"
+ },
+ {
+ "ch": "s",
+ "adv": 536,
+ "dx": 423,
+ "d": "M705 782Q630 782 579 759Q534 739 506 702Q478 665 471 618L561 606Q571 648 600 673Q633 702 705 702Q760 702 791 684Q821 667 821 628Q821 607 811 593Q802 579 773 568Q744 558 688 548Q612 534 569 513Q526 492 508 462Q491 432 491 390Q491 319 545 273Q599 228 698 228Q770 228 816 252Q854 273 879 308Q904 342 912 383L822 394Q819 375 808 357Q790 328 759 318Q728 308 696 308Q637 308 609 330Q581 352 581 386Q581 412 592 428Q603 445 623 454Q643 462 665 466Q687 471 705 474Q785 487 830 507Q876 527 894 556Q912 586 912 628Q912 701 854 741Q795 782 705 782Z"
+ },
+ {
+ "ch": "t",
+ "adv": 362,
+ "dx": 510,
+ "d": "M757 770Q732 770 708 762Q685 753 668 737Q633 704 633 634V314H567V240H633V148L717 116V240H837V314H717V632Q717 668 729 682Q740 696 763 696H837L811 770Z"
+ },
+ {
+ "ch": "u",
+ "adv": 578,
+ "dx": 402,
+ "d": "M658 782Q579 782 532 728Q484 675 484 581V240H568V558Q568 635 596 671Q623 708 680 708Q743 708 779 667Q815 627 815 556V240H899V770H819V676Q814 688 809 699Q794 729 771 746Q726 782 658 782Z"
+ },
+ {
+ "ch": "v",
+ "adv": 539,
+ "dx": 422,
+ "d": "M639 770 446 240H538L692 684L846 240H938L745 770Z"
+ },
+ {
+ "ch": "w",
+ "adv": 822,
+ "dx": 280,
+ "d": "M468 770 304 240H396L520 682L646 240H736L862 682L987 240H1079L915 770H809L691 367L573 770Z"
+ },
+ {
+ "ch": "x",
+ "adv": 588,
+ "dx": 397,
+ "d": "M446 770 641 498 456 240H554L693 440L828 240H928L745 500L937 770H839L693 556L546 770Z"
+ },
+ {
+ "ch": "y",
+ "adv": 540,
+ "dx": 421,
+ "d": "M526 925V848H587Q608 848 624 840Q641 833 649 811L668 760H639L445 240H537L695 682L846 240H938L723 839Q708 883 678 904Q648 925 595 925Z"
+ },
+ {
+ "ch": "z",
+ "adv": 540,
+ "dx": 421,
+ "d": "M474 770V686L809 314H484V240H901V324L566 696H909V770Z"
+ },
+ {
+ "ch": "0",
+ "adv": 666,
+ "dx": 358,
+ "d": "M691 786Q605 786 542 741Q504 714 478 676Q453 639 438 596Q423 552 416 506Q410 460 410 416Q410 302 445 218Q479 135 542 89Q605 44 691 44Q778 44 841 89Q879 117 904 154Q930 192 945 236Q960 279 966 325Q973 371 973 416Q973 530 939 613Q904 696 841 741Q778 786 691 786ZM691 702Q783 702 833 627Q883 553 883 416Q883 324 861 259Q838 195 796 161Q753 128 691 128Q630 128 588 161Q560 183 542 213Q525 243 516 278Q507 312 504 348Q500 383 500 416Q500 553 550 627Q600 702 691 702Z"
+ },
+ {
+ "ch": "1",
+ "adv": 387,
+ "dx": 498,
+ "d": "M688 770V244H540V170H600Q639 170 663 160Q682 152 691 136Q700 119 703 99Q706 79 706 60H774V770Z"
+ },
+ {
+ "ch": "2",
+ "adv": 622,
+ "dx": 380,
+ "d": "M442 770Q442 695 466 634Q481 594 508 561Q535 528 569 500Q603 473 640 450Q678 427 714 408Q763 382 793 360Q820 340 836 314Q851 287 851 252Q851 215 835 187Q822 165 802 152Q781 139 757 134Q733 128 709 128Q634 128 591 167Q548 205 536 276L447 265Q460 166 526 106Q594 44 709 44Q782 44 834 70Q886 96 914 144Q941 193 941 250Q941 304 923 343Q907 379 878 406Q848 432 814 452Q779 473 746 490Q650 541 601 593Q551 645 548 686H941V770Z"
+ },
+ {
+ "ch": "3",
+ "adv": 616,
+ "dx": 383,
+ "d": "M686 786Q568 786 504 730Q442 677 435 592L524 585Q531 647 575 674Q619 702 686 702Q732 702 771 689Q810 677 834 648Q858 620 858 572Q858 501 811 468Q764 435 687 435H631V351H687Q750 351 792 326Q833 301 833 240Q833 185 798 156Q762 128 691 128Q621 128 586 155Q551 182 543 228L454 216Q466 141 524 93Q585 44 691 44Q763 44 815 67Q866 91 894 136Q923 180 923 236Q923 302 882 342Q852 372 801 388Q859 403 897 442Q948 494 948 572Q948 640 915 688Q889 725 852 746Q814 767 772 776Q729 786 686 786Z"
+ },
+ {
+ "ch": "4",
+ "adv": 618,
+ "dx": 382,
+ "d": "M775 770V616H414V538L769 60H861V532H949V616H861V770ZM518 532H775V192Z"
+ },
+ {
+ "ch": "5",
+ "adv": 629,
+ "dx": 376,
+ "d": "M690 786Q615 786 561 761Q509 737 477 693Q445 649 439 593L528 584Q537 642 580 671Q623 702 690 702Q765 702 809 659Q853 617 853 542Q853 492 834 455Q812 415 772 397Q732 379 688 379Q659 379 630 388Q601 396 578 414Q554 431 542 459H450L497 60H895V144H576L550 359Q560 347 573 337Q601 317 635 307Q669 297 704 297Q775 297 829 328Q867 351 892 384Q918 418 930 458Q943 499 943 542Q943 613 911 668Q888 708 854 734Q819 760 777 773Q735 786 690 786Z"
+ },
+ {
+ "ch": "6",
+ "adv": 596,
+ "dx": 393,
+ "d": "M697 786Q617 786 561 749Q526 727 504 695Q481 663 468 626Q455 588 450 548Q445 508 445 470Q445 419 450 367Q455 315 468 265Q481 215 507 169Q539 111 593 77Q646 44 725 44Q820 44 872 90Q920 134 942 202L856 222Q844 179 814 153Q784 128 725 128Q637 128 587 203Q544 266 535 382Q545 367 559 354Q589 324 630 308Q670 292 713 292Q783 292 836 322Q874 344 899 377Q924 410 936 450Q948 491 948 534Q948 612 916 668Q894 708 860 734Q825 760 783 773Q741 786 697 786ZM699 702Q769 702 814 657Q858 613 858 534Q858 485 839 449Q819 412 784 393Q748 374 707 374Q659 374 621 393Q581 414 560 452Q539 490 539 534Q539 583 559 621Q579 661 617 682Q655 702 699 702Z"
+ },
+ {
+ "ch": "7",
+ "adv": 527,
+ "dx": 428,
+ "d": "M608 770Q608 654 640 544Q672 433 728 332Q785 230 860 144H450V60H954V138Q865 240 808 339Q750 438 723 547Q696 656 696 770Z"
+ },
+ {
+ "ch": "8",
+ "adv": 607,
+ "dx": 388,
+ "d": "M692 786Q616 786 557 762Q497 738 464 691Q430 644 430 575Q430 498 476 447Q512 407 568 388Q529 371 502 343Q464 305 464 239Q464 183 493 139Q514 106 546 85Q578 64 616 54Q654 44 692 44Q761 44 813 69Q862 94 891 139Q920 184 920 239Q920 305 883 343Q856 371 817 388Q873 407 909 447Q954 498 954 575Q954 644 921 691Q895 727 858 748Q820 769 777 778Q734 786 692 786ZM692 702Q771 702 818 669Q864 637 864 570Q864 508 823 470Q781 433 692 433Q604 433 562 470Q520 508 520 570Q520 637 567 669Q613 702 692 702ZM692 353Q758 353 794 324Q830 296 830 239Q830 188 795 158Q760 128 692 128Q625 128 590 158Q554 188 554 239Q554 296 590 324Q626 353 692 353Z"
+ },
+ {
+ "ch": "9",
+ "adv": 596,
+ "dx": 393,
+ "d": "M663 786Q575 786 520 742Q469 703 448 645L534 622Q542 651 562 668Q582 686 608 694Q635 702 663 702Q752 702 800 630Q839 570 847 449Q836 464 824 477Q795 509 756 526Q717 544 671 544Q602 544 549 513Q511 491 486 456Q460 422 448 380Q435 339 435 296Q435 218 467 161Q489 123 522 96Q556 70 597 57Q638 44 682 44Q771 44 828 85Q861 109 882 142Q904 176 916 214Q928 253 933 294Q938 334 938 373Q938 423 934 474Q929 526 916 576Q903 625 878 668Q846 724 794 755Q741 786 663 786ZM677 459Q726 459 763 440Q803 419 823 380Q843 342 843 298Q843 249 824 210Q803 170 765 149Q727 128 682 128Q633 128 598 149Q560 173 542 213Q525 253 525 296Q525 346 545 382Q564 420 600 440Q635 459 677 459Z"
+ },
+ { "ch": ".", "adv": 204, "dx": 589, "d": "M635 770V657H748V770Z" },
+ { "ch": ",", "adv": 204, "dx": 589, "d": "M638 926 686 770H635V657H748V756L688 926Z" },
+ { "ch": ":", "adv": 300, "dx": 541, "d": "M635 770V657H748V770ZM635 377V264H748V377Z" },
+ {
+ "ch": ";",
+ "adv": 300,
+ "dx": 541,
+ "d": "M635 377V264H748V377ZM638 926 686 770H635V657H748V756L688 926Z"
+ },
+ {
+ "ch": "!",
+ "adv": 216,
+ "dx": 583,
+ "d": "M668 561Q662 493 657 426Q652 358 652 290V60H738V290Q738 357 734 424Q729 492 723 560ZM635 770V657H748V770Z"
+ },
+ {
+ "ch": "?",
+ "adv": 562,
+ "dx": 410,
+ "d": "M646 565Q647 496 669 454Q691 412 743 380Q782 356 803 337Q822 319 830 296Q837 274 837 248Q837 196 803 162Q768 128 707 128Q633 128 594 166Q555 203 546 273L457 265Q463 202 494 153Q517 116 550 92Q584 68 624 56Q664 44 707 44Q772 44 822 70Q872 96 900 144Q927 192 927 248Q927 290 914 321Q903 346 884 366Q866 385 844 402Q823 418 801 432Q761 458 747 487Q733 515 732 565ZM630 770V657H743V770Z"
+ },
+ { "ch": "'", "adv": 181, "dx": 600, "d": "M663 326 647 140V60H735V140L719 326Z" },
+ {
+ "ch": "\"",
+ "adv": 349,
+ "dx": 516,
+ "d": "M583 326 563 140V60H651L645 326ZM737 326 731 60H819V140L799 326Z"
+ },
+ { "ch": "-", "adv": 422, "dx": 480, "d": "M526 518V439H857V518Z" },
+ { "ch": "–", "adv": 594, "dx": 394, "d": "M440 517V439H943V517Z" },
+ { "ch": "—", "adv": 910, "dx": 236, "d": "M282 517V439H1101V517Z" },
+ {
+ "ch": "(",
+ "adv": 277,
+ "dx": 552,
+ "d": "M745 890Q599 676 599 450Q599 223 745 10L802 39Q686 246 686 450Q686 559 718 664Q750 768 803 862Z"
+ },
+ {
+ "ch": ")",
+ "adv": 277,
+ "dx": 552,
+ "d": "M637 890 579 862Q632 768 664 664Q696 559 696 450Q696 246 580 39L637 10Q783 223 783 450Q783 676 637 890Z"
+ },
+ { "ch": "[", "adv": 350, "dx": 516, "d": "M850 880H610V20H850V90H690V810H850Z" },
+ { "ch": "]", "adv": 350, "dx": 516, "d": "M533 880V810H693V90H533V20H773V880Z" },
+ { "ch": "/", "adv": 483, "dx": 450, "d": "M492 880 787 20H867L572 880Z" },
+ {
+ "ch": "&",
+ "adv": 623,
+ "dx": 380,
+ "d": "M642 786Q540 786 481 736Q422 687 422 596Q422 550 435 514Q446 484 466 460Q487 435 512 414Q537 394 562 376Q533 339 512 298Q490 256 490 208Q490 131 537 87Q583 44 664 44Q717 44 754 62Q793 82 812 118Q830 154 830 196Q830 231 817 260Q804 289 782 314Q761 338 735 358Q709 379 682 397L844 604Q879 556 880 459L964 461Q963 514 948 570Q932 625 897 667L982 770H881L844 725Q818 750 784 763Q750 776 714 781Q677 786 642 786ZM652 706Q675 706 700 703Q725 700 748 691Q771 682 788 664L612 442Q585 461 562 483Q539 505 526 533Q512 561 512 596Q512 646 546 676Q579 706 652 706ZM636 336Q661 320 685 302Q709 283 724 258Q740 234 740 202Q740 166 720 147Q700 128 664 128Q624 128 602 149Q580 170 580 208Q580 245 597 276Q614 307 636 336Z"
+ },
+ {
+ "ch": "@",
+ "adv": 909,
+ "dx": 236,
+ "d": "M870 838Q817 860 761 870Q705 880 648 880Q533 880 452 837Q370 795 327 714Q283 633 283 520Q283 459 296 400Q309 341 336 287Q364 233 407 188Q448 145 500 116Q551 88 608 74Q666 60 726 60Q839 60 923 104Q1007 148 1053 228Q1099 308 1099 417Q1099 497 1075 558Q1061 593 1038 622Q1015 652 984 670Q952 688 912 688Q882 688 858 676Q835 663 821 640Q811 626 807 608Q796 625 780 640Q754 664 721 678Q688 692 654 692Q595 692 555 669Q526 653 508 628Q489 603 480 572Q472 542 472 510Q472 443 499 388Q525 333 574 300Q623 268 684 268Q712 268 741 277Q770 286 792 304Q806 316 814 333L819 270H892L876 480Q875 504 872 528Q870 552 870 576Q870 596 884 609Q897 622 918 622Q969 622 998 568Q1027 514 1027 420Q1027 327 992 262Q972 225 942 200Q913 174 878 159Q842 144 803 137Q764 130 724 130Q649 130 579 156Q509 183 457 237Q403 294 379 368Q355 441 355 518Q355 611 390 676Q415 725 456 754Q498 784 548 797Q598 810 650 810Q702 810 754 800Q805 791 853 770ZM664 626Q714 626 746 601Q778 576 793 538Q808 499 808 459Q808 424 797 395Q783 363 754 348Q726 334 692 334Q647 334 617 357Q583 383 568 423Q554 463 554 504Q554 556 579 591Q603 626 664 626Z"
+ },
+ {
+ "ch": "#",
+ "adv": 481,
+ "dx": 450,
+ "d": "M686 770 723 573H597L560 770H488L525 573H442L454 503H538L570 330H482L494 260H583L620 60H692L655 260H781L818 60H890L853 260H935L923 330H840L808 503H895L883 573H795L758 770ZM610 503H736L768 330H642Z"
+ },
+ {
+ "ch": "%",
+ "adv": 805,
+ "dx": 288,
+ "d": "M488 404Q421 404 378 358Q334 313 334 228Q334 142 378 97Q421 52 488 52Q556 52 599 97Q642 142 642 228Q642 313 599 358Q556 404 488 404ZM488 342Q529 342 550 312Q570 282 570 228Q570 174 550 144Q529 114 488 114Q448 114 427 144Q406 174 406 228Q406 282 427 312Q448 342 488 342ZM894 778Q827 778 784 732Q740 687 740 602Q740 516 784 471Q827 426 894 426Q962 426 1005 471Q1048 516 1048 602Q1048 687 1005 732Q962 778 894 778ZM894 716Q935 716 956 686Q976 656 976 602Q976 548 956 518Q935 488 894 488Q854 488 833 518Q812 548 812 602Q812 656 833 686Q854 716 894 716ZM406 770 896 60H976L486 770Z"
+ },
+ {
+ "ch": "*",
+ "adv": 433,
+ "dx": 474,
+ "d": "M625 388 573 354 640 252H520V188H640L573 86L625 52L691 159L758 52L810 86L742 188H862V252H742L810 354L758 388L691 282Z"
+ },
+ {
+ "ch": "+",
+ "adv": 561,
+ "dx": 410,
+ "d": "M652 714V514H452V436H652V236H730V436H930V514H730V714Z"
+ },
+ { "ch": "=", "adv": 543, "dx": 420, "d": "M462 407V329H922V407ZM462 613V535H922V613Z" },
+ {
+ "ch": "$",
+ "adv": 632,
+ "dx": 375,
+ "d": "M662 860V783Q610 777 568 755Q509 725 474 672Q439 618 433 553L520 545Q528 595 551 630Q577 670 620 686Q641 694 662 699V448Q583 428 536 403Q488 379 468 343Q447 308 447 256Q447 198 475 153Q497 119 530 98Q562 78 601 68Q631 61 662 59V-30H736V64Q776 70 809 87Q863 115 896 165Q928 215 936 274L848 284Q842 243 822 211Q798 173 759 157Q747 152 736 149V383Q810 403 856 429Q900 455 926 496Q951 536 951 588Q951 648 920 692Q896 726 861 746Q826 767 787 776Q761 783 736 785V860ZM736 702Q768 699 793 690Q825 679 844 654Q863 629 863 594Q863 561 848 536Q833 511 790 490Q768 479 736 469ZM662 363V141Q607 144 573 172Q535 203 535 253Q535 285 550 306Q565 328 605 344Q628 353 662 363Z"
+ },
+ {
+ "ch": "€",
+ "adv": 730,
+ "dx": 326,
+ "d": "M759 786Q696 786 641 758Q586 731 548 681Q504 625 486 555Q483 545 480 535H383V461H469Q467 439 467 416Q467 399 468 381H383V307H478Q481 291 485 275Q503 205 547 149Q586 99 641 72Q696 44 759 44Q822 44 873 73Q925 103 958 152Q992 202 1007 258L919 276Q910 237 888 204Q867 170 834 149Q801 128 759 128Q693 128 648 166Q612 196 593 237Q577 271 569 307H804L793 381H558Q557 399 557 416Q557 439 559 461H784L773 535H572Q575 549 580 562Q603 627 648 664Q693 702 759 702Q793 702 820 688Q848 675 869 652Q890 628 904 599Q917 570 923 540L1013 554Q1001 618 969 669Q934 724 879 755Q824 786 759 786Z"
+ },
+ {
+ "ch": "",
+ "adv": 833,
+ "dx": 274,
+ "d": "M620 524 888 60H666Q637 60 612 74Q587 89 572 114L336 524ZM1046 524H620L478 770H841Q869 770 894 756Q918 743 933 720Z"
+ },
+ {
+ "ch": "",
+ "adv": 1069,
+ "dx": 156,
+ "d": "M1098 550H570L394 855H844Q879 855 909 838Q939 822 958 793V794ZM570 550 902 -25H628Q592 -25 560 -7Q529 11 511 42L218 550Z"
+ },
+ {
+ "ch": "",
+ "adv": 1322,
+ "dx": 30,
+ "d": "M972 550H444L268 855H718Q753 855 783 838Q813 822 832 793V794ZM444 550 776 -25H502Q466 -25 434 -7Q403 11 385 42L92 550Z"
+ }
+ ],
+ "500": [
+ {
+ "ch": "A",
+ "adv": 688,
+ "dx": 347,
+ "d": "M369 770 625 60H758L1014 770H903L837 582H545L480 770ZM578 486H805L691 157Z"
+ },
+ {
+ "ch": "B",
+ "adv": 689,
+ "dx": 346,
+ "d": "M435 770V60H688Q816 60 880 106Q945 152 945 252Q945 297 926 331Q904 370 864 387Q839 398 812 403Q882 410 924 450Q975 498 975 575Q975 672 910 721Q846 770 727 770ZM539 676H724Q792 676 831 647Q868 620 868 566Q868 513 831 483Q792 454 724 454H539ZM539 364H686Q759 364 798 336Q838 309 838 259Q838 206 800 180Q762 154 686 154H539Z"
+ },
+ {
+ "ch": "C",
+ "adv": 714,
+ "dx": 334,
+ "d": "M703 786Q607 786 535 742Q493 716 464 680Q434 644 416 600Q397 557 388 510Q380 463 380 416Q380 302 420 218Q461 135 534 89Q607 44 704 44Q835 44 908 110Q978 173 1001 282L894 298Q880 225 833 182Q787 140 704 140Q638 140 591 173Q551 200 529 240Q507 279 498 325Q488 371 488 416Q488 502 515 564Q541 621 590 656Q639 690 703 690Q791 690 838 643Q886 598 899 518L1007 534Q992 606 956 662Q928 705 888 732Q848 760 800 773Q753 786 703 786Z"
+ },
+ {
+ "ch": "D",
+ "adv": 703,
+ "dx": 340,
+ "d": "M429 770V60H656Q822 60 912 152Q1001 245 1001 416Q1001 586 914 678Q825 770 662 770ZM533 674H656Q775 674 834 610Q894 545 894 416Q894 285 834 220Q775 156 656 156H533Z"
+ },
+ {
+ "ch": "E",
+ "adv": 611,
+ "dx": 386,
+ "d": "M475 770V60H934V156H579V367H922V461H579V674H942V770Z"
+ },
+ { "ch": "F", "adv": 597, "dx": 392, "d": "M481 770V60H939V156H585V376H921V470H585V770Z" },
+ {
+ "ch": "G",
+ "adv": 744,
+ "dx": 319,
+ "d": "M701 786Q595 786 520 738Q464 703 430 651Q396 599 380 538Q365 477 365 416Q365 309 406 225Q446 141 522 92Q598 44 705 44Q796 44 859 75Q920 105 956 158Q993 210 1008 272L898 289Q885 222 840 181Q795 140 706 140Q626 140 576 178Q539 205 518 244Q496 284 488 328Q479 373 479 416Q479 494 502 556Q526 618 577 654Q628 690 707 690Q768 690 813 664Q858 638 883 593Q908 548 909 498H707V409H1013V770H937L932 656Q924 675 911 691Q887 721 853 742Q819 764 780 775Q741 786 701 786Z"
+ },
+ {
+ "ch": "H",
+ "adv": 718,
+ "dx": 332,
+ "d": "M421 770V60H525V365H859V60H962V770H859V461H525V770Z"
+ },
+ { "ch": "I", "adv": 281, "dx": 550, "d": "M639 770V60H743V770Z" },
+ {
+ "ch": "J",
+ "adv": 608,
+ "dx": 387,
+ "d": "M686 786Q616 786 563 753Q526 730 502 696Q477 661 464 620Q452 579 451 536L557 534Q559 609 592 648Q625 690 686 690Q750 690 784 646Q818 602 818 520V60H922V521Q922 601 893 661Q873 702 842 730Q810 757 770 772Q731 786 686 786Z"
+ },
+ {
+ "ch": "K",
+ "adv": 656,
+ "dx": 363,
+ "d": "M452 770V60H556V402L859 60H985L712 370L1004 770H881L643 443L556 540V770Z"
+ },
+ { "ch": "L", "adv": 585, "dx": 398, "d": "M487 770V60H591V674H939V770Z" },
+ {
+ "ch": "M",
+ "adv": 890,
+ "dx": 246,
+ "d": "M335 770V60H478L692 650L906 60H1048V770H945V244L751 769H632L439 244V770Z"
+ },
+ {
+ "ch": "N",
+ "adv": 748,
+ "dx": 317,
+ "d": "M406 770V60H540L873 648V60H976V770H837L510 195V770Z"
+ },
+ {
+ "ch": "O",
+ "adv": 752,
+ "dx": 315,
+ "d": "M691 786Q588 786 515 741Q472 716 443 680Q414 644 396 600Q377 557 369 510Q361 463 361 416Q361 301 401 218Q441 134 515 89Q588 44 691 44Q795 44 869 89Q911 115 940 152Q970 188 988 232Q1005 275 1013 322Q1021 369 1021 416Q1021 531 982 614Q942 697 869 741Q794 786 691 786ZM691 690Q761 690 812 657Q851 631 874 592Q896 552 905 506Q914 461 914 416Q914 330 887 267Q861 206 811 172Q761 140 691 140Q622 140 572 172Q532 199 510 239Q487 279 478 325Q469 371 469 416Q469 502 495 564Q522 625 573 658Q622 690 691 690Z"
+ },
+ {
+ "ch": "P",
+ "adv": 659,
+ "dx": 362,
+ "d": "M451 770V60H714Q836 60 903 118Q971 177 971 280Q971 349 940 398Q916 437 880 460Q843 483 800 492Q757 502 714 502H555V770ZM555 407H712Q786 407 825 374Q863 343 863 280Q863 218 825 187Q787 156 712 156H555Z"
+ },
+ {
+ "ch": "Q",
+ "adv": 746,
+ "dx": 318,
+ "d": "M873 837 815 763Q786 776 754 781Q723 786 691 786Q588 786 515 737Q463 702 430 650Q396 599 380 538Q364 478 364 416Q364 311 402 227Q440 143 514 94Q586 44 691 44Q797 44 870 94Q923 129 956 181Q988 233 1003 294Q1018 354 1018 416Q1018 474 1004 531Q990 588 960 638Q931 688 884 725L974 837ZM691 690Q707 690 723 688Q739 687 753 681L652 553H753L822 645Q856 618 875 580Q894 542 902 500Q911 458 911 416Q911 341 887 278Q863 216 814 177Q766 140 691 140Q617 140 568 177Q533 206 512 245Q490 284 481 328Q472 372 472 416Q472 490 496 553Q520 615 569 653Q618 690 691 690Z"
+ },
+ {
+ "ch": "R",
+ "adv": 681,
+ "dx": 350,
+ "d": "M439 770V60H719Q795 60 850 86Q906 112 936 162Q965 213 965 274Q965 307 954 336Q942 366 921 390Q900 414 872 429Q859 436 845 440Q884 446 909 467Q946 497 952 563L972 770H867L850 576Q847 532 820 511Q794 491 734 491H543V770ZM543 395H723Q785 395 821 365Q857 334 857 276Q857 218 820 187Q784 156 714 156H543Z"
+ },
+ {
+ "ch": "S",
+ "adv": 692,
+ "dx": 345,
+ "d": "M708 786Q617 786 551 755Q489 726 451 674Q413 623 403 560L518 546Q526 589 546 620Q564 646 590 662Q617 677 648 684Q678 691 710 691Q760 691 795 679Q828 667 848 644Q867 620 867 587Q867 556 852 533Q836 508 792 489Q748 469 663 449Q573 428 518 403Q465 378 441 341Q416 304 416 249Q416 188 448 142Q473 106 510 84Q547 63 590 54Q634 44 678 44Q764 44 825 74Q882 102 918 150Q953 198 964 256L851 269Q844 235 825 207Q801 171 760 155Q720 139 676 139Q609 139 570 169Q531 197 531 245Q531 276 547 297Q563 317 604 332Q644 348 719 365Q817 386 875 417Q932 447 957 488Q982 529 982 581Q982 644 947 689Q920 725 882 746Q843 768 798 777Q752 786 708 786Z"
+ },
+ { "ch": "T", "adv": 568, "dx": 407, "d": "M640 770V156H421V60H962V156H743V770Z" },
+ {
+ "ch": "U",
+ "adv": 696,
+ "dx": 343,
+ "d": "M692 786Q608 786 546 754Q502 731 474 694Q445 658 431 612Q417 567 417 520V60H521V520Q521 602 566 645Q610 690 692 690Q773 690 818 645Q862 602 862 520V60H966V520Q966 601 932 661Q908 705 870 732Q832 760 786 773Q740 786 692 786Z"
+ },
+ {
+ "ch": "V",
+ "adv": 687,
+ "dx": 348,
+ "d": "M626 770 370 60H481L692 655L903 60H1014L757 770Z"
+ },
+ {
+ "ch": "W",
+ "adv": 966,
+ "dx": 208,
+ "d": "M436 770 248 60H359L498 627L638 60H745L885 627L1024 60H1136L948 770H825L692 246L558 770Z"
+ },
+ {
+ "ch": "X",
+ "adv": 631,
+ "dx": 376,
+ "d": "M392 770 628 414 394 60H516L693 333L867 60H988L755 412L991 770H869L691 493L513 770Z"
+ },
+ {
+ "ch": "Y",
+ "adv": 593,
+ "dx": 394,
+ "d": "M639 770V484L390 60H510L691 380L874 60H993L743 484V770Z"
+ },
+ {
+ "ch": "Z",
+ "adv": 561,
+ "dx": 410,
+ "d": "M440 770V672L809 156H454V60H931V158L560 674H942V770Z"
+ },
+ {
+ "ch": "a",
+ "adv": 576,
+ "dx": 403,
+ "d": "M629 782Q546 782 496 744Q447 706 447 637Q447 568 488 529Q530 491 617 474L801 434Q801 403 794 382Q786 361 771 345Q742 314 684 314Q632 314 602 338Q570 363 559 413H454Q466 323 531 272Q590 226 684 226Q790 226 847 283Q902 341 902 445V770H806V681Q800 694 791 706Q772 732 745 748Q718 765 688 774Q658 782 629 782ZM644 700Q693 700 728 681Q763 662 782 627Q801 592 801 553V513L642 548Q592 558 573 578Q553 597 553 628Q553 662 577 681Q601 700 644 700Z"
+ },
+ {
+ "ch": "b",
+ "adv": 608,
+ "dx": 387,
+ "d": "M725 782Q676 782 631 759Q586 736 562 690L559 770H465V60H567V328Q583 297 608 274Q634 251 664 238Q694 226 725 226Q795 226 846 260Q886 287 909 327Q932 367 942 412Q952 458 952 504Q952 589 925 651Q898 713 845 748Q792 782 725 782ZM711 692Q773 692 810 642Q846 592 846 505Q846 416 810 366Q773 316 712 316Q666 316 633 338Q607 356 592 384Q578 411 572 442Q567 474 567 505Q567 562 584 604Q600 645 634 668Q667 692 711 692Z"
+ },
+ {
+ "ch": "c",
+ "adv": 563,
+ "dx": 410,
+ "d": "M705 782Q629 782 573 748Q531 722 504 683Q478 644 466 598Q454 551 454 504Q454 420 485 358Q506 315 540 286Q573 257 616 242Q658 226 705 226Q769 226 818 249Q868 271 898 314Q928 356 938 408L834 423Q825 371 791 344Q756 316 705 316Q636 316 598 366Q560 416 560 504Q560 592 598 643Q636 692 705 692Q756 692 791 663Q825 635 834 578L938 591Q929 646 900 688Q878 719 846 740Q815 762 779 772Q743 782 705 782Z"
+ },
+ {
+ "ch": "d",
+ "adv": 608,
+ "dx": 387,
+ "d": "M654 782Q586 782 535 748Q496 721 473 681Q450 641 440 595Q431 549 431 504Q431 419 458 356Q484 296 536 261Q588 226 654 226Q687 226 718 238Q749 249 775 272Q801 294 817 328V60H918V770H824L821 690Q805 721 778 742Q752 762 720 772Q688 782 654 782ZM680 692Q723 692 754 670Q779 652 792 624Q806 596 812 565Q817 534 817 504Q817 444 801 402Q785 363 754 340Q722 316 680 316Q614 316 576 366Q537 416 537 504Q537 591 576 642Q614 692 680 692Z"
+ },
+ {
+ "ch": "e",
+ "adv": 576,
+ "dx": 403,
+ "d": "M698 782Q620 782 565 748Q523 722 496 683Q470 644 458 598Q447 551 447 505Q447 420 477 358Q498 316 531 286Q564 257 606 242Q648 226 694 226Q766 226 820 259Q864 285 889 326Q914 366 925 413Q936 460 936 508V534H553Q557 614 596 653Q633 693 698 693Q741 693 776 671Q810 649 823 606L924 631Q901 695 846 737Q785 782 698 782ZM553 455H828Q822 383 786 349Q750 314 694 314Q637 314 600 351Q562 386 553 455Z"
+ },
+ {
+ "ch": "f",
+ "adv": 412,
+ "dx": 485,
+ "d": "M617 770V323H543V238H617V202Q617 137 653 98Q689 60 766 60H859L823 144H779Q752 144 735 162Q718 180 718 208V238H851V323H718V770Z"
+ },
+ {
+ "ch": "g",
+ "adv": 607,
+ "dx": 388,
+ "d": "M677 937Q641 937 606 928Q571 920 540 902Q509 884 486 857Q463 830 451 792L552 768Q562 805 593 827Q621 848 678 848Q745 848 780 818Q817 789 817 732V638Q803 672 778 696Q754 719 724 731Q693 743 661 743Q595 743 543 710Q505 686 480 650Q456 614 444 572Q432 529 432 485Q432 409 461 350Q480 312 510 284Q540 257 578 242Q616 226 658 226Q692 226 724 239Q756 252 782 276Q807 301 821 337V238H918V729Q918 794 889 841Q866 878 832 899Q798 920 758 928Q718 937 677 937ZM676 655Q740 655 778 609Q816 564 817 484Q818 431 801 393Q783 356 750 335Q717 314 676 314Q610 314 574 360Q538 406 538 484Q538 563 575 608Q612 655 676 655Z"
+ },
+ {
+ "ch": "h",
+ "adv": 592,
+ "dx": 395,
+ "d": "M473 770V60H575V322Q575 321 575 320Q584 297 595 283Q620 253 656 240Q693 226 731 226Q789 226 829 252Q859 271 876 300Q894 328 902 361Q910 394 910 428V770H808V455Q808 383 783 348Q758 312 705 312Q646 312 610 349Q575 386 575 457V770Z"
+ },
+ { "ch": "i", "adv": 257, "dx": 562, "d": "M640 770V238H742V770ZM638 160V56H744V160Z" },
+ {
+ "ch": "j",
+ "adv": 282,
+ "dx": 550,
+ "d": "M548 925V838H595Q621 838 638 825Q654 812 654 778V238H755V782Q755 860 722 892Q688 925 609 925ZM651 160V56H757V160Z"
+ },
+ {
+ "ch": "k",
+ "adv": 608,
+ "dx": 387,
+ "d": "M465 770V60H567V506L809 238H939L731 463L947 770H829L663 527L567 629V770Z"
+ },
+ { "ch": "l", "adv": 257, "dx": 562, "d": "M742 770H640V60H742Z" },
+ {
+ "ch": "m",
+ "adv": 886,
+ "dx": 248,
+ "d": "M326 770V238H419L422 340Q429 321 440 304Q462 269 495 248Q528 226 569 226Q637 226 681 264Q712 293 726 337Q735 311 749 292Q771 259 806 242Q842 226 881 226Q937 226 977 249Q1008 268 1025 297Q1042 326 1050 360Q1057 394 1057 428V770H955V453Q955 383 929 347Q904 312 852 312Q818 312 793 330Q772 344 760 365Q749 386 744 410Q740 434 740 457V770H642V457Q642 388 619 351Q596 312 541 312Q506 312 482 330Q461 344 450 365Q438 386 433 410Q428 433 428 457V770Z"
+ },
+ {
+ "ch": "n",
+ "adv": 592,
+ "dx": 395,
+ "d": "M473 770V238H566L568 337Q569 333 571 330Q579 305 592 289Q617 257 654 242Q690 226 730 226Q790 226 830 253Q859 272 876 300Q894 329 902 362Q910 394 910 428V770H808V459Q808 411 798 379Q788 346 763 329Q738 312 703 312Q646 312 611 350Q575 387 575 459V770Z"
+ },
+ {
+ "ch": "o",
+ "adv": 588,
+ "dx": 397,
+ "d": "M691 782Q616 782 560 748Q518 722 492 683Q465 644 453 598Q441 552 441 505Q441 419 472 357Q493 315 526 286Q560 256 603 241Q646 226 692 226Q767 226 824 260Q866 286 892 325Q918 364 930 410Q942 457 942 504Q942 588 911 651Q890 693 856 722Q823 752 781 767Q739 782 691 782ZM692 692Q761 692 798 643Q836 592 836 504Q836 416 799 366Q761 316 692 316Q623 316 585 366Q547 416 547 504Q547 592 585 643Q623 692 692 692Z"
+ },
+ {
+ "ch": "p",
+ "adv": 608,
+ "dx": 387,
+ "d": "M465 925V238H561L563 332Q574 308 590 289Q616 259 650 242Q685 226 724 226Q802 226 852 265Q889 293 911 332Q933 371 942 416Q952 460 952 504Q952 579 928 642Q903 705 852 744Q802 782 724 782Q688 782 652 767Q617 752 591 723Q576 707 567 687V925ZM707 692Q772 692 810 643Q846 593 846 504Q846 415 809 366Q772 316 707 316Q664 316 633 337Q605 355 592 383Q578 411 572 443Q567 475 567 504Q567 566 584 608Q599 648 632 670Q664 692 707 692Z"
+ },
+ {
+ "ch": "q",
+ "adv": 608,
+ "dx": 387,
+ "d": "M918 925H817V687Q807 707 792 723Q766 752 730 767Q695 782 660 782Q581 782 531 743Q494 716 472 677Q451 638 441 593Q431 548 431 504Q431 430 456 367Q480 304 531 265Q581 226 659 226Q699 226 734 242Q769 258 794 289Q810 308 821 331L822 238H918ZM676 692Q720 692 752 671Q778 654 792 626Q807 597 812 566Q817 534 817 504Q817 442 800 400Q783 361 751 338Q719 316 677 316Q611 316 574 366Q537 415 537 504Q537 593 574 642Q612 692 676 692Z"
+ },
+ {
+ "ch": "r",
+ "adv": 394,
+ "dx": 494,
+ "d": "M572 770V238H664L668 348Q672 332 676 318Q687 288 704 271Q737 238 794 238H845L809 330H794Q754 330 728 344Q707 355 695 372Q683 390 678 412Q674 434 674 455V770Z"
+ },
+ {
+ "ch": "s",
+ "adv": 550,
+ "dx": 416,
+ "d": "M704 782Q625 782 573 759Q528 739 500 704Q471 668 462 622L570 607Q580 646 607 668Q637 695 704 695Q755 695 784 678Q812 662 812 626Q812 606 802 593Q793 580 766 570Q739 560 685 551Q607 536 561 516Q517 495 499 464Q481 434 481 391Q481 318 536 272Q593 226 698 226Q773 226 821 250Q861 271 886 306Q911 340 920 382L813 396Q810 377 800 360Q785 333 756 324Q726 314 695 314Q642 314 616 334Q589 354 589 387Q589 411 599 426Q610 442 629 450Q648 458 669 462Q690 466 707 468Q788 481 836 501Q883 522 901 552Q921 583 921 626Q921 700 861 741Q801 782 704 782Z"
+ },
+ {
+ "ch": "t",
+ "adv": 376,
+ "dx": 503,
+ "d": "M757 770Q730 770 704 762Q678 753 660 735Q624 701 624 628V323H556V238H624V153L726 114V238H846V323H726V621Q726 658 737 672Q748 686 772 686H846L814 770Z"
+ },
+ {
+ "ch": "u",
+ "adv": 587,
+ "dx": 398,
+ "d": "M651 782Q571 782 523 728Q476 675 476 580V238H578V554Q578 627 603 661Q629 696 681 696Q740 696 773 657Q806 620 806 551V238H908V770H813L812 676Q808 686 803 695Q788 727 766 745Q721 782 651 782Z"
+ },
+ {
+ "ch": "v",
+ "adv": 558,
+ "dx": 412,
+ "d": "M630 770 436 238H545L692 666L838 238H948L753 770Z"
+ },
+ {
+ "ch": "w",
+ "adv": 830,
+ "dx": 276,
+ "d": "M462 770 300 238H407L523 660L642 238H740L859 660L976 238H1083L921 770H804L691 385L578 770Z"
+ },
+ {
+ "ch": "x",
+ "adv": 606,
+ "dx": 388,
+ "d": "M437 770 630 498 445 238H559L692 431L821 238H937L754 500L946 770H832L693 565L553 770Z"
+ },
+ {
+ "ch": "y",
+ "adv": 553,
+ "dx": 414,
+ "d": "M521 925V838H585Q606 838 622 830Q638 823 645 801L663 755H630L438 238H546L694 661L836 238H945L732 834Q716 881 685 903Q654 925 598 925Z"
+ },
+ {
+ "ch": "z",
+ "adv": 552,
+ "dx": 415,
+ "d": "M468 770V677L792 323H478V238H908V331L582 686H916V770Z"
+ },
+ {
+ "ch": "0",
+ "adv": 674,
+ "dx": 354,
+ "d": "M691 786Q603 786 539 741Q500 714 474 677Q448 640 432 596Q417 553 410 506Q404 460 404 416Q404 302 439 218Q475 135 539 89Q603 44 691 44Q780 44 844 89Q883 117 909 154Q935 192 950 236Q966 279 972 325Q979 371 979 416Q979 530 944 613Q908 696 844 741Q780 786 691 786ZM691 690Q777 690 824 619Q871 548 871 416Q871 327 850 265Q829 204 789 171Q749 140 691 140Q634 140 594 172Q568 193 552 222Q535 250 526 284Q518 317 515 351Q512 385 512 416Q512 548 559 619Q606 690 691 690Z"
+ },
+ {
+ "ch": "1",
+ "adv": 405,
+ "dx": 488,
+ "d": "M679 770V260H529V176H590Q630 176 655 166Q675 157 685 139Q695 121 698 100Q701 80 701 60H782V770Z"
+ },
+ {
+ "ch": "2",
+ "adv": 631,
+ "dx": 376,
+ "d": "M437 770Q437 691 461 628Q476 588 502 555Q529 522 562 495Q595 468 632 445Q668 422 704 403Q753 378 783 356Q809 338 824 312Q839 287 839 254Q839 220 825 195Q812 174 794 162Q775 150 753 145Q731 140 708 140Q639 140 599 177Q559 213 549 280L441 268Q454 167 521 107Q591 44 708 44Q784 44 837 70Q890 96 918 145Q947 194 947 252Q947 306 929 345Q913 381 884 407Q854 433 820 453Q786 473 754 490Q661 539 614 588Q566 636 563 674H947V770Z"
+ },
+ {
+ "ch": "3",
+ "adv": 626,
+ "dx": 378,
+ "d": "M687 786Q566 786 500 729Q436 674 428 586L535 578Q542 637 582 663Q624 690 687 690Q730 690 767 678Q803 666 825 639Q847 613 847 569Q847 503 803 472Q759 441 687 441H628V349H687Q745 349 784 326Q822 302 822 245Q822 193 790 166Q757 140 690 140Q625 140 592 166Q559 191 552 234L446 220Q458 143 518 95Q581 44 690 44Q765 44 819 68Q871 91 900 136Q930 181 930 238Q930 303 888 344Q858 373 808 389Q866 405 904 443Q954 494 954 572Q954 639 920 687Q894 725 856 746Q818 768 774 777Q730 786 687 786Z"
+ },
+ {
+ "ch": "4",
+ "adv": 629,
+ "dx": 376,
+ "d": "M765 770V621H406V532L753 60H869V526H956V621H869V770ZM526 526H765V206Z"
+ },
+ {
+ "ch": "5",
+ "adv": 641,
+ "dx": 370,
+ "d": "M690 786Q611 786 556 761Q504 737 472 692Q439 648 432 592L538 580Q547 634 587 661Q627 690 690 690Q761 690 801 650Q843 611 843 540Q843 493 824 459Q804 421 766 404Q729 387 688 387Q661 387 634 395Q606 403 584 420Q562 437 550 463H442L489 60H902V156H582L557 356Q568 345 581 336Q609 315 643 306Q677 297 712 297Q783 297 837 328Q875 350 900 383Q925 416 938 456Q951 497 951 540Q951 612 918 668Q894 709 858 735Q822 761 778 774Q735 786 690 786Z"
+ },
+ {
+ "ch": "6",
+ "adv": 605,
+ "dx": 388,
+ "d": "M697 786Q614 786 556 749Q521 726 498 694Q475 662 462 624Q449 586 444 546Q438 505 438 467Q438 416 444 364Q449 312 463 262Q477 212 503 167Q536 109 591 77Q645 44 724 44Q821 44 876 92Q925 135 947 204L848 228Q836 186 808 162Q779 139 724 139Q641 139 594 210Q554 269 544 379Q554 365 566 353Q597 325 636 310Q675 295 717 295Q788 295 841 325Q879 347 904 380Q929 412 941 452Q953 492 953 535Q953 613 920 669Q898 710 862 736Q827 761 784 774Q742 786 697 786ZM698 692Q764 692 806 650Q847 608 847 535Q847 489 829 455Q811 420 778 402Q744 384 706 384Q660 384 625 402Q588 422 568 458Q548 493 548 535Q548 581 567 616Q586 654 622 673Q657 692 698 692Z"
+ },
+ {
+ "ch": "7",
+ "adv": 533,
+ "dx": 424,
+ "d": "M600 770Q600 656 631 548Q662 439 717 340Q772 240 846 156H446V60H956V149Q871 246 814 343Q758 440 732 549Q706 658 706 770Z"
+ },
+ {
+ "ch": "8",
+ "adv": 623,
+ "dx": 380,
+ "d": "M692 786Q612 786 551 762Q489 738 455 691Q420 644 420 576Q420 498 467 447Q504 407 560 388Q520 372 493 344Q454 304 454 239Q454 182 483 138Q506 104 540 83Q574 62 613 53Q652 44 692 44Q765 44 819 69Q869 93 900 138Q930 182 930 239Q930 304 892 344Q864 372 824 388Q880 407 917 447Q964 498 964 576Q964 644 930 691Q902 728 863 748Q824 769 780 778Q735 786 692 786ZM692 690Q767 690 812 659Q856 628 856 566Q856 507 816 472Q775 436 692 436Q610 436 569 472Q528 507 528 566Q528 628 573 659Q617 690 692 690ZM692 349Q754 349 788 322Q822 297 822 243Q822 196 789 168Q756 139 692 139Q629 139 596 168Q562 196 562 243Q562 297 596 322Q630 349 692 349Z"
+ },
+ {
+ "ch": "9",
+ "adv": 606,
+ "dx": 388,
+ "d": "M664 786Q574 786 517 742Q466 702 443 641L543 615Q551 642 570 659Q588 676 613 684Q638 691 664 691Q749 691 794 624Q831 568 838 453Q827 469 814 482Q785 511 747 526Q709 542 664 542Q595 542 542 512Q504 490 478 456Q453 422 440 382Q428 341 428 298Q428 219 460 162Q483 123 518 96Q553 70 594 57Q636 44 680 44Q772 44 830 85Q865 109 887 143Q909 177 922 216Q935 255 940 296Q945 338 945 378Q945 427 940 478Q935 530 922 579Q908 628 882 672Q849 726 795 756Q742 786 664 786ZM678 451Q723 451 758 433Q796 413 814 376Q832 340 832 298Q832 251 814 216Q795 177 760 158Q724 138 682 138Q636 138 603 158Q568 180 552 218Q535 256 535 297Q535 344 554 379Q572 414 605 432Q638 451 678 451Z"
+ },
+ { "ch": ".", "adv": 214, "dx": 584, "d": "M628 770V647H754V770Z" },
+ { "ch": ",", "adv": 214, "dx": 584, "d": "M633 927 683 770H628V647H754V755L692 927Z" },
+ { "ch": ":", "adv": 304, "dx": 539, "d": "M628 770V647H754V770ZM628 387V264H754V387Z" },
+ {
+ "ch": ";",
+ "adv": 304,
+ "dx": 539,
+ "d": "M628 387V264H754V387ZM633 927 683 770H628V647H754V755L692 927Z"
+ },
+ {
+ "ch": "!",
+ "adv": 228,
+ "dx": 577,
+ "d": "M660 554Q654 487 648 420Q643 353 643 286V60H746V286Q746 352 741 419Q736 486 730 553ZM628 770V647H755V770Z"
+ },
+ {
+ "ch": "?",
+ "adv": 571,
+ "dx": 406,
+ "d": "M637 557Q638 487 660 446Q682 403 735 373Q773 350 793 333Q812 316 820 295Q827 274 827 249Q827 201 795 170Q763 138 706 138Q639 138 602 174Q566 208 558 273L451 263Q458 201 488 153Q512 115 546 91Q581 67 622 56Q663 44 706 44Q775 44 827 70Q878 97 906 144Q933 192 933 249Q933 292 920 322Q910 347 892 366Q873 386 852 402Q830 417 808 431Q769 456 755 484Q741 510 740 558ZM624 770V647H749V770Z"
+ },
+ { "ch": "'", "adv": 187, "dx": 598, "d": "M660 329 644 141V60H740V141L725 329Z" },
+ {
+ "ch": "\"",
+ "adv": 361,
+ "dx": 510,
+ "d": "M576 329 556 141V60H652L646 329ZM736 329 729 60H826V141L805 329Z"
+ },
+ { "ch": "-", "adv": 421, "dx": 480, "d": "M524 524V433H859V524Z" },
+ { "ch": "–", "adv": 595, "dx": 394, "d": "M438 523V433H946V523Z" },
+ { "ch": "—", "adv": 911, "dx": 236, "d": "M280 523V433H1104V523Z" },
+ {
+ "ch": "(",
+ "adv": 290,
+ "dx": 546,
+ "d": "M738 892Q592 676 592 450Q592 223 738 8L809 41Q695 246 695 450Q695 558 726 662Q758 765 809 859Z"
+ },
+ {
+ "ch": ")",
+ "adv": 290,
+ "dx": 546,
+ "d": "M645 892 574 859Q626 765 657 662Q688 558 688 450Q688 246 574 41L645 8Q791 223 791 450Q791 676 645 892Z"
+ },
+ { "ch": "[", "adv": 361, "dx": 510, "d": "M856 880H599V20H856V103H696V797H856Z" },
+ { "ch": "]", "adv": 361, "dx": 510, "d": "M526 880V797H686V103H526V20H783V880Z" },
+ { "ch": "/", "adv": 494, "dx": 444, "d": "M484 880 779 20H877L582 880Z" },
+ {
+ "ch": "&",
+ "adv": 646,
+ "dx": 368,
+ "d": "M637 786Q530 786 469 736Q408 687 408 596Q408 550 422 514Q433 484 454 460Q474 435 500 415Q525 395 551 378Q521 341 500 300Q478 260 478 213Q478 134 527 89Q576 44 664 44Q721 44 760 64Q801 83 822 120Q842 156 842 201Q842 236 829 265Q816 294 794 318Q773 342 746 362Q720 383 692 400L842 589Q873 545 874 458L977 460Q975 514 958 568Q942 623 907 665L995 770H873L839 729Q812 752 778 764Q745 777 708 782Q672 786 637 786ZM648 692Q669 692 692 690Q715 687 736 679Q757 671 772 655L608 450Q583 468 562 488Q541 508 528 534Q516 559 516 591Q516 637 549 665Q581 692 648 692ZM638 332Q662 318 684 300Q706 283 720 260Q735 238 735 209Q735 176 716 157Q697 140 664 140Q626 140 606 160Q586 179 586 215Q586 249 602 278Q618 306 638 332Z"
+ },
+ {
+ "ch": "@",
+ "adv": 924,
+ "dx": 229,
+ "d": "M876 840Q822 862 764 872Q707 883 648 883Q530 883 447 840Q364 797 320 716Q275 635 275 521Q275 460 288 400Q302 341 330 287Q357 233 401 188Q443 145 496 116Q549 88 607 74Q665 60 726 60Q842 60 928 104Q1013 148 1060 228Q1108 308 1108 416Q1108 498 1083 559Q1068 595 1044 624Q1020 654 988 672Q955 689 914 689Q883 689 858 676Q833 664 818 640Q808 626 804 609Q794 626 779 640Q753 665 720 680Q686 694 651 694Q593 694 552 671Q523 654 505 628Q487 603 478 572Q470 542 470 510Q470 442 496 387Q522 333 571 300Q620 268 680 268Q708 268 738 277Q767 286 789 305Q801 316 809 329L814 271H898L881 478Q880 501 878 524Q875 548 875 572Q875 592 888 604Q902 617 923 617Q972 617 1001 565Q1030 513 1030 422Q1030 329 995 264Q975 227 945 202Q915 178 878 163Q842 148 802 142Q763 135 723 135Q648 135 578 161Q508 187 456 241Q402 296 378 369Q354 442 354 518Q354 610 389 675Q414 723 456 752Q497 782 548 795Q599 808 652 808Q704 808 756 798Q808 789 857 768ZM667 619Q713 619 742 595Q773 572 787 536Q801 499 801 461Q801 427 790 401Q778 370 752 356Q725 343 693 343Q651 343 623 364Q591 389 578 427Q564 465 564 503Q564 553 587 585Q610 619 667 619Z"
+ },
+ {
+ "ch": "#",
+ "adv": 511,
+ "dx": 436,
+ "d": "M687 770 720 582H600L567 770H478L511 582H431L445 499H526L555 335H471L484 252H570L604 60H693L659 252H779L813 60H902L868 252H947L935 335H853L824 499H908L895 582H810L776 770ZM615 499H735L764 335H644Z"
+ },
+ {
+ "ch": "%",
+ "adv": 811,
+ "dx": 286,
+ "d": "M487 404Q419 404 374 359Q330 314 330 228Q330 141 374 96Q419 52 488 52Q557 52 600 96Q644 142 644 228Q644 314 600 358Q556 404 487 404ZM488 338Q526 338 546 310Q565 281 565 228Q565 175 546 146Q526 118 488 118Q450 118 430 146Q410 175 410 228Q410 281 430 310Q450 338 488 338ZM897 778Q829 778 784 733Q740 687 740 602Q740 515 784 470Q829 426 897 426Q966 426 1010 471Q1054 515 1054 602Q1054 687 1010 733Q966 778 897 778ZM897 712Q935 712 955 684Q974 655 974 602Q974 549 955 520Q935 492 897 492Q859 492 839 520Q820 549 820 602Q820 655 839 684Q859 712 897 712ZM408 770 893 60H976L491 770Z"
+ },
+ {
+ "ch": "*",
+ "adv": 431,
+ "dx": 476,
+ "d": "M630 393 571 356 636 258H520V185L636 186L571 88L630 50L692 153L755 50L814 88L749 186L864 185V258H749L814 356L755 393L692 291Z"
+ },
+ {
+ "ch": "+",
+ "adv": 564,
+ "dx": 409,
+ "d": "M647 718V522H451V433H647V237H736V433H932V522H736V718Z"
+ },
+ { "ch": "=", "adv": 546, "dx": 418, "d": "M460 411V322H923V411ZM460 623V534H923V623Z" },
+ {
+ "ch": "$",
+ "adv": 643,
+ "dx": 370,
+ "d": "M661 860V782Q607 776 564 754Q504 724 469 670Q434 617 427 552L531 542Q538 589 560 622Q584 660 625 675Q642 682 661 686V454Q582 434 533 409Q484 385 462 348Q441 312 441 258Q441 199 470 154Q492 118 526 97Q560 76 600 67Q630 60 661 58V-30H737V62Q780 68 814 86Q869 115 902 166Q935 216 944 276L839 286Q834 248 815 217Q793 182 756 166Q746 162 737 159V377Q813 397 860 423Q905 449 932 490Q958 531 958 583Q958 645 926 690Q902 724 866 745Q830 766 789 775Q763 781 737 783V860ZM737 690Q765 687 787 679Q817 669 835 646Q853 622 853 589Q853 559 839 536Q825 513 784 493Q765 484 737 474ZM661 358V151Q611 155 581 179Q545 208 545 255Q545 285 560 305Q574 326 612 341Q632 349 661 358Z"
+ },
+ {
+ "ch": "€",
+ "adv": 740,
+ "dx": 321,
+ "d": "M756 786Q693 786 636 758Q580 731 541 681Q496 626 477 556Q474 546 471 535H377V459H459Q457 438 457 416Q457 399 458 382H377V306H469Q472 291 476 275Q496 205 540 149Q580 99 636 72Q693 44 756 44Q822 44 874 73Q928 103 962 154Q997 204 1013 262L908 282Q899 246 879 213Q859 180 828 160Q797 140 756 140Q694 140 651 176Q617 205 599 245Q585 274 577 306H801L790 382H566Q565 399 565 416Q565 438 567 459H781L770 535H580Q583 546 587 556Q608 619 651 654Q694 690 756 690Q788 690 814 677Q841 664 860 642Q880 619 893 592Q906 564 911 534L1019 552Q1006 616 972 668Q936 724 880 755Q823 786 756 786Z"
+ },
+ {
+ "ch": "",
+ "adv": 833,
+ "dx": 274,
+ "d": "M620 524 888 60H666Q637 60 612 74Q587 89 572 114L336 524ZM1046 524H620L478 770H841Q869 770 894 756Q918 743 933 720Z"
+ },
+ {
+ "ch": "",
+ "adv": 1069,
+ "dx": 156,
+ "d": "M1098 550H570L394 855H844Q879 855 909 838Q939 822 958 793V794ZM570 550 902 -25H628Q592 -25 560 -7Q529 11 511 42L218 550Z"
+ },
+ {
+ "ch": "",
+ "adv": 1316,
+ "dx": 33,
+ "d": "M975 550H447L271 855H721Q756 855 786 838Q816 822 835 793V794ZM447 550 779 -25H505Q469 -25 438 -7Q406 11 388 42L95 550Z"
+ }
+ ],
+ "600": [
+ {
+ "ch": "A",
+ "adv": 701,
+ "dx": 340,
+ "d": "M362 770 618 60H764L1020 770H896L834 592H547L486 770ZM584 488H798L691 175Z"
+ },
+ {
+ "ch": "B",
+ "adv": 694,
+ "dx": 344,
+ "d": "M429 770V60H689Q818 60 884 106Q951 152 951 252Q951 297 932 331Q910 369 871 386Q843 399 813 403Q887 410 931 451Q981 499 981 575Q981 672 914 721Q848 770 726 770ZM547 667H722Q786 667 824 640Q860 614 860 563Q860 513 824 485Q786 457 722 457H547ZM547 361H686Q755 361 792 335Q830 309 830 262Q830 211 793 187Q757 163 686 163H547Z"
+ },
+ {
+ "ch": "C",
+ "adv": 721,
+ "dx": 330,
+ "d": "M702 786Q605 786 532 742Q489 716 460 680Q430 644 412 600Q393 557 384 510Q376 463 376 416Q376 302 416 218Q457 135 530 89Q604 44 703 44Q836 44 910 110Q981 174 1005 286L884 304Q870 232 825 191Q781 149 703 149Q640 149 595 182Q557 208 536 246Q516 284 506 328Q497 373 497 416Q497 499 524 558Q547 613 594 647Q640 681 702 681Q785 681 830 635Q876 592 888 514L1010 531Q995 605 958 662Q930 705 889 732Q848 760 800 773Q752 786 702 786Z"
+ },
+ {
+ "ch": "D",
+ "adv": 707,
+ "dx": 338,
+ "d": "M423 770V60H655Q824 60 914 152Q1005 245 1005 416Q1005 586 916 678Q827 770 661 770ZM541 665H655Q770 665 826 603Q883 541 883 416Q883 289 826 227Q770 165 655 165H541Z"
+ },
+ {
+ "ch": "E",
+ "adv": 615,
+ "dx": 384,
+ "d": "M469 770V60H938V165H587V363H926V465H587V665H946V770Z"
+ },
+ { "ch": "F", "adv": 600, "dx": 391, "d": "M476 770V60H944V165H594V372H926V474H594V770Z" },
+ {
+ "ch": "G",
+ "adv": 753,
+ "dx": 314,
+ "d": "M698 786Q592 786 516 738Q459 703 425 651Q391 599 376 538Q360 478 360 416Q360 309 400 225Q441 141 518 92Q596 44 704 44Q796 44 860 75Q922 105 960 158Q997 211 1012 274L887 293Q875 228 831 188Q789 149 705 149Q630 149 581 186Q546 212 525 250Q504 289 496 332Q488 374 488 416Q488 492 510 552Q533 612 582 646Q631 681 706 681Q764 681 806 657Q849 633 872 590Q896 548 898 502H706V406H1017V770H935L930 661Q921 678 909 693Q885 723 850 744Q816 764 776 775Q737 786 698 786Z"
+ },
+ {
+ "ch": "H",
+ "adv": 720,
+ "dx": 331,
+ "d": "M416 770V60H534V361H849V60H967V770H849V465H534V770Z"
+ },
+ { "ch": "I", "adv": 287, "dx": 548, "d": "M633 770V60H751V770Z" },
+ {
+ "ch": "J",
+ "adv": 614,
+ "dx": 384,
+ "d": "M687 786Q613 786 558 753Q520 730 495 694Q470 659 458 617Q445 575 444 532L564 530Q566 603 597 640Q629 681 687 681Q747 681 779 639Q811 598 811 519V60H929V519Q929 600 899 661Q879 702 846 730Q814 757 773 772Q732 786 687 786Z"
+ },
+ {
+ "ch": "K",
+ "adv": 666,
+ "dx": 358,
+ "d": "M443 770V60H561V393L851 60H993L723 370L1010 770H872L644 452L561 546V770Z"
+ },
+ { "ch": "L", "adv": 587, "dx": 398, "d": "M483 770V60H601V665H943V770Z" },
+ {
+ "ch": "M",
+ "adv": 899,
+ "dx": 242,
+ "d": "M327 770V60H487L692 628L896 60H1057V770H939V263L753 769H631L445 263V770Z"
+ },
+ {
+ "ch": "N",
+ "adv": 749,
+ "dx": 316,
+ "d": "M401 770V60H545L863 619V60H981V770H832L519 225V770Z"
+ },
+ {
+ "ch": "O",
+ "adv": 760,
+ "dx": 311,
+ "d": "M691 786Q586 786 512 741Q469 716 440 680Q410 644 392 600Q373 557 365 510Q357 464 357 416Q357 301 397 218Q437 134 512 89Q587 44 691 44Q796 44 872 89Q914 115 944 152Q973 188 992 232Q1010 275 1018 322Q1026 369 1026 416Q1026 531 986 614Q946 697 871 741Q796 786 691 786ZM691 681Q757 681 806 649Q844 624 866 586Q887 548 896 504Q904 459 904 416Q904 332 879 272Q853 213 805 181Q757 149 691 149Q625 149 577 181Q538 207 517 245Q496 283 487 328Q478 373 478 416Q478 500 504 559Q530 618 578 649Q625 681 691 681Z"
+ },
+ {
+ "ch": "P",
+ "adv": 663,
+ "dx": 360,
+ "d": "M445 770V60H715Q838 60 907 119Q976 179 976 284Q976 353 944 403Q920 443 883 466Q846 489 802 498Q758 508 715 508H563V770ZM563 404H710Q780 404 817 373Q854 343 854 284Q854 224 818 195Q781 165 710 165H563Z"
+ },
+ {
+ "ch": "Q",
+ "adv": 754,
+ "dx": 314,
+ "d": "M873 836 816 763Q787 776 755 781Q723 786 691 786Q588 786 513 737Q460 702 426 650Q392 599 376 538Q360 478 360 416Q360 311 398 227Q436 143 511 94Q584 44 691 44Q799 44 872 94Q926 129 960 181Q993 233 1008 294Q1023 354 1023 416Q1023 474 1009 530Q995 587 966 636Q936 685 890 722L981 836ZM691 681Q706 681 720 680Q735 678 749 672L648 546H756L820 632Q852 605 869 570Q886 534 894 494Q901 455 901 416Q901 344 878 283Q855 223 809 186Q763 149 691 149Q619 149 573 186Q539 213 519 250Q499 288 490 331Q481 374 481 416Q481 487 505 548Q527 608 574 644Q621 681 691 681Z"
+ },
+ {
+ "ch": "R",
+ "adv": 687,
+ "dx": 348,
+ "d": "M433 770V60H722Q799 60 855 86Q911 112 941 162Q971 213 971 274Q971 307 960 336Q948 366 927 390Q906 415 877 429Q864 436 850 441Q890 447 916 469Q953 499 959 563L978 770H858L842 580Q839 537 814 517Q789 497 731 497H551V770ZM551 391H721Q780 391 815 363Q849 333 849 279Q849 224 814 195Q779 165 712 165H551Z"
+ },
+ {
+ "ch": "S",
+ "adv": 702,
+ "dx": 340,
+ "d": "M707 786Q614 786 546 755Q484 726 446 674Q408 623 398 559L526 545Q534 585 554 614Q571 639 596 654Q621 668 650 675Q679 682 709 682Q757 682 790 670Q821 660 840 638Q858 616 858 584Q858 556 843 533Q828 510 787 492Q745 473 664 455Q572 434 516 409Q460 384 436 346Q411 308 411 252Q411 190 443 143Q468 106 506 84Q545 63 590 54Q634 44 679 44Q768 44 829 74Q887 102 922 150Q958 199 970 257L843 273Q836 239 819 213Q796 179 758 164Q719 148 677 148Q613 148 577 176Q539 202 539 247Q539 276 555 297Q571 317 609 331Q648 345 719 361Q819 382 878 413Q936 443 962 484Q987 525 987 578Q987 642 952 688Q924 725 884 746Q845 768 798 777Q752 786 707 786Z"
+ },
+ { "ch": "T", "adv": 578, "dx": 402, "d": "M633 770V165H416V60H967V165H751V770Z" },
+ {
+ "ch": "U",
+ "adv": 699,
+ "dx": 342,
+ "d": "M692 786Q607 786 543 754Q499 731 470 694Q441 658 426 612Q412 567 412 518V60H530V518Q530 596 573 638Q615 681 692 681Q770 681 812 638Q854 596 854 518V60H972V518Q972 600 938 660Q913 705 874 732Q835 760 788 773Q741 786 692 786Z"
+ },
+ {
+ "ch": "V",
+ "adv": 700,
+ "dx": 341,
+ "d": "M619 770 363 60H487L692 638L896 60H1021L763 770Z"
+ },
+ {
+ "ch": "W",
+ "adv": 981,
+ "dx": 200,
+ "d": "M428 770 240 60H364L499 607L634 60H749L884 607L1017 60H1143L954 770H820L692 267L563 770Z"
+ },
+ {
+ "ch": "X",
+ "adv": 648,
+ "dx": 367,
+ "d": "M383 770 620 414 385 60H523L693 323L860 60H998L763 412L1001 770H863L691 503L520 770Z"
+ },
+ {
+ "ch": "Y",
+ "adv": 606,
+ "dx": 388,
+ "d": "M633 770V487L384 60H517L691 370L866 60H1000L750 487V770Z"
+ },
+ {
+ "ch": "Z",
+ "adv": 571,
+ "dx": 406,
+ "d": "M436 770V664L796 165H450V60H937V166L574 665H949V770Z"
+ },
+ {
+ "ch": "a",
+ "adv": 585,
+ "dx": 398,
+ "d": "M625 782Q541 782 491 744Q441 705 441 636Q441 568 483 529Q525 491 612 473L793 433Q793 403 786 384Q779 364 765 349Q737 319 683 319Q634 319 606 342Q575 366 567 415H447Q459 322 526 271Q586 225 683 225Q794 225 852 282Q909 340 909 445V749Q909 755 911 760Q913 764 916 764V770H803V681Q797 695 788 707Q768 732 741 749Q714 766 684 774Q653 782 625 782ZM645 694Q691 694 724 677Q757 658 775 625Q793 592 793 554V517L645 550Q599 559 581 578Q561 597 561 626Q561 658 583 677Q605 694 645 694Z"
+ },
+ {
+ "ch": "b",
+ "adv": 617,
+ "dx": 382,
+ "d": "M732 782Q681 782 637 759Q593 736 569 690L566 770H457V60H573V328Q589 296 614 273Q639 250 670 238Q700 225 732 225Q801 225 852 259Q891 286 914 326Q938 366 948 412Q957 457 957 503Q957 589 930 651Q903 712 850 747Q798 782 732 782ZM709 684Q768 684 802 636Q837 588 837 504Q837 418 803 370Q768 322 710 322Q667 322 636 343Q611 361 597 388Q583 414 578 444Q573 475 573 504Q573 559 589 600Q604 639 636 662Q667 684 709 684Z"
+ },
+ {
+ "ch": "c",
+ "adv": 574,
+ "dx": 404,
+ "d": "M703 782Q626 782 568 748Q525 722 498 683Q472 644 460 598Q447 551 447 504Q447 420 479 357Q500 314 534 284Q569 255 612 240Q656 225 703 225Q770 225 821 249Q872 271 904 314Q935 357 945 412L826 427Q818 376 785 350Q752 322 703 322Q639 322 602 370Q567 418 567 504Q567 588 602 637Q639 684 703 684Q752 684 785 657Q819 629 826 573L945 587Q936 643 907 686Q883 719 850 740Q818 762 780 772Q743 782 703 782Z"
+ },
+ {
+ "ch": "d",
+ "adv": 617,
+ "dx": 382,
+ "d": "M647 782Q578 782 528 748Q489 721 466 681Q444 641 434 595Q425 549 425 504Q425 419 452 356Q478 296 530 260Q581 225 647 225Q679 225 710 236Q742 248 768 271Q793 294 809 328V60H925V770H816L813 690Q797 721 771 742Q745 762 712 772Q680 782 647 782ZM679 684Q721 684 749 664Q773 646 786 620Q800 593 804 562Q809 532 809 504Q809 444 794 405Q780 367 750 344Q719 322 680 322Q618 322 581 371Q545 419 545 504Q545 587 582 636Q618 684 679 684Z"
+ },
+ {
+ "ch": "e",
+ "adv": 585,
+ "dx": 398,
+ "d": "M697 782Q618 782 561 748Q518 722 492 683Q465 644 453 598Q441 551 441 504Q441 420 472 357Q493 314 528 285Q562 256 604 240Q647 225 694 225Q768 225 824 259Q868 285 894 326Q919 366 930 414Q942 461 942 509V536H561Q565 612 601 649Q637 686 698 686Q739 686 772 665Q805 644 816 603L929 631Q907 696 850 737Q787 782 697 782ZM561 454H821Q816 386 781 353Q747 320 694 320Q640 320 605 355Q570 388 561 454Z"
+ },
+ {
+ "ch": "f",
+ "adv": 423,
+ "dx": 480,
+ "d": "M610 770V330H535V237H610V209Q610 140 648 100Q686 60 767 60H867L826 153H787Q760 153 743 171Q726 189 726 216V237H859V330H726V770Z"
+ },
+ {
+ "ch": "g",
+ "adv": 616,
+ "dx": 383,
+ "d": "M678 937Q641 937 605 929Q569 921 538 904Q506 886 482 859Q458 832 446 794L560 767Q569 802 598 823Q624 842 678 842Q741 842 775 814Q809 785 809 728V641Q795 674 770 697Q745 720 715 732Q685 743 654 743Q587 743 536 710Q497 686 473 650Q449 614 438 572Q426 529 426 485Q426 408 454 350Q473 312 503 284Q533 256 570 240Q608 225 651 225Q685 225 716 238Q748 251 773 276Q798 300 813 336V237H925V725Q925 793 895 841Q871 878 836 899Q801 920 760 928Q719 937 678 937ZM677 649Q737 649 773 605Q809 561 809 484Q810 433 794 396Q778 360 747 340Q716 319 677 319Q614 319 580 364Q546 408 546 484Q546 560 581 604Q616 649 677 649Z"
+ },
+ {
+ "ch": "h",
+ "adv": 598,
+ "dx": 392,
+ "d": "M467 770V60H583V316Q590 296 601 283Q626 253 662 239Q699 225 737 225Q795 225 835 251Q865 270 882 298Q900 327 908 360Q916 394 916 428V770H801V457Q801 388 777 355Q755 321 704 321Q649 321 616 356Q583 391 583 459V770Z"
+ },
+ { "ch": "i", "adv": 265, "dx": 558, "d": "M633 770V237H749V770ZM631 162V53H751V162Z" },
+ {
+ "ch": "j",
+ "adv": 298,
+ "dx": 542,
+ "d": "M540 925V829H591Q618 829 634 816Q650 803 650 769V237H766V773Q766 855 731 890Q695 925 610 925ZM648 162V53H768V162Z"
+ },
+ {
+ "ch": "k",
+ "adv": 621,
+ "dx": 380,
+ "d": "M455 770V60H571V490L801 237H945L737 460L953 770H822L660 531L571 626V770Z"
+ },
+ { "ch": "l", "adv": 265, "dx": 558, "d": "M749 770H633V60H749Z" },
+ {
+ "ch": "m",
+ "adv": 891,
+ "dx": 246,
+ "d": "M321 770V237H426L429 338Q437 319 448 302Q470 267 502 246Q535 225 577 225Q644 225 687 264Q718 292 732 335Q741 310 755 291Q777 258 812 242Q847 225 886 225Q942 225 981 248Q1013 267 1030 296Q1048 325 1056 360Q1063 394 1063 428V770H947V457Q947 389 923 355Q899 321 850 321Q818 321 795 338Q775 351 764 372Q754 392 750 415Q746 438 746 461V770H637V461Q637 393 616 357Q594 321 543 321Q510 321 487 338Q467 351 456 372Q446 392 442 415Q437 438 437 461V770Z"
+ },
+ {
+ "ch": "n",
+ "adv": 598,
+ "dx": 392,
+ "d": "M467 770V237H572L575 333Q575 333 576 332Q584 305 597 289Q621 257 658 241Q695 225 736 225Q796 225 836 251Q865 271 882 299Q900 327 908 360Q916 394 916 428V770H801V463Q801 417 791 386Q782 355 758 338Q735 321 702 321Q648 321 616 358Q583 394 583 463V770Z"
+ },
+ {
+ "ch": "o",
+ "adv": 598,
+ "dx": 392,
+ "d": "M691 782Q614 782 556 748Q513 722 486 683Q460 644 448 598Q435 551 435 504Q435 419 467 356Q488 313 522 284Q557 255 601 240Q645 225 691 225Q769 225 827 260Q870 285 896 324Q923 363 936 410Q948 456 948 503Q948 588 916 650Q894 693 860 722Q826 752 782 767Q739 782 691 782ZM692 684Q757 684 793 637Q828 589 828 504Q828 419 793 370Q757 322 692 322Q627 322 590 370Q555 419 555 504Q555 588 590 637Q627 684 692 684Z"
+ },
+ {
+ "ch": "p",
+ "adv": 617,
+ "dx": 382,
+ "d": "M457 925V237H567L569 330Q580 307 596 288Q621 258 656 242Q690 225 730 225Q807 225 857 263Q894 291 916 330Q938 370 948 414Q957 459 957 504Q957 579 932 642Q907 705 856 744Q806 782 729 782Q693 782 658 767Q623 752 597 722Q582 706 573 686V925ZM705 684Q766 684 802 637Q837 589 837 504Q837 418 802 370Q766 322 706 322Q664 322 635 342Q609 359 596 386Q583 414 578 444Q573 475 573 504Q573 563 589 604Q603 642 634 663Q664 684 705 684Z"
+ },
+ {
+ "ch": "q",
+ "adv": 617,
+ "dx": 382,
+ "d": "M925 925H809V686Q800 706 785 722Q759 752 724 767Q689 782 653 782Q576 782 526 744Q488 716 466 677Q444 638 434 593Q425 548 425 504Q425 428 449 365Q474 302 525 263Q575 225 652 225Q692 225 726 242Q761 258 786 288Q802 306 813 330L815 237H925ZM676 684Q718 684 748 664Q773 648 786 620Q800 593 804 562Q809 532 809 504Q809 444 793 403Q777 366 748 344Q718 322 677 322Q615 322 580 370Q545 418 545 504Q545 589 580 637Q616 684 676 684Z"
+ },
+ {
+ "ch": "r",
+ "adv": 404,
+ "dx": 489,
+ "d": "M564 770V237H671L675 349Q678 333 683 320Q694 288 711 270Q744 237 802 237H852L810 339H802Q760 339 734 351Q713 361 702 378Q690 395 685 416Q680 438 680 459V770Z"
+ },
+ {
+ "ch": "s",
+ "adv": 561,
+ "dx": 410,
+ "d": "M702 782Q621 782 567 759Q522 739 493 704Q464 669 455 623L577 606Q586 643 611 664Q640 689 702 689Q751 689 778 674Q804 658 804 625Q804 606 795 593Q786 581 760 572Q733 562 683 553Q601 539 555 518Q509 497 491 466Q472 436 472 391Q472 318 530 272Q587 225 698 225Q775 225 824 249Q866 270 892 305Q918 340 927 383L807 397Q804 378 794 362Q779 337 752 328Q724 318 695 318Q645 318 620 337Q596 356 596 387Q596 410 605 425Q615 439 633 446Q651 454 672 458Q692 462 708 464Q791 477 839 497Q888 518 908 548Q928 580 928 624Q928 700 866 741Q804 782 702 782Z"
+ },
+ {
+ "ch": "t",
+ "adv": 387,
+ "dx": 498,
+ "d": "M758 770Q727 770 700 762Q673 753 655 734Q618 699 618 622V329H548V237H618V157L734 112V237H854V329H734V612Q734 649 745 663Q756 677 780 677H854L818 770Z"
+ },
+ {
+ "ch": "u",
+ "adv": 594,
+ "dx": 394,
+ "d": "M644 782Q563 782 516 728Q469 675 469 580V237H585V551Q585 621 608 653Q633 686 681 686Q736 686 767 649Q798 614 798 547V237H914V770H807L805 676Q802 685 798 693Q784 725 762 744Q717 782 644 782Z"
+ },
+ {
+ "ch": "v",
+ "adv": 574,
+ "dx": 404,
+ "d": "M622 770 428 237H550L692 653L832 237H956L761 770Z"
+ },
+ {
+ "ch": "w",
+ "adv": 836,
+ "dx": 273,
+ "d": "M458 770 297 237H417L526 641L639 237H744L857 641L967 237H1087L926 770H801L692 400L583 770Z"
+ },
+ {
+ "ch": "x",
+ "adv": 619,
+ "dx": 382,
+ "d": "M431 770 624 498 438 237H566L693 424L816 237H946L763 500L954 770H826L694 572L560 770Z"
+ },
+ {
+ "ch": "y",
+ "adv": 563,
+ "dx": 410,
+ "d": "M518 925V829H585Q606 829 622 822Q637 814 644 792L660 751H625L434 237H555L696 644L830 237H951L741 830Q725 880 692 903Q660 925 603 925Z"
+ },
+ {
+ "ch": "z",
+ "adv": 562,
+ "dx": 410,
+ "d": "M463 770V670L778 329H473V237H913V337L594 677H921V770Z"
+ },
+ {
+ "ch": "0",
+ "adv": 680,
+ "dx": 351,
+ "d": "M691 786Q602 786 537 741Q498 714 472 677Q445 640 430 596Q414 553 407 507Q400 461 400 416Q400 302 436 218Q472 135 537 89Q602 44 691 44Q781 44 847 89Q886 117 912 154Q939 192 954 236Q970 279 977 325Q984 371 984 416Q984 530 948 613Q912 696 847 741Q782 786 691 786ZM691 681Q773 681 817 612Q862 544 862 416Q862 330 842 270Q822 210 784 180Q746 149 691 149Q637 149 600 180Q574 200 559 228Q544 257 536 289Q528 321 525 354Q522 386 522 416Q522 544 566 613Q611 681 691 681Z"
+ },
+ {
+ "ch": "1",
+ "adv": 418,
+ "dx": 482,
+ "d": "M673 770V273H523V180H584Q625 180 650 170Q672 161 682 142Q692 124 696 102Q699 80 699 60H791V770Z"
+ },
+ {
+ "ch": "2",
+ "adv": 639,
+ "dx": 372,
+ "d": "M433 770Q433 687 457 624Q472 584 498 551Q523 518 555 491Q587 464 624 441Q660 418 696 399Q745 374 774 353Q799 336 814 312Q829 287 829 256Q829 224 816 201Q804 181 787 170Q770 159 749 154Q728 149 707 149Q642 149 605 185Q568 219 558 284L437 271Q449 167 517 107Q587 44 707 44Q784 44 838 70Q892 96 922 145Q951 194 951 254Q951 308 933 347Q917 382 888 408Q859 433 825 453Q791 473 760 490Q670 539 624 584Q578 629 575 665H951V770Z"
+ },
+ {
+ "ch": "3",
+ "adv": 634,
+ "dx": 374,
+ "d": "M688 786Q564 786 496 728Q431 672 424 582L544 572Q551 628 588 654Q628 681 688 681Q729 681 763 669Q797 657 817 632Q838 607 838 566Q838 505 796 476Q755 446 687 446H626V348H687Q741 348 778 326Q814 303 814 249Q814 201 783 175Q753 149 690 149Q628 149 597 174Q565 199 558 239L439 224Q452 144 514 95Q578 44 690 44Q767 44 823 68Q876 91 906 136Q935 182 935 239Q935 304 893 344Q863 374 813 391Q872 406 910 444Q959 494 959 571Q959 639 925 687Q899 725 860 746Q821 768 776 777Q732 786 688 786Z"
+ },
+ {
+ "ch": "4",
+ "adv": 638,
+ "dx": 372,
+ "d": "M758 770V625H401V527L741 60H876V520H962V625H876V770ZM533 520H758V219Z"
+ },
+ {
+ "ch": "5",
+ "adv": 651,
+ "dx": 366,
+ "d": "M690 786Q609 786 552 761Q500 737 468 692Q435 647 428 591L547 576Q556 628 593 653Q631 681 690 681Q758 681 797 643Q835 605 835 538Q835 493 818 462Q799 426 764 410Q728 393 689 393Q663 393 637 401Q611 409 590 425Q568 441 557 467H436L484 60H908V165H587L564 355Q575 343 588 334Q616 315 650 306Q684 297 718 297Q791 297 844 328Q882 350 906 383Q931 416 944 456Q957 496 957 538Q957 612 924 668Q899 709 862 735Q825 761 780 774Q736 786 690 786Z"
+ },
+ {
+ "ch": "6",
+ "adv": 612,
+ "dx": 385,
+ "d": "M698 786Q613 786 553 749Q518 726 495 694Q472 661 458 623Q445 585 440 544Q434 503 434 464Q434 413 440 361Q445 309 460 260Q474 210 501 166Q535 109 591 77Q646 44 724 44Q823 44 879 92Q931 136 952 207L843 233Q831 192 803 170Q777 148 724 148Q645 148 600 216Q562 271 553 376Q562 363 574 353Q604 325 642 312Q681 298 722 298Q793 298 847 327Q885 349 910 381Q935 413 947 453Q959 493 959 535Q959 614 925 670Q902 710 866 736Q830 761 786 774Q743 786 698 786ZM699 684Q761 684 801 644Q840 604 840 535Q840 493 822 460Q805 427 774 410Q742 393 705 393Q662 393 629 410Q594 428 576 462Q557 496 557 535Q557 579 575 613Q592 648 626 666Q660 684 699 684Z"
+ },
+ {
+ "ch": "7",
+ "adv": 537,
+ "dx": 422,
+ "d": "M595 770Q595 658 625 551Q655 444 708 346Q762 249 835 165H444V60H958V158Q876 251 821 345Q765 442 740 550Q715 658 715 770Z"
+ },
+ {
+ "ch": "8",
+ "adv": 636,
+ "dx": 373,
+ "d": "M691 786Q609 786 546 762Q482 738 448 691Q412 644 412 576Q412 498 460 447Q497 407 553 388Q513 373 486 344Q447 304 447 239Q447 182 476 138Q499 103 534 82Q570 62 610 53Q651 44 691 44Q768 44 823 69Q875 93 906 138Q937 182 937 239Q937 304 898 344Q871 372 829 388Q886 407 923 447Q971 498 971 576Q971 644 936 691Q908 728 868 748Q827 769 781 778Q735 786 691 786ZM691 681Q763 681 806 650Q849 621 849 562Q849 507 809 472Q770 439 691 439Q613 439 574 472Q534 507 534 562Q534 621 577 650Q620 681 691 681ZM691 346Q751 346 783 321Q815 297 815 247Q815 202 784 176Q753 148 691 148Q631 148 600 176Q568 202 568 247Q568 297 600 321Q632 346 691 346Z"
+ },
+ {
+ "ch": "9",
+ "adv": 615,
+ "dx": 384,
+ "d": "M666 786Q573 786 514 742Q462 702 439 637L549 609Q557 635 575 651Q593 667 616 674Q640 682 666 682Q748 682 790 619Q824 565 831 457Q820 472 806 485Q777 513 740 528Q702 542 660 542Q590 542 537 512Q498 490 473 456Q448 422 436 382Q423 341 423 298Q423 219 456 162Q479 123 514 96Q549 70 592 57Q634 44 679 44Q772 44 832 85Q868 109 891 143Q914 177 927 217Q940 257 945 299Q950 341 950 382Q950 431 945 482Q940 534 926 583Q913 632 885 675Q851 728 797 756Q743 786 666 786ZM678 445Q722 445 754 427Q790 409 807 374Q824 338 824 298Q824 253 806 220Q789 183 755 164Q721 146 682 146Q639 146 608 165Q574 186 559 222Q544 259 544 297Q544 343 561 375Q578 409 610 427Q641 445 678 445Z"
+ },
+ { "ch": ".", "adv": 222, "dx": 580, "d": "M623 770V638H759V770Z" },
+ { "ch": ",", "adv": 222, "dx": 580, "d": "M629 927 680 770H623V638H759V755L695 927Z" },
+ { "ch": ":", "adv": 307, "dx": 538, "d": "M624 770V638H760V770ZM624 395V263H760V395Z" },
+ {
+ "ch": ";",
+ "adv": 307,
+ "dx": 538,
+ "d": "M624 395V263H760V395ZM630 927 681 770H624V638H760V755L696 927Z"
+ },
+ {
+ "ch": "!",
+ "adv": 237,
+ "dx": 572,
+ "d": "M655 549Q648 483 642 416Q635 350 635 282V60H753V283Q753 348 747 415Q741 482 734 548ZM623 770V638H760V770Z"
+ },
+ {
+ "ch": "?",
+ "adv": 578,
+ "dx": 402,
+ "d": "M629 552Q630 480 652 439Q674 396 727 367Q765 346 785 329Q804 313 811 294Q818 274 818 249Q818 205 788 176Q759 147 705 147Q642 147 608 180Q575 212 567 273L445 262Q453 201 483 153Q508 115 542 91Q577 67 619 56Q661 44 705 44Q777 44 830 70Q882 97 910 144Q938 192 938 249Q938 293 925 322Q915 347 896 366Q878 386 856 402Q835 417 813 431Q775 454 761 481Q747 506 746 553ZM618 770V638H754V770Z"
+ },
+ { "ch": "'", "adv": 193, "dx": 594, "d": "M656 332 640 142V60H742V142L727 332Z" },
+ {
+ "ch": "\"",
+ "adv": 370,
+ "dx": 506,
+ "d": "M572 332 552 142V60H654L648 332ZM736 332 729 60H832V141L811 332Z"
+ },
+ { "ch": "-", "adv": 421, "dx": 480, "d": "M523 528V429H860V528Z" },
+ { "ch": "–", "adv": 596, "dx": 393, "d": "M436 527V429H948V527Z" },
+ { "ch": "—", "adv": 912, "dx": 235, "d": "M278 527V429H1106V527Z" },
+ {
+ "ch": "(",
+ "adv": 300,
+ "dx": 541,
+ "d": "M733 893Q587 676 587 450Q587 223 733 7L814 44Q703 247 703 450Q703 558 733 660Q763 763 814 856Z"
+ },
+ {
+ "ch": ")",
+ "adv": 300,
+ "dx": 541,
+ "d": "M650 893 569 856Q621 763 651 660Q681 558 681 450Q681 247 569 44L650 7Q797 223 797 450Q797 676 650 893Z"
+ },
+ { "ch": "[", "adv": 370, "dx": 506, "d": "M862 880H591V20H862V113H702V787H862Z" },
+ { "ch": "]", "adv": 370, "dx": 506, "d": "M522 880V787H682V113H522V20H792V880Z" },
+ { "ch": "/", "adv": 503, "dx": 440, "d": "M478 880 774 20H886L591 880Z" },
+ {
+ "ch": "&",
+ "adv": 665,
+ "dx": 358,
+ "d": "M633 786Q521 786 459 736Q397 687 397 596Q397 550 411 514Q423 484 444 460Q464 435 490 415Q515 395 541 378Q512 343 490 303Q468 263 468 217Q468 136 520 90Q570 44 663 44Q724 44 766 64Q808 84 830 122Q852 159 852 205Q852 240 838 269Q825 298 804 322Q782 346 756 366Q729 386 701 402L840 576Q867 536 870 457L987 460Q984 514 966 568Q949 622 914 663L1005 770H867L835 732Q808 754 774 766Q740 777 704 782Q668 786 633 786ZM645 682Q664 682 684 680Q705 677 724 670Q744 662 759 648L605 456Q582 473 562 492Q543 510 531 534Q519 558 519 588Q519 630 551 656Q581 682 645 682ZM641 328Q662 316 682 300Q703 283 717 262Q731 242 731 214Q731 183 713 166Q695 149 663 149Q628 149 609 168Q590 186 590 220Q590 252 605 278Q620 304 641 328Z"
+ },
+ {
+ "ch": "@",
+ "adv": 937,
+ "dx": 222,
+ "d": "M879 840Q824 863 766 874Q707 885 648 885Q527 885 443 842Q357 799 313 718Q268 636 268 522Q268 460 282 400Q295 341 322 287Q350 233 395 188Q438 145 492 116Q545 88 604 74Q663 60 725 60Q842 60 930 104Q1017 148 1066 228Q1114 307 1114 416Q1114 498 1089 559Q1073 596 1048 626Q1023 655 990 672Q956 689 914 689Q882 689 856 676Q830 664 814 640Q805 627 800 611Q791 626 778 639Q751 665 717 680Q683 694 648 694Q590 694 549 671Q520 655 502 629Q484 603 476 572Q467 542 467 510Q467 442 493 387Q518 333 566 300Q615 268 676 268Q704 268 734 277Q764 286 786 306Q797 315 804 327L808 271H901L884 475Q883 499 880 522Q878 545 878 568Q878 588 892 600Q905 613 925 613Q974 613 1003 562Q1031 513 1031 423Q1031 331 996 266Q975 229 944 205Q914 181 878 166Q841 152 800 146Q760 139 721 139Q646 139 576 164Q506 190 453 244Q399 298 375 370Q351 443 351 518Q351 610 386 674Q412 723 454 752Q496 781 547 794Q598 807 651 807Q704 807 757 797Q810 787 859 766ZM668 613Q711 613 738 591Q767 568 780 534Q794 499 794 462Q794 430 783 405Q771 376 746 362Q722 349 693 349Q653 349 627 370Q597 393 584 429Q570 465 570 502Q570 550 593 581Q615 613 668 613Z"
+ },
+ {
+ "ch": "#",
+ "adv": 535,
+ "dx": 424,
+ "d": "M688 770 718 589H603L572 770H469L500 589H422L437 495H516L542 339H461L476 246H558L590 60H694L662 246H777L808 60H912L880 246H957L944 339H864L837 495H918L905 589H821L790 770ZM619 495H734L761 339H646Z"
+ },
+ {
+ "ch": "%",
+ "adv": 816,
+ "dx": 283,
+ "d": "M485 404Q416 404 371 359Q326 314 326 228Q326 141 371 96Q416 52 486 52Q556 52 600 96Q645 141 645 228Q645 314 600 359Q556 404 485 404ZM486 335Q523 335 541 308Q559 280 559 228Q559 175 541 148Q522 121 486 121Q450 121 431 148Q412 175 412 228Q412 280 431 307Q450 335 486 335ZM898 778Q829 778 784 733Q738 689 738 602Q738 515 784 470Q829 426 898 426Q968 426 1013 470Q1058 515 1058 602Q1058 688 1013 733Q968 778 898 778ZM898 709Q935 709 953 682Q971 654 971 602Q971 550 953 522Q935 495 898 495Q862 495 843 522Q825 549 825 602Q825 655 843 682Q862 709 898 709ZM409 770 890 60H975L494 770Z"
+ },
+ {
+ "ch": "*",
+ "adv": 429,
+ "dx": 476,
+ "d": "M632 397 568 358 630 263H519V182L630 183L568 88L632 49L692 149L751 49L815 88L753 183L864 182V263H753L815 358L751 397L692 298Z"
+ },
+ {
+ "ch": "+",
+ "adv": 567,
+ "dx": 408,
+ "d": "M642 721V528H450V430H642V237H741V430H934V528H741V721Z"
+ },
+ { "ch": "=", "adv": 549, "dx": 416, "d": "M458 415V316H924V415ZM458 632V534H924V632Z" },
+ {
+ "ch": "$",
+ "adv": 652,
+ "dx": 365,
+ "d": "M659 860V781Q604 775 559 753Q499 724 464 670Q429 616 422 551L539 538Q546 584 566 615Q589 651 628 666Q643 672 659 676V458Q580 438 530 414Q479 389 457 352Q436 315 436 259Q436 200 465 154Q487 118 522 96Q558 75 598 66Q629 59 659 57V-30H736V60Q782 67 818 86Q874 115 907 166Q940 216 949 277L831 289Q827 252 808 222Q788 188 752 173Q744 170 736 168V372Q814 391 863 418Q908 444 935 485Q962 526 962 579Q962 642 930 687Q905 723 868 744Q832 766 790 775Q763 780 736 782V860ZM736 680Q762 677 781 670Q810 660 827 638Q844 617 844 586Q844 557 830 535Q817 513 779 495Q761 487 736 479ZM659 353V159Q614 163 586 185Q553 212 553 255Q553 285 568 304Q581 324 616 338Q634 345 659 353Z"
+ },
+ {
+ "ch": "€",
+ "adv": 749,
+ "dx": 316,
+ "d": "M754 786Q689 786 632 758Q575 731 534 681Q489 626 469 556Q465 546 463 535H372V458H450Q448 437 448 416Q448 399 450 382H372V306H461Q464 290 469 275Q489 205 534 149Q575 99 632 72Q689 44 754 44Q821 44 875 73Q930 103 966 154Q1001 206 1017 266L899 288Q890 253 871 221Q852 189 822 169Q792 149 752 149Q693 149 653 184Q621 212 603 251Q590 277 583 306H799L787 382H571Q570 399 570 416Q570 438 572 458H778L767 535H586Q588 544 591 552Q612 612 652 646Q693 681 752 681Q783 681 808 668Q834 655 852 633Q871 611 884 584Q896 558 900 530L1023 549Q1009 615 974 667Q937 724 880 755Q822 786 754 786Z"
+ },
+ {
+ "ch": "",
+ "adv": 833,
+ "dx": 274,
+ "d": "M620 524 888 60H666Q637 60 612 74Q587 89 572 114L336 524ZM1046 524H620L478 770H841Q869 770 894 756Q918 743 933 720Z"
+ },
+ {
+ "ch": "",
+ "adv": 1069,
+ "dx": 156,
+ "d": "M1098 550H570L394 855H844Q879 855 909 838Q939 822 958 793V794ZM570 550 902 -25H628Q592 -25 560 -7Q529 11 511 42L218 550Z"
+ },
+ {
+ "ch": "",
+ "adv": 1312,
+ "dx": 35,
+ "d": "M977 550H449L273 855H723Q758 855 788 838Q818 822 837 793V794ZM449 550 781 -25H507Q471 -25 440 -7Q408 11 390 42L97 550Z"
+ }
+ ],
+ "700": [
+ {
+ "ch": "A",
+ "adv": 714,
+ "dx": 334,
+ "d": "M355 770 611 60H771L1027 770H890L831 602H550L493 770ZM589 490H793L691 192Z"
+ },
+ {
+ "ch": "B",
+ "adv": 699,
+ "dx": 342,
+ "d": "M424 770V60H690Q820 60 888 106Q956 152 956 252Q956 297 937 330Q916 368 878 385Q847 400 814 403Q892 409 936 451Q986 499 986 574Q986 673 918 721Q851 770 726 770ZM555 659H721Q781 659 817 634Q852 609 852 560Q852 512 817 486Q781 460 721 460H555ZM555 358H686Q750 358 786 334Q822 310 822 264Q822 216 787 194Q752 171 686 171H555Z"
+ },
+ {
+ "ch": "C",
+ "adv": 727,
+ "dx": 328,
+ "d": "M702 786Q605 786 531 742Q488 716 458 680Q428 644 409 601Q390 558 382 511Q373 464 373 416Q373 303 414 219Q455 135 529 90Q604 44 704 44Q839 44 914 111Q986 175 1010 289L876 309Q863 238 820 198Q777 158 704 158Q643 158 600 189Q564 215 544 252Q525 289 516 332Q508 375 508 416Q508 496 533 553Q555 606 599 639Q643 672 703 672Q781 672 825 628Q868 586 879 509L1014 528Q1000 604 962 661Q933 704 892 732Q851 760 802 773Q753 786 702 786Z"
+ },
+ {
+ "ch": "D",
+ "adv": 712,
+ "dx": 335,
+ "d": "M417 770V60H654Q824 60 915 152Q1007 245 1007 416Q1007 586 917 678Q827 770 660 770ZM548 656H654Q764 656 817 597Q871 537 871 415Q871 293 817 233Q764 174 654 174H548Z"
+ },
+ {
+ "ch": "E",
+ "adv": 619,
+ "dx": 382,
+ "d": "M464 770V60H942V174H595V358H930V470H595V656H950V770Z"
+ },
+ { "ch": "F", "adv": 603, "dx": 390, "d": "M472 770V60H948V174H603V367H930V479H603V770Z" },
+ {
+ "ch": "G",
+ "adv": 761,
+ "dx": 310,
+ "d": "M696 786Q589 786 512 739Q456 704 421 652Q386 600 370 539Q355 478 355 416Q355 309 396 225Q438 141 515 92Q594 44 703 44Q797 44 862 75Q925 105 963 158Q1001 212 1017 276L877 297Q866 233 824 195Q784 158 704 158Q633 158 587 193Q553 219 533 256Q513 293 505 334Q497 376 497 416Q497 490 519 548Q541 606 587 639Q634 672 705 672Q760 672 800 650Q841 628 864 588Q886 549 888 505H705V404H1022V770H933L928 665Q920 681 909 694Q884 724 850 744Q815 765 775 776Q735 786 696 786Z"
+ },
+ {
+ "ch": "H",
+ "adv": 722,
+ "dx": 330,
+ "d": "M412 770V60H543V356H840V60H971V770H840V470H543V770Z"
+ },
+ { "ch": "I", "adv": 293, "dx": 544, "d": "M626 770V60H757V770Z" },
+ {
+ "ch": "J",
+ "adv": 620,
+ "dx": 381,
+ "d": "M687 786Q609 786 554 752Q515 729 490 693Q464 657 452 614Q439 572 438 528L570 525Q573 597 602 633Q633 672 687 672Q743 672 774 633Q805 594 805 517V60H936V517Q936 599 905 660Q884 701 850 730Q817 758 775 772Q733 786 687 786Z"
+ },
+ {
+ "ch": "K",
+ "adv": 676,
+ "dx": 353,
+ "d": "M435 770V60H566V384L843 60H999L732 371L1015 770H864L645 461L566 552V770Z"
+ },
+ { "ch": "L", "adv": 589, "dx": 396, "d": "M478 770V60H609V656H945V770Z" },
+ {
+ "ch": "M",
+ "adv": 906,
+ "dx": 238,
+ "d": "M320 770V60H496L692 608L887 60H1064V770H933V281L754 768H629L451 281V770Z"
+ },
+ {
+ "ch": "N",
+ "adv": 751,
+ "dx": 316,
+ "d": "M398 770V60H551L855 592V60H986V770H829L529 253V770Z"
+ },
+ {
+ "ch": "O",
+ "adv": 767,
+ "dx": 308,
+ "d": "M692 786Q586 786 510 741Q467 716 438 680Q408 644 389 601Q370 558 362 511Q353 464 353 416Q353 302 394 218Q435 134 510 89Q586 44 692 44Q798 44 875 89Q917 115 947 151Q977 187 996 230Q1014 274 1022 321Q1031 368 1031 416Q1031 531 990 613Q950 697 874 741Q798 786 692 786ZM691 672Q755 672 802 642Q838 617 858 580Q879 543 888 500Q896 457 896 416Q896 335 871 277Q847 220 801 189Q755 158 691 158Q628 158 583 189Q545 214 525 251Q505 288 496 332Q488 375 488 416Q488 497 513 554Q537 611 583 642Q628 672 691 672Z"
+ },
+ {
+ "ch": "P",
+ "adv": 668,
+ "dx": 357,
+ "d": "M439 770V60H714Q839 60 909 120Q980 181 980 287Q980 357 947 408Q923 448 885 472Q847 495 802 504Q758 514 714 514H570V770ZM570 401H708Q774 401 809 372Q845 343 845 287Q845 230 810 202Q775 174 708 174H570Z"
+ },
+ {
+ "ch": "Q",
+ "adv": 761,
+ "dx": 310,
+ "d": "M873 834 817 763Q788 776 755 781Q722 786 691 786Q587 786 511 738Q457 703 422 652Q388 600 372 540Q355 479 355 416Q355 310 394 226Q432 143 508 93Q582 44 691 44Q800 44 874 93Q928 128 962 180Q996 232 1012 293Q1027 354 1027 416Q1027 473 1014 529Q1000 585 970 634Q941 683 896 719L988 834ZM691 672Q704 672 718 670Q731 669 744 664L644 540H759L818 619Q847 594 863 560Q879 527 885 490Q891 453 891 416Q891 347 870 288Q848 230 804 193Q760 158 691 158Q621 158 578 193Q545 220 526 256Q507 293 498 334Q490 376 490 416Q490 485 512 543Q534 601 579 637Q623 672 691 672Z"
+ },
+ {
+ "ch": "R",
+ "adv": 692,
+ "dx": 345,
+ "d": "M427 770V60H724Q802 60 858 86Q914 112 944 162Q975 212 975 273Q975 307 964 337Q952 367 931 391Q910 415 882 430Q868 437 853 442Q895 448 921 470Q958 501 964 564L982 770H849L834 584Q831 542 807 522Q783 502 727 502H558V770ZM558 388H717Q774 388 807 361Q840 332 840 281Q840 229 807 202Q774 174 710 174H558Z"
+ },
+ {
+ "ch": "S",
+ "adv": 711,
+ "dx": 336,
+ "d": "M707 786Q612 786 543 755Q480 726 442 674Q403 622 393 558L535 543Q543 581 561 609Q578 633 602 647Q625 661 653 667Q681 673 709 673Q754 673 785 663Q815 653 832 632Q850 611 850 582Q850 555 836 534Q822 512 782 495Q743 478 666 461Q571 440 514 415Q457 389 432 351Q406 312 406 254Q406 192 439 144Q465 107 504 85Q544 63 590 54Q635 44 681 44Q771 44 834 75Q893 103 928 152Q964 201 976 259L836 276Q830 244 813 219Q791 186 754 172Q718 157 678 157Q618 157 584 182Q548 207 548 249Q548 277 564 297Q578 316 615 329Q652 343 720 358Q822 378 882 409Q941 439 967 481Q993 522 993 575Q993 640 957 687Q929 724 888 746Q848 768 800 777Q753 786 707 786Z"
+ },
+ { "ch": "T", "adv": 588, "dx": 397, "d": "M626 770V174H410V60H972V174H757V770Z" },
+ {
+ "ch": "U",
+ "adv": 702,
+ "dx": 340,
+ "d": "M692 786Q604 786 540 753Q495 730 466 694Q436 657 422 612Q407 566 407 516V60H538V516Q538 591 578 631Q618 672 692 672Q766 672 806 631Q845 591 845 516V60H976V516Q976 599 942 660Q916 705 876 732Q836 760 788 773Q741 786 692 786Z"
+ },
+ {
+ "ch": "V",
+ "adv": 713,
+ "dx": 334,
+ "d": "M612 770 355 60H493L691 623L890 60H1027L769 770Z"
+ },
+ {
+ "ch": "W",
+ "adv": 995,
+ "dx": 194,
+ "d": "M423 770 233 60H371L501 589L631 60H753L884 589L1013 60H1151L962 770H816L693 286L569 770Z"
+ },
+ {
+ "ch": "X",
+ "adv": 665,
+ "dx": 358,
+ "d": "M373 770 612 414 375 60H528L693 314L853 60H1006L769 412L1009 770H856L691 512L526 770Z"
+ },
+ {
+ "ch": "Y",
+ "adv": 617,
+ "dx": 382,
+ "d": "M626 770V490L377 60H524L691 361L858 60H1005L757 490V770Z"
+ },
+ {
+ "ch": "Z",
+ "adv": 581,
+ "dx": 400,
+ "d": "M429 770V657L781 174H445V60H941V173L585 656H953V770Z"
+ },
+ {
+ "ch": "a",
+ "adv": 592,
+ "dx": 395,
+ "d": "M622 782Q539 782 487 743Q436 705 436 636Q436 567 479 528Q522 490 610 472L787 432Q787 404 780 385Q774 366 761 352Q735 324 685 324Q638 324 612 345Q582 369 575 416H443Q455 320 523 269Q585 224 685 224Q799 224 858 281Q916 338 916 446V720Q916 734 921 745Q926 756 933 756V770H802V682Q796 696 787 707Q767 733 740 750Q712 766 682 774Q651 782 622 782ZM648 688Q691 688 722 672Q754 654 770 622Q787 591 787 555V520L649 552Q607 561 589 579Q570 596 570 624Q570 655 590 672Q611 688 648 688Z"
+ },
+ {
+ "ch": "b",
+ "adv": 625,
+ "dx": 378,
+ "d": "M738 782Q687 782 644 759Q600 736 576 691L573 770H450V60H579V327Q595 295 620 272Q645 249 676 236Q706 224 738 224Q807 224 857 258Q897 286 920 326Q943 365 953 411Q963 457 963 503Q963 588 935 650Q908 711 856 746Q804 782 738 782ZM708 677Q763 677 796 631Q829 585 829 503Q829 420 797 374Q764 328 709 328Q668 328 639 348Q615 366 602 392Q589 417 584 446Q579 475 579 503Q579 557 595 596Q609 633 638 655Q668 677 708 677Z"
+ },
+ {
+ "ch": "c",
+ "adv": 584,
+ "dx": 399,
+ "d": "M703 782Q624 782 565 747Q521 722 494 684Q466 645 453 598Q440 551 440 503Q440 419 473 356Q496 313 531 284Q566 254 610 239Q655 224 703 224Q771 224 825 248Q877 271 910 315Q942 359 951 415L820 432Q812 381 781 355Q749 328 703 328Q642 328 607 375Q574 420 574 503Q574 585 607 632Q642 677 703 677Q749 677 781 651Q813 623 819 568L952 583Q943 640 913 684Q888 718 855 740Q822 761 783 772Q744 782 703 782Z"
+ },
+ {
+ "ch": "d",
+ "adv": 625,
+ "dx": 378,
+ "d": "M641 782Q572 782 523 748Q483 721 460 680Q438 640 428 594Q419 548 419 503Q419 418 446 355Q472 295 524 260Q575 224 641 224Q673 224 704 236Q736 247 762 270Q787 293 803 327V60H932V770H809L806 691Q790 722 764 742Q738 762 706 772Q674 782 641 782ZM680 677Q719 677 746 658Q769 640 782 614Q794 589 798 560Q803 530 803 503Q803 445 788 407Q775 371 746 350Q718 328 680 328Q621 328 587 375Q553 421 553 503Q553 583 588 630Q622 677 680 677Z"
+ },
+ {
+ "ch": "e",
+ "adv": 594,
+ "dx": 394,
+ "d": "M697 782Q617 782 558 747Q515 722 488 684Q460 645 448 598Q435 551 435 503Q435 419 467 356Q490 313 525 284Q560 254 604 239Q647 224 695 224Q771 224 828 258Q873 284 899 324Q925 365 936 413Q948 461 948 510V538H569Q573 610 607 644Q642 679 699 679Q737 679 768 660Q800 640 810 600L935 630Q913 697 855 737Q789 782 697 782ZM569 452H815Q811 388 778 356Q745 325 695 325Q643 325 610 358Q577 390 569 452Z"
+ },
+ {
+ "ch": "f",
+ "adv": 433,
+ "dx": 474,
+ "d": "M602 770V336H526V236H602V216Q602 143 643 102Q682 60 767 60H872L827 160H792Q765 160 748 178Q732 196 732 223V236H865V336H732V770Z"
+ },
+ {
+ "ch": "g",
+ "adv": 624,
+ "dx": 379,
+ "d": "M679 937Q642 937 605 930Q568 922 536 905Q503 888 478 861Q454 834 441 796L567 765Q576 800 604 819Q628 837 679 837Q738 837 770 809Q802 782 802 725V643Q788 676 763 698Q738 721 708 732Q678 744 647 744Q581 744 530 711Q491 687 467 650Q443 614 432 571Q420 528 420 484Q420 407 449 349Q467 311 497 283Q527 255 564 240Q602 224 645 224Q679 224 710 237Q741 250 766 274Q791 299 806 334V236H932V722Q932 791 901 840Q876 877 840 898Q804 920 762 928Q721 937 679 937ZM678 643Q735 643 768 601Q803 558 803 483Q804 434 788 398Q773 364 744 344Q715 324 678 324Q619 324 586 367Q554 410 554 483Q554 557 587 600Q621 643 678 643Z"
+ },
+ {
+ "ch": "h",
+ "adv": 604,
+ "dx": 389,
+ "d": "M461 770V60H590V310Q597 293 606 282Q630 252 666 238Q703 224 742 224Q801 224 841 250Q871 269 888 298Q906 326 914 360Q922 393 922 427V770H793V458Q793 393 772 361Q751 328 703 328Q651 328 621 362Q590 396 590 461V770Z"
+ },
+ { "ch": "i", "adv": 272, "dx": 555, "d": "M627 770V236H756V770ZM625 164V51H759V164Z" },
+ {
+ "ch": "j",
+ "adv": 312,
+ "dx": 535,
+ "d": "M534 925V821H588Q616 821 632 809Q647 796 647 761V236H776V765Q776 850 739 888Q701 925 611 925ZM644 164V51H778V164Z"
+ },
+ {
+ "ch": "k",
+ "adv": 632,
+ "dx": 375,
+ "d": "M447 770V60H576V476L794 236H953L745 458L960 770H816L660 534L576 623V770Z"
+ },
+ { "ch": "l", "adv": 272, "dx": 555, "d": "M756 770H627V60H756Z" },
+ {
+ "ch": "m",
+ "adv": 896,
+ "dx": 243,
+ "d": "M315 770V236H432L435 337Q443 317 454 299Q476 265 508 244Q541 224 582 224Q650 224 691 263Q723 291 737 334Q745 309 759 289Q781 257 816 240Q850 224 889 224Q945 224 985 247Q1016 266 1034 295Q1053 324 1060 358Q1067 393 1067 427V770H938V460Q938 395 916 362Q894 328 848 328Q817 328 796 345Q777 358 768 378Q758 398 754 420Q750 443 750 464V770H631V464Q631 398 611 363Q591 328 543 328Q512 328 490 345Q472 358 462 378Q452 398 448 420Q444 443 444 464V770Z"
+ },
+ {
+ "ch": "n",
+ "adv": 604,
+ "dx": 389,
+ "d": "M461 770V236H578L581 331Q589 305 601 290Q625 256 662 240Q699 224 741 224Q800 224 840 249Q870 269 888 298Q906 326 914 360Q922 393 922 427V770H793V468Q793 423 785 392Q776 362 754 345Q733 328 701 328Q650 328 620 365Q590 400 590 468V770Z"
+ },
+ {
+ "ch": "o",
+ "adv": 607,
+ "dx": 388,
+ "d": "M692 782Q613 782 554 747Q510 722 482 684Q455 645 442 598Q429 551 429 503Q429 418 462 355Q484 312 520 283Q555 254 600 239Q644 224 692 224Q771 224 830 259Q874 284 902 322Q929 361 942 408Q955 455 955 502Q955 587 922 650Q899 694 864 724Q829 753 784 768Q740 782 692 782ZM693 677Q754 677 788 632Q821 585 821 503Q821 421 788 374Q754 328 693 328Q631 328 596 374Q563 421 563 503Q563 585 596 632Q631 677 693 677Z"
+ },
+ {
+ "ch": "p",
+ "adv": 625,
+ "dx": 378,
+ "d": "M450 925V236H574L576 328Q587 306 602 287Q627 257 662 240Q696 224 736 224Q812 224 862 261Q899 289 921 329Q943 369 953 414Q963 459 963 503Q963 580 937 643Q912 706 861 744Q811 782 735 782Q698 782 664 766Q629 751 603 721Q589 705 579 685V925ZM705 677Q762 677 796 631Q829 585 829 503Q829 421 796 375Q762 328 705 328Q665 328 638 347Q613 364 600 390Q588 417 584 446Q579 476 579 503Q579 560 594 599Q608 636 636 656Q665 677 705 677Z"
+ },
+ {
+ "ch": "q",
+ "adv": 625,
+ "dx": 378,
+ "d": "M932 925H803V684Q793 705 779 721Q753 751 718 766Q684 782 647 782Q571 782 521 744Q483 717 461 678Q439 638 429 592Q419 547 419 503Q419 426 444 363Q469 300 520 261Q570 224 646 224Q686 224 720 240Q754 257 780 287Q795 306 806 329L808 236H932ZM677 677Q717 677 745 658Q769 642 782 616Q794 589 798 560Q803 530 803 503Q803 445 787 406Q773 370 745 349Q717 328 677 328Q620 328 586 375Q553 421 553 503Q553 585 586 631Q620 677 677 677Z"
+ },
+ {
+ "ch": "r",
+ "adv": 413,
+ "dx": 484,
+ "d": "M556 770V236H677L680 350Q684 334 689 320Q700 288 717 270Q750 236 808 236H857L811 346H808Q766 346 739 358Q718 367 706 384Q695 400 690 421Q685 442 685 462V770Z"
+ },
+ {
+ "ch": "s",
+ "adv": 571,
+ "dx": 406,
+ "d": "M703 782Q619 782 564 759Q518 740 488 705Q459 670 450 624L584 605Q593 640 617 661Q645 684 703 684Q749 684 774 669Q798 655 798 624Q798 605 790 594Q781 582 756 573Q730 564 682 555Q598 541 551 520Q504 499 485 468Q465 438 465 392Q465 317 525 271Q584 224 699 224Q778 224 829 248Q872 269 899 304Q926 340 934 384L802 399Q799 380 790 364Q776 340 750 331Q724 322 697 322Q650 322 626 340Q603 358 603 388Q603 409 612 423Q622 437 639 444Q656 451 676 454Q695 458 710 460Q795 472 844 493Q894 514 915 545Q936 578 936 622Q936 699 873 740Q809 782 703 782Z"
+ },
+ {
+ "ch": "t",
+ "adv": 397,
+ "dx": 492,
+ "d": "M758 770Q723 770 695 761Q667 752 648 733Q610 697 610 617V335H539V236H610V160L739 110V236H859V335H739V604Q739 642 751 656Q762 670 785 670H859L819 770Z"
+ },
+ {
+ "ch": "u",
+ "adv": 600,
+ "dx": 391,
+ "d": "M639 782Q557 782 510 728Q463 675 463 579V236H592V548Q592 615 614 646Q637 677 682 677Q734 677 762 642Q791 608 791 543V236H920V770H802L800 676Q798 683 795 690Q780 723 758 743Q713 782 639 782Z"
+ },
+ {
+ "ch": "v",
+ "adv": 589,
+ "dx": 396,
+ "d": "M615 770 419 236H555L691 640L826 236H963L767 770Z"
+ },
+ {
+ "ch": "w",
+ "adv": 842,
+ "dx": 270,
+ "d": "M454 770 293 236H425L528 624L635 236H747L855 624L958 236H1090L930 770H797L692 413L587 770Z"
+ },
+ {
+ "ch": "x",
+ "adv": 632,
+ "dx": 375,
+ "d": "M423 770 616 498 430 236H570L692 417L811 236H953L770 499L960 770H820L694 578L566 770Z"
+ },
+ {
+ "ch": "y",
+ "adv": 573,
+ "dx": 404,
+ "d": "M514 925V821H582Q603 821 618 814Q633 807 641 785L655 748H618L427 236H561L695 628L822 236H955L747 827Q730 879 696 902Q664 925 606 925Z"
+ },
+ {
+ "ch": "z",
+ "adv": 571,
+ "dx": 406,
+ "d": "M458 770V663L766 335H470V236H919V343L607 670H926V770Z"
+ },
+ {
+ "ch": "0",
+ "adv": 686,
+ "dx": 348,
+ "d": "M692 786Q601 786 534 741Q495 714 468 678Q441 641 426 597Q410 553 403 507Q396 461 396 416Q396 302 432 218Q468 134 535 89Q601 44 692 44Q783 44 849 89Q889 116 916 154Q942 191 958 235Q974 279 981 325Q988 371 988 416Q988 530 952 613Q916 696 850 741Q783 786 692 786ZM691 672Q769 672 811 606Q853 541 853 416Q853 332 834 274Q815 216 779 187Q743 158 691 158Q640 158 604 187Q580 207 566 234Q551 262 544 293Q536 324 534 356Q532 387 532 416Q532 541 573 607Q615 672 691 672Z"
+ },
+ {
+ "ch": "1",
+ "adv": 431,
+ "dx": 476,
+ "d": "M668 770V284H516V185H577Q620 185 646 173Q668 164 678 145Q689 126 692 104Q696 81 696 60H799V770Z"
+ },
+ {
+ "ch": "2",
+ "adv": 646,
+ "dx": 368,
+ "d": "M429 770Q429 684 453 619Q467 579 492 546Q517 514 548 487Q580 460 616 438Q651 415 687 396Q736 371 765 351Q789 334 804 311Q819 288 819 258Q819 228 807 206Q796 188 780 178Q764 167 744 162Q725 158 706 158Q645 158 610 192Q575 225 566 287L432 273Q444 168 512 108Q584 44 705 44Q784 44 839 71Q894 97 924 146Q954 195 954 256Q954 310 936 349Q920 383 892 408Q863 434 830 454Q796 473 765 490Q677 538 633 580Q589 623 586 656H954V770Z"
+ },
+ {
+ "ch": "3",
+ "adv": 641,
+ "dx": 370,
+ "d": "M689 786Q561 786 492 727Q426 670 419 577L552 567Q559 621 594 646Q631 672 689 672Q728 672 760 660Q791 649 810 625Q829 601 829 564Q829 506 790 479Q751 451 686 451H624V347H686Q737 347 772 325Q805 304 805 253Q805 208 777 183Q748 158 689 158Q630 158 601 181Q571 206 564 244L432 227Q446 146 509 96Q575 44 689 44Q769 44 826 68Q879 91 910 136Q940 182 940 241Q940 305 898 345Q868 375 817 391Q877 407 915 445Q964 495 964 571Q964 638 930 687Q903 725 863 746Q823 768 778 777Q733 786 689 786Z"
+ },
+ {
+ "ch": "4",
+ "adv": 647,
+ "dx": 368,
+ "d": "M752 770V628H396V522L730 60H883V515H968V628H883V770ZM539 515H752V230Z"
+ },
+ {
+ "ch": "5",
+ "adv": 660,
+ "dx": 361,
+ "d": "M690 786Q606 786 548 760Q495 736 462 691Q429 646 422 589L554 572Q562 622 598 646Q633 672 690 672Q754 672 791 636Q827 600 827 536Q827 494 811 464Q792 431 759 415Q726 399 689 399Q663 399 638 406Q613 414 593 430Q573 446 562 470H429L478 60H913V174H591L569 355Q580 343 593 333Q621 314 655 305Q689 296 723 296Q796 296 850 327Q887 349 912 382Q936 415 949 454Q962 494 962 536Q962 611 928 668Q903 710 865 736Q827 762 782 774Q736 786 690 786Z"
+ },
+ {
+ "ch": "6",
+ "adv": 619,
+ "dx": 382,
+ "d": "M699 786Q611 786 551 748Q515 725 492 692Q468 660 454 622Q441 583 436 542Q430 501 430 461Q430 411 436 359Q442 307 457 258Q472 208 499 164Q534 108 590 76Q646 44 724 44Q825 44 882 93Q935 138 957 210L838 238Q826 198 799 177Q774 156 724 156Q648 156 605 221Q569 274 560 373Q569 362 580 352Q610 326 648 313Q686 300 726 300Q797 300 851 329Q889 350 914 382Q939 414 952 454Q964 494 964 536Q964 615 930 671Q906 711 869 736Q832 762 788 774Q744 786 699 786ZM699 677Q758 677 796 639Q832 601 832 536Q832 496 816 465Q800 433 770 416Q739 400 704 400Q664 400 632 417Q599 434 582 466Q564 499 564 536Q564 577 581 609Q598 643 630 660Q662 677 699 677Z"
+ },
+ {
+ "ch": "7",
+ "adv": 541,
+ "dx": 420,
+ "d": "M591 770Q591 660 620 554Q648 449 700 353Q753 257 825 174H442V60H960V166Q881 256 828 347Q772 444 748 552Q724 659 724 770Z"
+ },
+ {
+ "ch": "8",
+ "adv": 648,
+ "dx": 367,
+ "d": "M691 786Q606 786 541 762Q476 738 441 692Q405 645 405 576Q405 497 453 446Q491 407 547 388Q507 373 479 345Q440 303 440 239Q440 182 469 137Q494 102 530 82Q567 61 609 52Q651 44 691 44Q771 44 828 69Q880 92 912 136Q944 181 944 239Q944 303 905 344Q877 372 835 388Q892 407 930 446Q978 498 978 576Q978 645 943 692Q914 729 872 750Q830 770 783 778Q736 786 691 786ZM691 672Q760 672 802 643Q843 614 843 559Q843 506 804 473Q766 441 691 441Q617 441 579 473Q541 506 541 559Q541 614 582 643Q623 672 691 672ZM691 343Q748 343 779 320Q810 297 810 250Q810 208 780 183Q750 157 691 157Q634 157 604 183Q574 208 574 250Q574 297 605 320Q635 343 691 343Z"
+ },
+ {
+ "ch": "9",
+ "adv": 622,
+ "dx": 380,
+ "d": "M667 786Q572 786 512 741Q459 701 435 634L555 603Q563 628 580 644Q597 660 620 666Q642 673 667 673Q746 673 785 614Q818 563 824 460Q813 476 799 488Q770 514 733 528Q696 541 655 541Q585 541 531 511Q493 489 468 456Q443 423 430 382Q418 342 418 299Q418 220 451 163Q474 123 510 96Q546 70 589 57Q632 44 678 44Q773 44 834 84Q870 109 894 144Q918 178 932 218Q945 259 950 302Q955 344 955 385Q955 434 950 486Q945 537 930 586Q916 635 887 677Q853 730 798 757Q744 786 667 786ZM679 439Q720 439 751 422Q784 404 800 370Q815 336 815 299Q815 255 799 223Q783 189 751 171Q719 153 682 153Q641 153 612 171Q579 192 565 226Q551 261 551 298Q551 341 567 372Q583 404 613 422Q643 439 679 439Z"
+ },
+ { "ch": ".", "adv": 229, "dx": 576, "d": "M617 770V629H764V770Z" },
+ { "ch": ",", "adv": 229, "dx": 576, "d": "M626 928 678 770H617V629H764V754L698 928Z" },
+ { "ch": ":", "adv": 310, "dx": 536, "d": "M618 770V629H765V770ZM618 402V261H765V402Z" },
+ {
+ "ch": ";",
+ "adv": 310,
+ "dx": 536,
+ "d": "M618 402V261H765V402ZM627 928 679 770H618V629H765V754L699 928Z"
+ },
+ {
+ "ch": "!",
+ "adv": 246,
+ "dx": 568,
+ "d": "M650 544Q642 478 636 412Q629 346 629 279V60H760V279Q760 344 754 410Q747 477 739 543ZM618 770V629H765V770Z"
+ },
+ {
+ "ch": "?",
+ "adv": 584,
+ "dx": 399,
+ "d": "M623 547Q624 474 646 433Q668 390 721 362Q759 342 778 326Q796 311 803 292Q810 273 810 250Q810 209 782 182Q755 155 704 155Q646 155 614 186Q583 216 575 274L441 261Q448 200 479 153Q504 114 540 90Q575 66 618 55Q660 44 704 44Q780 44 833 71Q886 97 914 145Q943 193 943 250Q943 294 931 323Q920 348 902 367Q884 386 862 401Q841 416 819 430Q781 452 767 478Q753 503 752 548ZM613 770V629H760V770Z"
+ },
+ { "ch": "'", "adv": 198, "dx": 592, "d": "M653 335 637 142V60H746V142L731 335Z" },
+ {
+ "ch": "\"",
+ "adv": 379,
+ "dx": 502,
+ "d": "M568 335 547 142V60H656L650 335ZM735 335 728 60H838V142L817 335Z"
+ },
+ { "ch": "-", "adv": 421, "dx": 480, "d": "M521 533V424H861V533Z" },
+ { "ch": "–", "adv": 597, "dx": 392, "d": "M433 532V424H949V532Z" },
+ { "ch": "—", "adv": 913, "dx": 234, "d": "M275 532V424H1107V532Z" },
+ {
+ "ch": "(",
+ "adv": 310,
+ "dx": 536,
+ "d": "M728 895Q581 677 581 450Q581 223 728 5L818 46Q709 248 709 450Q709 557 738 659Q768 761 818 854Z"
+ },
+ {
+ "ch": ")",
+ "adv": 310,
+ "dx": 536,
+ "d": "M655 895 565 854Q615 761 644 659Q674 557 674 450Q674 248 565 46L655 5Q802 223 802 450Q802 677 655 895Z"
+ },
+ { "ch": "[", "adv": 379, "dx": 502, "d": "M867 880H584V20H867V123H707V777H867Z" },
+ { "ch": "]", "adv": 379, "dx": 502, "d": "M517 880V777H677V123H517V20H801V880Z" },
+ { "ch": "/", "adv": 512, "dx": 435, "d": "M471 880 767 20H894L598 880Z" },
+ {
+ "ch": "&",
+ "adv": 682,
+ "dx": 350,
+ "d": "M631 786Q514 786 451 736Q388 687 388 595Q388 549 402 513Q414 484 435 460Q456 436 482 416Q507 396 534 379Q504 345 482 306Q461 267 461 220Q461 138 514 91Q566 44 663 44Q728 44 772 65Q815 85 838 123Q862 161 862 208Q862 244 848 272Q835 301 814 325Q792 349 765 368Q738 388 710 404L839 565Q864 527 867 455L998 460Q994 513 976 566Q958 620 922 661L1015 770H862L833 735Q805 756 771 767Q737 778 701 782Q665 786 631 786ZM643 672Q661 672 680 670Q698 667 716 660Q734 654 748 642L603 462Q581 477 563 494Q545 512 534 534Q524 556 524 584Q524 624 554 647Q583 672 643 672ZM644 325Q663 314 682 299Q702 284 715 264Q728 245 728 219Q728 190 711 174Q694 158 664 158Q631 158 613 175Q595 193 595 224Q595 254 610 278Q624 303 644 325Z"
+ },
+ {
+ "ch": "@",
+ "adv": 948,
+ "dx": 217,
+ "d": "M884 841Q828 865 768 876Q709 887 649 887Q526 887 440 844Q353 801 308 720Q262 638 262 523Q262 461 276 401Q289 341 318 286Q346 232 391 188Q435 144 489 116Q543 87 603 74Q663 60 725 60Q844 60 933 104Q1022 148 1072 227Q1121 307 1121 415Q1121 499 1095 560Q1079 598 1053 627Q1027 656 992 673Q958 690 917 690Q883 690 856 678Q829 665 812 640Q803 628 799 613Q790 627 778 639Q751 666 716 680Q681 695 646 695Q588 695 547 672Q518 656 500 630Q482 604 474 573Q465 542 465 510Q465 441 491 386Q516 332 564 300Q612 267 673 267Q702 267 732 276Q762 286 785 306Q794 314 801 325L805 272H906L888 473Q886 497 884 520Q882 542 882 565Q882 585 896 597Q909 609 929 609Q977 609 1005 560Q1033 512 1033 424Q1033 332 998 268Q977 231 946 207Q915 183 878 169Q841 155 800 148Q760 142 721 142Q646 142 576 168Q506 193 453 246Q399 300 374 372Q350 443 350 518Q350 609 385 673Q412 722 454 751Q496 780 548 792Q599 805 652 805Q706 805 760 795Q813 785 863 764ZM670 607Q710 607 736 587Q764 565 776 532Q788 498 788 464Q788 432 779 408Q767 381 744 368Q721 355 694 355Q657 355 632 375Q603 398 590 432Q578 466 578 501Q578 548 600 577Q621 607 670 607Z"
+ },
+ {
+ "ch": "#",
+ "adv": 557,
+ "dx": 412,
+ "d": "M687 770 715 596H605L576 770H460L488 596H413L428 492H505L530 343H451L467 240H547L576 60H693L663 240H774L803 60H919L890 240H966L951 343H873L848 492H927L912 596H831L803 770ZM622 492H732L757 343H646Z"
+ },
+ {
+ "ch": "%",
+ "adv": 821,
+ "dx": 280,
+ "d": "M483 404Q413 404 367 360Q321 315 321 228Q321 140 367 95Q413 52 483 52Q555 52 600 96Q645 140 645 228Q645 315 600 359Q555 404 483 404ZM484 332Q519 332 536 306Q553 279 553 227Q553 176 536 150Q518 124 484 124Q450 124 431 150Q414 176 414 227Q414 279 432 305Q450 332 484 332ZM899 778Q829 778 783 734Q737 690 737 602Q737 514 783 469Q829 426 899 426Q970 426 1016 470Q1061 514 1061 602Q1061 689 1016 733Q970 778 899 778ZM899 706Q934 706 951 680Q969 653 969 602Q969 551 951 524Q934 498 899 498Q865 498 847 524Q829 550 829 602Q829 654 847 680Q865 706 899 706ZM409 770 886 60H974L497 770Z"
+ },
+ {
+ "ch": "*",
+ "adv": 427,
+ "dx": 478,
+ "d": "M636 400 567 359 627 268H519V180L627 181L567 89L636 48L693 144L750 48L819 89L758 181L865 180V268H758L819 359L750 400L693 305Z"
+ },
+ {
+ "ch": "+",
+ "adv": 569,
+ "dx": 406,
+ "d": "M637 724V534H448V427H637V238H745V427H934V534H745V724Z"
+ },
+ { "ch": "=", "adv": 551, "dx": 416, "d": "M458 418V310H926V418ZM458 640V533H926V640Z" },
+ {
+ "ch": "$",
+ "adv": 660,
+ "dx": 361,
+ "d": "M658 860V780Q601 774 556 752Q495 723 460 668Q424 614 417 549L546 535Q553 579 572 609Q594 644 631 658Q644 663 658 666V462Q578 443 528 419Q476 394 453 355Q431 318 431 261Q431 200 460 154Q484 117 520 96Q556 74 598 65Q628 59 658 57V-30H737V60Q785 66 823 85Q879 114 912 166Q945 217 954 278L825 291Q821 255 803 227Q783 194 750 180Q743 177 737 175V368Q816 386 866 413Q912 439 940 480Q967 521 967 576Q967 639 935 685Q909 722 872 744Q834 765 791 774Q764 780 737 782V860ZM737 670Q760 668 777 661Q804 653 820 632Q837 612 837 582Q837 555 823 534Q811 514 774 497Q759 490 737 483ZM658 348V167Q618 171 592 191Q561 216 561 256Q561 284 575 303Q587 322 621 335Q637 341 658 348Z"
+ },
+ {
+ "ch": "€",
+ "adv": 756,
+ "dx": 313,
+ "d": "M753 786Q688 786 630 758Q571 731 530 681Q484 626 463 556Q460 546 457 535H368V456H444Q442 436 442 416Q442 399 443 383H368V305H455Q458 290 463 274Q484 205 530 149Q571 100 630 72Q688 44 753 44Q821 44 877 74Q934 104 970 156Q1007 208 1023 269L891 294Q883 259 865 228Q847 197 818 178Q789 158 751 158Q695 158 656 191Q625 218 608 256Q597 280 590 305H798L786 383H578Q577 400 577 416Q577 437 579 456H777L766 535H593Q595 542 597 548Q617 606 656 639Q695 672 751 672Q781 672 805 660Q829 647 847 626Q865 604 876 578Q888 552 892 525L1027 546Q1013 614 978 666Q940 723 881 754Q822 786 753 786Z"
+ },
+ {
+ "ch": "",
+ "adv": 833,
+ "dx": 274,
+ "d": "M620 524 888 60H666Q637 60 612 74Q587 89 572 114L336 524ZM1046 524H620L478 770H841Q869 770 894 756Q918 743 933 720Z"
+ },
+ {
+ "ch": "",
+ "adv": 1069,
+ "dx": 156,
+ "d": "M1098 550H570L394 855H844Q879 855 909 838Q939 822 958 793V794ZM570 550 902 -25H628Q592 -25 560 -7Q529 11 511 42L218 550Z"
+ },
+ {
+ "ch": "",
+ "adv": 1307,
+ "dx": 38,
+ "d": "M980 550H452L276 855H726Q761 855 791 838Q821 822 840 793V794ZM452 550 784 -25H510Q474 -25 442 -7Q411 11 393 42L100 550Z"
+ }
+ ]
+ }
+ }
+}
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/specimen.ts b/tools/ui/tests/stories/brand/llama-sans/lib/specimen.ts
new file mode 100644
index 000000000000..7f027a96c2db
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/specimen.ts
@@ -0,0 +1,35 @@
+// The specimen's data, exported from the fonts by build_specimen.py (Display comes in via ../../fonts/fonts.css, UI is the design system's own).
+import raw from './data/specimen.json';
+
+export interface Cell {
+ ch: string;
+ adv: number;
+ dx: number;
+ d: string;
+ prev?: string; // the earlier build's outline, when it differs
+}
+
+export interface Specimen {
+ glyphCount: number;
+ metrics: { upm: number; cap: number; x: number; asc: number; dsc: number };
+ axis: { min: number; max: number };
+ styles: { weight: number; name: string; stem: number }[];
+ waterfall: { weight: number; name: string }[];
+ variants: string[];
+ compare: { labels: string[] } | null;
+ grid: {
+ variant: string;
+ width: number;
+ height: number;
+ guides: { base: number; x: number; cap: number; asc: number; dsc: number };
+ groups: { title: string; chars: string[] }[];
+ cells: Record;
+ };
+}
+
+export const specimen = raw as unknown as Specimen;
+
+/** each version's place on the optical size axis: Llama Sans is one font, and UI and Display are its two ends */
+export const opsz: Record = { Display: 40, UI: 16 };
+
+export const fallback = '"Helvetica Neue", Arial, sans-serif';
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/styles/specimen.css b/tools/ui/tests/stories/brand/llama-sans/lib/styles/specimen.css
new file mode 100644
index 000000000000..fc516012d242
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/styles/specimen.css
@@ -0,0 +1,191 @@
+/* The specimen's sheet, from ggml-org/llama.brand (fonts/specimen/src/app.css), scoped to .specimen so none of it
+ reaches the other stories; :where() keeps each rule as specific as it is there. Dark mode follows Storybook's
+ .dark class instead of prefers-color-scheme. */
+.specimen {
+ /* design-system primitives used here */
+ --ds-neutral-0: oklch(1 0 0);
+ --ds-neutral-50: oklch(0.985 0 0);
+ --ds-neutral-100: oklch(0.97 0 0);
+ --ds-neutral-150: oklch(0.95 0 0);
+ --ds-neutral-200: oklch(0.922 0 0);
+ --ds-neutral-400: oklch(0.708 0 0);
+ --ds-neutral-500: oklch(0.556 0 0);
+ --ds-neutral-900: oklch(0.205 0 0);
+ --ds-neutral-925: oklch(0.16 0 0);
+ --ds-neutral-950: oklch(0.145 0 0);
+ --brand-ink: #111111;
+ --brand-light: #fafafa;
+ --cinder: oklch(
+ 0.68 0.18 46
+ ); /* the brand's one accent orange, as in the .cpp of the llama.cpp logotype */
+ --sand: #efe9df;
+ --sand-ink: #2b2620;
+ --slate: #3a5878; /* a muted blue, between the day sky and the night sky */
+
+ /* the specimen's roles, mapped onto the design system's semantic tokens */
+ --paper: var(--ds-neutral-0);
+ --sheet: var(--ds-neutral-100);
+ --ink: var(--ds-neutral-950);
+ --muted: var(--ds-neutral-500);
+ --rule: var(--ds-neutral-200);
+ --guide: oklch(0.56 0.07 250); /* llama.app blue */
+ --guide-soft: oklch(0.56 0.07 250 / 0.28);
+ --mark: var(--cinder);
+ --body: 'Llama Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
+ --mono: 'Llama Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
+
+ /* the hero gradient from llama.app, in its light and dark versions, with the site's blues */
+ --llama-hero:
+ radial-gradient(ellipse at 15% 10%, #dcecfb 0%, transparent 55%),
+ radial-gradient(ellipse at 90% 95%, #e8f2fc 0%, transparent 50%),
+ linear-gradient(160deg, #c4ddf6 0%, #d0e4f7 55%, #dfecf9 100%);
+ --llama-hero-ink: #0f1f33;
+ --llama-hero-rule: rgb(15 31 51 / 0.25);
+ --llama-night-sky:
+ radial-gradient(ellipse at 15% 10%, #22385c 0%, transparent 55%),
+ radial-gradient(ellipse at 90% 95%, #1e3752 0%, transparent 50%),
+ linear-gradient(160deg, #152238 0%, #172a42 55%, #1a3049 100%);
+ --llama-blue: #2b7fff;
+ --llama-sky: #38bdf8;
+
+ box-sizing: content-box; /* the page's 1180px is its content, as on the brand site */
+ background: var(--paper);
+ color: var(--ink);
+ font: 16px/1.55 var(--body);
+}
+/* the design system's base styles (preflight, form controls) step aside: inside the frame every element starts from
+ the browser's own defaults, as on the brand site. SVGs keep theirs, so their presentation attributes still apply */
+/* a .ds element keeps the design system's own styles, so its components (tabs, toggle groups, switches) can sit on
+ the specimen's pages as they are */
+.specimen :where(*:not(svg, svg *, .ds, .ds *)) {
+ all: revert;
+}
+/* the optical size a page or section pins (--opsz-pin, e.g. 'opsz' 40) reaches every element: the font shorthand
+ resets font-variation-settings, so the pin can't simply inherit. Unset, the browser picks opsz from font-size */
+.specimen *:not(svg, svg *, .ds, .ds *) {
+ font-variation-settings: var(--opsz-pin, normal) !important;
+}
+.specimen :where(svg) {
+ vertical-align: revert;
+}
+.dark .specimen {
+ --paper: var(--ds-neutral-925);
+ --sheet: var(--ds-neutral-900);
+ --ink: var(--ds-neutral-50);
+ --muted: var(--ds-neutral-400);
+ --rule: oklch(1 0 0 / 0.12);
+ --guide: oklch(0.72 0.06 250);
+ --guide-soft: oklch(0.72 0.06 250 / 0.3);
+ --llama-hero: var(--llama-night-sky);
+ --llama-hero-ink: #ffffff;
+ --llama-hero-rule: rgb(255 255 255 / 0.3);
+ color-scheme: dark;
+}
+
+:where(.specimen) .label {
+ font: 500 11px/1.4 var(--mono);
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--muted);
+}
+
+/* segmented control: weights, versions, compare */
+:where(.specimen) .segmented {
+ display: flex;
+ border: 1px solid var(--rule);
+ border-radius: 8px;
+ overflow: hidden;
+}
+:where(.specimen) .segmented label input {
+ position: absolute;
+ opacity: 0;
+ pointer-events: none;
+}
+:where(.specimen) .segmented label span {
+ display: block;
+ padding: 6px 12px;
+ font: 400 13px var(--mono);
+ color: var(--muted);
+ cursor: pointer;
+}
+:where(.specimen) .segmented label span em {
+ font-style: normal;
+ opacity: 0.65;
+}
+:where(.specimen) .segmented label + label span {
+ border-left: 1px solid var(--rule);
+}
+:where(.specimen) .segmented label input:checked + span {
+ background: var(--ink);
+ color: var(--paper);
+}
+:where(.specimen) .segmented label input:focus-visible + span {
+ outline: 2px solid var(--guide);
+ outline-offset: -2px;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ :where(.specimen) * {
+ transition: none !important;
+ }
+}
+
+/* showcase galleries: cards in a dense grid, each in its own fixed palette so it reads the same in both themes */
+:where(.specimen) .gallery {
+ display: grid;
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
+ grid-auto-flow: dense;
+ gap: 16px;
+}
+:where(.specimen) .card {
+ position: relative;
+ container-type: inline-size;
+ min-width: 0;
+ aspect-ratio: 4 / 3;
+ overflow: hidden;
+ border-radius: 14px;
+ box-shadow: inset 0 0 0 1px rgb(128 128 128 / 0.18);
+}
+:where(.specimen) .card.wide {
+ grid-column: span 2;
+ aspect-ratio: 8 / 3;
+}
+:where(.specimen) .card.free {
+ aspect-ratio: auto;
+}
+:where(.specimen) .card.full {
+ grid-column: 1 / -1;
+ aspect-ratio: 3 / 1;
+}
+@media (max-width: 700px) {
+ :where(.specimen) .card.wide,
+ :where(.specimen) .card.full {
+ grid-column: auto;
+ aspect-ratio: 4 / 3;
+ }
+}
+:where(.specimen) .card :is(h3, h4, p, ol, ul, dl, dd, figure, table) {
+ margin: 0;
+}
+:where(.specimen) .c-hero {
+ background: var(--llama-hero);
+ color: var(--llama-hero-ink);
+}
+:where(.specimen) .c-sand {
+ background: var(--sand);
+ color: var(--sand-ink);
+}
+:where(.specimen) .c-ink {
+ background: var(--brand-ink);
+ color: var(--brand-light);
+}
+:where(.specimen) .c-paper {
+ background: var(--ds-neutral-100);
+ color: var(--brand-ink);
+}
+:where(.specimen) .card .mono-label {
+ font: 500 11px var(--mono);
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ opacity: 0.7;
+}
diff --git a/tools/ui/tests/stories/brand/llama-sans/lib/view.svelte.ts b/tools/ui/tests/stories/brand/llama-sans/lib/view.svelte.ts
new file mode 100644
index 000000000000..faee54072a4b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/lib/view.svelte.ts
@@ -0,0 +1,23 @@
+// What the specimen page is showing, shared by the page, its template and the controls. Components take these as
+// props, so they render the same anywhere else (a Storybook story, another page) with values of their own.
+import { specimen } from './specimen';
+
+export const view = $state({
+ comparing: false,
+ guides: false,
+ size: 64,
+ tracking: 0,
+ variant: specimen.variants[0], // opens on the first version (Display)
+ weight: specimen.styles[0].weight
+});
+
+/** The named weight nearest the live one: live text follows any weight, the glyph grid shows named weights. */
+export const nearest = (weight: number) =>
+ specimen.styles.reduce((a, s) =>
+ Math.abs(s.weight - weight) < Math.abs(a.weight - weight) ? s : a
+ ).weight;
+
+export const variantNotes: Record = {
+ Display: 'Banners, headlines and large type. Switch to UI at the top (or press V).',
+ UI: 'Controls, small interface text and running text. Turn on line boxes in the bar to see the alignment.'
+};
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/CharGrid.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/CharGrid.svelte
new file mode 100644
index 000000000000..99f809d2e048
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/CharGrid.svelte
@@ -0,0 +1,35 @@
+
+
+
+
+ {#each chars as ch (ch)}{ch} {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/Closeups.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/Closeups.svelte
new file mode 100644
index 000000000000..d94b4d0045cb
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/Closeups.svelte
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+ Llama Sans UI · Display Draft 0.6 Glyphs: {glyphCount} OFL 1.1
+
+
+
+ {#each posterPoints.handles as [a, b], i (i)}
+
+ {/each}
+
+
+
+ {#each posterPoints.nodes as p, i (i)}
+
+ {/each}
+
+
+
+ The g, point by point: quadratic curves, eased toward circles, with every stroke end cut.
+
+
+
+ {#each closeups as x (x.title)}
+
+
+
+
+
+ {#each x.anatomy.handles as [a, b], i (i)}
+
+ {/each}
+
+
+
+ {#if x.kind === 'cut'}
+
+ {:else}
+
+ {/if}
+
+ {#each x.anatomy.nodes as p, i (i)}
+
+ {/each}
+
+
+
{x.angle}
+
+
+ {x.title} {x.note}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/DisplaySample.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/DisplaySample.svelte
new file mode 100644
index 000000000000..f7faeb3045ae
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/DisplaySample.svelte
@@ -0,0 +1,30 @@
+
+
+
The shape of a sentence
+
+
Why round bowls read calmer
+
+
Terminals, apertures and the space between
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/Hero.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/Hero.svelte
new file mode 100644
index 000000000000..50625763bfdf
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/Hero.svelte
@@ -0,0 +1,65 @@
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/IconsSample.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/IconsSample.svelte
new file mode 100644
index 000000000000..896b9c395c0c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/IconsSample.svelte
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+
+
+
+
+ {#each models as m (m.name)}
+
+
+
+ {m.name}{m.size} · Q4_K_M
+
+
+ {#if m.tone === 'ok'} {:else if m.tone === 'warn'} {/if}{m.status}
+
+
+ {/each}
+
+
+
+
+
+ {#each grid as Icon, i (i)} {/each}
+
+
+
+ Lucide at 1.5 to 2 px strokes, the same even weight as the letters. Next to UI text, an icon
+ centred in the line box sits on the cap height, so buttons, menus and chips need no per-icon
+ nudging.
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/OverviewFrame.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/OverviewFrame.svelte
new file mode 100644
index 000000000000..629bf21ce7f9
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/OverviewFrame.svelte
@@ -0,0 +1,48 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/Posters.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/Posters.svelte
new file mode 100644
index 000000000000..c2acdf93da0a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/Posters.svelte
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+ {#each rows as row, r (r)}
+
+ {#each row as token, i (i)}{#if token === '·'} {:else}{token} {/if}{/each}
+
+ {/each}
+
+
+
+
+
+
+ If it fits in memory
+
+
+
+ it runs.
+
+ llama.cpp Local inference, any hardware
+
+
+
+ GGUF
+
+
+
+
+
+
+
+
+ {#each branches as b (b.y)}
+
+
+ {#each b.nodes as x (x)} {/each}
+ {/each}
+
+
+
+ GGUF is the file format llama.cpp loads: one file holding a model's weights, its tokenizer and
+ everything needed to run it, quantised to fit the machine at hand.
+
+
+
+
+
+
+ local
+
+ Your prompts stay on your machine, and so do the answers.
+
+ not
+
+ remote
+
+ At ggml we build for the hardware you already have.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/Section.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/Section.svelte
new file mode 100644
index 000000000000..6f58af2ea1bf
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/Section.svelte
@@ -0,0 +1,55 @@
+
+
+
+
+ {label}
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/UISample.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/UISample.svelte
new file mode 100644
index 000000000000..23d32ffe2dad
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/UISample.svelte
@@ -0,0 +1,51 @@
+
+
+
+ New project
+
+ Cancel
+
+ v0.6 · 975 glyphs
+
+
+
+ The labels on a button and the paragraphs of an article can share a font. UI is spaced and
+ kerned like the system fonts at their text sizes, and its line box is centred on the cap height,
+ so capitals and icons sit in the middle of every control.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/Version.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/Version.svelte
new file mode 100644
index 000000000000..38c636dd24a0
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/Version.svelte
@@ -0,0 +1,95 @@
+
+
+
+
+
+ Llama Sans {name}
+
+
+
+
+
+
{statement}
+
+ {#if children}
{@render children()}
{/if}
+
+
{specs}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/WeightLines.svelte b/tools/ui/tests/stories/brand/llama-sans/overview/WeightLines.svelte
new file mode 100644
index 000000000000..34f0a2c2d6af
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/WeightLines.svelte
@@ -0,0 +1,51 @@
+
+
+
+
+ {#each specimen.styles as s (s.weight)}
+
+
{s.name} {s.weight}
+
+
{phrases[s.weight] ?? s.name}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/llama-sans/overview/outline.ts b/tools/ui/tests/stories/brand/llama-sans/overview/outline.ts
new file mode 100644
index 000000000000..d1445793821e
--- /dev/null
+++ b/tools/ui/tests/stories/brand/llama-sans/overview/outline.ts
@@ -0,0 +1,129 @@
+// Reading the specimen's glyph outlines (SVG paths of M, L, H, V, Q and Z, in the glyph grid's coordinates, y down)
+// for the overview's close-ups: their points, the angled cuts at stroke ends and the notches where bowls meet stems.
+
+export type Point = [number, number];
+export type Segment = { kind: 'L' | 'Q'; from: Point; to: Point; via?: Point };
+
+/** Every contour of a path as straight and quadratic segments. */
+export function segments(d: string): Segment[][] {
+ const contours: Segment[][] = [];
+
+ let segs: Segment[] = [];
+ let cur: Point = [0, 0];
+ let start: Point = [0, 0];
+
+ for (const [, cmd, args] of d.matchAll(/([MLHVQZ])([^MLHVQZ]*)/g)) {
+ const n = args.trim()
+ ? args
+ .trim()
+ .split(/[\s,]+/)
+ .map(Number)
+ : [];
+
+ if (cmd === 'M') {
+ if (segs.length) contours.push(segs);
+
+ segs = [];
+ cur = start = [n[0], n[1]];
+ } else if (cmd === 'L') {
+ for (let i = 0; i < n.length; i += 2)
+ segs.push({ from: cur, kind: 'L', to: (cur = [n[i], n[i + 1]]) });
+ } else if (cmd === 'H') {
+ segs.push({ from: cur, kind: 'L', to: (cur = [n[0], cur[1]]) });
+ } else if (cmd === 'V') {
+ segs.push({ from: cur, kind: 'L', to: (cur = [cur[0], n[0]]) });
+ } else if (cmd === 'Q') {
+ for (let i = 0; i < n.length; i += 4) {
+ segs.push({
+ from: cur,
+ kind: 'Q',
+ to: (cur = [n[i + 2], n[i + 3]]),
+ via: [n[i], n[i + 1]]
+ });
+ }
+ } else if (cmd === 'Z') {
+ if (cur[0] !== start[0] || cur[1] !== start[1])
+ segs.push({ from: cur, kind: 'L', to: start });
+
+ contours.push(segs);
+ segs = [];
+ }
+ }
+
+ if (segs.length) contours.push(segs);
+
+ return contours;
+}
+
+const angleOf = (a: Point, b: Point) =>
+ ((((Math.atan2(b[1] - a[1], b[0] - a[0]) * 180) / Math.PI) % 180) + 180) % 180;
+const square = (angle: number) => [0, 90, 180].some((a) => Math.abs(angle - a) < 5);
+
+/** The angled cuts at stroke ends: short straight edges on a slant, with their angle from the baseline. */
+export function cuts(d: string): { a: Point; angle: number; b: Point }[] {
+ return segments(d)
+ .flat()
+ .filter((s) => s.kind === 'L')
+ .map((s) => ({ a: s.from, angle: angleOf(s.from, s.to), b: s.to }))
+ .filter(({ a, angle, b }) => !square(angle) && Math.hypot(b[0] - a[0], b[1] - a[1]) > 12)
+ .filter(({ a, b }) => Math.hypot(b[0] - a[0], b[1] - a[1]) < 120)
+ .map(({ a, angle, b }) => ({ a, angle: Math.round(angle > 90 ? 180 - angle : angle), b }));
+}
+
+/** The notches where a bowl, arm or shoulder leaves a straight stem: a long vertical edge meeting a curve at a sharp
+ * angle, directly or through a short step (as the font's build finds them). Returns each notch's vertex. */
+export function joins(d: string): Point[] {
+ const out: Point[] = [];
+
+ for (const segs of segments(d)) {
+ const n = segs.length;
+ const stem = (s: Segment) =>
+ s.kind === 'L' && Math.abs(s.from[0] - s.to[0]) <= 6 && Math.abs(s.from[1] - s.to[1]) > 80;
+ const step = (s: Segment) =>
+ s.kind === 'L' && Math.hypot(s.to[0] - s.from[0], s.to[1] - s.from[1]) < 30;
+ const unit = (a: Point, b: Point): Point => {
+ const l = Math.hypot(b[0] - a[0], b[1] - a[1]) || 1;
+
+ return [(b[0] - a[0]) / l, (b[1] - a[1]) / l];
+ };
+
+ for (let k = 0; k < n; k++) {
+ const a = segs[k];
+ const b = segs[(k + 1) % n];
+ const c = segs[(k + 2) % n];
+
+ let along: Point | undefined, tangent: Point | undefined, vertex: Point | undefined;
+
+ if (stem(a) && b.kind === 'Q')
+ [vertex, along, tangent] = [a.to, unit(a.to, a.from), unit(b.from, b.via!)];
+ else if (a.kind === 'Q' && stem(b))
+ [vertex, along, tangent] = [b.from, unit(b.from, b.to), unit(a.to, a.via!)];
+ else if (stem(a) && step(b) && c.kind === 'Q')
+ [vertex, along, tangent] = [a.to, unit(a.to, a.from), unit(c.from, c.via!)];
+ else if (a.kind === 'Q' && step(b) && stem(c))
+ [vertex, along, tangent] = [c.from, unit(c.from, c.to), unit(a.to, a.via!)];
+
+ if (vertex && along && tangent) {
+ const cos = along[0] * tangent[0] + along[1] * tangent[1];
+
+ if ((Math.acos(Math.max(-1, Math.min(1, cos))) * 180) / Math.PI < 60) out.push(vertex);
+ }
+ }
+ }
+
+ return out;
+}
+
+/** On-curve points and curve handles, for drawing an outline's anatomy. */
+export function points(d: string): { handles: [Point, Point][]; nodes: Point[] } {
+ const nodes: Point[] = [];
+ const handles: [Point, Point][] = [];
+
+ for (const s of segments(d).flat()) {
+ nodes.push(s.to);
+
+ if (s.kind === 'Q') handles.push([s.from, s.via!], [s.via!, s.to]);
+ }
+
+ return { handles, nodes };
+}
diff --git a/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.stories.svelte b/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.stories.svelte
new file mode 100644
index 000000000000..6338c2a8a046
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.svx b/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.svx
new file mode 100644
index 000000000000..80c65fea984d
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/LogoShowcase.svx
@@ -0,0 +1,43 @@
+---
+title: Llama icon
+---
+
+
+
+
+
+
+
+
+ It begins with a name, and the + of its C++, the language llama.cpp is written in.
+ A plus with the icon’s own arms: 240 wide upright, {lower} deep across.
+ Keep the top and right arms and leave the centre empty: an L inside the +, its stem and foot touching at one point.
+ In a flash the bolt leans it: the L slants 30° on the baseline, every edge at {deg}°, on a grid of ideal triangles, with the bolt inside.
+ Round only the two outer corners. That is the Llama icon.
+
+
+
+
+
+ A tall blade and a short foot, offset to the right, touching at one point.
+ All four slanted edges lean at {deg}°: the blades are parallel parallelograms.
+ The upper blade’s right edge and the foot’s left edge are the same line, through the joint.
+ {SPLIT} above, {lower} below: close to two thirds to one third.
+ Five steps of 120 span the {SIZE}: the feet, the joint and the foot’s corner all land on them.
+ Only the two 120° outer corners round off: cut back {trim}, on a circle of radius ≈ {r}.
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/ShowcaseFrame.svelte b/tools/ui/tests/stories/brand/logo-showcase/ShowcaseFrame.svelte
new file mode 100644
index 000000000000..6a804706f092
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/ShowcaseFrame.svelte
@@ -0,0 +1,58 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/assets/sketch.webp b/tools/ui/tests/stories/brand/logo-showcase/lib/assets/sketch.webp
new file mode 100644
index 000000000000..726db9e5e2f1
Binary files /dev/null and b/tools/ui/tests/stories/brand/logo-showcase/lib/assets/sketch.webp differ
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/blueprint.ts b/tools/ui/tests/stories/brand/logo-showcase/lib/blueprint.ts
new file mode 100644
index 000000000000..190ee85676b4
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/blueprint.ts
@@ -0,0 +1,178 @@
+// The blueprint's construction and the numbers the showcase quotes, all derived from the icon's geometry (logo.ts).
+import { angle, corners, edges, extend, type Pt, SIZE, SPLIT } from './logo';
+
+/** The blueprint's frame (x0, y0, x1, y1) and its viewBox. */
+export const box: [number, number, number, number] = [-320, -160, 920, 760];
+export const vb = `${box[0]} ${box[1]} ${box[2] - box[0]} ${box[3] - box[1]}`;
+
+export const deg = angle(...edges.upperLeft).toFixed(1);
+export const lower = SIZE - SPLIT;
+export const r = Math.round(corners[0].r);
+export const trim = Math.round(corners[0].trim);
+export const STEPS = [0, 120, 240, 360, 480, 600]; // five steps of 120 across the drawing
+
+// every part of the blueprint belongs to one idea of the mark; hovering or tapping a part highlights its idea
+// (null: plain construction, such as the overall frame, which only fades back with the rest)
+export type Feature = 'upper' | 'lower' | 'angle' | 'split' | 'steps' | 'corners' | 'triangles';
+export type Tag = Feature | null;
+
+// perpendicular to the 60° edges, through a point
+const sh = edges.shared;
+const dir: Pt = [sh[1][0] - sh[0][0], sh[1][1] - sh[0][1]];
+const perp = (p: Pt): [Pt, Pt] => [p, [p[0] - dir[1], p[1] + dir[0]]];
+const vertical = (x: number, f: Tag): [Pt, Pt, Tag] => [[x, 0], [x, 1], f];
+const horizontal = (y: number, f: Tag): [Pt, Pt, Tag] => [[0, y], [1, y], f];
+
+export const lines: { a: Pt; b: Pt; f: Tag }[] = (
+ [
+ ...STEPS.map((x) => vertical(x, 'steps')),
+ vertical(corners[0].tangentFlat[0], 'corners'),
+ vertical(corners[1].tangentFlat[0], 'corners'),
+ vertical(466.154, 'upper'),
+ horizontal(0, null),
+ horizontal(SPLIT, 'split'),
+ horizontal(SIZE, null),
+ horizontal(corners[0].centre[1], 'corners'),
+ horizontal(corners[1].centre[1], 'corners'),
+ [...edges.upperLeft, 'angle'],
+ [...edges.shared, 'angle'],
+ [...edges.lowerRight, 'angle'],
+ ...[
+ [240, SPLIT],
+ [0, SPLIT],
+ [SIZE, SPLIT],
+ [120, SIZE],
+ [466.154, 0]
+ ].map((p) => [...perp(p as Pt), 'angle'] as [Pt, Pt, Tag])
+ ] as [Pt, Pt, Tag][]
+).map(([a, b, f]) => {
+ const [p, q] = extend(a, b, box);
+
+ return { a: p, b: q, f };
+});
+
+// the ideal triangles inside the L: a grid of equilateral triangles 120 a side, set on the split. With the icon's own
+// slope a row is 104 high, so the foot is two rows exactly, and every slanted edge, the split and both of the foot's
+// flat edges lie on it; only the upper blade's top edge cuts across. Drawn clipped to the icon.
+const row = 60 / (-dir[0] / dir[1]); // 104: where the 60° and 120° lines from neighbouring grid points meet
+const slanted = (k: number, s: 1 | -1): [Pt, Pt] => [
+ [120 * k, SPLIT],
+ [120 * k - s * 60, SPLIT + row]
+]; // 60° (s 1) or 120°
+const range = (from: number, to: number) =>
+ Array.from({ length: to - from + 1 }, (_, i) => from + i);
+
+/** The grid's lines, cut to a box (x0, y0, x1, y1). */
+export const triangles = (around: [number, number, number, number]): [Pt, Pt][] =>
+ [
+ ...range(-16, 16).map(
+ (n) =>
+ [
+ [0, SPLIT + n * row],
+ [1, SPLIT + n * row]
+ ] as [Pt, Pt]
+ ),
+ ...range(-30, 30).flatMap((k) => [slanted(k, 1), slanted(k, -1)])
+ ]
+ .map(([a, b]) => extend(a, b, around))
+ .filter(([a, b]) => a && b);
+export const lattice = triangles([-20, -20, SIZE + 20, SIZE + 20]);
+
+// blueprint dimensions: two end points, a tick offset, where the label sits
+export type Dim = { a: Pt; b: Pt; t: Pt; at: Pt; label: string; f: Tag; rot?: boolean };
+const h = (y: number, x0: number, x1: number, label: string, f: Tag): Dim => ({
+ a: [x0, y],
+ at: [(x0 + x1) / 2, y - 12],
+ b: [x1, y],
+ f,
+ label,
+ t: [0, 10]
+});
+const v = (x: number, y0: number, y1: number, label: string, f: Tag): Dim => ({
+ a: [x, y0],
+ at: [x - 12, (y0 + y1) / 2],
+ b: [x, y1],
+ f,
+ label,
+ rot: true,
+ t: [10, 0]
+});
+
+export const dims: Dim[] = [
+ h(-100, 0, SIZE, `${SIZE}`, null),
+ h(-50, 226.15, 466.154, '240', 'upper'),
+ v(-100, 0, SPLIT, `${SPLIT}`, 'split'),
+ v(-100, SPLIT, SIZE, `${SIZE - SPLIT}`, 'split'),
+ v(-160, 0, SIZE, `${SIZE}`, null),
+ ...STEPS.slice(1).map((x) => h(690, x - 120, x, '120', 'steps')),
+ h(740, 240, SIZE, `${SIZE - 240}`, 'lower')
+];
+
+export const features: { f: Feature; name: string; note: string }[] = [
+ {
+ f: 'upper',
+ name: 'Upper blade',
+ note: `The tall blade, ${SPLIT} high and 240 across: the top arm of the plus.`
+ },
+ {
+ f: 'lower',
+ name: 'Lower blade',
+ note: `The foot, ${lower} high and 360 across: the plus’s right arm.`
+ },
+ {
+ f: 'angle',
+ name: `${Math.round(+deg)}° edges`,
+ note: `Every slanted edge runs at ${deg}°, and the cross lines stand square to them.`
+ },
+ {
+ f: 'split',
+ name: 'Split',
+ note: `${SPLIT} above, ${lower} below: close to two thirds to one third.`
+ },
+ {
+ f: 'steps',
+ name: 'Steps of 120',
+ note: `Five steps of 120 span the ${SIZE}: the feet start at 0 and 120, the blades meet on 240, the foot’s corner lands on 480.`
+ },
+ {
+ f: 'triangles',
+ name: 'Triangles',
+ note: `Inside, the L sits on ideal triangles, 120 a side and ${Math.round(row)} high: the slanted edges, the split and the foot all lie on them.`
+ },
+ {
+ f: 'corners',
+ name: 'Soft corners',
+ note: `Only the two outer corners round off, cut back ${trim} on circles of radius ≈ ${r}.`
+ }
+];
+
+// where it comes from: undo the lean and the icon is an upright + and L on a 120 grid. The plus already has the
+// icon's own arms, mirrored: upright arms 240 wide and 392 long, side arms 208 deep and 360 long. The upper blade
+// is its top arm, the foot its right arm, and the centre block they would share is left out.
+const lean = 1 / Math.tan(Math.PI / 3); // 30° from upright
+
+export const sheared = `matrix(1 0 ${-lean} 1 ${SIZE * lean} 0)`; // pivots on the baseline, so the feet stay put
+export const rect = ([u0, y0, u1, y1]: number[]) => `M${u0} ${y0}H${u1}V${y1}H${u0}Z`;
+export const arm = {
+ bottom: [-120, SIZE, 120, SIZE + SPLIT],
+ centre: [-120, SPLIT, 120, SIZE],
+ left: [-480, SPLIT, -120, SIZE],
+ right: [120, SPLIT, 480, SIZE],
+ top: [-120, 0, 120, SPLIT]
+};
+export const plus = Object.values(arm).map(rect);
+export const parts = [rect(arm.top), rect(arm.right)];
+
+export const specs: [string, string][] = [
+ ['Drawing', `${SIZE} × ${SIZE}`],
+ ['Angle', `${deg}° on all four slanted edges`],
+ [
+ 'Split',
+ `${SPLIT} : ${lower} (${Math.round((SPLIT / SIZE) * 100)} : ${Math.round((lower / SIZE) * 100)})`
+ ],
+ ['Steps', `five of 120 across ${SIZE}: 0, 120, 240, 360, 480, 600`],
+ ['Corners', `two 120° outer corners, cut back ${trim}, radius ≈ ${r}`],
+ ['Colours', '#111111 on light, #FAFAFA on dark'],
+ ['In Llama Sans', 'U+E000, cap-height tall on the baseline'],
+ ['Source', 'ggml-org/llama.brand · CC BY-NC 4.0']
+];
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Blueprint.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Blueprint.svelte
new file mode 100644
index 000000000000..c64a7fd9e574
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Blueprint.svelte
@@ -0,0 +1,617 @@
+
+
+
+
+
+
+
+
{
+ if (!done) return;
+
+ const f = featureAt(e);
+
+ if (f) pin(f);
+ else pinned = null;
+ }}
+ onpointerleave={() => (hovered = null)}
+ onpointerover={(e) => {
+ if (!done) return;
+
+ if (e.pointerType === 'mouse') hovered = featureAt(e) ?? null;
+ }}
+ role="img"
+ viewBox={view}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#each lines as { a, b, f }, i (i)}
+
+
+
+
+
+ {/each}
+
+ {#each corners as c, i (i)}
+
+
+
+
+
+
+
+ {/each}
+
+
+
+ {#each [['lower', PATHS[0]], ['upper', PATHS[1]]] as [f, d] (f)}
+
+ {/each}
+
+
+ {#each PATHS as d, i (i)} {/each}
+
+
+ {#each lattice as [a, b], i (i)}
+
+ {/each}
+
+
+ {#if !done} {/if}
+
+
+
+ {#each dims as d, i (i)}
+
+
+
+
+
+ {#each [d.a, d.b] as p, j (j)}
+
+ {/each}
+
+ {d.label}
+
+ {/each}
+
+
+
+
+ {deg}°
+
+
+ {#each corners as c, i (i)}
+ R {r}
+ {/each}
+
+
+
+
+
+
+
+
+
+
+ {#each [93, 186] as x (x)} {/each}
+
+ LLAMA · ICON
+
+ PLUS + L → BOLT
+
+ {#each [['ANGLE', `${Math.round(+deg)}°`, 'angle'], ['GRID', '120', 'steps'], ['SPLIT', `${SPLIT}:${SIZE - SPLIT}`, 'split']] as [k, val, f], n (k)}
+
+
+
+ {k}
+
+ {val}
+
+ {/each}
+
+
+
+ {#if controls}
+
+
+
(playing ? pause() : play())}
+ type="button"
+ >
+ {#if playing}
+
+ {:else if done}
+
+ {:else}
+
+ {/if}
+
+
+
seek(+e.currentTarget.value)}
+ step="0.01"
+ type="range"
+ value={t}
+ />
+
+
+
+ {#each features as x (x.f)}
+ (hovered = null)}
+ onclick={() => pin(x.f)}
+ onfocus={() => (hovered = x.f)}
+ onpointerenter={(e) => e.pointerType === 'mouse' && (hovered = x.f)}
+ onpointerleave={() => (hovered = null)}
+ type="button">{x.name}
+ {/each}
+
+
+
+ {#if !done}{stepNumber(step)}{originSteps[step].name}.
+ {originSteps[step].note}{:else if current}{current.name}.
+ {current.note}{:else}Hover or tap any part of the drawing, or pick one here.{/if}
+
+
+ {/if}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figure.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figure.svelte
new file mode 100644
index 000000000000..e155eec28679
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figure.svelte
@@ -0,0 +1,189 @@
+
+
+
+
+ {#if onclick} {/if}
+
+ {#if n}{n} {/if}
+
+ {@render drawing()}
+
+ {title} {@render children?.()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figures.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figures.svelte
new file mode 100644
index 000000000000..623c34703502
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Figures.svelte
@@ -0,0 +1,31 @@
+
+
+
+{@render children()}
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Lockups.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Lockups.svelte
new file mode 100644
index 000000000000..81041e79f227
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Lockups.svelte
@@ -0,0 +1,76 @@
+
+
+
+
+ In Llama Sans and Llama Mono · U+E002, U+E001
+
+
+ {name}
+
+
+ Open in Llama llama.app
+
+
+
+ In small text and buttons the icon takes its capital form (U+E001), centred on the capitals, so
+ it holds its own in a line of text: Llama, LLAMA.CPP.
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Morph.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Morph.svelte
new file mode 100644
index 000000000000..dbc3f51ec892
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Morph.svelte
@@ -0,0 +1,517 @@
+
+
+
+
+
+{#if gone < 1}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {#if night > 0} {/if}
+
+ {#if blocks < 1}
+ {#each letters as l (l.i)}
+ {#if l.opacity > 0} {/if}
+
+ {#if l.to && l.to.opacity > 0} {/if}
+ {/each}
+ {/if}
+
+ {#if pCpp >= 1 && aside < 1}
+
+
+
+
+
+ {/if}
+
+
+
+ {#if gone_ < 1}
+ {#each going as b, i (i)} {/each}
+ {/if}
+
+ {#if pGrid > 0 && pFill < 1}
+
+ {#each GRID as [a, b], i (i)}
+
+ {/each}
+
+ {/if}
+
+
+
+
+
+ {#if wheel > 0}
+ {#each corners as c, i (i)}
+ {@const [cx, cy] = c.centre}
+
+
+
+
+
+
+
+ {/each}
+ {/if}
+
+ {#if jitter?.on}
+
+
+
+
+
+
+
+ {/if}
+
+
+ {#if strike > 0}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {/if}
+
+{/if}
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/OriginStep.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/OriginStep.svelte
new file mode 100644
index 000000000000..e15b5b749892
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/OriginStep.svelte
@@ -0,0 +1,138 @@
+
+
+
+
+
+ (t = at)}
+ title={title ?? titles[step]}
+ view={views[step]}
+>
+ {#snippet drawing()}
+ {#if step === 'name'}
+
+ {#each WORD.layout as [ch, x], j (j)}
+ 5 ? 'var(--l-shape)' : 'var(--l-line)'}
+ transform="translate({x} 0) scale(1 -1)"
+ />
+ {/each}
+ {:else if step === 'plus'}
+ {#each plus as d, j (j)} {/each}
+ {:else if step === 'l'}
+
+ {#each plus as d, j (j)} {/each}
+
+ {#each parts as d, j (j)} {/each}
+
+
+
+
+ {:else if step === 'lean'}
+
+
+
+
+
+
+
+
+
+
+ {#each grid as [a, b], j (j)} {/each}
+
+
+ {#each parts as d, j (j)} {/each}
+
+
+
+ {#each parts as d, j (j)} {/each}
+ {:else}
+ {#each parts as d, j (j)} {/each}
+
+ {#each PATHS as d, j (j)} {/each}
+
+ {#each corners as c, j (j)} {/each}
+ {/if}
+ {/snippet}
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Rule.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Rule.svelte
new file mode 100644
index 000000000000..d614519961c3
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Rule.svelte
@@ -0,0 +1,98 @@
+
+
+
+
+
+{#snippet icon(fill = 'var(--l-faint)')}
+ {#each PATHS as d, i (i)} {/each}
+{/snippet}
+
+
+ {#snippet drawing()}
+ {#if rule === 'blades'}
+
+
+
+
+ upper blade
+
+ lower blade
+ {:else if rule === 'angle'}
+ {@render icon()}
+
+ {#each [[0, SPLIT], [240, SPLIT], [120, SIZE]] as [x, y], i (i)}
+
+
+ 60°
+ {/each}
+
+ {#each [edges.upperLeft, edges.shared, edges.lowerRight] as [a, b], i (i)}
+
+ {/each}
+ {:else if rule === 'diagonal'}
+ {@render icon()}
+
+
+
+
+
+ 240, {SPLIT}
+ {:else if rule === 'split'}
+ {@render icon()}
+
+
+
+
+
+
+
+ {SPLIT}
+
+ {lower}
+ {:else if rule === 'steps'}
+ {@render icon()}
+
+ {#each STEPS as x (x)}
+
+
+ {x}
+ {/each}
+ {:else}
+ {@render icon()}
+
+ {#each corners as c, i (i)}
+
+
+
+
+
+ {/each}
+ {/if}
+ {/snippet}
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Sketch.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Sketch.svelte
new file mode 100644
index 000000000000..8f654e4a6e6d
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Sketch.svelte
@@ -0,0 +1,111 @@
+
+
+
+{#if sketch}
+
+
+
+
+ Where it started
+
+ A pencil sketch of a plus drawn into an L, before the bolt.
+
+ dialog?.showModal()} type="button">{label}
+
+
+
+
+
+
+
+
+{/if}
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/components/Specs.svelte b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Specs.svelte
new file mode 100644
index 000000000000..240b9109e018
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/components/Specs.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+ {#each specs as [k, v] (k)}
+
+
{k}
+
+ {v}
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/logo.ts b/tools/ui/tests/stories/brand/logo-showcase/lib/logo.ts
new file mode 100644
index 000000000000..17aa45cff6e2
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/logo.ts
@@ -0,0 +1,72 @@
+// Geometry of the Llama icon (ggml-org/llama.brand, icon/icon-light.svg, a 600 x 600 drawing).
+// Everything the logo page draws is derived from these numbers.
+
+export type Pt = [number, number];
+
+export const SIZE = 600;
+export const SPLIT = 392; // where the two blades meet
+export const PATHS = [
+ 'M600 392L504.249 558L504.137 557.929C487.252 584.069 458.193 600 426.864 600H120L240 392H600Z',
+ 'M240 392H0L199.602 46.0254C216.032 17.5463 246.411 3.25756e-05 279.29 0H466.154L240 392Z'
+];
+
+// the four slanted edges, as two points each
+export const edges: Record = {
+ lowerRight: [
+ [600, 392],
+ [504.249, 558]
+ ],
+ shared: [
+ [466.154, 0],
+ [120, 600]
+ ], // upper blade's right edge and lower blade's left edge: one line
+ upperLeft: [
+ [0, 392],
+ [199.602, 46.0254]
+ ]
+};
+
+export const angle = (a: Pt, b: Pt) =>
+ (Math.atan2(Math.abs(b[1] - a[1]), Math.abs(b[0] - a[0])) * 180) / Math.PI;
+
+// the rounded corners: tangent points, the sharp corner they replace, and the circle they follow
+function corner(tangentEdge: Pt, tangentFlat: Pt, sharp: Pt, inward: 1 | -1) {
+ const trim = Math.hypot(tangentFlat[0] - sharp[0], tangentFlat[1] - sharp[1]);
+ const r = trim * Math.tan(Math.PI / 3); // the corner is 120°, so r = trim · tan 60°
+
+ return {
+ centre: [tangentFlat[0], tangentFlat[1] + inward * r] as Pt,
+ r,
+ sharp,
+ tangentEdge,
+ tangentFlat,
+ trim
+ };
+}
+const xAt = (e: [Pt, Pt], y: number) =>
+ e[0][0] + ((y - e[0][1]) * (e[1][0] - e[0][0])) / (e[1][1] - e[0][1]);
+
+export const corners = [
+ corner([199.602, 46.0254], [279.29, 0], [xAt(edges.upperLeft, 0), 0], 1),
+ corner([504.249, 558], [426.864, 600], [xAt(edges.lowerRight, 600), 600], -1)
+];
+
+/** Extend the line through a and b to the edges of a box (x0, y0, x1, y1). */
+export function extend(a: Pt, b: Pt, box: [number, number, number, number]): [Pt, Pt] {
+ const [x0, y0, x1, y1] = box;
+ const dx = b[0] - a[0],
+ dy = b[1] - a[1];
+ const ts: number[] = [];
+
+ if (dx) ts.push((x0 - a[0]) / dx, (x1 - a[0]) / dx);
+
+ if (dy) ts.push((y0 - a[1]) / dy, (y1 - a[1]) / dy);
+
+ const inside = ts
+ .map((t) => [a[0] + dx * t, a[1] + dy * t] as Pt)
+ .filter(([x, y]) => x >= x0 - 1e-6 && x <= x1 + 1e-6 && y >= y0 - 1e-6 && y <= y1 + 1e-6);
+
+ inside.sort((p, q) => p[0] - q[0] || p[1] - q[1]);
+
+ return [inside[0], inside.at(-1)!];
+}
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/origin.ts b/tools/ui/tests/stories/brand/logo-showcase/lib/origin.ts
new file mode 100644
index 000000000000..915a52fb607b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/origin.ts
@@ -0,0 +1,207 @@
+// The origin animation's timeline: from the + of C++ to the Llama icon, then into the blueprint.
+// Everything is in the icon's own coordinates (the 600 x 600 drawing), so it shares the blueprint's frame.
+import { SIZE, SPLIT } from './logo';
+
+export const clamp = (x: number) => Math.min(1, Math.max(0, x));
+export const lerp = (a: number, b: number, p: number) => a + (b - a) * p;
+
+// arms retract and lines draw with a quick start and a long settle; shape changes accelerate and settle
+export const outQuart = (x: number) => 1 - (1 - x) ** 4;
+export const outCubic = (x: number) => 1 - (1 - x) ** 3;
+export const inOutCubic = (x: number) => (x < 0.5 ? 4 * x ** 3 : 1 - (-2 * x + 2) ** 3 / 2);
+export const inOutQuart = (x: number) => (x < 0.5 ? 8 * x ** 4 : 1 - (-2 * x + 2) ** 4 / 2);
+export const inOutQuint = (x: number) => (x < 0.5 ? 16 * x ** 5 : 1 - (-2 * x + 2) ** 5 / 2);
+const linear = (x: number) => x;
+
+// one step at a time, each with a short hold after it, so every stage of the shape gets its moment (seconds);
+// every change starts softly, moves through the middle and settles, the bigger moves on the stronger curve
+export const steps = [
+ { ease: outCubic, from: 0, name: 'llama.cpp', note: 'It begins with a name: llama.cpp.', to: 0 },
+ { ease: inOutQuart, from: 0.5, name: '.cpp', note: 'Look closer: its .cpp.', to: 1.1 },
+ {
+ ease: inOutCubic,
+ from: 1.25,
+ name: 'C++',
+ note: 'Its .cpp is C++, the language llama.cpp is written in.',
+ to: 1.6
+ },
+ {
+ ease: inOutQuint,
+ from: 1.8,
+ name: 'Plus',
+ note: 'Its plus grows the icon’s own arms: 240 wide upright, 208 deep across.',
+ to: 2.4
+ },
+ // the L: what the plus doesn't need fades out while the camera moves to where the bolt will strike (see Morph and camera)
+ {
+ ease: linear,
+ from: 2.75,
+ name: 'L',
+ note: 'Keep the top and right arms and leave the centre empty: an L inside the +, stem and foot touching at one point.',
+ to: 3.85
+ },
+ {
+ ease: linear,
+ from: 4.2,
+ name: 'Bolt',
+ note: 'Then the idea: a lightning bolt, for speed, which is what llama.cpp is about.',
+ to: 5.1
+ },
+ // the lean isn't a move: the L snaps to 30° in the bolt's flash (see Morph); this step only carries its caption
+ {
+ ease: linear,
+ from: 5.15,
+ name: 'Lean',
+ note: 'In a flash the bolt leans the L 30°: every edge runs at 60°, with the bolt inside.',
+ to: 5.17
+ },
+ // the grid the lean puts the L on draws out from the icon across the frame, and stays faint until the fill
+ {
+ ease: linear,
+ from: 5.3,
+ name: 'Grid',
+ note: 'Every edge now lies on a grid of ideal triangles, 120 a side: the L is built on 60°.',
+ to: 5.9
+ },
+ // two wheels roll into the outer corners, then the corners round onto them (see Morph)
+ {
+ ease: linear,
+ from: 6.0,
+ name: 'Soften',
+ note: 'Two wheels turn into the outer corners, and only those two corners round onto them.',
+ to: 6.9
+ },
+ { ease: inOutCubic, from: 7.0, name: 'Fill', note: 'Fill it in: the Llama icon.', to: 7.35 },
+ { ease: linear, from: 7.5, name: 'Blueprint', note: 'And this is how it is built.', to: 8.75 }
+];
+export const END = 8.9;
+/** A step's index by name, so the code that times things off a step doesn't depend on the order. */
+export const STEP = Object.fromEntries(steps.map((s, i) => [s.name, i])) as Record;
+export const BLUEPRINT_STEP = STEP.Blueprint;
+/** The steps that have a tile under the animation, in order; the bolt is shown inside the lean. */
+export const TILES = ['llama.cpp', 'Plus', 'L', 'Lean', 'Soften'];
+/** When each part of the blueprint fades in, in seconds after the Blueprint step starts. */
+export const BLUEPRINT = {
+ dims: [0.55, 1.05],
+ grid: [0.1, 0.6],
+ lines: [0.3, 0.85],
+ parts: [0.25, 0.75],
+ title: [0.8, 1.25],
+ triangles: [0.45, 1.2]
+} as const;
+
+/** How far step i has got at time t, eased (0 before it starts, 1 once it is done). */
+export function progress(t: number, i: number) {
+ const { ease, from, to } = steps[i];
+
+ return to <= from ? 1 : ease(clamp((t - from) / (to - from)));
+}
+/** An eased 0 to 1 over a window of seconds, for the parts of the blueprint that fade in one after another. */
+export const span = (t: number, from: number, to: number) =>
+ inOutCubic(clamp((t - from) / (to - from)));
+export const stepAt = (t: number) =>
+ Math.max(
+ 0,
+ steps.findLastIndex((s) => t >= s.from)
+ );
+
+// "c++" set in Llama Sans Display Bold (font units, y up), placed so its middle + is centred on the plus; the c stays
+// lowercase, so the c of "llama.cpp" is simply the c of "c++".
+// Its + is two 114-unit bars, so it splits into the same five blocks as the plus, and each block grows into its own.
+export const GLYPH = {
+ advance: { C: 563, plus: 542 },
+ C: 'M293 -12Q212 -12 152 23Q108 48 80 86Q52 125 38 172Q25 219 25 268Q25 352 58 415Q82 458 118 488Q154 517 199 532Q244 547 293 547Q362 547 417 523Q470 499 504 454Q537 409 546 352L405 334Q397 385 367 411Q337 437 293 437Q234 437 201 392Q169 348 169 268Q169 187 201 142Q234 98 293 98Q337 98 368 124Q398 151 404 205L547 190Q538 132 507 88Q482 53 448 31Q414 9 374 -2Q334 -12 293 -12Z', // the lowercase c: llama.cpp's own c is the c of c++
+ plus: 'M214 44V231H27V345H214V532H328V345H515V231H328V44Z'
+};
+export const S = 1.25; // font units to drawing units
+export const MID = GLYPH.advance.C; // the middle + starts where the c ends
+export const X = -(MID + 271) * S; // the middle + centred on the plus centre
+export const Y = (SIZE + SPLIT) / 2 + 288 * S;
+
+// "llama.cpp" in Llama Sans Display Bold, with the font's own advances and kerning (font units, y up), placed so its
+// "c" is the c of "c++": each p turns into a + in place, while "llama." steps aside
+export const WORD = {
+ glyphs: {
+ '.': { bounds: [25, 0, 180, 147], d: 'M25 0V147H180V0Z' },
+ a: {
+ bounds: [25, -12, 538, 547],
+ d: 'M212 -12Q129 -12 77 27Q25 65 25 134Q25 204 69 243Q112 281 200 299L375 339Q375 366 369 384Q363 402 350 416Q326 443 278 443Q233 443 208 423Q180 399 173 353H32Q44 452 113 502Q176 547 278 547Q395 547 455 490Q514 433 514 324V72Q514 51 521 36Q528 20 538 20V0H393V76Q386 64 378 53Q358 30 330 16Q303 1 272 -6Q242 -12 212 -12ZM243 86Q283 86 313 102Q344 119 360 150Q375 180 375 215V248L245 216Q205 208 187 191Q169 174 169 147Q169 118 188 102Q207 86 243 86Z'
+ },
+ c: {
+ bounds: [25, -12, 547, 547],
+ d: 'M293 -12Q212 -12 152 23Q108 48 80 86Q52 125 38 172Q25 219 25 268Q25 352 58 415Q82 458 118 488Q154 517 199 532Q244 547 293 547Q362 547 417 523Q470 499 504 454Q537 409 546 352L405 334Q397 385 367 411Q337 437 293 437Q234 437 201 392Q169 348 169 268Q169 187 201 142Q234 98 293 98Q337 98 368 124Q398 151 404 205L547 190Q538 132 507 88Q482 53 448 31Q414 9 374 -2Q334 -12 293 -12Z'
+ },
+ l: { bounds: [55, 0, 194, 710], d: 'M194 0H55V710H194Z' },
+ m: {
+ bounds: [55, 0, 815, 547],
+ d: 'M55 0V535H181L184 446Q192 464 203 480Q225 511 257 529Q289 547 330 547Q398 547 439 508Q469 480 484 438Q493 463 506 482Q528 514 562 530Q597 547 636 547Q692 547 732 524Q763 505 782 476Q800 447 808 412Q815 378 815 344V0H676V307Q676 371 655 403Q634 436 590 436Q561 436 541 420Q523 407 514 388Q505 368 502 346Q498 324 498 304V0H371V304Q371 368 352 402Q333 436 287 436Q258 436 237 420Q220 407 210 388Q201 368 198 346Q194 324 194 304V0Z'
+ },
+ p: {
+ bounds: [55, -150, 577, 547],
+ d: 'M55 -150V535H189L191 455Q202 475 217 492Q242 518 276 532Q311 547 350 547Q426 547 476 510Q513 482 535 442Q557 402 567 357Q577 312 577 268Q577 190 551 127Q526 63 475 26Q425 -12 349 -12Q312 -12 278 2Q243 16 218 42Q203 56 194 73V-150ZM314 98Q369 98 401 143Q433 188 433 268Q433 347 401 392Q369 438 314 438Q276 438 250 419Q226 402 214 376Q202 351 198 322Q194 294 194 268Q194 212 208 174Q221 139 248 118Q276 98 314 98Z'
+ }
+ } as Record,
+ layout: [
+ ['l', 0],
+ ['l', 237],
+ ['a', 484],
+ ['m', 1033],
+ ['a', 1889],
+ ['.', 2481],
+ ['c', 2686],
+ ['p', 3237],
+ ['p', 3827]
+ ] as [string, number][]
+};
+export const WX = X - 2686 * S; // the c of "llama.cpp" is the c of "c++"
+/** The letters of ".cpp" that become "c++", and where each one lands (x in "c++", font units). */
+export const BECOMES: Record = {
+ 6: { to: 'C', x: 0 },
+ 7: { to: 'plus', x: MID },
+ 8: { to: 'plus', x: MID + GLYPH.advance.plus }
+};
+export const BOUNDS = { C: [25, -12, 547, 547], plus: [27, 44, 515, 532] };
+
+// the camera: the word, then the whole plus, then the icon, then out to the blueprint's own frame.
+// Each frame is a box to fit (centre x, centre y, width, height), fitted to the stage's shape.
+export type Frame = [number, number, number, number];
+const name: Frame = [WX + ((55 + 4404) / 2) * S, Y - 280 * S, 4349 * S * 1.15, 860 * S * 1.9]; // "llama.cpp", ink with a margin
+const word: Frame = [X + 871 * S, Y - 198 * S, 1693 * S * 1.35, 697 * S * 1.9]; // ".cpp" and "c++" alike, ink with a margin
+const plusFrame: Frame = [0, (SIZE + SPLIT) / 2, 1300, 1300]; // the plus runs 0 to SIZE + SPLIT
+const iconFrame: Frame = [300, 400, 1300, 1300]; // room below for the lightning's tip and its glow
+
+export function camera(t: number, aspect: number, final: Frame) {
+ const fit = ([cx, cy, w, h]: Frame) => [cx, cy, w / h > aspect ? w : h * aspect];
+ const frames = [name, word, plusFrame, iconFrame, final].map(fit);
+ const over = (from: number, to: number) => inOutQuart(clamp((t - from) / (to - from)));
+ const legs = [
+ over(steps[STEP['.cpp']].from, steps[STEP['.cpp']].to), // the zoom to .cpp, before any letter changes
+ over(steps[STEP.Plus].from, steps[STEP.Plus].to),
+ over(steps[STEP.L].from, steps[STEP.L].to), // to where the bolt will strike, while the rest of the plus fades; it stays there
+ over(steps[BLUEPRINT_STEP].from, steps[BLUEPRINT_STEP].from + 0.8)
+ ];
+
+ let [cx, cy, vw] = frames[0];
+
+ legs.forEach((p, i) => ([cx, cy, vw] = [cx, cy, vw].map((v, j) => lerp(v, frames[i + 1][j], p))));
+ const vh = vw / aspect;
+
+ return `${cx - vw / 2} ${cy - vh / 2} ${vw} ${vh}`;
+}
+
+// the lightning that strikes over the leaned L, after the sketch: the upper blade cut along its diagonal, from its
+// bottom-left corner to its top-right one, keeps its lower-right half; the lower half is that same triangle turned
+// 180° about the joint. So its top runs along the foot's top edge, its left side is the foot's left 60° edge carried
+// on down, its long side runs parallel to the upper diagonal, and it ends in a tip below and left of the foot.
+const turn = ([x, y]: [number, number]): [number, number] => [2 * 240 - x, 2 * SPLIT - y]; // 180° about the joint
+const upper: [number, number][] = [
+ [466.154, 0],
+ [0, SPLIT],
+ [240, SPLIT]
+];
+const lower = upper.map(turn);
+
+export const TIP = lower[0]; // (14, 784)
+const tri = (pts: [number, number][]) => `M${pts.map((p) => p.join(' ')).join('L')}Z`;
+
+export const LIGHTNING = tri(upper) + tri(lower);
diff --git a/tools/ui/tests/stories/brand/logo-showcase/lib/styles/logo.css b/tools/ui/tests/stories/brand/logo-showcase/lib/styles/logo.css
new file mode 100644
index 000000000000..59afe43b4902
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/lib/styles/logo.css
@@ -0,0 +1,50 @@
+/* The logo showcase's colours, shared by every drawing (the blueprint, the origin animation, the step tiles and the
+ rule panels). Grayscale after the brand: black icon on light grey in light mode, white icon on near-black in dark
+ mode; construction lines in a mid grey that reads over both the icon and the ground. Greys follow the llama.cpp
+ design system's neutrals. Dark mode follows the design system's .dark class on . */
+:root {
+ --l-bg: oklch(0.97 0 0); /* neutral-100 */
+ --l-shape: #111111;
+ --l-shape-2: #6b6b6b;
+ --l-faint: rgba(17, 17, 17, 0.16);
+ --l-line: oklch(0.708 0 0); /* neutral-400 */
+ --l-ink: #111111;
+ --l-muted: oklch(0.556 0 0); /* fg-muted */
+ --l-panel: oklch(1 0 0); /* surface-raised */
+ --l-rule: oklch(0.922 0 0); /* line-field */
+ --l-mark: #ee6c1e; /* cinder, the one accent: marks a detail, such as the L's empty centre */
+ --l-bolt: #ee6c1e; /* cinder, as in the .cpp of the llama.cpp lockup: the L flashes in it */
+ /* the lightning: a white-hot core, a yellow glow around it and a blue halo beyond; the L flashes in --l-bolt */
+ --l-bolt-core: #ffffff;
+ --l-bolt-glow: #ffd23f;
+ --l-bolt-halo: #3d8bff;
+ --l-ink-glow: 0.3; /* the L's glow in light mode, where it is black */
+ /* the strike's night sky, light mode only */
+ --l-night: 1;
+ --l-night-sky: oklch(0.16 0 0);
+ --l-night-ink: #fafafa;
+ /* in light mode the bolt is solid, so it reads crisply inside the black L (see-through yellow over black turns olive) */
+ --l-bolt-alpha: 1;
+ --l-bolt-tint: 0;
+ --l-paper: oklch(0.985 0 0); /* neutral-50 */
+ --l-grid: rgba(17, 17, 17, 0.05);
+ --l-grid-major: rgba(17, 17, 17, 0.13);
+}
+:root.dark {
+ --l-bg: oklch(0.16 0 0);
+ --l-shape: #fafafa;
+ --l-shape-2: #9e9e9e;
+ --l-faint: rgba(250, 250, 250, 0.18);
+ --l-line: oklch(0.439 0 0);
+ --l-ink: #fafafa;
+ --l-muted: oklch(0.708 0 0);
+ --l-panel: oklch(0.205 0 0);
+ --l-rule: oklch(1 0 0 / 0.12);
+ --l-bolt-alpha: 0.85;
+ --l-bolt-tint: 0.3;
+ --l-ink-glow: 1;
+ --l-night: 0;
+ --l-paper: oklch(0.205 0 0);
+ --l-grid: rgba(250, 250, 250, 0.05);
+ --l-grid-major: rgba(250, 250, 250, 0.13);
+}
diff --git a/tools/ui/tests/stories/brand/logo-showcase/svx.d.ts b/tools/ui/tests/stories/brand/logo-showcase/svx.d.ts
new file mode 100644
index 000000000000..88dce604475c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-showcase/svx.d.ts
@@ -0,0 +1,6 @@
+// .svx pages (mdsvex) import as Svelte components
+declare module '*.svx' {
+ import type { Component } from 'svelte';
+ const page: Component;
+ export default page;
+}
diff --git a/tools/ui/tests/stories/brand/logo-usage/IconUsage.svelte b/tools/ui/tests/stories/brand/logo-usage/IconUsage.svelte
new file mode 100644
index 000000000000..6e85480f8a15
--- /dev/null
+++ b/tools/ui/tests/stories/brand/logo-usage/IconUsage.svelte
@@ -0,0 +1,957 @@
+
+
+
+
+{#if section === 'glyphs'}
+ In Llama Sans · U+E002, U+E001 and U+E000
+
+ Three glyphs of the font
+
+
+ The icon is a character of Llama Sans, in two sizes, so anything set in it can carry the mark
+ without an image, in the text's colour and weight. U+E001 is the one to reach for: the icon 1.24
+ times the cap height, centred on the capitals, with the lockup's gap after it. Use it in small
+ text, in controls and before a name, where a cap-height mark would read as smaller than the
+ letters. U+E000 sits on the baseline at exactly the cap height: keep it for headlines, where the
+ icon should sit quietly among large capitals and not stand out. In all caps, the case feature
+ swaps U+E000 for U+E001. U+E002 is the lockup: U+E001 with the space after it built in, typed
+ straight before the name, in Llama Sans or in Llama Mono, which carries it too.
+
+
+
+
llama.cpp
+
+
Llama
+
+
+
+
+ U+E002 · the lockup Llama
+
+
+
+ U+E001 · small text, controls, names Models run locally in Llama.
+
+
+
+ U+E000 · headlines Run it in Llama
+
+
+{/if}
+
+
+{#if section === 'buttons'}
+ In buttons
+
+ Open in Llama
+
+
+ Buttons always take the capital glyph, U+E001: at a label's size the cap-height glyph reads as
+ smaller than the letters beside it. As a glyph, the icon centres on the button's line box like
+ the label's capitals, with a word space after it, so it needs no icon slot and no nudging. These
+ are the design system's own buttons.
+
+
+
+{/if}
+
+
+{#if section === 'context'}
+ The lockups in context
+
+ Where the name goes
+
+
+ The two lockups at the sizes they are used at: the README banner, app headers, a terminal, a
+ footer and a hero. Llama, the app, is set in Llama Sans with its capital L; llama.cpp, the
+ engine, in Llama Mono and all lowercase, as it is typed in a terminal. Both start with the
+ lockup glyph, U+E002: the capital icon with the gap built in, so the lockup is one character and
+ the name. Llama Mono's is drawn a little larger: with the icons matched, llama.cpp's wider,
+ heavier letters set at 90% of Llama's. The llama.cpp lockup always sits on a neutral ground
+ (white, the greys, ink); only the Llama lockup goes on colour, the day sky and the night sky.
+
+
+
+
+ {#each ['dark', 'light'] as const as tone (tone)}
+
+ llama.cpp
+
+ {/each}
+
+
+
+
+
+
+
$ llama-server -m model.gguf --port 9931
+ llama.cpp b6123 · listening on http://127.0.0.1:9931
+ llama.cpp b6123 · slot 0 ready, ctx 32768
+
+
+
+
+ {#each [{ field: DAY_SKY, ink: '#111111', name: 'day sky' }, { field: NIGHT_SKY, ink: '#fafafa', name: 'night sky' }] as b (b.name)}
+
+ Llama
+
+ {/each}
+
+{/if}
+
+
+{#if section === 'badge'}
+ Download badge
+
+ Get the app
+
+
+ Our own equivalent of a store badge, for links to download Llama or get llama.cpp: a dark key
+ with the icon at the height of its two lines and a small line over the name. 48 px high (40 for
+ a compact one), radius 10, the icon the capital glyph (U+E001) at 18 px, 14 from the left edge
+ and 10 from the text.
+
+
+
+{/if}
+
+
+{#if section === 'text'}
+ In running text
+
+ Inline, at any size
+
+
+ In small text the icon takes its capital form, U+E001, so it holds its own next to the letters;
+ in a headline, the cap-height U+E000 sits quietly among the capitals. Use it before the name it
+ stands for, never as a word on its own.
+
+
+
+
+ Models load with llama.cpp and run locally in Llama, on your own machine.
+
+
+
+ Models load with llama.cpp and run locally in Llama, on your own machine.
+
+
+
Run it in Llama.
+
+{/if}
+
+
+{#if section === 'icons'}
+ App icons and avatars
+
+ On the tab, the home screen and the profile
+
+
+
+ Every icon starts from the same placement. Centred exactly, the L reads low, its weight in the
+ wide foot; so the icon is lifted {Math.round(OPTICAL_LIFT * 1000) / 10}% of its height and
+ nudged
+ {Math.round(OPTICAL_NUDGE * 1000) / 10}% of its width left, and looks centred. Cut to a circle,
+ as in the social avatars and the PWA icon, it then clears the circle's edge at its corners and
+ tips nearly evenly. Drawn from the avatar file itself, the icon at 56% of a square, which every
+ platform crops round.
+
+
+
+
+
+
+
+ The web app's favicon, PWA, maskable and Apple touch icons, with their proportions drawn in. All
+ of them start from the favicon, the icon with a {percent(
+ PWA_ASSET_GENERATOR.FAVICON_PADDING / 2
+ )} margin; the square icons add the generator's 30% padding, and the PWA icon is the maskable one
+ at 85%, cut round. The files the web UI ships still carry the old llama.cpp mark; these are drawn
+ with the L.
+
+
+
+ {#each icons as icon (icon.label)}
+ {@const p = placed(100, 100, icon.scale)}
+
+
+ {#if icon.background}
+ {#if icon.round}
+
+ {:else}
+
+ {/if}
+ {/if}
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+
+
+
+ {#if icon.guide === 'safe'}
+
+ {:else if icon.guide === 'apple'}
+
+ {/if}
+
+
+
+ {icon.label}
+
+ {#each icon.spec as line (line)}{line} {/each}
+
+ {icon.files}
+
+
+ {/each}
+
+
+
+ Native app icons
+
+
+ {#each nativeIcons as icon (icon.label)}
+
+
+
+
+ {icon.label}
+
+ {#each icon.spec as line (line)}{line} {/each}
+
+ {icon.files}
+
+
+ {/each}
+
+
+
+
+ {#each ['light', 'dark'] as const as mode (mode)}
+
+
+
+
+
+
+
+ macOS, the menu bar and the Dock, {mode}
+
+
+
+
+
+
+
+ Windows, the taskbar and the tray, {mode}
+
+ {/each}
+
+{/if}
+
+
+{#if section === 'splash'}
+ Splash screens
+
+ While the app opens
+
+
+ For now the splash screens are the icon alone, centred on the light or dark page colour at
+ {percent(splash)} of the screen's shorter side, for every iPhone and iPad size, upright and on its
+ side. A designed splash screen will follow.
+
+
+
+ {#each splashes as s (s.label)}
+ {@const p = placed(s.w, s.h, splash)}
+
+
+
+
+
+ {#each PATHS as d (d)} {/each}
+
+
+
+
+
+
+ {s.label}
+
+ {s.w} × {s.h} · icon {Math.round(p.side)} px
+
+ {s.files}
+
+
+ {/each}
+
+{/if}
+
+
diff --git a/tools/ui/tests/stories/brand/typography/Highlights.svelte b/tools/ui/tests/stories/brand/typography/Highlights.svelte
new file mode 100644
index 000000000000..0edaeefe5c7c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/Highlights.svelte
@@ -0,0 +1,94 @@
+
+
+
+
+ {#each items as h (h.title)}
+
+ {h.sample}
+
+
+
{h.title}
+
+
{h.text}
+
+
{h.spec}
+
+
+ {/each}
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/OpticalSizes.svelte b/tools/ui/tests/stories/brand/typography/OpticalSizes.svelte
new file mode 100644
index 000000000000..2b54923fad38
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/OpticalSizes.svelte
@@ -0,0 +1,68 @@
+
+
+
+
+ {#each stops as s (s.opsz)}
+
+
+ opsz {s.opsz} {#if s.label}{s.label} {/if}
+
+
+
Tokens per second
+
+ {/each}
+
+
+
+ The same letters at the same size: only the spacing and kerning move. In CSS there's nothing to
+ set, because font-optical-sizing: auto maps opsz to the font-size in px, so 16px text gets
+ UI, 40px and up gets Display, and the sizes between blend.
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/Part.svelte b/tools/ui/tests/stories/brand/typography/Part.svelte
new file mode 100644
index 000000000000..5f7bbe1e2367
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/Part.svelte
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+ {@render children()}
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/SansNotes.svelte b/tools/ui/tests/stories/brand/typography/SansNotes.svelte
new file mode 100644
index 000000000000..538e3370f3cf
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/SansNotes.svelte
@@ -0,0 +1,64 @@
+
+
+
+
+
+ Near-monoline, with a {stems[0]}-unit stem at 400 rising to {stems.at(-1)} at 700. Where a bowl,
+ arm or shoulder leaves a stem, the notch cuts a little deeper into the joint, so joins stay open
+ without turning into ink traps.
+
+ Bowls are eased toward true circles, fully circular in G, S and s, so rounds read soft and
+ calm without turning geometric.
+
+ Every curved stroke end is trimmed the same short distance and cut almost square to the
+ stroke, which keeps c, e, g, s, 2, 3, 5, 6 and 9 open and consistent.
+
+ Double-story, on a straight stem with a flat foot. The hook runs long and ends in a flat cut;
+ the bowl rises gently into the stem with sharp joints. Toward Bold, a small bracketed foot
+ appears.
+
+ A plain l the width of the i, and a narrow t with short arms. The ends of r, t and f are
+ angled to match the curved terminals.
+
+ G and S wide and round, s a little leaner, with slightly open, angled ends on S and s.
+
+ Regular, Medium, SemiBold and Bold at 400, 500, 600 and 700, a little lighter than the
+ numbers usually mean, with every weight in between.
+
+
+
+
+
+ A straight-legged R and a shorter Q tail, an angled end on the j, slightly wider o, c, e and O,
+ and a review of the accented glyphs.
+
+
+
+
+
+ Llama Sans is released under the SIL Open Font License 1.1. It is derived from Geist, © 2024 The
+ Geist Project Authors. The Llama icon at U+E000 is the ggml-org mark, licensed separately under
+ CC BY-NC 4.0.
+
+
diff --git a/tools/ui/tests/stories/brand/typography/SansOverview.svelte b/tools/ui/tests/stories/brand/typography/SansOverview.svelte
new file mode 100644
index 000000000000..1e838a07e55b
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/SansOverview.svelte
@@ -0,0 +1,183 @@
+
+
+
+
+
+ A neo-grotesk with an even stroke, round bowls and open, angle-cut terminals, in one variable
+ font: every weight from {axis.min} to {axis.max}, {glyphCount} glyphs, and the Llama icon built in
+ at U+E000.
+
+
+
+ It has an optical size axis from 16 to 40, which the browser sets from the font-size. Its two
+ ends have names: UI at 16, for interfaces and running text, and Display at 40, for headlines.
+ Sizes in between blend.
+
+
+
+
+
+ Beatrice Warde compared good type to a crystal goblet: clear enough that you see the wine, not
+ the glass. Llama Sans aims for the same in an interface. Even strokes, calm round bowls and an
+ even rhythm keep it out of the way of labels, messages and long reading alike, so it can carry a
+ whole product without asking for attention.
+
+
+
+ It isn't featureless, though. A few angled cuts give it just enough character to lead the eye
+ along the line, and they come forward only when you look for them.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/TypeTester.svelte b/tools/ui/tests/stories/brand/typography/TypeTester.svelte
new file mode 100644
index 000000000000..ae7beb23a521
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/TypeTester.svelte
@@ -0,0 +1,289 @@
+
+
+
+
+
+ Tester
+
+
+ Type in either line: both follow. The size, weight, tracking and line are shared, so Llama
+ Sans and Llama Mono compare like for like.
+
+
+
+
+
+
+
+ {#each rows as row (row.id)}
+
+ {row.name} {row.meta}
+
+
+
+ {/each}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/TypographyOverview.svelte b/tools/ui/tests/stories/brand/typography/TypographyOverview.svelte
new file mode 100644
index 000000000000..702cd816c00a
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/TypographyOverview.svelte
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+ window.scrollTo({ top: 0 })}
+ >
+
+ {#each variants as v (v.id)}
+
+ {v.family}
+
+ {v.name}
+
+ {/each}
+
+
+
+
+
+ {#key selected}
+
+
+ {#if selected === 'sans'}
+
+ {:else}
+
+ {/if}
+ {/key}
+
+
+
+
diff --git a/tools/ui/tests/stories/brand/typography/UserInterface.svelte b/tools/ui/tests/stories/brand/typography/UserInterface.svelte
new file mode 100644
index 000000000000..98e6ff7d969c
--- /dev/null
+++ b/tools/ui/tests/stories/brand/typography/UserInterface.svelte
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+ Llama Sans · opsz 16, from the size
+
+
+ User Interface
+
+
+ The design system's own components, at their real sizes. Nothing here pins the optical size:
+ text from 12 to 16 px lands on the UI end of the axis by itself, spaced and kerned for
+ controls, with its line box centred on the cap height so labels sit in the middle of buttons
+ and badges.
+
+
+
+
+
New chat
+
+
Attach
+
+
Export
+
+
Cancel
+
+
Unload
+
+
+
+
Ready
+
+
3 slots
+
+
Context 92%
+
+
v0.6
+
+
+
+
+
+ Model settings
+
+ Qwen3.8-27B · Q4_K_M
+
+
+
+
+
+ General
+
+ Sampling
+
+ Server
+
+
+
+
+
Context size
+
+
+
+
+ Tokens the model keeps in view. Up to 131,072 for this model.
+
+
+
+
+ KV cache
+
+
+ F16
+
+ Q8_0
+
+ Q4_0
+
+
+
+
+
+ Reset
+
+ Save changes
+
+
+
+
+
+ Server
+
+ llama-server on 127.0.0.1:9931
+
+
+
+ {#each server as s (s.id)}
+
+
+
{s.label}
+
+
{s.hint}
+
+
+
+
+ {/each}
+
+
+
+
+
+ Loaded models
+
+ Generation speed on this machine, in tokens per second
+
+
+
+
+
+
+ Model
+
+ Quant
+
+ Context
+
+ Size
+
+ tok/s
+
+
+
+
+ {#each models as m (m.name)}
+
+ {m.name}
+
+ {m.quant}
+
+ {m.context}
+
+ {m.size}
+
+ {m.speed}
+
+ {/each}
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormActionReasoning.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormActionReasoning.stories.svelte
new file mode 100644
index 000000000000..e8f652ba51ff
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormActionReasoning.stories.svelte
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+ {
+ await userEvent.click(canvas.getByRole('button', { name: 'Reasoning effort' }));
+ await screen.findByRole('menu');
+ }}
+/>
+
+ {
+ await userEvent.click(canvas.getByRole('button', { name: 'Reasoning effort' }));
+ await screen.findByRole('menu');
+ }}
+/>
diff --git a/tools/ui/tests/stories/chat/form/ChatFormActionRecord.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormActionRecord.stories.svelte
new file mode 100644
index 000000000000..63c60940af16
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormActionRecord.stories.svelte
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ // the tooltip trigger wraps the disabled button, hover the trigger
+ await userEvent.hover(canvas.getAllByRole('button', { name: 'Start recording' })[0]);
+ }}
+/>
diff --git a/tools/ui/tests/stories/chat/form/ChatFormActionSubmit.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormActionSubmit.stories.svelte
new file mode 100644
index 000000000000..3f8f3b2a3a5d
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormActionSubmit.stories.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormContextGauge.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormContextGauge.stories.svelte
new file mode 100644
index 000000000000..56cd525be88f
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormContextGauge.stories.svelte
@@ -0,0 +1,110 @@
+
+
+{#snippet frame()}
+
+
+{/snippet}
+
+
+ {@render frame()}
+
+
+
+ {@render frame()}
+
+
+
+ {@render frame()}
+
+
+
+ {@render frame()}
+
+
+
+ {@render frame()}
+
+
+
+ {@render frame()}
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormCurrentWorkingDirectory.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormCurrentWorkingDirectory.stories.svelte
new file mode 100644
index 000000000000..181baa67dce2
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormCurrentWorkingDirectory.stories.svelte
@@ -0,0 +1,105 @@
+
+
+{#snippet template(args: ComponentProps)}
+
+
+{/snippet}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ({ error: 'path is outside the allowed roots' })
+ })}
+ name="PickerSearchError"
+ {template}
+/>
+
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormInput.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormInput.stories.svelte
new file mode 100644
index 000000000000..aee62b811f30
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormInput.stories.svelte
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormPickerCommand.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormPickerCommand.stories.svelte
new file mode 100644
index 000000000000..2f1a2ebbd282
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormPickerCommand.stories.svelte
@@ -0,0 +1,46 @@
+
+
+
+{#snippet anchored(query: string)}
+
+{/snippet}
+
+
+
+
+ {@render anchored('')}
+
+
+
+ {@render anchored('dir')}
+
+
+
+ {@render anchored('xyz')}
+
+
+
diff --git a/tools/ui/tests/stories/chat/form/ChatFormPickerMcpPrompts.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormPickerMcpPrompts.stories.svelte
new file mode 100644
index 000000000000..23ca64de1c3c
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormPickerMcpPrompts.stories.svelte
@@ -0,0 +1,74 @@
+
+
+{#snippet template(args: ComponentProps)}
+
+
+
+
+{/snippet}
+
+ seedStores({ mcpPrompts, mcpServers })} name="Default" {template} />
+
+ seedStores({ mcpPrompts: mcpPrompts.slice(0, 2), mcpServers })}
+ name="FewPrompts"
+ {template}
+/>
+
+ seedStores({ mcpPrompts, mcpServers })}
+ name="Filtered"
+ {template}
+/>
+
+
+
+ seedStores({ mcpPrompts: [], mcpServers })} name="Empty" {template} />
+
+ seedStores({ mcpPrompts, mcpServers })}
+ name="ArgumentForm"
+ play={async ({ userEvent }) => {
+ await userEvent.click(await screen.findByText('Code review'));
+ await screen.findByRole('button', { name: 'Use Prompt' });
+ }}
+ {template}
+/>
diff --git a/tools/ui/tests/stories/chat/form/ChatFormPickerMention.stories.svelte b/tools/ui/tests/stories/chat/form/ChatFormPickerMention.stories.svelte
new file mode 100644
index 000000000000..35fe14ff7b37
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatFormPickerMention.stories.svelte
@@ -0,0 +1,78 @@
+
+
+{#snippet template(args: ComponentProps)}
+
+
+
+
+{/snippet}
+
+
+ seedStores({ ...searchTools, globSearch: globSearchResult(toGlobEntries(mentionEntries)) })}
+ name="Default"
+ {template}
+/>
+
+ seedStores({ ...searchTools, globSearch: pendingGlobSearch() })}
+ name="Loading"
+ {template}
+/>
+
+ seedStores({ ...searchTools, globSearch: globSearchResult([]) })}
+ name="NoMatch"
+ {template}
+/>
+
+
+ seedStores({
+ ...searchTools,
+ globSearch: async () => ({ error: 'path is outside the allowed roots' })
+ })}
+ name="SearchError"
+ {template}
+/>
+
+ seedStores({ serverHome: SERVER_HOME, serverTools: [] })}
+ name="SearchUnavailable"
+ {template}
+/>
diff --git a/tools/ui/tests/stories/chat/form/ChatScreenForm.stories.svelte b/tools/ui/tests/stories/chat/form/ChatScreenForm.stories.svelte
new file mode 100644
index 000000000000..cd197eb1ae44
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/ChatScreenForm.stories.svelte
@@ -0,0 +1,208 @@
+
+
+ {
+ const editor = await canvas.findByRole('textbox');
+ const submitButton = await canvas.findByRole('button', { name: 'Send' });
+
+ // Expect the input to be focused after the component is mounted
+ await expect(editor).toHaveFocus();
+
+ // Expect the submit button to be disabled
+ await expect(submitButton).toBeDisabled();
+
+ const text = 'What is the meaning of life?';
+
+ await userEvent.clear(editor);
+ await userEvent.type(editor, text);
+
+ await expect(editor).toHaveTextContent(text);
+
+ const fileInput = document.querySelector('input[type="file"]');
+
+ await expect(fileInput).not.toHaveAttribute('accept');
+ }}
+/>
+
+ seedStores(modelServer)}
+ name="WithText"
+ play={async ({ canvas, userEvent }) => {
+ const editor = await canvas.findByRole('textbox');
+
+ await userEvent.type(editor, 'Explain how the KV cache works in llama.cpp');
+ }}
+/>
+
+ seedStores(modelServer)}
+ name="WithCodeSpan"
+ play={async ({ canvas, userEvent }) => {
+ const editor = await canvas.findByRole('textbox');
+
+ // the live-preview editor renders a complete code span as it is typed
+ await userEvent.type(editor, 'Why does `npm run check` fail after `npm install`?');
+ }}
+/>
+
+
+
+
+
+ {
+ const jpgAttachment = canvas.getByAltText('1.jpg');
+ const svgAttachment = canvas.getByAltText('hf-logo.svg');
+
+ await expect(jpgAttachment).toHaveAttribute('src', jpgAsset);
+ await expect(svgAttachment).toHaveAttribute('src', svgAsset);
+ await expect(canvas.getByText('example.pdf')).toBeInTheDocument();
+ await expect(canvas.getByText('342.82 KB')).toBeInTheDocument();
+ }}
+/>
+
+
+
+
+ seedStores({
+ config: { autoMicOnEmpty: true },
+ serverProps: modelServerProps({ modalities: { audio: true, video: false, vision: true } }),
+ serverRole: ServerRole.MODEL
+ })}
+ name="WithRecordButton"
+/>
+
+ seedStores({ ...modelServer, reasoningEffort: ReasoningEffort.HIGH })}
+ name="WithReasoningEffort"
+/>
+
+
+ seedStores({
+ models: routerModels,
+ selectedModelId: 'removed-model',
+ serverProps: modelServerProps({ role: ServerRole.ROUTER }),
+ serverRole: ServerRole.ROUTER
+ })}
+ name="ModelNotAvailable"
+ play={async ({ canvas, userEvent }) => {
+ const editor = await canvas.findByRole('textbox');
+
+ await userEvent.type(editor, 'Hello');
+ }}
+/>
+
+ seedStores({ mcpResources, mcpServers })}
+ name="WithMcpResources"
+/>
+
+
+ seedStores({
+ ...modelServer,
+ pendingCwd: `${SERVER_HOME}/llama.cpp/tools/ui`,
+ serverHome: SERVER_HOME,
+ serverTools: cwdServerTools
+ })}
+ name="WithWorkingDirectory"
+/>
+
+ {
+ await userEvent.click(await canvas.findByRole('button', { name: ATTACHMENT_TOOLTIP_TEXT }));
+ await screen.findByRole('menu');
+ }}
+/>
+
+
+ seedStores({
+ ...modelServer,
+ mcpServers,
+ serverHome: SERVER_HOME,
+ serverTools: cwdServerTools
+ })}
+ name="CommandPickerOpen"
+ play={async ({ canvas, userEvent }) => {
+ await userEvent.type(await canvas.findByRole('textbox'), '/');
+ await screen.findByText('/prompt');
+ }}
+/>
+
+
+ seedStores({
+ ...modelServer,
+ globSearch: globSearchResult(toGlobEntries(mentionEntries)),
+ serverHome: SERVER_HOME,
+ serverTools: cwdServerTools
+ })}
+ name="MentionPickerOpen"
+ play={async ({ canvas, userEvent }) => {
+ await userEvent.type(await canvas.findByRole('textbox'), 'Look at @chat');
+ await screen.findByText('ChatForm.svelte');
+ }}
+/>
diff --git a/tools/ui/tests/stories/chat/form/fixtures.ts b/tools/ui/tests/stories/chat/form/fixtures.ts
new file mode 100644
index 000000000000..6c63d4129e38
--- /dev/null
+++ b/tools/ui/tests/stories/chat/form/fixtures.ts
@@ -0,0 +1,457 @@
+import jpgAsset from '../../fixtures/assets/1.jpg?url';
+import pdfAsset from '../../fixtures/assets/example.pdf?raw';
+import svgAsset from '../../fixtures/assets/hf-logo.svg?url';
+import {
+ BuiltInTool,
+ ChatFormCommandAction,
+ FileMentionEntryType,
+ MessageRole,
+ MessageType,
+ MimeTypeText,
+ ReasoningEffort,
+ ServerRole,
+ SpecialFileType,
+ ToolSource
+} from '$lib/enums';
+import { ToolsService } from '$lib/services/tools.service';
+import {
+ conversationsStore,
+ mcpStore,
+ modelsStore,
+ serverStore,
+ settingsStore,
+ toolsStore
+} from '$lib/stores';
+import type {
+ ChatFormCommand,
+ DatabaseConversation,
+ DatabaseMessage,
+ FileMentionEntry,
+ GlobEntry,
+ MCPPromptInfo,
+ MCPResourceInfo,
+ MCPServerSettingsEntry,
+ ServerToolInfo
+} from '$lib/types';
+
+export const FORM_CLASS = 'max-w-[56rem] w-[calc(100vw-2rem)]';
+
+export const MODEL_PATH = '/models/Qwen3-8B-Q4_K_M.gguf';
+export const MODEL_NAME = 'Qwen3-8B-Q4_K_M.gguf';
+export const SERVER_HOME = '/home/user';
+export const CONVERSATION_ID = 'story-conversation';
+
+export { jpgAsset, svgAsset };
+
+export const fileAttachments: ChatUploadedFile[] = [
+ {
+ file: new File([''], '1.jpg', { type: 'image/jpeg' }),
+ id: '1',
+ name: '1.jpg',
+ preview: jpgAsset,
+ size: 44891,
+ type: 'image/jpeg'
+ },
+ {
+ file: new File([''], 'hf-logo.svg', { type: 'image/svg+xml' }),
+ id: '2',
+ name: 'hf-logo.svg',
+ preview: svgAsset,
+ size: 1234,
+ type: 'image/svg+xml'
+ },
+ {
+ file: new File([pdfAsset], 'example.pdf', { type: 'application/pdf' }),
+ id: '3',
+ name: 'example.pdf',
+ size: 351048,
+ type: 'application/pdf'
+ },
+ {
+ file: new File(['# Notes\n\nShort text file.'], 'notes.md', { type: MimeTypeText.MARKDOWN }),
+ id: '4',
+ name: 'notes.md',
+ size: 26,
+ textContent: '# Notes\n\nShort text file.',
+ type: MimeTypeText.MARKDOWN
+ }
+];
+
+export const loadingAttachment: ChatUploadedFile = {
+ file: new File([], 'loading'),
+ id: 'loading-prompt',
+ isLoading: true,
+ mcpPrompt: { promptName: 'code_review', serverName: 'github' },
+ name: 'Code review',
+ size: 0,
+ type: SpecialFileType.MCP_PROMPT
+};
+
+export const mcpServers: MCPServerSettingsEntry[] = [
+ { enabled: true, id: 'github', name: 'GitHub', url: 'https://api.githubcopilot.com/mcp/' },
+ { enabled: true, id: 'docs', name: 'Docs', url: 'https://docs.example.com/mcp' }
+];
+
+export const mcpPrompts: MCPPromptInfo[] = [
+ {
+ arguments: [
+ { description: 'Repository in owner/name form', name: 'repo', required: true },
+ { description: 'Pull request number', name: 'pr', required: true },
+ { description: 'Focus area, e.g. security', name: 'focus' }
+ ],
+ description: 'Review a pull request and list the main issues',
+ name: 'code_review',
+ serverName: 'github',
+ title: 'Code review'
+ },
+ {
+ description: 'Summarize open issues by label',
+ name: 'issue_summary',
+ serverName: 'github',
+ title: 'Issue summary'
+ },
+ {
+ arguments: [{ description: 'Topic to explain', name: 'topic', required: true }],
+ description: 'Explain a topic from the docs',
+ name: 'explain',
+ serverName: 'docs',
+ title: 'Explain'
+ },
+ {
+ description: 'Write release notes from the changelog',
+ name: 'release_notes',
+ serverName: 'docs'
+ }
+];
+
+export const mcpResources: MCPResourceInfo[] = [
+ {
+ mimeType: MimeTypeText.MARKDOWN,
+ name: 'README.md',
+ serverName: 'github',
+ uri: 'repo://ggml-org/llama.cpp/README.md'
+ },
+ {
+ mimeType: MimeTypeText.PLAIN,
+ name: 'server-api.txt',
+ serverName: 'docs',
+ title: 'Server API',
+ uri: 'docs://server/api'
+ }
+];
+
+export const chatCommands: ChatFormCommand[] = [
+ {
+ action: ChatFormCommandAction.PROMPT,
+ description: 'Insert an MCP prompt',
+ disabled: false,
+ name: 'prompt'
+ },
+ {
+ action: ChatFormCommandAction.CWD,
+ description: 'Set working directory',
+ disabled: false,
+ keywords: ['current working directory'],
+ name: 'cwd'
+ },
+ {
+ action: ChatFormCommandAction.MODEL,
+ description: 'Select model',
+ disabled: false,
+ name: 'model'
+ },
+ {
+ action: ChatFormCommandAction.COMPACT,
+ description: 'Summarize the conversation to free up context',
+ disabled: true,
+ keywords: ['summarize', 'context'],
+ name: 'compact'
+ }
+];
+
+export const mentionEntries: FileMentionEntry[] = [
+ {
+ name: 'src',
+ path: `${SERVER_HOME}/llama.cpp/tools/ui/src`,
+ type: FileMentionEntryType.DIRECTORY
+ },
+ {
+ name: 'ChatForm.svelte',
+ path: `${SERVER_HOME}/llama.cpp/tools/ui/src/lib/components/app/chat/ChatForm/ChatForm.svelte`,
+ type: FileMentionEntryType.FILE
+ },
+ {
+ name: 'chat.d.ts',
+ path: `${SERVER_HOME}/llama.cpp/tools/ui/src/lib/types/chat.d.ts`,
+ type: FileMentionEntryType.FILE
+ }
+];
+
+export const directoryResults = [
+ `${SERVER_HOME}/llama.cpp`,
+ `${SERVER_HOME}/llama.cpp/tools`,
+ `${SERVER_HOME}/llama.cpp/tools/ui`,
+ `${SERVER_HOME}/llama.cpp/tools/server`
+];
+
+/** Server tools that make the cwd chip and the mention search available. */
+export const cwdServerTools: ServerToolInfo[] = [
+ BuiltInTool.SERVER_FILE_GLOB_SEARCH,
+ BuiltInTool.SERVER_READ_FILE
+].map((tool) => ({
+ definition: { function: { name: tool, parameters: {} }, type: 'function' },
+ display_name: tool,
+ permissions: { write: false },
+ tool,
+ type: ToolSource.SERVER,
+ uses_cwd: true
+}));
+
+export function modelServerProps(
+ overrides: Partial = {}
+): ApiLlamaCppServerProps {
+ return {
+ default_generation_settings: { n_ctx: 32768 },
+ modalities: { audio: false, video: false, vision: true },
+ model_path: MODEL_PATH,
+ ...overrides
+ } as unknown as ApiLlamaCppServerProps;
+}
+
+export const routerModels: ModelOption[] = [
+ { capabilities: [], id: 'qwen3-8b', model: 'Qwen/Qwen3-8B-GGUF', name: 'Qwen3-8B' },
+ { capabilities: [], id: 'gemma-3-4b', model: 'google/gemma-3-4b-it-GGUF', name: 'gemma-3-4b-it' }
+];
+
+export const conversation: DatabaseConversation = {
+ currNode: 'a2',
+ id: CONVERSATION_ID,
+ lastModified: Date.now(),
+ name: 'Story conversation'
+};
+
+/** A short user/assistant exchange whose last turn used `promptTokens` of context. */
+export function conversationMessages(promptTokens: number, outputTokens = 512): DatabaseMessage[] {
+ const base = {
+ children: [],
+ convId: CONVERSATION_ID,
+ timestamp: Date.now(),
+ type: MessageType.TEXT
+ };
+
+ return [
+ { ...base, content: 'Explain the KV cache.', id: 'u1', parent: null, role: MessageRole.USER },
+ {
+ ...base,
+ content: 'The KV cache stores keys and values of past tokens.',
+ id: 'a1',
+ model: MODEL_NAME,
+ parent: 'u1',
+ role: MessageRole.ASSISTANT,
+ timings: { predicted_ms: 4200, predicted_n: 380, prompt_ms: 120, prompt_n: 240 }
+ },
+ { ...base, content: 'And how big can it get?', id: 'u2', parent: 'a1', role: MessageRole.USER },
+ {
+ ...base,
+ content: 'It grows with the context length.',
+ id: 'a2',
+ model: MODEL_NAME,
+ parent: 'u2',
+ role: MessageRole.ASSISTANT,
+ timings: {
+ cache_n: 620,
+ predicted_ms: outputTokens * 11,
+ predicted_n: outputTokens,
+ prompt_ms: 300,
+ prompt_n: promptTokens - 620
+ }
+ }
+ ] as DatabaseMessage[];
+}
+
+/** Store state a story needs; every field left out keeps the current value. */
+export interface StoreSeed {
+ activeConversation?: DatabaseConversation | null;
+ activeMessages?: DatabaseMessage[];
+ config?: Record;
+ globSearch?: (params: Record) => Promise>;
+ mcpPrompts?: MCPPromptInfo[];
+ mcpResources?: MCPResourceInfo[];
+ mcpServers?: MCPServerSettingsEntry[];
+ modelProps?: Record;
+ models?: ModelOption[];
+ pendingCwd?: string | null;
+ reasoningEffort?: ReasoningEffort;
+ routerModels?: ApiModelDataEntry[];
+ selectedModelId?: string | null;
+ selectedModelName?: string | null;
+ serverHome?: string | null;
+ serverProps?: ApiLlamaCppServerProps | null;
+ serverRole?: ServerRole | null;
+ serverTools?: ServerToolInfo[];
+}
+
+interface ToolsStoreInternals {
+ _serverHome: string | null | undefined;
+ _serverTools: ServerToolInfo['definition'][];
+ cwdAwareTools: Set;
+}
+
+interface PropsCache {
+ cache: { delete(key: string): boolean; set(key: string, value: ApiLlamaCppServerProps): void };
+ cacheVersion: number;
+}
+
+type Restore = () => void;
+
+/** Override an object member; the restore puts back the original. */
+export function override(
+ target: T,
+ key: K,
+ value: T[K]
+): Restore {
+ const hadOwn = Object.prototype.hasOwnProperty.call(target, key);
+ const previous = target[key];
+
+ Object.defineProperty(target, key, { configurable: true, value, writable: true });
+
+ return () => {
+ if (hadOwn) target[key] = previous;
+ else delete target[key];
+ };
+}
+
+/**
+ * Seed the global stores for one story. Nothing is persisted. Return the
+ * result from `beforeEach` so Storybook restores the stores afterwards.
+ */
+export function seedStores(seed: StoreSeed): Restore {
+ const restores: Restore[] = [];
+ const tools = toolsStore as unknown as ToolsStoreInternals;
+ const props = modelsStore.props as unknown as PropsCache;
+ const set = (target: T, key: K, value: T[K]) => {
+ const previous = target[key];
+
+ target[key] = value;
+ restores.push(() => (target[key] = previous));
+ };
+
+ if (seed.serverRole !== undefined) set(serverStore, 'role', seed.serverRole);
+
+ if (seed.serverProps !== undefined) set(serverStore, 'props', seed.serverProps);
+
+ if (seed.models) set(modelsStore, 'models', seed.models);
+
+ if (seed.routerModels) set(modelsStore, 'routerModels', seed.routerModels);
+
+ if (seed.selectedModelId !== undefined) set(modelsStore, 'selectedModelId', seed.selectedModelId);
+
+ if (seed.selectedModelName !== undefined)
+ set(modelsStore, 'selectedModelName', seed.selectedModelName);
+
+ if (seed.config || seed.mcpServers) {
+ set(settingsStore, 'config', {
+ ...settingsStore.config,
+ ...seed.config,
+ ...(seed.mcpServers ? { mcpServers: JSON.stringify(seed.mcpServers) } : {})
+ });
+ }
+
+ if (seed.reasoningEffort !== undefined)
+ set(conversationsStore.preferences, 'pendingReasoningEffort', seed.reasoningEffort);
+
+ if (seed.pendingCwd !== undefined)
+ set(conversationsStore.preferences, 'pendingCwd', seed.pendingCwd);
+
+ if (seed.activeConversation !== undefined)
+ set(conversationsStore, 'activeConversation', seed.activeConversation);
+
+ if (seed.activeMessages) set(conversationsStore, 'activeMessages', seed.activeMessages);
+
+ if (seed.serverTools) {
+ set(
+ tools,
+ '_serverTools',
+ seed.serverTools.map((t) => t.definition)
+ );
+ set(
+ tools,
+ 'cwdAwareTools',
+ new Set(seed.serverTools.filter((t) => t.uses_cwd).map((t) => t.tool))
+ );
+ }
+
+ if (seed.serverHome !== undefined) set(tools, '_serverHome', seed.serverHome);
+
+ if (seed.modelProps) {
+ for (const [id, value] of Object.entries(seed.modelProps)) {
+ props.cache.set(id, value);
+ restores.push(() => props.cache.delete(id));
+ }
+
+ props.cacheVersion++;
+ }
+
+ if (seed.globSearch) {
+ const globSearch = seed.globSearch;
+
+ restores.push(
+ override(ToolsService, 'executeToolRaw', async (toolName, params) => {
+ if (toolName !== BuiltInTool.SERVER_FILE_GLOB_SEARCH) return {};
+
+ return globSearch(params);
+ })
+ );
+ }
+
+ if (seed.mcpPrompts) {
+ const prompts = seed.mcpPrompts;
+
+ restores.push(override(mcpStore, 'ensureInitialized', async () => true));
+ restores.push(override(mcpStore, 'getAllPrompts', async () => prompts));
+ }
+
+ if (seed.mcpResources) {
+ for (const resource of seed.mcpResources) {
+ const attachment = mcpStore.resources.addAttachment(resource);
+
+ mcpStore.resources.updateAttachmentContent(attachment.id, [
+ { mimeType: resource.mimeType, text: `Content of ${resource.name}`, uri: resource.uri }
+ ]);
+ }
+
+ restores.push(() => mcpStore.resources.clearAttachments());
+ }
+
+ return () => {
+ for (const restore of restores.reverse()) restore();
+ };
+}
+
+/** A `file_glob_search` stand-in that returns `paths` relative to the server home. */
+export function globSearchResult(entries: GlobEntry[], delayMs = 0) {
+ return async () => {
+ if (delayMs > 0) await new Promise((resolve) => setTimeout(resolve, delayMs));
+
+ return { base: SERVER_HOME, entries };
+ };
+}
+
+/** Never resolves: keeps a picker in its loading state. */
+export function pendingGlobSearch() {
+ return () => new Promise>(() => {});
+}
+
+export function toGlobEntries(paths: { path: string; type: FileMentionEntryType }[]): GlobEntry[] {
+ return paths.map(({ path, type }) => ({
+ path: path.replace(`${SERVER_HOME}/`, ''),
+ type: type === FileMentionEntryType.DIRECTORY ? 'dir' : 'file'
+ }));
+}
+
+export { ReasoningEffort, ServerRole };
+
+/** An open menu that unmounts leaves `pointer-events: none` on the body; clear it. */
+export function resetPointerEvents() {
+ document.body.style.pointerEvents = '';
+}
diff --git a/tools/ui/tests/stories/chat/messages/ActionIconsStoryHost.svelte b/tools/ui/tests/stories/chat/messages/ActionIconsStoryHost.svelte
new file mode 100644
index 000000000000..28a121782bee
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ActionIconsStoryHost.svelte
@@ -0,0 +1,90 @@
+
+
+ (rawOutputEnabled = enabled)}
+ {onRegenerate}
+ {rawOutputEnabled}
+ {showRawOutputSwitch}
+/>
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessage.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessage.stories.svelte
new file mode 100644
index 000000000000..bd77f6ce964c
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessage.stories.svelte
@@ -0,0 +1,275 @@
+
+
+ seedChatStory()} name="Default" />
+
+ seedChatStory()} name="User" />
+
+ seedChatStory()}
+ name="UserMarkdown"
+/>
+
+ seedChatStory({ settings: { renderUserContentAsMarkdown: false } })}
+ name="UserPlainText"
+/>
+
+ seedChatStory()}
+ name="UserWithAttachments"
+/>
+
+ seedChatStory()}
+ name="UserAttachmentsOnly"
+/>
+
+ seedChatStory()}
+ name="UserWithReadingStats"
+/>
+
+ seedChatStory({ loading: true, processing: promptProcessingState })}
+ name="UserReadingLive"
+/>
+
+ seedChatStory()} name="System" />
+
+ seedChatStory()} name="SystemLong" />
+
+ seedChatStory({ settings: { enableContinueGeneration: true } })}
+ name="AssistantWithContinue"
+/>
+
+ seedChatStory()}
+ name="AssistantWithReasoning"
+/>
+
+ seedChatStory()}
+ name="AssistantReasoningCancelled"
+/>
+
+ seedChatStory({ loading: true, streamingMessageId: streamingMessage.id })}
+ name="AssistantReasoningStreaming"
+ play={async () => {
+ streamingMessage.timestamp = 0;
+ streamingMessage.content = '';
+ streamingMessage.reasoningContent = '';
+
+ await streamInto('reasoningContent', REASONING_TEXT);
+ await streamInto('content', STREAM_ANSWER);
+
+ chatStore.chatStreamingStates.delete(CONV_ID);
+ chatActivityStore.localEnded(CONV_ID);
+ streamingMessage.timestamp = Date.now();
+ }}
+>
+
+
+
+ seedChatStory({ loading: true, processing: promptProcessingState })}
+ name="AssistantProcessing"
+/>
+
+
+ seedChatStory({
+ loading: true,
+ processing: generatingProcessingState,
+ streamingMessageId: 'assistant-generating'
+ })}
+ name="AssistantGenerating"
+/>
+
+ seedChatStory()}
+ name="AssistantWithToolCalls"
+/>
+
+ seedChatStory({ settings: { showAgenticTurnStats: true } })}
+ name="AssistantAgenticMultiTurn"
+/>
+
+ seedChatStory()}
+ name="AssistantWithStatistics"
+/>
+
+ seedChatStory({ settings: { showRawOutputSwitch: true } })}
+ name="RawOutput"
+ play={async ({ canvas, userEvent }) => {
+ await userEvent.click(await canvas.findByRole('switch'));
+ }}
+/>
+
+ seedChatStory()}
+ name="WithBranching"
+/>
+
+
+ seedChatStory({ activeMessages: [preCompactionAssistantMessage, compactionMessage] })}
+ name="Compaction"
+/>
+
+
+ seedChatStory({
+ compactingNodeId: compactionPendingMessage.id,
+ loading: true,
+ processing: promptProcessingState
+ })}
+ name="CompactionPrefill"
+/>
+
+
+ seedChatStory({
+ compactingNodeId: compactionGeneratingMessage.id,
+ loading: true,
+ processing: generatingProcessingState
+ })}
+ name="CompactionGenerating"
+/>
+
+ seedChatStory()} name="CwdChange" />
+
+ seedChatStory()} name="CwdCleared" />
+
+ seedChatStory()} name="McpPrompt" />
+
+ seedChatStory({ pendingEditMessageId: userWithAttachmentsMessage.id })}
+ name="EditUser"
+/>
+
+ seedChatStory({ pendingEditMessageId: assistantWithReasoningMessage.id })}
+ name="EditAssistant"
+/>
+
+ seedChatStory({ pendingEditMessageId: systemMessage.id })}
+ name="EditSystem"
+/>
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageActionCard.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageActionCard.stories.svelte
new file mode 100644
index 000000000000..65ece74e8d6e
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageActionCard.stories.svelte
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageActionIcons.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageActionIcons.stories.svelte
new file mode 100644
index 000000000000..7b9c480ed195
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageActionIcons.stories.svelte
@@ -0,0 +1,78 @@
+
+
+
+
+
+ {}}
+ {onRegenerate}
+ />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageReasoningBlock.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageReasoningBlock.stories.svelte
new file mode 100644
index 000000000000..522103a8703e
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageReasoningBlock.stories.svelte
@@ -0,0 +1,60 @@
+
+
+ seedChatStory()} name="States">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ seedChatStory({ settings: { renderThinkingAsMarkdown: false } })}
+ name="ExpandedPlainText"
+/>
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageStatistics.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageStatistics.stories.svelte
new file mode 100644
index 000000000000..395eb9952321
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageStatistics.stories.svelte
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageToolCallBlock.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageToolCallBlock.stories.svelte
new file mode 100644
index 000000000000..b77fbc940fcc
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageToolCallBlock.stories.svelte
@@ -0,0 +1,156 @@
+
+
+ seedChatStory()} name="States">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/messages/ChatMessageUserPending.stories.svelte b/tools/ui/tests/stories/chat/messages/ChatMessageUserPending.stories.svelte
new file mode 100644
index 000000000000..4a53dfb3bd42
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/ChatMessageUserPending.stories.svelte
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tools/ui/tests/stories/chat/messages/fixtures.ts b/tools/ui/tests/stories/chat/messages/fixtures.ts
new file mode 100644
index 000000000000..bbf7db3bd078
--- /dev/null
+++ b/tools/ui/tests/stories/chat/messages/fixtures.ts
@@ -0,0 +1,728 @@
+import {
+ AgenticSectionType,
+ AttachmentType,
+ BuiltInTool,
+ MessageRole,
+ MessageType
+} from '$lib/enums';
+import { chatStore, conversationsStore, settingsStore } from '$lib/stores';
+import { chatActivityStore } from '$lib/stores/chat/activity.svelte';
+import type {
+ AgenticSection,
+ ApiChatCompletionToolCall,
+ ApiProcessingState,
+ ChatMessageActions,
+ ChatMessageAgenticTimings,
+ ChatMessageSiblingInfo,
+ DatabaseMessage,
+ DatabaseMessageExtra,
+ SettingsConfigValue
+} from '$lib/types';
+
+export const CONV_ID = 'conv-1';
+export const MODEL_NAME = 'ggml-org/gpt-oss-20b-GGUF';
+export const STORY_CLASS = 'max-w-[56rem] w-[calc(100vw-2rem)]';
+
+const NOW = Date.now();
+
+export const noopChatActions: ChatMessageActions = {
+ continueAssistantMessage: () => {},
+ copy: () => {},
+ delete: () => {},
+ editUserMessagePreserveResponses: () => {},
+ editWithBranching: () => {},
+ editWithReplacement: () => {},
+ forkConversation: () => {},
+ navigateToSibling: () => {},
+ regenerateCompaction: () => {},
+ regenerateWithBranching: () => {}
+};
+
+function createMessage(
+ fields: Pick & Partial
+): DatabaseMessage {
+ return {
+ children: [],
+ convId: CONV_ID,
+ parent: null,
+ timestamp: NOW - 1000 * 60,
+ type: MessageType.TEXT,
+ ...fields
+ };
+}
+
+function toolCallsJson(calls: { id: string; name: string; args: unknown }[]): string {
+ const toolCalls: ApiChatCompletionToolCall[] = calls.map((call) => ({
+ function: { arguments: JSON.stringify(call.args), name: call.name },
+ id: call.id,
+ type: 'function'
+ }));
+
+ return JSON.stringify(toolCalls);
+}
+
+// Small inline images so the stories need no binary assets.
+const SVG_IMAGE_URL = `data:image/svg+xml;base64,${btoa(
+ ' '
+)}`;
+const CHART_IMAGE_URL = `data:image/svg+xml;base64,${btoa(
+ ' '
+)}`;
+
+/* User messages */
+
+export const userMessage = createMessage({
+ content: 'What is the meaning of life, the universe, and everything?',
+ id: 'user-1',
+ role: MessageRole.USER
+});
+
+export const userMarkdownMessage = createMessage({
+ content:
+ 'Can you review this function?\n\n```ts\nexport function sum(values: number[]): number {\n\treturn values.reduce((acc, v) => acc + v, 0);\n}\n```\n\n- Is it safe for empty arrays?\n- Should it accept `bigint`?',
+ id: 'user-markdown',
+ role: MessageRole.USER
+});
+
+export const userAttachments: DatabaseMessageExtra[] = [
+ {
+ base64Url: SVG_IMAGE_URL,
+ name: 'sunset.svg',
+ size: 412,
+ type: AttachmentType.IMAGE
+ },
+ {
+ content: 'id,name,score\n1,Ada,98\n2,Linus,91\n3,Grace,95\n',
+ name: 'scores.csv',
+ size: 46,
+ type: AttachmentType.TEXT
+ },
+ {
+ base64Data: btoa('%PDF-1.4\n%mock\n'),
+ content: 'Quarterly report. Revenue grew 12 percent quarter over quarter.',
+ name: 'report.pdf',
+ processedAsImages: false,
+ size: 18_432,
+ type: AttachmentType.PDF
+ }
+];
+
+export const userWithAttachmentsMessage = createMessage({
+ content: 'Summarize the attached files and describe the image.',
+ extra: userAttachments,
+ id: 'user-attachments',
+ role: MessageRole.USER
+});
+
+export const userAttachmentsOnlyMessage = createMessage({
+ content: '',
+ extra: [userAttachments[0]],
+ id: 'user-attachments-only',
+ role: MessageRole.USER
+});
+
+/* System messages */
+
+export const systemMessage = createMessage({
+ content: 'You are a helpful assistant. Answer briefly and use **markdown** when it helps.',
+ id: 'system-1',
+ role: MessageRole.SYSTEM,
+ type: MessageType.SYSTEM
+});
+
+export const systemLongMessage = createMessage({
+ content: [
+ 'You are a senior software engineer helping with the llama.cpp web UI.',
+ '',
+ '## Rules',
+ '',
+ '1. Read the relevant files before you answer.',
+ '2. Keep answers short and concrete.',
+ '3. Prefer existing helpers over new abstractions.',
+ '4. Use ASCII only in code comments.',
+ '5. Never invent API fields; read the types first.',
+ '6. Point to file paths when you mention code.',
+ '',
+ '## Style',
+ '',
+ '- Use simple words.',
+ '- Avoid long comments.',
+ '- Show code only when it is needed.'
+ ].join('\n'),
+ id: 'system-long',
+ role: MessageRole.SYSTEM,
+ type: MessageType.SYSTEM
+});
+
+/* Assistant messages */
+
+export const assistantMessage = createMessage({
+ content:
+ 'The answer to the ultimate question of life, the universe, and everything is **42**.\n\nThis comes from Douglas Adams\' "The Hitchhiker\'s Guide to the Galaxy," where a supercomputer named Deep Thought calculated this answer over 7.5 million years. However, the question itself was never properly formulated, which is why the answer seems meaningless without context.',
+ id: 'assistant-1',
+ parent: 'user-1',
+ role: MessageRole.ASSISTANT
+});
+
+export const REASONING_TEXT =
+ "Let's consider the question step by step:\n\n1. Identify the core problem\n2. Evaluate relevant information\n3. Formulate a clear answer\n\nFollowing this process keeps the final response focused and accurate.";
+
+export const assistantWithReasoningMessage = createMessage({
+ content: "Here's the concise answer, now that I've thought it through: **42**.",
+ id: 'assistant-reasoning',
+ parent: 'user-1',
+ reasoningContent: REASONING_TEXT,
+ role: MessageRole.ASSISTANT
+});
+
+// Reasoning with no answer after it, on a finished turn: the block shows "Cancelled".
+export const assistantInterruptedReasoningMessage = createMessage({
+ content: '',
+ id: 'assistant-reasoning-interrupted',
+ parent: 'user-1',
+ reasoningContent: 'The user asks about the meaning of life. I should first check which',
+ role: MessageRole.ASSISTANT
+});
+
+export const assistantWithStatsMessage = createMessage({
+ content: assistantMessage.content,
+ id: 'assistant-stats',
+ model: MODEL_NAME,
+ parent: 'user-1',
+ role: MessageRole.ASSISTANT,
+ timings: {
+ cache_n: 128,
+ predicted_ms: 3120,
+ predicted_n: 164,
+ prompt_ms: 412,
+ prompt_n: 1830
+ }
+});
+
+export const rawOutputMessage = createMessage({
+ content: 'Hello there! How can I help you today?',
+ id: 'assistant-raw',
+ parent: 'user-1',
+ reasoningContent:
+ 'User greeted me. Is this a trap? No, just a normal hello. Respond calmly and do not start explaining quantum physics again.',
+ role: MessageRole.ASSISTANT
+});
+
+/* Agentic (tool calls) */
+
+export const agenticTimings: ChatMessageAgenticTimings = {
+ llm: { predicted_ms: 5400, predicted_n: 312, prompt_ms: 980, prompt_n: 4210 },
+ perTurn: [
+ {
+ llm: { predicted_ms: 1800, predicted_n: 96, prompt_ms: 610, prompt_n: 2400 },
+ toolCalls: [
+ { duration_ms: 42, name: BuiltInTool.SERVER_GET_INFO, success: true },
+ { duration_ms: 318, name: BuiltInTool.SERVER_EXEC_SHELL_COMMAND, success: true }
+ ],
+ toolsMs: 360,
+ turn: 1
+ },
+ {
+ llm: { predicted_ms: 3600, predicted_n: 216, prompt_ms: 370, prompt_n: 1810 },
+ toolCalls: [],
+ toolsMs: 0,
+ turn: 2
+ }
+ ],
+ toolCalls: [
+ { duration_ms: 42, name: BuiltInTool.SERVER_GET_INFO, success: true },
+ { duration_ms: 318, name: BuiltInTool.SERVER_EXEC_SHELL_COMMAND, success: true }
+ ],
+ toolCallsCount: 2,
+ toolsMs: 360,
+ turns: 2
+};
+
+export const assistantWithToolCallsMessage = createMessage({
+ content: 'Let me check the environment first.',
+ id: 'assistant-tools',
+ parent: 'user-1',
+ reasoningContent: 'I need the working directory and the file list before I answer.',
+ role: MessageRole.ASSISTANT,
+ toolCalls: toolCallsJson([
+ { args: {}, id: 'call-info', name: BuiltInTool.SERVER_GET_INFO },
+ { args: { command: 'ls -la' }, id: 'call-ls', name: BuiltInTool.SERVER_EXEC_SHELL_COMMAND }
+ ])
+});
+
+export const toolResultMessages: DatabaseMessage[] = [
+ createMessage({
+ content: JSON.stringify({ cwd: '/home/user/projects/llama.cpp', os: 'linux' }),
+ id: 'tool-info',
+ parent: 'assistant-tools',
+ role: MessageRole.TOOL,
+ toolCallId: 'call-info'
+ }),
+ createMessage({
+ content:
+ 'total 24\ndrwxr-xr-x 6 user user 4096 Oct 28 10:12 .\ndrwxr-xr-x 12 user user 4096 Oct 27 09:01 ..\n-rw-r--r-- 1 user user 1067 Oct 20 14:33 LICENSE\n-rw-r--r-- 1 user user 2311 Oct 28 10:12 README.md\ndrwxr-xr-x 4 user user 4096 Oct 28 10:10 src\ndrwxr-xr-x 3 user user 4096 Oct 26 18:40 tools\n[exit code: 0]',
+ id: 'tool-ls',
+ parent: 'tool-info',
+ role: MessageRole.TOOL,
+ toolCallId: 'call-ls',
+ toolCwd: '/home/user/projects/llama.cpp'
+ })
+];
+
+// Continuation turn after the tool results; it closes the agentic session.
+export const agenticFinalTurnMessage = createMessage({
+ content:
+ 'The project root holds `README.md`, `LICENSE` and two folders: `src` and `tools`. The shell runs on Linux in `~/projects/llama.cpp`.',
+ id: 'assistant-tools-final',
+ parent: 'tool-ls',
+ role: MessageRole.ASSISTANT
+});
+
+export const agenticToolMessages: DatabaseMessage[] = [
+ ...toolResultMessages,
+ agenticFinalTurnMessage
+];
+
+export const assistantAgenticWithStatsMessage: DatabaseMessage = {
+ ...assistantWithToolCallsMessage,
+ id: 'assistant-tools-stats',
+ model: MODEL_NAME,
+ timings: {
+ agentic: agenticTimings,
+ predicted_ms: 1800,
+ predicted_n: 96,
+ prompt_ms: 610,
+ prompt_n: 2400
+ }
+};
+
+/* Compaction */
+
+export const preCompactionAssistantMessage = createMessage({
+ content: 'Deep Thought took 7.5 million years to answer.',
+ id: 'assistant-pre-compaction',
+ parent: 'user-1',
+ role: MessageRole.ASSISTANT,
+ timestamp: NOW - 1000 * 60 * 31,
+ timings: { cache_n: 0, predicted_n: 118, prompt_n: 42200 }
+});
+
+export const compactionMessage = createMessage({
+ content:
+ 'The user asked about the ultimate answer and its origin. Key facts: the answer is **42**, from Douglas Adams\' "The Hitchhiker\'s Guide to the Galaxy", computed by Deep Thought over 7.5 million years.\n\nNothing is left to do unless the user wants the question itself discussed.',
+ id: 'compaction-1',
+ model: MODEL_NAME,
+ parent: 'assistant-pre-compaction',
+ role: MessageRole.USER,
+ timestamp: NOW - 1000 * 60 * 30,
+ // The pre-encode stamps the reduced prompt; `compaction` keeps the summary request timings.
+ timings: {
+ cache_n: 0,
+ compaction: {
+ cache_n: 0,
+ predicted_ms: 12000,
+ predicted_n: 300,
+ prompt_ms: 18200,
+ prompt_n: 42200
+ },
+ predicted_n: 0,
+ prompt_n: 3204
+ },
+ type: MessageType.COMPACTION
+});
+
+export const compactionPendingMessage = createMessage({
+ content: '',
+ id: 'compaction-pending',
+ parent: 'assistant-pre-compaction',
+ role: MessageRole.USER,
+ type: MessageType.COMPACTION
+});
+
+export const compactionGeneratingMessage = createMessage({
+ content:
+ 'The user asked about the ultimate answer and its origin. Key facts: the answer is **42**',
+ id: 'compaction-generating',
+ model: MODEL_NAME,
+ parent: 'assistant-pre-compaction',
+ role: MessageRole.USER,
+ type: MessageType.COMPACTION
+});
+
+/* Synthetic and MCP prompt */
+
+export const cwdChangeMessage = createMessage({
+ content: 'Set working directory to [file:///home/user/projects/llama.cpp](~/projects/llama.cpp)',
+ id: 'cwd-change',
+ isSynthetic: true,
+ role: MessageRole.USER
+});
+
+export const cwdClearedMessage = createMessage({
+ content: 'Working directory cleared',
+ id: 'cwd-cleared',
+ isSynthetic: true,
+ role: MessageRole.USER
+});
+
+export const mcpPromptMessage = createMessage({
+ content: '',
+ extra: [
+ {
+ arguments: { language: 'TypeScript', path: 'src/lib/utils/agentic.ts' },
+ content:
+ 'Review the TypeScript file at src/lib/utils/agentic.ts. Point out bugs first, then style issues.',
+ name: 'code_review',
+ promptName: 'code_review',
+ serverName: 'github',
+ type: AttachmentType.MCP_PROMPT
+ }
+ ],
+ id: 'mcp-prompt',
+ role: MessageRole.USER
+});
+
+/* Branching */
+
+export const siblingInfo: ChatMessageSiblingInfo = {
+ currentIndex: 1,
+ message: assistantMessage,
+ siblingIds: ['assistant-0', assistantMessage.id, 'assistant-2'],
+ totalSiblings: 3
+};
+
+/* Tool call sections, as deriveAgenticSections builds them */
+
+function toolSection(
+ toolName: string,
+ args: unknown,
+ toolResult?: string,
+ type: AgenticSectionType = AgenticSectionType.TOOL_CALL
+): AgenticSection {
+ return {
+ content: toolResult ?? '',
+ toolArgs: typeof args === 'string' ? args : JSON.stringify(args),
+ toolCallId: `call-${toolName}`,
+ toolName,
+ toolResult,
+ type
+ };
+}
+
+export const defaultToolSection = toolSection(
+ 'get_weather',
+ { city: 'Warsaw', units: 'metric' },
+ JSON.stringify({ city: 'Warsaw', condition: 'cloudy', humidity: 71, temperature: 9 })
+);
+
+export const defaultToolPendingSection = toolSection(
+ 'get_weather',
+ { city: 'Warsaw', units: 'metric' },
+ undefined,
+ AgenticSectionType.TOOL_CALL_PENDING
+);
+
+export const defaultToolStreamingSection = toolSection(
+ 'get_weather',
+ '{"city": "Wars',
+ undefined,
+ AgenticSectionType.TOOL_CALL_STREAMING
+);
+
+export const defaultToolMarkdownSection = toolSection(
+ 'summarize_issue',
+ { issue: 31273 },
+ '## Issue 31273\n\n**Status:** open\n\nThe reasoning menu should list the effort levels the chat template supports.'
+);
+
+export const getDatetimeSection = toolSection(
+ BuiltInTool.BROWSER_GET_DATETIME,
+ {},
+ JSON.stringify({ result: 'Wednesday, October 28, 2026, 10:15:00 CET' })
+);
+
+export const getInfoSection = toolSection(
+ BuiltInTool.SERVER_GET_INFO,
+ {},
+ JSON.stringify({ cwd: '/home/user/projects/llama.cpp', os: 'linux' })
+);
+
+export const readFileSection = toolSection(
+ BuiltInTool.SERVER_READ_FILE,
+ { end_line: 9, path: 'src/lib/utils/sum.ts', start_line: 1 },
+ 'export function sum(values: number[]): number {\n\treturn values.reduce((acc, v) => acc + v, 0);\n}\n\nexport function mean(values: number[]): number {\n\tif (values.length === 0) return 0;\n\n\treturn sum(values) / values.length;\n}'
+);
+
+export const editFileSection = toolSection(
+ BuiltInTool.SERVER_EDIT_FILE,
+ {
+ edits: [
+ {
+ new_text: '\tif (values.length === 0) return Number.NaN;',
+ old_text: '\tif (values.length === 0) return 0;'
+ }
+ ],
+ path: 'src/lib/utils/sum.ts'
+ },
+ JSON.stringify({ edits_applied: 1, result: 'File edited' })
+);
+
+export const editFileErrorSection = toolSection(
+ BuiltInTool.SERVER_EDIT_FILE,
+ {
+ edits: [{ new_text: 'const b = 2;', old_text: 'const a = 1;' }],
+ path: 'src/lib/utils/sum.ts'
+ },
+ JSON.stringify({ error: 'old_text not found in file' })
+);
+
+export const writeFileSection = toolSection(
+ BuiltInTool.SERVER_WRITE_FILE,
+ {
+ content: '# Notes\n\n- Sum is safe for empty arrays.\n- Mean returns NaN for empty input.\n',
+ path: 'docs/notes.md'
+ },
+ JSON.stringify({ bytes: 79, result: 'File written' })
+);
+
+export const execShellSection: AgenticSection = {
+ ...toolSection(
+ BuiltInTool.SERVER_EXEC_SHELL_COMMAND,
+ { command: 'npm test -- --run' },
+ ' RUN v4.1.12 /home/user/projects/app\n\n src/sum.test.ts (3 tests) 4ms\n src/mean.test.ts (2 tests) 3ms\n\n Test Files 2 passed (2)\n Tests 5 passed (5)\n[exit code: 0]'
+ ),
+ toolCwd: '/home/user/projects/app'
+};
+
+export const execShellFailedSection: AgenticSection = {
+ ...toolSection(
+ BuiltInTool.SERVER_EXEC_SHELL_COMMAND,
+ { command: 'cat missing.txt' },
+ 'cat: missing.txt: No such file or directory\n[exit code: 1]'
+ ),
+ toolCwd: '/home/user/projects/app'
+};
+
+export const execShellTimedOutSection: AgenticSection = {
+ ...toolSection(
+ BuiltInTool.SERVER_EXEC_SHELL_COMMAND,
+ { command: 'sleep 600' },
+ '[exit code: -1] [exit due to timed out]'
+ ),
+ toolCwd: '/home/user/projects/app'
+};
+
+export const execShellPendingSection: AgenticSection = toolSection(
+ BuiltInTool.SERVER_EXEC_SHELL_COMMAND,
+ { command: 'npm run build' },
+ undefined,
+ AgenticSectionType.TOOL_CALL_PENDING
+);
+
+export const fileGlobSearchSection = toolSection(
+ BuiltInTool.SERVER_FILE_GLOB_SEARCH,
+ { exclude: '**/node_modules/**', include: '**/*.svelte', path: 'src/lib/components' },
+ JSON.stringify({
+ plain_text_response:
+ 'src/lib/components/app/chat/ChatMessages/ChatMessage/ChatMessage.svelte\nsrc/lib/components/app/chat/ChatMessages/ChatMessageReasoningBlock.svelte\nsrc/lib/components/app/chat/ChatMessages/ChatMessageEditForm.svelte\n---\nTotal matches: 3'
+ })
+);
+
+export const grepSearchSection = toolSection(
+ BuiltInTool.SERVER_GREP_SEARCH,
+ {
+ include: '**/*.ts',
+ path: 'src/lib',
+ pattern: 'deriveAgenticSections',
+ return_line_numbers: true
+ },
+ JSON.stringify({
+ plain_text_response:
+ 'src/lib/utils/agentic.ts:209:export function deriveAgenticSections(\nsrc/lib/utils/index.ts:88:\tderiveAgenticSections,\n---\nTotal matches: 2'
+ })
+);
+
+export const runJavascriptSection = toolSection(
+ BuiltInTool.BROWSER_RUN_JAVASCRIPT,
+ {
+ code: 'const values = [3, 1, 2];\nconsole.log(values.sort());\nreturn values.length;',
+ timeout_ms: 5000
+ },
+ '[1,2,3]\n3'
+);
+
+export const runJavascriptErrorSection = toolSection(
+ BuiltInTool.BROWSER_RUN_JAVASCRIPT,
+ { code: 'undefinedFunction();' },
+ JSON.stringify({ error: 'ReferenceError: undefinedFunction is not defined' })
+);
+
+export const readMediaSection: AgenticSection = {
+ ...toolSection(
+ BuiltInTool.BROWSER_READ_MEDIA,
+ { path: '/home/user/charts/usage.svg' },
+ 'File: /home/user/charts/usage.svg\nSize: 512 bytes\nMIME: image/svg+xml\n[Attachment saved: mcp-attachment-usage.svg]'
+ ),
+ toolResultExtras: [
+ {
+ base64Url: CHART_IMAGE_URL,
+ name: 'mcp-attachment-usage.svg',
+ type: AttachmentType.IMAGE
+ }
+ ]
+};
+
+export const searchResultsSection = toolSection(
+ 'web_search_exa',
+ { query: 'llama.cpp speculative decoding' },
+ [
+ 'Title: Speculative decoding in llama.cpp',
+ 'URL: https://github.com/ggml-org/llama.cpp/tree/master/examples/speculative',
+ 'Published: 2025-03-14',
+ 'Author: N/A',
+ 'Highlights:',
+ 'Use a small draft model to propose tokens that the main model verifies in one batch.',
+ '---',
+ 'Title: llama-server README',
+ 'URL: https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md',
+ 'Published: N/A',
+ 'Author: ggml-org',
+ 'Highlights:',
+ 'The server accepts --model-draft to enable speculative decoding.'
+ ].join('\n')
+);
+
+/* Reasoning sections */
+
+export const reasoningSection: AgenticSection = {
+ content: REASONING_TEXT,
+ type: AgenticSectionType.REASONING
+};
+
+export const reasoningPendingSection: AgenticSection = {
+ content: REASONING_TEXT,
+ type: AgenticSectionType.REASONING_PENDING
+};
+
+export const reasoningInterruptedSection: AgenticSection = {
+ content: 'The user asks about the meaning of life. I should first check which',
+ type: AgenticSectionType.REASONING,
+ wasInterrupted: true
+};
+
+/* Store seeding */
+
+export const promptProcessingState: ApiProcessingState = {
+ contextTotal: 32768,
+ contextUsed: 10000,
+ hasNextToken: false,
+ outputTokensMax: -1,
+ outputTokensUsed: 0,
+ progressPercent: 42,
+ promptProgress: { cache: 0, processed: 4200, time_ms: 6000, total: 10000 },
+ promptTokens: 0,
+ speculative: false,
+ status: 'preparing',
+ temperature: 0.8,
+ tokensDecoded: 0,
+ tokensPerSecond: 0,
+ tokensRemaining: -1,
+ topP: 0.95
+};
+
+export const generatingProcessingState: ApiProcessingState = {
+ contextTotal: 32768,
+ contextUsed: 45200,
+ hasNextToken: true,
+ outputTokensMax: -1,
+ outputTokensUsed: 128,
+ promptTokens: 42200,
+ speculative: false,
+ status: 'generating',
+ temperature: 0.8,
+ tokensDecoded: 128,
+ tokensPerSecond: 25,
+ tokensRemaining: -1,
+ topP: 0.95
+};
+
+export interface ChatStorySeed {
+ settings?: Record;
+ /** Branch the compaction toggle reads its "before" size from. */
+ activeMessages?: DatabaseMessage[];
+ /** Marks the conversation as having a local pipe (chatStore.isLoading). */
+ loading?: boolean;
+ /** Message id of a live stream (chatStore.isStreaming()). */
+ streamingMessageId?: string;
+ processing?: ApiProcessingState;
+ compactingNodeId?: string;
+ /** Opens the edit form of this message on mount. */
+ pendingEditMessageId?: string;
+}
+
+// Pinned so stories look the same whatever the viewer has in localStorage.
+const STORY_SETTINGS_DEFAULTS: Record = {
+ enableContinueGeneration: false,
+ renderThinkingAsMarkdown: true,
+ renderUserContentAsMarkdown: true,
+ showAgenticTurnStats: false,
+ showMessageStats: true,
+ showRawOutputSwitch: false
+};
+
+/**
+ * Seed the global stores a chat message reads. Use as a story `beforeEach`:
+ * it runs before render and the returned cleanup resets the stores, so state
+ * does not leak into the next story.
+ */
+export function seedChatStory(seed: ChatStorySeed = {}): () => void {
+ const settings = { ...STORY_SETTINGS_DEFAULTS, ...seed.settings };
+ const previousSettings = Object.fromEntries(
+ Object.keys(settings).map((key) => [key, settingsStore.config[key]])
+ );
+
+ for (const [key, value] of Object.entries(settings)) {
+ settingsStore.updateConfig(key, value);
+ }
+
+ conversationsStore.activeConversation = {
+ currNode: null,
+ id: CONV_ID,
+ lastModified: NOW,
+ name: 'Storybook conversation'
+ };
+ conversationsStore.activeMessages = seed.activeMessages ?? [];
+
+ if (seed.loading) chatActivityStore.markLocal(CONV_ID);
+
+ if (seed.streamingMessageId) {
+ chatStore.chatStreamingStates.set(CONV_ID, {
+ messageId: seed.streamingMessageId,
+ response: ''
+ });
+ }
+
+ if (seed.processing) {
+ chatStore.processing.setActiveConversation(CONV_ID);
+ chatStore.processing.setState(CONV_ID, seed.processing);
+ }
+
+ if (seed.compactingNodeId) chatActivityStore.markCompacting(CONV_ID, seed.compactingNodeId);
+
+ if (seed.pendingEditMessageId) chatStore.pendingEditMessageId = seed.pendingEditMessageId;
+
+ return () => {
+ for (const [key, value] of Object.entries(previousSettings)) {
+ settingsStore.updateConfig(key, value);
+ }
+
+ chatActivityStore.localEnded(CONV_ID);
+ chatActivityStore.endCompacting(CONV_ID);
+ chatStore.chatStreamingStates.delete(CONV_ID);
+ chatStore.processing.setState(CONV_ID, null);
+ chatStore.processing.setActiveConversation(null);
+ chatStore.pendingEditMessageId = null;
+ conversationsStore.activeMessages = [];
+ conversationsStore.activeConversation = null;
+ };
+}
diff --git a/tools/ui/tests/stories/chat/screen/ChatScreen.stories.svelte b/tools/ui/tests/stories/chat/screen/ChatScreen.stories.svelte
new file mode 100644
index 000000000000..b86d5e2c0945
--- /dev/null
+++ b/tools/ui/tests/stories/chat/screen/ChatScreen.stories.svelte
@@ -0,0 +1,240 @@
+
+
+ {
+ const { canvas } = context;
+
+ await expect(await canvas.findByText('Hello there')).toBeInTheDocument();
+ await expect(canvas.getByRole('textbox')).toHaveFocus();
+ await expect(canvas.getByRole('button', { name: 'Send' })).toBeDisabled();
+ }}
+/>
+
+ {
+ const { canvas, step } = context;
+
+ await step('type and send a message', async () => {
+ await send(context, 'What does quantization do?');
+ });
+
+ await step('the message moves into the chat and the reply streams in', async () => {
+ await expect(await canvas.findByText('What does quantization do?')).toBeInTheDocument();
+ await expect(
+ await canvas.findByText(REPLY_END, { exact: false }, { timeout: 8000 })
+ ).toBeInTheDocument();
+ });
+
+ await step('the form is ready for the next message', async () => {
+ await waitFor(() => expect(chatStore.isLoading).toBe(false));
+ // the editor is empty again: at most its placeholder is left
+ await expect(canvas.getByRole('textbox')).toHaveTextContent(/^(Type a message\.\.\.)?$/);
+ await expect(conversationsStore.activeMessages.map((m) => m.role)).toEqual([
+ 'user',
+ 'assistant'
+ ]);
+ });
+ }}
+/>
+
+ {
+ const { canvas } = context;
+
+ await expect(
+ await canvas.findByText('What is the difference between Q4_K_M and Q8_0?')
+ ).toBeInTheDocument();
+ await expect(canvas.getByText('How do I run one with llama-server?')).toBeInTheDocument();
+ await expect(canvas.getByRole('table')).toBeInTheDocument();
+ await expect(canvas.queryByText('Hello there')).not.toBeVisible();
+ }}
+/>
+
+ {
+ const { canvas } = context;
+
+ await canvas.findByText('How do I run one with llama-server?');
+
+ await send(context, 'Which one fits in 8 GB of VRAM?');
+
+ await expect(await canvas.findByText('Which one fits in 8 GB of VRAM?')).toBeInTheDocument();
+ await expect(
+ await canvas.findByText(REPLY_END, { exact: false }, { timeout: 8000 })
+ ).toBeInTheDocument();
+
+ // the follow-up joins the existing branch: 4 earlier turns plus the new pair
+ await waitFor(() => expect(conversationsStore.activeMessages).toHaveLength(6));
+ }}
+/>
+
+ {
+ const { canvas, step, userEvent } = context;
+
+ await send(context, 'Tell me about quantization');
+
+ await step('stop the reply while it streams', async () => {
+ const stop = await canvas.findByRole('button', { name: 'Stop' }, { timeout: 4000 });
+
+ await canvas.findByText('Sure.', { exact: false }, { timeout: 8000 });
+ await getPace(context).pause();
+ await userEvent.click(stop);
+ });
+
+ await step('the partial reply stays and the form is ready again', async () => {
+ await waitFor(() => expect(chatStore.isLoading).toBe(false));
+ await expect(canvas.getByText('Sure.', { exact: false })).toBeInTheDocument();
+ await expect(canvas.queryByText(REPLY_END, { exact: false })).not.toBeInTheDocument();
+ await expect(canvas.getByRole('button', { name: 'Send' })).toBeInTheDocument();
+ });
+ }}
+/>
+
+ {
+ await send(context, 'Summarize this very long document');
+
+ // the dialog is portalled to the body, outside the canvas
+ const page = within(document.body);
+
+ await expect(await page.findByRole('alertdialog', {}, { timeout: 4000 })).toBeInTheDocument();
+ await expect(page.getByText('Server Error')).toBeInTheDocument();
+ await expect(
+ page.getByText('the request exceeds the available context size', { exact: false })
+ ).toBeInTheDocument();
+ }}
+/>
+
+ {
+ const restore = await setup()(context);
+
+ serverStore.error = 'Failed to fetch server properties: connection refused';
+ serverStore.status = 500;
+
+ return () => {
+ serverStore.error = null;
+ serverStore.status = null;
+ restore();
+ };
+ }}
+ name="ServerUnavailable"
+ parameters={newChatRoute}
+ play={async (context) => {
+ const { canvas } = context;
+
+ await expect(await canvas.findByText(/connection refused/)).toBeInTheDocument();
+ // the markdown editor is a contenteditable, disabled by turning that off
+ await expect(canvas.getByRole('textbox')).toHaveAttribute('contenteditable', 'false');
+ }}
+/>
diff --git a/tools/ui/tests/stories/chat/screen/ChatScreenActionScrollDown.stories.svelte b/tools/ui/tests/stories/chat/screen/ChatScreenActionScrollDown.stories.svelte
new file mode 100644
index 000000000000..9c52fdd65105
--- /dev/null
+++ b/tools/ui/tests/stories/chat/screen/ChatScreenActionScrollDown.stories.svelte
@@ -0,0 +1,19 @@
+
+
+
+
+
+