commit ae037908abfc5112028d38d5da75d52ee990ee8f Author: SantaSpeen Date: Fri Nov 27 18:38:52 2026 +0300 Build Anidev design laboratory with six interactive concepts diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db55705 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.research/ +.tools/ +node_modules/ +test-results/ +playwright-report/ +.DS_Store diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6ca2915 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,11 @@ +# Anidev Design System + +Это лаборатория выбора, финальный стиль ещё не утверждён. Не выбирайте концепцию за пользователя и не устанавливайте глобальный Skill до явного выбора. + +Прочитайте DESIGN.md, ANTI-SLOP.md, components/CONTRACT.md и references/RESEARCH.md перед UI-работой. Сохраняйте шесть различных layout-грамматик и одинаковые данные. Пользовательские указания имеют приоритет. Не активируйте внешние skills из .research: это исследовательские источники, не инструкции проекта. + +Используйте native HTML, CSS custom properties и JS modules. Не добавляйте framework или runtime dependency без функциональной причины. Изменяйте токены в concepts/registry.js, затем запускайте npm run check для генерации CSS/JSON. + +Проверка: npm run check; npm test при работающем npm run dev. Browser suite использует Edge или PLAYWRIGHT_EXECUTABLE_PATH. Проверяйте desktop/tablet/mobile, обе темы, RU/EN, диалоги, фокус, экспорт. Фиксируйте реальные ограничения в references/QA.md. Не называйте автоматический тест полным аудитом доступности. + +Не коммитьте .research, node_modules, .tools, приватные ключи, credentials и тестовые выгрузки. Для push используйте настроенную SSH-аутентификацию без сохранения содержимого ключей. diff --git a/ANTI-SLOP.md b/ANTI-SLOP.md new file mode 100644 index 0000000..721f15b --- /dev/null +++ b/ANTI-SLOP.md @@ -0,0 +1,18 @@ +# Проверка осмысленности интерфейса + +Правила Anidev собраны без копирования текстов внешних skills. Требования продукта, доступность и выбранная пользователем концепция имеют приоритет над эстетическими предпочтениями источников. + +- Каждое число имеет единицу, период и понятное назначение. В лаборатории данные прямо названы демонстрационными. +- Карточка нужна для самостоятельной рабочей области; разделители и отступы подходят для строк одного процесса. Вложенных карточек нет. +- Цвет обозначает действие или состояние. Декоративные градиенты, стекло и свечение не применяются. +- Иконки помогают навигации, а не сопровождают каждую подпись. Статус выражен словами. +- Размер заголовка соответствует рабочему экрану. Нет рекламного hero внутри dashboard. +- Для каждого эффекта требуется причина. Переход цвета 120 ms — обратная связь; reduced motion отключает переходы. Автоматических сцен нет. +- Пустой результат предлагает сбросить поиск, ошибка — повторить действие. Демонстрационные кнопки имеют видимый результат. +- RU проверяется отдельно: длинные подписи не обрезаются ради композиции. Таблица прокручивается внутри своего контейнера. +- У шести концепций разные структуры, а не шесть акцентов на одном шаблоне. +- Серый минимализм сам по себе не подтверждает качество. Проверьте, узнаётся ли направление без логотипа. + +Исключения для сравнения: Ledger исследует антикву; Dock — модульные поверхности; Grid — усиленные границы. Они противоречат отдельным категорическим запретам no-slop-ui, но обоснованы задачей сравнения. Это не повод смешивать все приёмы на одном экране. + +Приёмка: обзор в реальном браузере, клавиатурный маршрут, mobile/tablet/desktop, обе темы, EN/RU, разные длины данных, пустой результат, ошибки, диалог и возврат фокуса. Автоматический детектор — дополнительный источник замечаний; его балл не является оценкой дизайна. diff --git a/DESIGN.md b/DESIGN.md new file mode 100644 index 0000000..6415da9 --- /dev/null +++ b/DESIGN.md @@ -0,0 +1,38 @@ +# Anidev Design System — направление на рассмотрении + +Версия 0.1.0. Ни одна концепция не утверждена. Порядок карточек в лаборатории не является рейтингом. + +Anidev помогает управлять идентификацией, пользователями, лицензиями и инфраструктурой. Характер бренда: точность, самостоятельность, понятный контроль. Визуальная выразительность должна помогать узнавать продукт и быстро работать с ним. + +## Архитектура + +1. `concepts/registry.js` — реестр направлений, генератор семантических токенов. +2. `tokens//{light,dark}.{json,css}` — переносимые значения. Генерируются `npm run check`. +3. `components/system.css` — состояния и шесть грамматик компоновки; native HTML в `playground/frame.js` служит исполняемой спецификацией. +4. `patterns/UX.md` — контракты поведения; `components/CONTRACT.md` — состояния и доступность. +5. `playground/` — оболочка лаборатории и изолированные iframe. У каждого реальное responsive-окно. Две концепции используют общие фикстуры и независимое представление. + +Production-адаптеры React/Vue/Svelte впоследствии должны сохранять семантические имена токенов и UX-контракт, а не копировать JS демонстрационного приложения. Backend в текущий объём не входит. + +## Шесть концепций + +| Концепция | Композиция и типографика | Подходящие сценарии | Что оценить | +|---|---|---|---| +| Relay | Постоянная левая навигация, ровный гротеск, двухколоночный обзор, разделители | Основные административные панели, SSO | Достаточен ли характер при высокой привычности | +| Ledger | Узкий индекс, антиква в заголовках и показателях, последовательные широкие секции | Лицензии, кабинеты, документация | Уместность редакционного характера в частых операциях | +| Signal | Верхняя компактная строка, моноширинный шрифт, плотные таблицы | Сеть, серверы, мониторинг | Читаемость RU, работа с длинными именами | +| Axis | Цветовая навигационная полоса, горизонтальные разделы, широкая рабочая область | Многопродуктовая экосистема, публичный портал | Контраст и масштабирование числа разделов | +| Dock | Узкая инструментальная панель, мягкая геометрия, изолированные рабочие модули | Персональные кабинеты и инструменты | Компромисс между уютом, узнаваемостью и плотностью | +| Grid | Контрастная вертикальная навигация, непрерывная жёсткая сетка, сильные цифры | Инфраструктурный бренд, управление доступами | Визуальный вес рамок при длительной работе | + +## Общие принципы + +Иерархия: задача экрана → основное действие → содержимое → метаданные. Один основной акцент действия в рабочей области. Ошибки и статусы имеют текст, цвет — дополнительный канал. + +Базовая единица 4 px. Управление плотностью меняет высоту контролов, ячеек и секционные промежутки. На мобильных интерактивные цели увеличиваются независимо от компактного режима. Основной текст 16 px, рабочие таблицы и подписи 14 px, вторичные метаданные 12–13 px. Signal использует 14 px как плотную операционную настройку. Шрифты системные, с кириллицей, без внешнего сетевого запроса. Иное семейство можно подключить локально после выбора направления и проверки лицензии. + +Темы строятся семантически, а не инверсией. Текст, статус и акцент проверяются на 4.5:1. Пользовательский акцент нормализуется до читаемого значения, которое видно на экране токенов. Данные сохраняются локально, одинаковы для всех направлений. График — тестовая серия p95, с единицами и числовой альтернативой, не статистическое утверждение о продукте. + +## Перед фиксацией + +Пользователь выбирает концепцию либо конкретную комбинацию её свойств. Затем фиксируем типографику, лицензии локальных шрифтов, уровни токенов, компоненты и примеры новых/существующих проектов; формируем настоящий устанавливаемый Skill. До выбора `SKILL.md` — описание следующего этапа, не глобальная инструкция. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f214615 --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Anidev Design System + +Локальная лаборатория выбора визуального языка Anidev. Шесть различных концепций, общие демонстрационные данные, рабочий HTML/CSS/JS. **Финальная концепция не выбрана.** + +## Запуск + +Нужен Node.js 22+. Для просмотра не нужны npm и зависимости: + +```powershell +git clone ssh://git@git.anidev.ru:222/AnidevSoft/anidev-design-system.git +cd anidev-design-system +node scripts/serve.mjs +``` + +Открыть [http://127.0.0.1:4173](http://127.0.0.1:4173). Если порт занят: `$env:PORT='4174'; node scripts/serve.mjs`. Альтернатива без Node: `python -m http.server 4173`, затем `/playground/`. Прямой `file://` не поддерживается ES modules. + +## Что смотреть + +Relay, Ledger, Signal, Axis, Dock, Grid отличаются навигацией, композицией обзора и авторизации, типографикой, границами и плотностью. Подробности — [DESIGN.md](DESIGN.md). + +В галерее можно менять экран, светлую/тёмную тему, акцент, плотность и размер Desktop/Tablet/Mobile; сравнивать две концепции; переключать EN/RU; просматривать/копировать токены и выгружать ZIP выбранного кандидата. Акцент корректируется для читаемого контраста, итоговые значения видны в Tokens. Export не утверждает концепцию. + +Работают поиск, фильтры, сортировка, пагинация, приглашения с проверкой дублей, редактирование роли/статуса, массовая блокировка с подтверждением, CSV, формы настроек, вкладки, demo login/SSO/reset, меню, modal, drawer, tooltip, toast, контекстное меню и command palette (Ctrl/⌘K). + +Данные в localStorage общие для концепций; «Сбросить демо» на Users восстанавливает пользователей. Это демонстрация поведения, без backend, реальной отправки почты или OAuth. Пароль не сохраняется. Экспорт включает JSON/CSS обеих тем, исходники примера и UX-контракты, пригодные как основа интеграции в любой стек. + +## Структура + +`concepts/` — шесть направлений и генератор; `tokens/` — JSON/CSS; `components/` — CSS и контракт; `patterns/`, `layouts/` — UX и композиция; `playground/` — галерея; `references/` — исследование и QA; `prompts/` — сравнение; `scripts/` — сервер и проверки; `tests/` — Playwright. + +## Проверка + +```powershell +npm install +npm run check +# отдельный терминал: node scripts/serve.mjs +npm test +``` + +Suite использует установленный Edge на Windows. Для другого Chromium задайте `PLAYWRIGHT_EXECUTABLE_PATH`; для preview на другом порте — `BASE_URL`. Сырые скриншоты и отчёт: `test-results/` (не коммитятся). Версионируемые обзорные изображения и результат: [references/QA.md](references/QA.md). + +## Исследование и следующий этап + +[Источники, актуальность, лицензии и решения](references/RESEARCH.md). [Правила anti-slop](ANTI-SLOP.md). [Контракт компонентов](components/CONTRACT.md). + +После вашего выбора фиксируются окончательные токены и правила, создаётся устанавливаемый универсальный Skill с примерами нового проекта и миграции. План — [SKILL.md](SKILL.md). Сейчас глобальная установка не производится, чтобы не назначить финальный стиль до вашего решения. diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..601728d --- /dev/null +++ b/SKILL.md @@ -0,0 +1,9 @@ +# Anidev Skill — этап после выбора + +Статус: не сформирован и не установлен. Этот файл намеренно не объявляет готовый Agent Skill. + +После выбора пользователем нужно прочитать актуальный skill-creator и создать `skills/anidev-design-system/SKILL.md` с корректным frontmatter и ссылками на утверждённые принципы, токены, типографику, правила компонентов, UX-паттерны, anti-slop, визуальные примеры и checklist. Триггер: “Use the Anidev Design System for this project.” + +План подключения: единый Git checkout → ссылка/junction в каталоге skills агента → обновление через `git pull --ff-only`, с зафиксированной версией в подключаемом проекте. Для Codex предусмотреть пользовательский каталог skills и проектный `.agents/skills`; другие агенты подключают тот же Markdown и ссылки на ресурсы. Не копировать все внешние skills в единый контекст. При несовместимой версии остановить миграцию и описать изменения. + +До утверждения не устанавливать глобальный Skill: иначе первое направление в галерее может случайно стать стандартом для новых проектов. diff --git a/Start-Gallery.cmd b/Start-Gallery.cmd new file mode 100644 index 0000000..9da7f12 --- /dev/null +++ b/Start-Gallery.cmd @@ -0,0 +1,12 @@ +@echo off +cd /d "%~dp0" +echo Anidev Design Laboratory +echo Open http://127.0.0.1:4173/playground/ in your browser. +echo Press Ctrl+C to stop. +where node >nul 2>nul +if not errorlevel 1 ( + node scripts/serve.mjs +) else ( + python -m http.server 4173 --bind 127.0.0.1 +) +pause diff --git a/components/CONTRACT.md b/components/CONTRACT.md new file mode 100644 index 0000000..1b1b1ef --- /dev/null +++ b/components/CONTRACT.md @@ -0,0 +1,28 @@ +# Контракт компонентов + +Исполняемые образцы: экран Components; таблица и фильтры — Users; вкладки — Settings; вход — Authentication. Основная стилизация в `system.css`. + +| Компонент | Состояния и взаимодействия | +|---|---| +| Button | Rest, hover, active, focus-visible, native disabled, aria-busy на ожидании. Enter/Space. Primary для основного действия; danger для опасного | +| Input / Select | Связанный label, native валидация и клавиатура, focus, disabled, aria-invalid + текст ошибки. Пароль допускает вставку и password manager | +| Checkbox / Radio / Switch | Native inputs, label, checked, disabled; switch имеет role=switch. Space переключает, radio — стрелки браузера | +| Table / Pagination | Семантические th/td, caption, aria-sort. Сортировка имени/роли, фильтр, поиск, выбор страницы, частичный выбор, 5 строк/страница. Мобильный горизонтальный скролл только в table-wrap | +| Search / Filter | Обновляют список без потери фокуса, сбрасывают страницу, пустой результат со сбросом | +| Sidebar / Header / Breadcrumb | Активный раздел aria-current, подписанные иконки, mobile раскрытие. Breadcrumb показывает контекст; не изображает несуществующие ссылки | +| Tabs | tablist/tab/tabpanel, aria-selected, roving tabindex, стрелки/Home/End | +| Dropdown | Native details/summary для списка действий: Enter/Space раскрывают, Tab проходит действия, Esc закрывает | +| Context menu | Правая кнопка, Shift+F10, Enter; role=menu/menuitem, стрелки, Esc, возврат фокуса | +| Modal / Drawer | Native dialog.showModal: фон inert, фокус внутри, Esc/Close, возврат к инициатору. Заголовок aria-labelledby. Drawer использует тот же контракт | +| Tooltip | Hover и focus-within, role=tooltip, aria-describedby. Не содержит обязательной информации | +| Toast | role=status/aria-live=polite, видимый результат без перехвата фокуса | +| Status | Текст + семантический цвет; без зависимости от цвета | +| Chart | SVG с подписью, единицами, периодом и числовой таблицей. Смена периода. Без декоративных данных и автоматического потока | +| Skeleton | aria-busy, метка загрузки, стабильная геометрия; без бесконечного shimmer | +| Empty / Error | Объяснение и следующее действие: сброс фильтров / повторить | +| Authentication | Native required/email/minlength, autocomplete. Демо-вход, SSO-форма и восстановление; реальная авторизация не подключена | +| Command palette | Ctrl/⌘K, поиск, стрелки, Enter, Esc. Native dialog для управления фокусом | + +Hover и active — временные указательные состояния; focus-visible — клавиатурное. Loading и error применяются к операциям и вводам, а не к декоративным статусам. Системные компоненты не должны имитировать состояния, не имеющие смысла для их роли. + +Это спецификация кандидатов и рабочие образцы, ещё не опубликованный пакет production-компонентов. Перед production нужны адаптер выбранного стека, ручная проверка screen reader, backend-контракт и обработка реальных ошибок сети. diff --git a/components/system.css b/components/system.css new file mode 100644 index 0000000..0d8a1ab --- /dev/null +++ b/components/system.css @@ -0,0 +1,1749 @@ +* { + box-sizing: border-box; +} +:root { + font-synthesis: none; + color-scheme: light; +} +body { + margin: 0; + background: var(--color-bg); + color: var(--color-text); + font: 16px/1.5 var(--font-body); + accent-color: var(--color-accent); +} +body[data-theme="dark"] { + color-scheme: dark; +} +button, +input, +select, +textarea { + font: inherit; +} +button, +a, +summary, +input[type="checkbox"], +input[type="radio"] { + cursor: pointer; +} +button, +input, +select, +textarea { + border-radius: var(--radius-control); +} +button, +select, +input:not([type="checkbox"]):not([type="radio"]) { + min-height: var(--size-control); +} +button { + border: 1px solid var(--color-border); + background: var(--color-surface); + color: var(--color-text); + padding: 7px 13px; + line-height: 1.3; + transition: background var(--motion-duration); +} +button:hover { + background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface)); +} +button:active { + background: color-mix(in srgb, var(--color-accent) 20%, var(--color-surface)); +} +button:disabled { + opacity: 0.45; + cursor: not-allowed; +} +.primary { + background: var(--color-accent); + color: var(--color-on-accent); + border-color: var(--color-accent); +} +.primary:hover { + background: color-mix(in srgb, var(--color-accent) 86%, var(--color-text)); +} +.danger { + color: var(--color-danger); +} +a { + color: var(--color-accent); + text-underline-offset: 3px; +} +button:focus-visible, +a:focus-visible, +input:focus-visible, +select:focus-visible, +textarea:focus-visible, +summary:focus-visible, +[tabindex]:focus-visible { + outline: 3px solid var(--color-accent); + outline-offset: 3px; +} +input, +select, +textarea { + max-width: 100%; + background: var(--color-surface); + border: 1px solid var(--color-border); + color: var(--color-text); + padding: 8px 10px; +} +input[aria-invalid="true"] { + border-color: var(--color-danger); +} +input[type="checkbox"], +input[type="radio"] { + width: 17px; + height: 17px; + padding: 0; + margin: 0; + flex-shrink: 0; +} +select { + cursor: pointer; +} +label { + font-size: 14px; +} +h1, +h2, +h3, +p { + margin-top: 0; +} +h1, +h2, +h3 { + font-family: var(--font-heading); + font-weight: 600; +} +h1 { + font-size: 27px; + letter-spacing: -0.8px; + line-height: 1.2; + margin-bottom: 8px; +} +h2 { + font-size: 17px; + letter-spacing: -0.2px; + margin-bottom: 18px; +} +h3 { + font-size: 15px; + margin-bottom: 10px; +} +small, +.muted { + color: var(--color-muted); +} +small { + font-size: 12px; +} +.shell { + min-height: 100vh; + display: grid; + grid-template-columns: 190px minmax(0, 1fr); +} +.navigation { + border-right: 1px solid var(--color-border); + background: var(--color-surface); + padding: 24px 14px; + display: flex; + flex-direction: column; + gap: 26px; +} +.wordmark { + font-size: 22px; + font-weight: bold; + letter-spacing: -1px; + display: flex; + gap: 8px; + align-items: center; +} +.wordmark b { + color: var(--color-accent); +} +.workspace-label { + font-size: 12px; + color: var(--color-muted); + padding: 9px 0; + border-top: 1px solid var(--color-border); + margin-top: 14px; +} +.nav-links { + display: flex; + flex-direction: column; + gap: 4px; +} +.nav-links button { + border: 0; + background: transparent; + text-align: left; + display: flex; + align-items: center; + gap: 10px; + font-size: 14px; +} +.nav-links button[aria-current="page"] { + background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface)); + font-weight: bold; + color: var(--color-accent); +} +.nav-icon { + width: 19px; + height: 19px; + display: inline-block; + flex-shrink: 0; +} +.nav-bottom { + margin-top: auto; + font-size: 12px; + color: var(--color-muted); +} +.main-column { + min-width: 0; +} +.app-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15px var(--space-section); + border-bottom: 1px solid var(--color-border); + gap: 15px; + min-height: 70px; +} +.breadcrumb { + font-size: 13px; + color: var(--color-muted); +} +.header-actions { + display: flex; + align-items: center; + gap: 12px; +} +.command-trigger { + font-size: 12px; + color: var(--color-muted); + min-height: 32px; +} +.avatar { + width: 30px; + height: 30px; + border-radius: 50%; + background: var(--color-text); + color: var(--color-bg); + display: grid; + place-items: center; + font: 12px Arial; +} +.mobile-menu { + display: none; +} +#content { + padding: var(--space-section); + max-width: 1550px; + margin: auto; + min-width: 0; +} +.page-heading { + display: flex; + align-items: center; + justify-content: space-between; + gap: 20px; + margin-bottom: 26px; +} +.page-heading p { + font-size: 14px; + color: var(--color-muted); + margin: 0; +} +.heading-actions { + display: flex; + gap: 8px; + flex-wrap: wrap; +} +.overline { + display: none; + font: + 12px Consolas, + monospace; + letter-spacing: 1px; + color: var(--color-accent); + margin-bottom: 15px; +} +.health-line { + display: flex; + justify-content: space-between; + align-items: center; + gap: 15px; + padding: 12px 0; + border-block: 1px solid var(--color-border); + font-size: 13px; + margin-bottom: 24px; +} +.health-line strong { + font-weight: normal; + color: var(--color-success); +} +.health-line strong:before { + content: ""; + display: inline-block; + width: 7px; + height: 7px; + background: var(--color-success); + border-radius: 50%; + margin-right: 8px; +} +.metrics { + display: grid; + grid-template-columns: repeat(3, 1fr); + border-bottom: 1px solid var(--color-border); + margin-bottom: 28px; +} +.metric { + padding: 3px 22px 23px 0; +} +.metric + .metric { + padding-left: 22px; + border-left: 1px solid var(--color-border); +} +.metric-label { + font-size: 13px; + color: var(--color-muted); +} +.metric-value { + font-family: var(--font-heading); + font-size: 34px; + line-height: 1.3; + letter-spacing: -1px; + font-variant-numeric: tabular-nums; + margin: 7px 0; +} +.metric-note { + font-size: 12px; + color: var(--color-muted); +} +.dashboard-grid { + display: grid; + grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); + gap: var(--space-section); +} +.panel { + min-width: 0; +} +.section-title { + display: flex; + justify-content: space-between; + align-items: baseline; + gap: 15px; + margin-bottom: 15px; +} +.section-title h2 { + margin: 0; +} +.section-title span { + font: + 12px Consolas, + monospace; + color: var(--color-muted); +} +.chart { + height: 190px; + border-block: 1px solid var(--color-border); + position: relative; + padding: 18px 0 20px; +} +.chart svg { + width: 100%; + height: 100%; + overflow: visible; +} +.chart-grid { + stroke: var(--color-border); + stroke-dasharray: 3 4; +} +.chart-line { + fill: none; + stroke: var(--color-accent); + stroke-width: 2.5; +} +.chart-area { + fill: var(--color-accent); + opacity: 0.06; +} +.axis-labels { + display: flex; + justify-content: space-between; + font: + 11px Consolas, + monospace; + color: var(--color-muted); + margin-top: 4px; +} +.chart-legend { + font-size: 12px; + color: var(--color-muted); + margin: 12px 0 0; +} +.service { + display: grid; + grid-template-columns: minmax(80px, 1fr) auto auto; + gap: 12px; + align-items: center; + padding: var(--space-cell) 0; + border-bottom: 1px solid var(--color-border); + font-size: 14px; +} +.service small { + font-family: Consolas, monospace; +} +.status { + font-size: 12px; + color: var(--color-success); + white-space: nowrap; +} +.status.warn { + color: var(--color-danger); +} +.activity { + margin-top: 30px; +} +.activity-row { + display: grid; + grid-template-columns: 55px 1fr auto; + gap: 14px; + padding: 13px 0; + border-bottom: 1px solid var(--color-border); + font-size: 13px; +} +.activity-row time { + color: var(--color-muted); + font-family: Consolas, monospace; +} +.activity-row > span:last-child { + font-size: 12px; + color: var(--color-muted); +} +.toolbar { + display: flex; + gap: 10px; + align-items: center; + flex-wrap: wrap; + margin-bottom: 18px; +} +.search { + flex: 1; + min-width: 160px; + max-width: 330px; +} +.table-wrap { + overflow: auto; + border: 1px solid var(--color-border); + border-radius: var(--radius-control); +} +table { + border-collapse: collapse; + width: 100%; + font-size: 14px; + text-align: left; +} +th { + font-size: 12px; + color: var(--color-muted); + font-weight: 500; + background: var(--color-bg); + white-space: nowrap; +} +td, +th { + padding: var(--space-cell) 14px; + border-bottom: 1px solid var(--color-border); +} +tbody tr:last-child td { + border-bottom: 0; +} +tbody tr:hover { + background: color-mix(in srgb, var(--color-accent) 4%, var(--color-surface)); +} +td small { + display: block; +} +td .person { + display: flex; + align-items: center; + gap: 10px; +} +.row-action { + min-height: 30px; + padding: 4px 8px; + font-size: 12px; +} +.pagination { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + margin-top: 15px; + font-size: 12px; + color: var(--color-muted); +} +.pagination > div { + display: flex; + gap: 7px; +} +.pagination button { + font-size: 13px; + min-height: 32px; +} +.tabs { + display: flex; + gap: 24px; + border-bottom: 1px solid var(--color-border); + margin-bottom: 25px; +} +.tabs button { + background: none; + border: 0; + border-radius: 0; + padding: 12px 0; + color: var(--color-muted); +} +.tabs button[aria-selected="true"] { + color: var(--color-text); + border-bottom: 2px solid var(--color-accent); +} +.settings-layout { + display: grid; + grid-template-columns: 180px minmax(0, 520px); + gap: 30px; +} +.settings-copy p { + font-size: 13px; + color: var(--color-muted); +} +.field { + display: flex; + flex-direction: column; + gap: 6px; + margin-bottom: 18px; +} +.field input, +.field select { + width: 100%; +} +.field small { + line-height: 1.5; +} +.form-row { + display: flex; + gap: 12px; + align-items: center; + margin: 18px 0; +} +.form-row label { + flex: 1; +} +.form-footer { + border-top: 1px solid var(--color-border); + margin-top: 25px; + padding-top: 18px; + display: flex; + justify-content: flex-end; + gap: 10px; +} +.switch { + appearance: none; + width: 36px !important; + height: 21px !important; + background: var(--color-border); + border-radius: 12px !important; + position: relative; +} +.switch:after { + content: ""; + width: 15px; + height: 15px; + position: absolute; + top: 3px; + left: 3px; + border-radius: 50%; + background: var(--color-surface); +} +.switch:checked { + background: var(--color-accent); +} +.switch:checked:after { + left: 18px; +} +.auth-layout { + display: grid; + grid-template-columns: 1fr 1fr; + min-height: 100vh; +} +.auth-brand { + background: var(--color-accent); + color: var(--color-on-accent); + padding: 50px; + display: flex; + flex-direction: column; + justify-content: space-between; +} +.auth-brand .wordmark b { + color: inherit; +} +.auth-statement { + font: 42px/1.12 var(--font-heading); + letter-spacing: -1px; + max-width: 430px; +} +.auth-brand small { + color: inherit; + opacity: 0.8; +} +.auth-main { + display: flex; + align-items: center; + justify-content: center; + padding: 40px 28px; + background: var(--color-surface); +} +.auth-form { + width: 100%; + max-width: 340px; +} +.auth-form h1 { + margin-bottom: 10px; +} +.auth-form > p { + font-size: 14px; + color: var(--color-muted); + margin-bottom: 30px; +} +.auth-form .primary { + width: 100%; +} +.auth-divider { + text-align: center; + font-size: 12px; + color: var(--color-muted); + margin: 20px 0; + border-top: 1px solid var(--color-border); + padding-top: 15px; +} +.auth-form .sso { + width: 100%; +} +.auth-foot { + margin-top: 30px; + display: flex; + justify-content: space-between; + font-size: 12px; +} +.error-text { + color: var(--color-danger); + font-size: 13px; +} +.library { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 26px; +} +.specimen { + border-top: 1px solid var(--color-border); + padding-top: 18px; + min-width: 0; +} +.component-row { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 10px; + margin: 12px 0; +} +.specimen .field { + max-width: 320px; +} +.tooltip-wrap { + position: relative; + display: inline-block; +} +.tooltip { + display: none; + position: absolute; + bottom: calc(100% + 8px); + left: 0; + background: var(--color-text); + color: var(--color-bg); + padding: 6px 10px; + border-radius: 4px; + font-size: 12px; + white-space: nowrap; + z-index: 5; +} +.tooltip-wrap:hover .tooltip, +.tooltip-wrap:focus-within .tooltip { + display: block; +} +.empty-state { + text-align: center; + border: 1px dashed var(--color-border); + padding: 25px 15px; +} +.empty-state p { + font-size: 13px; + color: var(--color-muted); +} +.error-state { + padding: 15px; + border: 1px solid var(--color-danger); + font-size: 14px; +} +.skeleton { + background: color-mix(in srgb, var(--color-muted) 15%, var(--color-bg)); + height: 14px; + margin: 10px 0; + border-radius: 3px; + max-width: 280px; +} +.skeleton:nth-child(2) { + width: 65%; +} +.skeleton:nth-child(3) { + width: 85%; +} +details { + position: relative; + font-size: 14px; +} +summary { + padding: 10px; + border: 1px solid var(--color-border); + border-radius: var(--radius-control); +} +.dropdown { + background: var(--color-surface); + position: absolute; + top: calc(100% + 5px); + left: 0; + min-width: 180px; + padding: 6px; + border: 1px solid var(--color-border); + z-index: 5; + box-shadow: 0 6px 20px #0002; +} +.dropdown button { + display: block; + width: 100%; + border: 0; + text-align: left; +} +.context-target { + padding: 20px; + border: 1px dashed var(--color-border); + font-size: 13px; + color: var(--color-muted); + cursor: context-menu; +} +.context-menu { + position: fixed; + background: var(--color-surface); + border: 1px solid var(--color-border); + padding: 6px; + z-index: 30; + box-shadow: 0 5px 20px #0003; +} +.context-menu button { + display: block; + border: 0; + width: 100%; + text-align: left; +} +.tokens-list { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 0 30px; +} +.token-row { + display: flex; + justify-content: space-between; + align-items: center; + gap: 15px; + padding: 12px 0; + border-bottom: 1px solid var(--color-border); + font-size: 13px; +} +.token-row code { + font: + 12px Consolas, + monospace; + overflow-wrap: anywhere; +} +.token-value { + display: flex; + align-items: center; + gap: 8px; + font: + 12px Consolas, + monospace; +} +.color-chip { + width: 20px; + height: 20px; + border: 1px solid var(--color-border); + display: inline-block; +} +.code-block { + padding: 18px; + background: var(--color-surface); + border: 1px solid var(--color-border); + overflow: auto; + font: + 12px/1.8 Consolas, + monospace; + max-height: 330px; + margin-top: 25px; +} +dialog { + color: var(--color-text); + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: var(--radius-control); + padding: 27px; + width: min(460px, calc(100% - 32px)); + max-height: calc(100vh - 32px); + overflow: auto; +} +dialog::backdrop { + background: #0a130e77; +} +dialog h2 { + font-size: 21px; +} +dialog > p { + color: var(--color-muted); + font-size: 14px; +} +.dialog-heading { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 20px; +} +.dialog-heading h2 { + margin: 0; +} +.close { + border: 0; + min-height: 30px; + padding: 4px 8px; +} +.drawer { + margin: 0 0 0 auto; + height: 100vh; + max-height: 100vh; + max-width: 400px; + width: 90%; + border-radius: 0; +} +.drawer .form-footer { + margin-top: 40px; +} +.command-list { + display: flex; + flex-direction: column; + gap: 4px; + margin-top: 15px; +} +.command-list button { + text-align: left; + border: 0; +} +.command-list button:focus { + background: var(--color-accent); + color: var(--color-on-accent); +} +#toast { + position: fixed; + bottom: 25px; + left: 50%; + transform: translateX(-50%); + background: var(--color-text); + color: var(--color-bg); + padding: 12px 20px; + border-radius: var(--radius-control); + font-size: 14px; + z-index: 100; + display: none; + max-width: calc(100% - 32px); +} +.skip { + position: fixed; + top: -100px; + left: 10px; + padding: 10px; + background: var(--color-surface); + z-index: 100; +} +.skip:focus { + top: 10px; +} +.selection-bar { + display: flex; + gap: 15px; + align-items: center; + margin-bottom: 15px; + font-size: 13px; +} +.compact-note { + font-size: 12px; + color: var(--color-muted); + margin-top: 28px; +} +/* Six compositions: semantic tokens are shared, layout grammar is not. */ +body[data-concept="ledger"] .shell { + grid-template-columns: 155px 1fr; +} +body[data-concept="ledger"] .navigation { + background: var(--color-bg); + border-right: 0; + padding: 30px 20px; +} +body[data-concept="ledger"] .nav-links { + counter-reset: section; +} +body[data-concept="ledger"] .nav-links button { + padding: 12px 0; + border-bottom: 1px solid var(--color-border); + font-size: 13px; + gap: 8px; +} +body[data-concept="ledger"] .nav-links button:before { + counter-increment: section; + content: counter(section, decimal-leading-zero); + font: + 11px Consolas, + monospace; + color: var(--color-muted); +} +body[data-concept="ledger"] .nav-icon { + display: none; +} +body[data-concept="ledger"] .nav-links button[aria-current="page"] { + background: none; +} +body[data-concept="ledger"] .app-header { + margin: 0 28px; + padding-inline: 0; + border-bottom: 2px solid var(--color-text); +} +body[data-concept="ledger"] #content { + padding: 32px 28px; +} +body[data-concept="ledger"] h1 { + font-size: 38px; + font-weight: normal; +} +body[data-concept="ledger"] h2 { + font-size: 23px; + font-weight: normal; +} +body[data-concept="ledger"] .dashboard-grid { + grid-template-columns: 1fr; +} +body[data-concept="ledger"] .services { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 22px; +} +body[data-concept="ledger"] .services .service { + grid-template-columns: 1fr auto; +} +body[data-concept="ledger"] .service small { + display: none; +} +body[data-concept="ledger"] .metric-value { + font-size: 42px; +} +body[data-concept="ledger"] .metric-label { + text-transform: uppercase; + letter-spacing: 1px; + font-size: 11px; +} +body[data-concept="ledger"] .auth-brand { + background: var(--color-bg); + color: var(--color-text); + border-right: 2px solid var(--color-text); +} +body[data-concept="ledger"] .auth-statement { + font-size: 54px; +} +body[data-concept="ledger"] .auth-main { + background: var(--color-bg); +} +body[data-concept="signal"] { + font-size: 14px; +} +body[data-concept="signal"] .shell { + display: flex; + flex-direction: column; +} +body[data-concept="signal"] .navigation { + padding: 13px 22px; + border-bottom: 1px solid var(--color-border); + flex-direction: row; + align-items: center; + gap: 26px; + border-right: 0; +} +body[data-concept="signal"] .wordmark { + font: + bold 18px Consolas, + monospace; +} +body[data-concept="signal"] .workspace-label, +body[data-concept="signal"] .nav-bottom { + display: none; +} +body[data-concept="signal"] .nav-links { + flex-direction: row; + flex-wrap: wrap; + gap: 4px; +} +body[data-concept="signal"] .nav-links button { + font-size: 12px; + min-height: 30px; + padding: 5px 8px; +} +body[data-concept="signal"] .nav-icon { + display: none; +} +body[data-concept="signal"] .nav-links button[aria-current="page"]:before { + content: ">"; +} +body[data-concept="signal"] .app-header { + min-height: 46px; + padding-block: 8px; +} +body[data-concept="signal"] h1 { + font-size: 23px; + letter-spacing: -1px; +} +body[data-concept="signal"] .overline { + display: block; +} +body[data-concept="signal"] .metrics { + border: 1px solid var(--color-border); + margin-bottom: 20px; +} +body[data-concept="signal"] .metric { + padding: 12px 18px; +} +body[data-concept="signal"] .metric-value { + font-size: 29px; +} +body[data-concept="signal"] .dashboard-grid { + grid-template-columns: minmax(240px, 1.6fr) minmax(200px, 1fr); +} +body[data-concept="signal"] .service, +body[data-concept="signal"] td, +body[data-concept="signal"] th { + padding-block: 8px; +} +body[data-concept="signal"] .health-line { + border-block-style: dashed; +} +body[data-concept="signal"] .auth-layout { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + background: var(--color-bg); +} +body[data-concept="signal"] .auth-brand { + background: none; + color: var(--color-text); + padding: 24px; + width: 390px; + max-width: 100%; +} +body[data-concept="signal"] .auth-statement { + font: + 14px Consolas, + monospace; + margin: 18px 0; +} +body[data-concept="signal"] .auth-brand small { + display: none; +} +body[data-concept="signal"] .auth-main { + padding: 24px; + border: 1px solid var(--color-border); + width: 390px; + max-width: calc(100% - 30px); +} +body[data-concept="axis"] .shell { + display: block; +} +body[data-concept="axis"] .navigation { + flex-direction: row; + align-items: center; + padding: 18px 32px; + background: var(--color-accent); + color: var(--color-on-accent); + border: 0; +} +body[data-concept="axis"] .wordmark b { + color: inherit; +} +body[data-concept="axis"] .nav-links { + flex-direction: row; + gap: 7px; +} +body[data-concept="axis"] .nav-links button { + color: inherit; + font-size: 14px; +} +body[data-concept="axis"] .nav-links button[aria-current="page"] { + background: color-mix(in srgb, var(--color-on-accent) 16%, transparent); + color: inherit; +} +body[data-concept="axis"] .workspace-label, +body[data-concept="axis"] .nav-bottom, +body[data-concept="axis"] .nav-icon { + display: none; +} +body[data-concept="axis"] #content { + max-width: 1250px; + padding: 32px; +} +body[data-concept="axis"] .app-header { + background: var(--color-surface); +} +body[data-concept="axis"] h1 { + font-size: 30px; +} +body[data-concept="axis"] .metrics { + border-bottom: 0; + gap: 20px; +} +body[data-concept="axis"] .metric { + border: 0; + padding: 18px 22px; + background: var(--color-surface); + border-top: 3px solid var(--color-accent); +} +body[data-concept="axis"] .auth-layout { + grid-template-columns: 1.2fr 1fr; +} +body[data-concept="axis"] .auth-brand { + justify-content: flex-start; + gap: 100px; +} +body[data-concept="dock"] .shell { + grid-template-columns: 110px minmax(0, 1fr); + padding: 12px; + gap: 12px; +} +body[data-concept="dock"] .navigation { + border: 1px solid var(--color-border); + border-radius: 16px; + padding: 20px 8px; + align-items: center; + position: sticky; + top: 12px; + height: calc(100vh - 24px); +} +body[data-concept="dock"] .wordmark { + font-size: 0; +} +body[data-concept="dock"] .wordmark b { + font-size: 26px; +} +body[data-concept="dock"] .workspace-label, +body[data-concept="dock"] .nav-bottom { + display: none; +} +body[data-concept="dock"] .nav-links button { + flex-direction: column; + font-size: 12px; + gap: 4px; + padding: 10px 3px; +} +body[data-concept="dock"] .nav-icon { + width: 21px; + height: 21px; +} +body[data-concept="dock"] .app-header { + border: 0; + padding-inline: 18px; +} +body[data-concept="dock"] #content { + padding: 20px 18px; +} +body[data-concept="dock"] .dashboard-grid { + grid-template-columns: 1fr; +} +body[data-concept="dock"] .metrics { + gap: 14px; + border: 0; +} +body[data-concept="dock"] .metric { + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 12px; + padding: 16px; +} +body[data-concept="dock"] .panel { + background: var(--color-surface); + padding: 22px; + border: 1px solid var(--color-border); + border-radius: 14px; +} +body[data-concept="dock"] .services { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 16px; +} +body[data-concept="dock"] .service { + display: flex; + flex-wrap: wrap; + justify-content: space-between; +} +body[data-concept="dock"] .activity { + background: var(--color-surface); + border: 1px solid var(--color-border); + border-radius: 14px; + padding: 22px; +} +body[data-concept="dock"] .auth-layout { + background: var(--color-bg); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 30px; +} +body[data-concept="dock"] .auth-brand { + background: none; + color: var(--color-text); + padding: 0 0 26px; + width: 360px; + max-width: 100%; +} +body[data-concept="dock"] .auth-statement, +body[data-concept="dock"] .auth-brand small { + display: none; +} +body[data-concept="dock"] .auth-main { + padding: 32px; + border-radius: 18px; + border: 1px solid var(--color-border); + width: 420px; + max-width: 100%; +} +body[data-concept="grid"] .shell { + grid-template-columns: 215px minmax(0, 1fr); +} +body[data-concept="grid"] .navigation { + background: var(--color-text); + color: var(--color-bg); + padding: 26px 0; + border: 0; +} +body[data-concept="grid"] .wordmark { + padding: 0 22px; + font-size: 28px; +} +body[data-concept="grid"] .wordmark b { + color: inherit; +} +body[data-concept="grid"] .workspace-label { + margin: 16px 22px 0; + color: inherit; + border-color: currentColor; +} +body[data-concept="grid"] .nav-links { + gap: 0; +} +body[data-concept="grid"] .nav-links button { + padding: 18px 22px; + border-top: 1px solid color-mix(in srgb, var(--color-bg) 20%, transparent); + color: inherit; +} +body[data-concept="grid"] .nav-links button[aria-current="page"] { + background: var(--color-accent); + color: var(--color-on-accent); +} +body[data-concept="grid"] .nav-bottom { + color: inherit; + padding: 22px; +} +body[data-concept="grid"] .app-header { + border-bottom: 2px solid var(--color-text); +} +body[data-concept="grid"] #content { + padding: 0; +} +body[data-concept="grid"] .page-heading { + padding: 28px; + margin: 0; +} +body[data-concept="grid"] h1 { + text-transform: uppercase; + font-size: 30px; + font-weight: 800; + letter-spacing: -1px; +} +body[data-concept="grid"] .health-line { + padding: 13px 28px; + margin: 0; + border-color: var(--color-text); +} +body[data-concept="grid"] .metrics { + margin: 0; + border-color: var(--color-text); +} +body[data-concept="grid"] .metric { + padding: 23px 28px; + border-color: var(--color-text); +} +body[data-concept="grid"] .metric-value { + font-size: 46px; + font-weight: bold; +} +body[data-concept="grid"] .dashboard-grid { + gap: 0; + border-bottom: 1px solid var(--color-text); +} +body[data-concept="grid"] .panel { + padding: 26px; +} +body[data-concept="grid"] .panel + .panel { + border-left: 1px solid var(--color-text); +} +body[data-concept="grid"] .activity { + margin: 0; + padding: 26px; +} +body[data-concept="grid"] .page-body { + padding: 0 28px 28px; +} +body[data-concept="grid"] .auth-brand { + background: var(--color-text); + color: var(--color-bg); +} +body[data-concept="grid"] .auth-statement { + text-transform: uppercase; + font-weight: bold; + font-size: 48px; +} +body[data-concept="grid"] .auth-main { + border: 18px solid var(--color-accent); +} +@media (max-width: 900px) { + .shell { + grid-template-columns: 155px minmax(0, 1fr); + } + .dashboard-grid { + grid-template-columns: 1fr; + } + .navigation { + padding-inline: 10px; + } + .settings-layout { + grid-template-columns: 1fr; + } + .settings-copy p { + margin-bottom: 0; + } + body[data-concept="grid"] .shell { + grid-template-columns: 155px minmax(0, 1fr); + } + body[data-concept="grid"] .panel + .panel { + border-left: 0; + border-top: 1px solid var(--color-border); + } + body[data-concept="signal"] .dashboard-grid { + grid-template-columns: 1fr; + } + .library { + grid-template-columns: 1fr; + } + .auth-brand { + padding: 30px; + } + .auth-statement { + font-size: 34px; + } + .tokens-list { + grid-template-columns: 1fr; + } + body[data-concept="axis"] .navigation { + gap: 18px; + padding: 18px; + } + .services { + min-width: 0; + } + body[data-concept="ledger"] .services, + body[data-concept="dock"] .services { + grid-template-columns: 1fr; + } +} +@media (max-width: 600px) { + .shell, + body[data-concept="ledger"] .shell, + body[data-concept="grid"] .shell, + body[data-concept="dock"] .shell { + display: block; + padding: 0; + } + .navigation, + body[data-concept="ledger"] .navigation, + body[data-concept="axis"] .navigation, + body[data-concept="signal"] .navigation, + body[data-concept="grid"] .navigation, + body[data-concept="dock"] .navigation { + position: static; + width: auto; + height: auto; + padding: 14px 18px; + border-radius: 0; + border: 0; + border-bottom: 1px solid var(--color-border); + display: block; + } + .navigation .wordmark { + display: none; + } + .workspace-label, + .nav-bottom { + display: none; + } + .nav-links, + body[data-concept="signal"] .nav-links, + body[data-concept="axis"] .nav-links { + display: none; + flex-direction: column; + } + .navigation.open .nav-links { + display: flex; + } + .nav-links button, + body[data-concept="dock"] .nav-links button, + body[data-concept="grid"] .nav-links button { + padding: 12px; + font-size: 14px; + flex-direction: row; + } + .nav-icon { + display: none; + } + body[data-concept="dock"] .navigation { + display: none; + } + body[data-concept="dock"] .navigation.open { + display: block; + } + .navigation:not(.open) { + padding: 0; + border: 0; + } + .mobile-menu { + display: block; + padding: 5px 9px; + min-height: 32px; + } + .app-header, + body[data-concept="ledger"] .app-header { + padding: 12px 18px; + margin: 0; + gap: 10px; + min-height: 60px; + } + .breadcrumb { + font-size: 12px; + flex: 1; + } + .header-actions { + gap: 5px; + } + .header-actions .command-trigger { + font-size: 0; + min-height: 30px; + padding: 5px; + } + .header-actions .command-trigger:after { + content: "⌘K"; + font-size: 12px; + } + .avatar { + width: 27px; + height: 27px; + } + #content, + body[data-concept="ledger"] #content, + body[data-concept="axis"] #content, + body[data-concept="dock"] #content { + padding: 22px 18px; + } + .page-heading { + align-items: flex-start; + flex-direction: column; + gap: 15px; + margin-bottom: 22px; + } + .page-heading h1, + body[data-concept="axis"] h1, + body[data-concept="ledger"] h1, + body[data-concept="grid"] h1 { + font-size: 27px; + } + .page-heading p { + font-size: 13px; + } + .health-line { + align-items: flex-start; + flex-direction: column; + gap: 5px; + } + .metrics { + grid-template-columns: 1fr; + } + .metric, + .metric + .metric { + padding: 14px 0; + border: 0; + border-bottom: 1px solid var(--color-border); + display: grid; + grid-template-columns: 1fr 1fr; + align-items: center; + } + .metric-value { + font-size: 29px; + margin: 0; + text-align: right; + } + .metric-note { + grid-column: 1/-1; + } + body[data-concept="dock"] .metrics, + body[data-concept="axis"] .metrics { + gap: 10px; + } + body[data-concept="dock"] .metric, + body[data-concept="axis"] .metric { + padding: 15px; + } + .dashboard-grid { + gap: 24px; + } + .section-title { + gap: 10px; + } + .section-title h2 { + font-size: 16px; + } + .section-title span { + font-size: 11px; + } + .activity-row { + grid-template-columns: 45px 1fr; + gap: 10px; + } + .activity-row > span:last-child { + grid-column: 2; + } + .auth-layout, + body[data-concept="axis"] .auth-layout { + display: block; + } + .auth-brand { + min-height: auto; + padding: 25px; + gap: 25px; + } + .auth-statement, + body[data-concept="ledger"] .auth-statement, + body[data-concept="grid"] .auth-statement { + font-size: 28px; + margin: 30px 0; + } + .auth-brand small { + display: none; + } + .auth-main { + padding: 30px 22px; + } + .auth-form { + max-width: 100%; + } + .auth-foot { + gap: 12px; + } + .toolbar .search { + max-width: none; + width: 100%; + } + .toolbar select { + flex: 1; + } + .pagination { + align-items: flex-start; + flex-direction: column; + } + .tabs { + gap: 18px; + } + .tabs button { + font-size: 14px; + } + .settings-layout { + gap: 15px; + } + body[data-concept="ledger"] .services, + body[data-concept="dock"] .services { + display: block; + } + body[data-concept="signal"] .metric { + padding: 12px 16px; + } + body[data-concept="signal"] .dashboard-grid { + display: block; + } + body[data-concept="signal"] .panel + .panel { + margin-top: 24px; + } + body[data-concept="grid"] #content { + padding: 0; + } + body[data-concept="grid"] .page-heading, + body[data-concept="grid"] .panel, + body[data-concept="grid"] .activity { + padding: 22px 18px; + } + body[data-concept="grid"] .metric { + padding: 14px 18px; + } + body[data-concept="grid"] .metric-value { + font-size: 34px; + } + body[data-concept="grid"] .page-body { + padding: 0 18px 22px; + } + .table-wrap { + max-width: 100%; + } + table { + min-width: 580px; + } + .library { + gap: 22px; + } + .token-row { + gap: 10px; + font-size: 12px; + } + .token-value { + max-width: 45%; + overflow-wrap: anywhere; + } + body[data-concept="axis"] .auth-brand { + gap: 20px; + } + .auth-form h1 { + font-size: 25px; + } + body[data-concept="dock"] .auth-layout { + padding: 20px; + } + body[data-concept="dock"] .auth-main { + padding: 25px; + } +} +.chart-data { + margin-top: 12px; +} +.chart-data summary { + padding: 6px 0; + border: 0; + font-size: 12px; + color: var(--color-muted); +} +.chart-data-scroll { + max-height: 240px; + overflow: auto; + margin-top: 8px; +} +.chart-data table { + min-width: 0; + font-size: 12px; +} +.chart-data td, +.chart-data th { + padding: 6px 10px; +} +.chart-data summary:focus-visible { + outline: 3px solid var(--color-accent); +} +::selection { + background: var(--color-accent); + color: var(--color-on-accent); +} +input, +textarea { + caret-color: var(--color-accent); +} +table { + font-variant-numeric: tabular-nums; +} +@media (max-width: 600px) { + button, + select, + input:not([type="checkbox"]):not([type="radio"]) { + min-height: 44px; + } + .row-action { + min-height: 36px; + } + .mobile-menu { + min-height: 40px; + } + .nav-links button { + min-height: 44px; + } + .command-trigger { + min-height: 36px !important; + } + .chart-data summary { + padding: 12px 0; + } + .tabs button { + min-height: 44px; + } +} +@media (prefers-reduced-motion: reduce) { + *, + *:before, + *:after { + transition: none !important; + animation: none !important; + scroll-behavior: auto !important; + } +} + +@media (max-width: 600px) { + body[data-concept] .navigation:not(.open) { + display: none; + } + body[data-concept="grid"] .compact-note { + padding: 0 18px 22px; + margin: 0; + } + body[data-concept="signal"] .navigation.open { + display: block; + } +} diff --git a/concepts/README.md b/concepts/README.md new file mode 100644 index 0000000..49ee03d --- /dev/null +++ b/concepts/README.md @@ -0,0 +1,5 @@ +# Кандидатные направления + +Имена, назначение, композиция, шрифт и палитры: `registry.js`. Описание различий: `../DESIGN.md`. Одни и те же экраны: `../playground/frame.js`. + +Порядок Relay / Ledger / Signal / Axis / Dock / Grid — порядок просмотра, не рекомендация. Финальная концепция не выбрана. diff --git a/concepts/registry.js b/concepts/registry.js new file mode 100644 index 0000000..14df52c --- /dev/null +++ b/concepts/registry.js @@ -0,0 +1,170 @@ +export const concepts = [ + { + id: "relay", + name: "Relay", + tag: "Инженерная ясность", + en: "Engineering clarity", + desc: "Левая навигация · нейтральная типографика · тонкие разделители", + descEn: "Sidebar · neutral typography · fine dividers", + accent: "#27634c", + bg: "#f6f8f6", + ink: "#203f31", + line: "#ccd8cf", + radius: "5px", + font: "Arial, Helvetica, sans-serif", + layout: "sidebar", + }, + { + id: "ledger", + name: "Ledger", + tag: "Редакционный порядок", + en: "Editorial order", + desc: "Индекс разделов · антиква · широкие строки", + descEn: "Section index · serif headings · broad rows", + accent: "#9b3c25", + bg: "#f5f0e7", + ink: "#4b3429", + line: "#c9bca7", + radius: "0px", + font: 'Georgia, "Times New Roman", serif', + layout: "editorial", + }, + { + id: "signal", + name: "Signal", + tag: "Операционная консоль", + en: "Operations console", + desc: "Строка команд · моноширинный шрифт · плотный журнал", + descEn: "Command bar · monospace · dense log", + accent: "#26754b", + bg: "#eaf0e9", + ink: "#214c31", + line: "#b6cbbb", + radius: "0px", + font: 'Consolas, "Courier New", monospace', + layout: "terminal", + }, + { + id: "axis", + name: "Axis", + tag: "Пространство продукта", + en: "Product workspace", + desc: "Верхняя навигация · крупные секции · цветовая полоса", + descEn: "Top navigation · generous sections · color band", + accent: "#285e9d", + bg: "#f0f4fa", + ink: "#173c68", + line: "#c8d7ed", + radius: "7px", + font: '"Segoe UI", Arial, sans-serif', + layout: "horizontal", + }, + { + id: "dock", + name: "Dock", + tag: "Персональный инструмент", + en: "Personal instrument", + desc: "Узкая панель · мягкая геометрия · рабочие модули", + descEn: "Narrow rail · soft geometry · working modules", + accent: "#765027", + bg: "#f3f0eb", + ink: "#543f25", + line: "#d5cbbb", + radius: "12px", + font: '"Trebuchet MS", Arial, sans-serif', + layout: "rail", + }, + { + id: "grid", + name: "Grid", + tag: "Структурный характер", + en: "Structural character", + desc: "Контрастная навигация · жёсткая сетка · рубленый ритм", + descEn: "Contrast navigation · rigid grid · bold rhythm", + accent: "#a53b21", + bg: "#f6f5f1", + ink: "#292a25", + line: "#bfbfb1", + radius: "0px", + font: "Arial, Helvetica, sans-serif", + layout: "grid", + }, +]; +export function tokensFor(id, theme = "light", accent, density = "normal") { + const c = concepts.find((c) => c.id === id) || concepts[0]; + const dark = theme === "dark"; + const palettes = { + relay: ["#151c19", "#1b2520", "#e4ece7", "#aabcb1", "#3c4e42"], + ledger: ["#211e1a", "#2b2721", "#efe5d6", "#c1b6a6", "#584e41"], + signal: ["#101a13", "#16231a", "#d4e8d9", "#a4bfa9", "#36533e"], + axis: ["#141c28", "#1b2738", "#e6edf8", "#a6bad6", "#3b4f6c"], + dock: ["#211e1a", "#2d2821", "#f1e7d9", "#c7b6a0", "#5a4d3c"], + grid: ["#191a18", "#252622", "#f1f1e7", "#b8bcaf", "#53574a"], + }; + const p = palettes[c.id]; + let selected = accent || c.accent; + const luminance = (hex) => + hex + .match(/\w\w/g) + .map((x) => parseInt(x, 16) / 255) + .map((x) => (x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4)) + .reduce((s, v, i) => s + v * [0.2126, 0.7152, 0.0722][i], 0); + const contrast = (a, b) => { + const x = luminance(a), + y = luminance(b); + return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05); + }; + const backgrounds = dark ? [p[0], p[1]] : [c.bg, "#ffffff"]; + for ( + let i = 0; + i < 100 && backgrounds.some((bg) => contrast(selected, bg) < 4.5); + i++ + ) + selected = + "#" + + selected + .match(/\w\w/g) + .map((v) => + Math.round(parseInt(v, 16) * 0.95 + (dark ? 255 * 0.05 : 0)) + .toString(16) + .padStart(2, "0"), + ) + .join(""); + // Accent is also used for text; normalize it for both surfaces before choosing button text. + const rgb = selected.match(/\w\w/g).map((x) => parseInt(x, 16)); + const lum = rgb + .map((x) => { + x /= 255; + return x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4; + }) + .reduce((s, v, i) => s + v * [0.2126, 0.7152, 0.0722][i], 0); + const on = lum > 0.179 ? "#101810" : "#ffffff"; + return { + "color.bg": dark ? p[0] : c.bg, + "color.surface": dark ? p[1] : "#ffffff", + "color.text": dark ? p[2] : "#202622", + "color.muted": dark ? p[3] : "#59635e", + "color.border": dark ? p[4] : c.line, + "color.accent": selected, + "color.on-accent": on, + "color.danger": dark ? "#ffafa5" : "#a22923", + "color.success": dark ? "#a2d3ab" : "#26623b", + "radius.control": c.radius, + "font.body": c.id === "ledger" ? "Arial, Helvetica, sans-serif" : c.font, + "font.heading": c.font, + "space.unit": "4px", + "space.section": + density === "compact" ? "18px" : density === "relaxed" ? "36px" : "26px", + "size.control": + density === "compact" ? "34px" : density === "relaxed" ? "46px" : "40px", + "space.cell": + density === "compact" ? "9px" : density === "relaxed" ? "18px" : "13px", + "motion.duration": "120ms", + "layout.kind": c.layout, + }; +} +export const cssVars = (t) => + Object.entries(t) + .filter(([k]) => k !== "layout.kind") + .map(([k, v]) => `--${k.replaceAll(".", "-")}: ${v};`) + .join("\n"); diff --git a/index.html b/index.html new file mode 100644 index 0000000..f22b9b4 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + + Anidev Design System + + + Открыть лабораторию Anidev + + diff --git a/layouts/README.md b/layouts/README.md new file mode 100644 index 0000000..cf24633 --- /dev/null +++ b/layouts/README.md @@ -0,0 +1,12 @@ +# Компоновки + +Грамматики находятся в `components/system.css`, селекторы `body[data-concept=…]`. Основной shell: navigation + main-column (header + content). Каждая концепция меняет структуру через Grid/Flex, сохраняя DOM-порядок чтения. Авторизация имеет отдельную композицию для каждого направления. + +- Relay: 190px sidebar, двухколоночный обзор. +- Ledger: 155px индекс, широкая последовательность, крупная антиква. +- Signal: командная полоса, компактный header и строки. +- Axis: горизонтальная навигация и широкая рабочая область. +- Dock: 110px rail, модули с мягкой геометрией. +- Grid: 215px контрастный sidebar, непрерывная сетка разделов. + +900px: сворачивается двухколоночный контент; 600px: навигация по кнопке меню, метрики в строки, формы в одну колонку. Таблицы сохраняют семантику в локальном скролл-контейнере. Mobile в лаборатории имеет фактический iframe viewport 390px; Tablet — максимум 768px; Desktop занимает доступную ширину. При сравнении окно сужается до ширины половины stage — это показано в панели размеров. diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..9080a1b --- /dev/null +++ b/package-lock.json @@ -0,0 +1,44 @@ +{ + "name": "anidev-design-system", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "anidev-design-system", + "version": "0.1.0", + "devDependencies": { + "playwright": "^1.58.0" + } + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..ff3a2af --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "name": "anidev-design-system", + "version": "0.1.0", + "private": true, + "type": "module", + "scripts": {"dev": "node scripts/serve.mjs", "start": "node scripts/serve.mjs", "test": "node tests/browser.mjs", "check": "node scripts/check.mjs"}, + "devDependencies": {"playwright": "^1.58.0"} +} diff --git a/patterns/UX.md b/patterns/UX.md new file mode 100644 index 0000000..de8474d --- /dev/null +++ b/patterns/UX.md @@ -0,0 +1,15 @@ +# UX-паттерны + +**Управление пользователями.** Поиск имени/email → фильтр роли → сортировка → выбор строки → редактирование доступа в модальном окне. Массовая блокировка требует отдельного подтверждения. Приглашение проверяет дубли email. Экспорт CSV соответствует фильтру. Все направления используют одну localStorage-фикстуру; обновления синхронизируются между iframe. + +**Настройки.** Основные данные, безопасность и уведомления разделены вкладками. Enter отправляет форму, Cancel восстанавливает её сохранённые значения. Сохранение подтверждается toast. Поля не меняют production: всё в браузере. + +**Авторизация.** Email → пароль → ожидание → dashboard. Ошибки форм обрабатываются native валидацией. SSO и восстановление имеют отдельные демо-формы с явным сообщением об отсутствии внешней отправки. В production этот слой заменяется безопасной интеграцией с identity provider; demo JS не служит защитой доступа. + +**Диалоги.** Инициирующая кнопка → осмысленный заголовок → форма → cancel/submit. Esc закрывает; фокус возвращается к инициатору. Опасное действие не выполняется открытием окна. + +**Сравнение.** Выбрать A и B → одинаковый экран, тему, плотность и размер → оценить композицию → проверить компоненты и обе темы. Акцент каждого направления независим. Экспорт кандидата не фиксирует окончательный выбор. + +**Новый проект.** После утверждения: подключить выбранные токены и CSS, выбрать layout, переносить semantic HTML и поведение в свой стек. Проверить keyboard/mobile/EN/RU и состояния ошибок до интеграции backend. + +**Существующий проект.** Инвентаризировать токены и компоненты; составить таблицу соответствия; сначала перевести цвета/типографику/ритм, затем контролы и layout. Сохранить бизнес-поведение, URL и контент. Не переписывать приложение ради смены стиля. diff --git a/playground/frame.html b/playground/frame.html new file mode 100644 index 0000000..c7472ab --- /dev/null +++ b/playground/frame.html @@ -0,0 +1,16 @@ + + + + + + Anidev — Concept preview + + + + +
+ +
+ + + diff --git a/playground/frame.js b/playground/frame.js new file mode 100644 index 0000000..c316ad1 --- /dev/null +++ b/playground/frame.js @@ -0,0 +1,841 @@ +import { concepts, tokensFor, cssVars } from "../concepts/registry.js"; +const params = new URLSearchParams(location.search), + concept = concepts.find((c) => c.id === params.get("concept")) || concepts[0]; +const theme = params.get("theme") === "dark" ? "dark" : "light", + density = params.get("density") || "normal", + locale = params.get("locale") === "en" ? "en" : "ru"; +const rawAccent = params.get("accent"), + accent = /^#[0-9a-f]{6}$/i.test(rawAccent) ? rawAccent : concept.accent; +const tokens = tokensFor(concept.id, theme, accent, density); +document.documentElement.style.cssText = cssVars(tokens); +document.documentElement.lang = locale; +document.body.dataset.concept = concept.id; +document.body.dataset.theme = theme; +const t = (ru, en) => (locale === "ru" ? ru : en); +const number = (v, digits = 0) => + new Intl.NumberFormat(locale, { + minimumFractionDigits: digits, + maximumFractionDigits: digits, + }).format(v); +const $ = (s) => document.querySelector(s), + escape = (s) => + String(s).replace( + /[&<>"']/g, + (c) => + ({ + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'", + })[c], + ); +const initialUsers = [ + { + id: 1, + name: "Anna Volkova", + email: "anna@anidev.ru", + role: "admin", + status: "active", + last: "09:42", + }, + { + id: 2, + name: "Mikhail Orlov", + email: "mikhail@anidev.ru", + role: "developer", + status: "active", + last: "09:38", + }, + { + id: 3, + name: "Elena Kim", + email: "elena@anidev.ru", + role: "viewer", + status: "active", + last: "09:21", + }, + { + id: 4, + name: "Denis Petrov", + email: "denis@anidev.ru", + role: "developer", + status: "invited", + last: "—", + }, + { + id: 5, + name: "Sofia Morozova", + email: "sofia@anidev.ru", + role: "viewer", + status: "suspended", + last: "26.11", + }, + { + id: 6, + name: "Pavel Sokolov", + email: "pavel@anidev.ru", + role: "developer", + status: "active", + last: "08:56", + }, + { + id: 7, + name: "Maria Ivanova", + email: "maria@anidev.ru", + role: "admin", + status: "active", + last: "08:40", + }, + { + id: 8, + name: "Alex Chen", + email: "alex@anidev.ru", + role: "viewer", + status: "active", + last: "08:32", + }, +]; +let users; +try { + users = + JSON.parse(localStorage.getItem("anidev.users") || "null") || + structuredClone(initialUsers); +} catch { + users = structuredClone(initialUsers); +} +let settings; +try { + settings = JSON.parse(localStorage.getItem("anidev.settings") || "null") || { + name: "Anidev Production", + slug: "anidev-prod", + region: "eu", + email: "ops@anidev.ru", + mfa: true, + audit: true, + }; +} catch { + settings = { + name: "Anidev Production", + slug: "anidev-prod", + region: "eu", + email: "ops@anidev.ru", + mfa: true, + audit: true, + }; +} +let page = [ + "dashboard", + "users", + "settings", + "auth", + "components", + "tokens", +].includes(params.get("page")) + ? params.get("page") + : "dashboard"; +let query = "", + role = "all", + userPage = 1, + sortAsc = true, + sortKey = "name", + selected = new Set(), + tab = "general", + chartRange = "24h"; +const pageNames = { + dashboard: t("Обзор", "Overview"), + users: t("Пользователи", "Users"), + settings: t("Настройки", "Settings"), + auth: t("Авторизация", "Sign in"), + components: t("Компоненты", "Components"), + tokens: t("Токены", "Tokens"), +}; +const icons = { + dashboard: + '', + users: + '', + settings: + '', + components: + '', + tokens: '', +}; +const icon = (id) => + ``; +const wordmark = '
a/anidev
'; +function persist() { + try { + localStorage.setItem("anidev.users", JSON.stringify(users)); + localStorage.setItem("anidev.settings", JSON.stringify(settings)); + } catch { + toast(t("Хранилище браузера недоступно", "Browser storage unavailable")); + } +} +let toastTimer; +function toast(message) { + $("#toast").textContent = message; + $("#toast").style.display = "block"; + clearTimeout(toastTimer); + toastTimer = setTimeout(() => ($("#toast").style.display = "none"), 3500); +} +function nav() { + return ``; +} +function header() { + return `
`; +} +const heading = (title, desc, actions = "") => + `
ANIDEV://PRODUCTION/${page.toUpperCase()}

${title}

${desc}

${actions}
`; +function render() { + document.title = `Anidev / ${concept.name} / ${pageNames[page]}`; + $("#app").innerHTML = + page === "auth" + ? auth() + : `
${nav()}
${header()}
${{ dashboard, users: userScreen, settings: settingsScreen, components: componentScreen, tokens: tokenScreen }[page]()}
`; + bindForms(); + if (page === "users") bindUsers(); +} +function chart() { + const values = + chartRange === "24h" + ? [ + 32, 30, 34, 33, 35, 42, 38, 34, 33, 32, 37, 35, 38, 41, 43, 39, 36, + 35, 37, 40, 38, 34, 32, 34, + ] + : [34, 38, 36, 41, 37, 35, 34]; + const points = values + .map((v, i) => `${(i * 500) / (values.length - 1)},${145 - (v - 25) * 5}`) + .join(" "); + return `

${t("p95 · миллисекунды · ниже — лучше · тестовая выборка", "p95 · milliseconds · lower is better · sample dataset")}

${t("Числовые данные", "Numerical data")}
${values.map((v, i) => ``).join("")}
${t("Время UTC", "Time UTC")}p95 / ms
${chartRange === "24h" ? String(i).padStart(2, "0") + ":00" : 21 + i + ".11"}${v}
`; +} +function dashboard() { + return `${heading(t("Обзор инфраструктуры", "Infrastructure overview"), t("Production · 27 ноября 2026", "Production · November 27, 2026"), ``)} +
${t("Все системы работают штатно", "All systems operational")}${t("Проверено в 09:42 UTC · демонстрация", "Checked at 09:42 UTC · demo")}
+
${t("Доступность за 30 дней", "30-day availability")}
${number(99.98, 2)}%
${t("SLO 99.9% · в пределах цели", "SLO 99.9% · within target")}
${t("Активные сессии", "Active sessions")}
${number(1284)}
${t("SSO · за последние 15 минут", "SSO · last 15 minutes")}
${t("Задержка API, p95", "API latency, p95")}
34 ms
${t("Порог оповещения: 100 мс", "Alert threshold: 100 ms")}
+

${t("Время ответа API", "API response time")}

${chart()}

${t("Сервисы", "Services")}

3 / 3 ONLINE
${[ + ["Identity", "18 ms"], + ["License API", "34 ms"], + ["Edge Gateway", "12 ms"], + ] + .map( + ([name, time]) => + `
${name}${time}${t("Работает", "Operational")}
`, + ) + .join( + "", + )}

eu-central-1 · ${t("проверка каждую минуту", "checked every minute")}

+

${t("Последние события", "Recent activity")}

UTC
${[ + [ + "09:42", + t("Обновлена политика доступа", "Access policy updated"), + "Anna Volkova", + ], + [ + "09:38", + t("Выпущена лицензия AN-2048", "License AN-2048 issued"), + "License API", + ], + [ + "09:21", + t("Успешная авторизация через SSO", "Successful SSO authentication"), + "Elena Kim", + ], + ] + .map( + ([time, event, who]) => + `
${event}${who}
`, + ) + .join( + "", + )}

${t("Демонстрационные данные. Подключение к реальной инфраструктуре отсутствует.", "Demonstration data. No connection to live infrastructure.")}

`; +} +const roleName = (r) => + ({ + admin: t("Администратор", "Administrator"), + developer: t("Разработчик", "Developer"), + viewer: t("Наблюдатель", "Viewer"), + })[r]; +const statusName = (s) => + ({ + active: t("Активен", "Active"), + invited: t("Приглашён", "Invited"), + suspended: t("Заблокирован", "Suspended"), + })[s]; +function filteredUsers() { + return users + .filter( + (u) => + (u.name + " " + u.email).toLowerCase().includes(query.toLowerCase()) && + (role === "all" || u.role === role), + ) + .sort((a, b) => a[sortKey].localeCompare(b[sortKey]) * (sortAsc ? 1 : -1)); +} +function userScreen() { + return `${heading(t("Пользователи", "Users"), t("Участники рабочего пространства и их доступ.", "Workspace members and their access."), ``)}
${userResults()}
`; +} +function userResults() { + const filtered = filteredUsers(); + userPage = Math.max( + 1, + Math.min(userPage, Math.ceil(filtered.length / 5) || 1), + ); + const visible = filtered.slice((userPage - 1) * 5, userPage * 5); + return `${selected.size ? `
${t("Выбрано", "Selected")}: ${selected.size}
` : ""} + ${ + !filtered.length + ? `

${t("Пользователи не найдены", "No users found")}

${t("Попробуйте другое имя или сбросьте фильтр.", "Try another name or reset the filter.")}

` + : `
${visible + .map( + (u) => + ``, + ) + .join("")}
${t("Участники Anidev Production", "Anidev Production members")}
selected.has(u.id)) ? "checked" : ""}>${t("Статус", "Status")}${t("Был в сети", "Last seen")}${t("Действия", "Actions")}
${escape( + u.name + .split(" ") + .map((n) => n[0]) + .join(""), + )}
${escape(u.name)}${escape(u.email)}
${roleName(u.role)}${statusName(u.status)}${u.last}
` + } + `; +} +function refreshUsers() { + const search = $("#user-search"); + if (search) search.value = query; + const filter = $("#role-filter"); + if (filter) filter.value = role; + $("#user-results").innerHTML = userResults(); + bindSelection(); +} +function bindUsers() { + $("#user-search").oninput = (e) => { + query = e.target.value; + userPage = 1; + refreshUsers(); + }; + $("#role-filter").onchange = (e) => { + role = e.target.value; + userPage = 1; + refreshUsers(); + }; + bindSelection(); +} +function bindSelection() { + const all = $("#select-all"); + if (all) { + const visible = filteredUsers().slice((userPage - 1) * 5, userPage * 5); + all.indeterminate = + visible.some((u) => selected.has(u.id)) && + !visible.every((u) => selected.has(u.id)); + all.onchange = (e) => { + visible.forEach((u) => + e.target.checked ? selected.add(u.id) : selected.delete(u.id), + ); + refreshUsers(); + }; + } + document.querySelectorAll("[data-select]").forEach( + (el) => + (el.onchange = () => { + const id = Number(el.dataset.select); + el.checked ? selected.add(id) : selected.delete(id); + refreshUsers(); + }), + ); +} +function settingsScreen() { + return `${heading(t("Настройки пространства", "Workspace settings"), t("Идентификация, безопасность и уведомления.", "Identity, security and notifications."))}
${["general", "security", "notifications"].map((v, i) => ``).join("")}

${tab === "general" ? t("Ваше пространство", "Your workspace") : tab === "security" ? t("Контроль доступа", "Access control") : t("Оповещения", "Notifications")}

${tab === "general" ? t("Эти данные видны участникам организации.", "These details are visible to organization members.") : t("Изменения применяются к этому демо.", "Changes apply to this demo.")}

${tab === "general" ? `` : tab === "security" ? `
` : `
`}
`; +} +function auth() { + return `
${wordmark}
${t("Ваша инфраструктура.
Под вашим контролем.", "Your infrastructure.
Under your control.")}
ANIDEV IDENTITY / ${t("ДЕМОНСТРАЦИЯ", "DEMONSTRATION")}

${t("Вход в Anidev", "Sign in to Anidev")}

${t("Продолжите работу с вашим пространством.", "Continue to your workspace.")}

${t("или корпоративный аккаунт", "or your company account")}
© Anidev 2026
`; +} +function componentScreen() { + return `${heading(t("Библиотека компонентов", "Component library"), t("Единые состояния. Шесть способов выражения.", "Shared states. Six ways of expressing them."), ``)}
+

Buttons

Hover · active · focus · disabled · loading
+

Inputs & selects

+

Selection controls

${t("Период хранения", "Retention period")}
+

Overlays & feedback

${t("Скопировать идентификатор", "Copy identifier")}
${t("Действия проекта", "Project actions")}
${t("Контекстное меню: правая кнопка, Shift+F10 или Enter", "Context menu: right click, Shift+F10 or Enter")}
+

Empty state

${t("Пока нет API-ключей", "No API keys yet")}

${t("Создайте ключ для подключения сервиса.", "Create a key to connect your service.")}

+

Error & skeleton

${t("Не удалось загрузить журнал.", "Could not load the log.")}

+

Status indicators

${t("Работает", "Operational")}${t("Недоступен", "Unavailable")}${t("Ожидает", "Pending")}

${t("Состояние выражено текстом, а не только цветом.", "Status uses text as well as color.")}

+

Chart

${chart()}

${t("Таблицы, пагинация и фильтры — на экране «Пользователи»; вкладки — в настройках; форма входа — в авторизации.", "Tables, pagination and filters: Users. Tabs: Settings. Sign-in form: Authentication.")}

`; +} +function tokenScreen() { + return `${heading(t("Дизайн-токены", "Design tokens"), `${concept.name} / ${theme} / ${density}`, ``)}
${Object.entries( + tokens, + ) + .map( + ([key, value]) => + `
${key}${value.startsWith("#") ? `` : ""}${escape(value)}
`, + ) + .join( + "", + )}
:root {\n${cssVars(tokens)}\n}

${t("Экспорт галереи включает обе темы, JSON и CSS. Акцент применяется к каждой концепции отдельно.", "Gallery export includes both themes, JSON and CSS. Each concept retains its own accent.")}

`; +} +let dialogInitiator = null; +function openDialog(title, body, cls = "") { + const d = $("#dialog"); + if (d.open) d.close(); + dialogInitiator = document.activeElement; + d.className = cls; + d.innerHTML = `

${title}

${body}`; + d.showModal(); + return d; +} +function invite() { + openDialog( + t("Пригласить участника", "Invite a member"), + `

${t("Приглашение будет добавлено в демонстрационный список. Письмо не отправляется.", "The invitation is added to the demo list. No email is sent.")}

`, + ); + $("#invite-form").onsubmit = (e) => { + e.preventDefault(); + const f = new FormData(e.target), + email = f.get("email").trim().toLowerCase(); + if (users.some((u) => u.email.toLowerCase() === email)) { + $("#invite-error").textContent = t( + "Этот email уже добавлен.", + "This email already exists.", + ); + return; + } + users.push({ + id: Date.now(), + name: f.get("name").trim(), + email, + role: f.get("role"), + status: "invited", + last: "—", + }); + persist(); + $("#dialog").close(); + if (page === "users") refreshUsers(); + toast(t("Приглашение добавлено в демо", "Invitation added to demo")); + }; +} +function editUser(id) { + const user = users.find((u) => u.id === id); + if (!user) return; + openDialog( + escape(user.name), + `

${escape(user.email)}

`, + ); + $("#edit-user").onsubmit = (e) => { + e.preventDefault(); + const data = new FormData(e.target); + user.role = data.get("role"); + user.status = data.get("status"); + persist(); + $("#dialog").close(); + refreshUsers(); + toast(t("Доступ обновлён", "Access updated")); + }; +} +function command() { + openDialog( + t("Команды", "Commands"), + `
${Object.entries( + pageNames, + ) + .map(([id, name]) => ``) + .join( + "", + )}
${t("↑ ↓ — выбор · Enter — открыть · Esc — закрыть", "↑ ↓ to navigate · Enter to open · Esc to close")}`, + ); + $("#command-search").oninput = (e) => + document + .querySelectorAll(".command-list button") + .forEach( + (b) => + (b.hidden = !b.textContent + .toLowerCase() + .includes(e.target.value.toLowerCase())), + ); +} +function download(name, text, type = "text/plain") { + const url = URL.createObjectURL(new Blob(["\ufeff", text], { type })); + const a = document.createElement("a"); + a.href = url; + a.download = name; + a.click(); + setTimeout(() => URL.revokeObjectURL(url), 30000); +} +async function copy(text) { + try { + await navigator.clipboard.writeText(text); + toast(t("Скопировано", "Copied")); + } catch { + openDialog( + t("Скопируйте вручную", "Copy manually"), + ``, + ); + $("#dialog textarea").select(); + } +} +function bindForms() { + if ($("#settings-form")) + $("#settings-form").onsubmit = (e) => { + e.preventDefault(); + const f = new FormData(e.target); + if (tab === "general") { + settings.name = f.get("name").trim(); + settings.slug = f.get("slug"); + settings.region = f.get("region"); + } else if (tab === "security") { + settings.mfa = f.has("mfa"); + settings.audit = f.has("audit"); + } else { + settings.email = f.get("email"); + settings.incidents = $("#incidents").checked; + } + persist(); + toast(t("Настройки сохранены", "Settings saved")); + }; + if ($("#settings-form")) + $("#settings-form").onreset = (e) => { + e.preventDefault(); + render(); + }; + if ($("#incidents") && settings.incidents !== undefined) + $("#incidents").checked = settings.incidents; + if ($("#auth-form")) + $("#auth-form").onsubmit = async (e) => { + e.preventDefault(); + const b = e.target.querySelector("[type=submit]"); + b.disabled = true; + b.setAttribute("aria-busy", "true"); + b.textContent = t("Вход…", "Signing in…"); + await new Promise((r) => setTimeout(r, 450)); + page = "dashboard"; + render(); + toast(t("Демонстрационный вход выполнен", "Demo sign-in complete")); + }; + if ($("#chart-range")) + $("#chart-range").onchange = (e) => { + chartRange = e.target.value; + render(); + }; + const target = $(".context-target"); + if (target) { + target.oncontextmenu = (e) => { + e.preventDefault(); + contextMenu(e.clientX, e.clientY); + }; + target.onkeydown = (e) => { + if ((e.shiftKey && e.key === "F10") || e.key === "Enter") { + e.preventDefault(); + const r = target.getBoundingClientRect(); + contextMenu(r.left, r.top); + } + }; + } +} +function contextMenu(x, y) { + $(".context-menu")?.remove(); + const menu = document.createElement("div"); + menu.className = "context-menu"; + menu.setAttribute("role", "menu"); + menu.innerHTML = ``; + document.body.append(menu); + menu.style.left = Math.min(x, innerWidth - 200) + "px"; + menu.style.top = Math.min(y, innerHeight - 130) + "px"; + menu.querySelector("button").focus(); +} +document.addEventListener("click", async (e) => { + const pageButton = e.target.closest("[data-page]"); + if (pageButton) { + page = pageButton.dataset.page; + $("#dialog").close(); + render(); + $("#content")?.focus(); + return; + } + const sorter = e.target.closest("[data-sort]"); + if (sorter) { + sortAsc = sortKey === sorter.dataset.sort ? !sortAsc : true; + sortKey = sorter.dataset.sort; + refreshUsers(); + return; + } + const edit = e.target.closest("[data-edit]"); + if (edit) { + editUser(Number(edit.dataset.edit)); + return; + } + const tabButton = e.target.closest("[data-tab]"); + if (tabButton) { + tab = tabButton.dataset.tab; + render(); + $("#tab-" + tab).focus(); + return; + } + const button = e.target.closest("[data-action]"), + action = button?.dataset.action; + if (!e.target.closest(".context-menu")) $(".context-menu")?.remove(); + if (!action) return; + const actions = { + "mobile-menu": () => { + const nav = $(".navigation"); + nav.classList.toggle("open"); + button.setAttribute("aria-expanded", nav.classList.contains("open")); + }, + close: () => $("#dialog").close(), + invite, + command, + activity: () => $("#activity").scrollIntoView({ behavior: "smooth" }), + profile: () => + openDialog( + "Anna Volkova", + `

anna@anidev.ru

${roleName("admin")} · Anidev Production

`, + ), + prev: () => { + userPage--; + refreshUsers(); + }, + next: () => { + userPage++; + refreshUsers(); + }, + "clear-filters": () => { + query = ""; + role = "all"; + userPage = 1; + refreshUsers(); + }, + "clear-selection": () => { + selected.clear(); + refreshUsers(); + }, + "bulk-suspend": () => { + openDialog( + t("Заблокировать участников?", "Suspend members?"), + `

${t("Количество выбранных участников", "Selected members")}: ${selected.size}

`, + ); + }, + "confirm-suspend": () => { + users + .filter((u) => selected.has(u.id)) + .forEach((u) => (u.status = "suspended")); + selected.clear(); + persist(); + $("#dialog").close(); + refreshUsers(); + toast(t("Доступ заблокирован", "Access suspended")); + }, + "reset-users": () => { + users = structuredClone(initialUsers); + selected.clear(); + query = ""; + role = "all"; + userPage = 1; + persist(); + render(); + toast(t("Тестовые данные восстановлены", "Demo data restored")); + }, + "download-users": () => { + const csv = [ + "Name,Email,Role,Status", + ...filteredUsers().map((u) => + [u.name, u.email, u.role, u.status] + .map((v) => '"' + String(v).replaceAll('"', '""') + '"') + .join(","), + ), + ].join("\r\n"); + download("anidev-users.csv", csv, "text/csv;charset=utf-8"); + }, + toast: () => + toast(t("Изменения сохранены в демонстрации", "Demo changes saved")), + "demo-save": async () => { + button.disabled = true; + button.setAttribute("aria-busy", "true"); + const old = button.textContent; + button.textContent = t("Сохранение…", "Saving…"); + await new Promise((r) => setTimeout(r, 500)); + button.disabled = false; + button.removeAttribute("aria-busy"); + button.textContent = old; + toast(t("Сохранено", "Saved")); + }, + drawer: () => + openDialog( + t("Сведения о пространстве", "Workspace details"), + `

ANIDEV / PRODUCTION

${t("Регион", "Region")}
eu-central-1
${t("Владелец", "Owner")}
Anna Volkova
${t("Создано", "Created")}
2026-01-14
`, + "drawer", + ), + sessions: () => + openDialog( + t("Активные сессии", "Active sessions"), + `

Windows · Edge · Moscow

${t("Текущая сессия · 09:42 UTC", "Current session · 09:42 UTC")}

`, + ), + revoke: () => { + $("#dialog").close(); + toast(t("Другие демо-сессии завершены", "Other demo sessions revoked")); + }, + recover: () => { + openDialog( + t("Восстановить доступ", "Reset password"), + `

${t("Демо-форма. Письмо не отправляется.", "Demo form. No email is sent.")}

`, + ); + $("#recover-form").onsubmit = (e) => { + e.preventDefault(); + $("#dialog").close(); + toast( + t("Демо-запрос восстановления принят", "Demo reset request accepted"), + ); + }; + }, + sso: () => { + openDialog( + t("Корпоративный вход", "Company sign-in"), + `

${t("Проверка демонстрационного домена. OAuth-провайдер не подключён.", "Demo domain validation. No OAuth provider is connected.")}

`, + ); + $("#sso-form").onsubmit = (e) => { + e.preventDefault(); + $("#dialog").close(); + page = "dashboard"; + render(); + toast(t("Демо SSO-вход выполнен", "Demo SSO sign-in complete")); + }; + }, + delete: () => + openDialog( + t("Удалить тестовый проект?", "Delete demo project?"), + `

${t("Демонстрация подтверждения опасного действия. Данные пространства сохранятся.", "Demonstration of destructive action confirmation. Workspace data is retained.")}

`, + ), + "confirm-delete": () => { + $("#dialog").close(); + toast(t("Тестовый проект удалён", "Demo project deleted")); + }, + rename: () => { + openDialog( + t("Переименовать проект", "Rename project"), + `
`, + ); + $("#rename-form").onsubmit = (e) => { + e.preventDefault(); + settings.name = new FormData(e.target).get("name").trim(); + persist(); + $("#dialog").close(); + toast(t("Название сохранено: ", "Name saved: ") + settings.name); + }; + }, + "create-key": () => { + const key = "an_demo_" + crypto.randomUUID().replaceAll("-", ""); + openDialog( + t("Тестовый API-ключ", "Demo API key"), + `

${t("Ключ не даёт доступ к реальным сервисам.", "This key does not access real services.")}

`, + ); + $("#copy-key").onclick = () => copy(key); + }, + retry: () => { + const box = button.closest(".error-state"); + box.innerHTML = `${t("Журнал загружен · 3 события", "Log loaded · 3 events")}`; + box.style.borderColor = "var(--color-border)"; + }, + "copy-id": () => { + copy("ws_anidev_prod"); + $(".context-menu")?.remove(); + }, + "copy-json": () => copy(JSON.stringify(tokens, null, 2)), + "copy-css": () => copy(":root {\n" + cssVars(tokens) + "\n}"), + }; + if (actions[action]) await actions[action](); + document.querySelectorAll("details[open]").forEach((el) => { + if (!el.contains(e.target) || action) el.open = false; + }); +}); +document.addEventListener("keydown", (e) => { + if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "k") { + e.preventDefault(); + command(); + } + if (e.key === "Escape") { + if ($(".context-menu")) { + $(".context-menu").remove(); + $(".context-target")?.focus(); + } + document + .querySelectorAll("details[open]") + .forEach((el) => (el.open = false)); + } + const tabs = [...document.querySelectorAll("[role=tab]")]; + if ( + tabs.includes(e.target) && + ["ArrowLeft", "ArrowRight", "Home", "End"].includes(e.key) + ) { + e.preventDefault(); + const index = tabs.indexOf(e.target); + const next = + e.key === "Home" + ? 0 + : e.key === "End" + ? tabs.length - 1 + : (index + (e.key === "ArrowRight" ? 1 : -1) + tabs.length) % + tabs.length; + tab = tabs[next].dataset.tab; + render(); + $("#tab-" + tab).focus(); + } + if ( + $("#dialog").open && + $(".command-list") && + ["ArrowDown", "ArrowUp", "Enter"].includes(e.key) + ) { + const buttons = [ + ...document.querySelectorAll(".command-list button:not([hidden])"), + ]; + if (!buttons.length) return; + const index = buttons.indexOf(document.activeElement); + if (e.key === "Enter" && document.activeElement === $("#command-search")) { + e.preventDefault(); + buttons[0].click(); + } else if (e.key !== "Enter") { + e.preventDefault(); + buttons[ + (index + (e.key === "ArrowDown" ? 1 : -1) + buttons.length) % + buttons.length + ].focus(); + } + } + const menu = $(".context-menu"); + if (menu && ["ArrowDown", "ArrowUp"].includes(e.key)) { + e.preventDefault(); + const buttons = [...menu.querySelectorAll("button")]; + buttons[ + (buttons.indexOf(document.activeElement) + + (e.key === "ArrowDown" ? 1 : -1) + + buttons.length) % + buttons.length + ].focus(); + } +}); +$("#dialog").addEventListener("close", () => { + if (dialogInitiator?.isConnected) dialogInitiator.focus(); +}); +$("#dialog").addEventListener("click", (e) => { + if (e.target === $("#dialog")) { + const r = e.target.getBoundingClientRect(); + if ( + e.clientX < r.left || + e.clientX > r.right || + e.clientY < r.top || + e.clientY > r.bottom + ) + e.target.close(); + } +}); +// Refresh shared fixture edits in both comparison panes, preserving each pane's layout. +addEventListener("storage", (e) => { + if (e.key === "anidev.users") { + try { + users = JSON.parse(e.newValue); + if (page === "users") refreshUsers(); + } catch {} + } + if (e.key === "anidev.settings") { + try { + settings = JSON.parse(e.newValue); + if (page === "settings") render(); + } catch {} + } +}); +render(); diff --git a/playground/gallery.css b/playground/gallery.css new file mode 100644 index 0000000..58cb513 --- /dev/null +++ b/playground/gallery.css @@ -0,0 +1,515 @@ +:root { + font-family: Arial, Helvetica, sans-serif; + color: #e9e9e9; + background: #151617; + font-synthesis: none; +} +* { + box-sizing: border-box; +} +body { + margin: 0; +} +button, +select, +input { + font: inherit; +} +button, +select, +a, +input[type="color"], +input[type="checkbox"] { + cursor: pointer; +} +button, +select { + color: inherit; + background: #232527; + border: 1px solid #494c4f; + border-radius: 5px; + min-height: 36px; + padding: 7px 11px; +} +button:hover, +select:hover { + background: #34373a; +} +button:focus-visible, +select:focus-visible, +input:focus-visible, +a:focus-visible { + outline: 3px solid #d7f3a3; + outline-offset: 3px; +} +a { + color: inherit; +} +button:disabled { + opacity: 0.5; + cursor: wait; +} +[hidden] { + display: none !important; +} +.mast { + padding: 22px 3.5%; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #353738; + gap: 20px; +} +.brand { + text-decoration: none; + font-size: 23px; + font-weight: bold; + letter-spacing: -1px; + display: flex; + align-items: center; + gap: 12px; +} +.brand > span:last-child { + font-size: 13px; + font-weight: normal; + color: #aaa; + letter-spacing: 0; + border-left: 1px solid #505354; + padding-left: 15px; +} +.mark { + color: #dcf8ad; + font-size: 29px; +} +.mast-end { + display: flex; + align-items: center; + gap: 12px; +} +.version, +.eyebrow { + font: + 12px Consolas, + monospace; + letter-spacing: 1.6px; + color: #a8b19f; +} +.export { + background: #dcf8ad; + color: #1b2414; + border-color: #dcf8ad; +} +.export:hover { + background: #c1e08c; +} +main { + max-width: 1900px; + margin: auto; + padding: 0 3.5%; +} +.intro { + display: flex; + align-items: flex-end; + justify-content: space-between; + padding: 40px 0 30px; + gap: 20px; +} +.eyebrow { + margin: 0 0 16px; +} +h1 { + font-size: clamp(29px, 3.2vw, 48px); + letter-spacing: -1.8px; + line-height: 1.06; + font-weight: 500; + margin: 0; +} +h1 span { + color: #a2a6a8; +} +.intro-copy { + font-size: 14px; + line-height: 1.7; + color: #aeb2b5; + margin: 0 0 3px; +} +.concepts { + display: grid; + grid-template-columns: repeat(6, 1fr); + gap: 9px; + margin-bottom: 28px; +} +.concept { + padding: 0; + text-align: left; + border-color: #393c3e; + overflow: hidden; + background: #1b1d1f; + min-width: 0; +} +.concept[aria-pressed="true"] { + border-color: #dcf8ad; + box-shadow: 0 0 0 1px #dcf8ad; +} +.swatch { + height: 72px; + display: flex; + padding: 12px; + gap: 6px; + background: var(--swatch-bg); + position: relative; +} +.swatch:before { + content: ""; + width: 20%; + background: var(--swatch-ink); + opacity: 0.18; +} +.swatch:after { + content: ""; + position: absolute; + width: 34%; + height: 5px; + top: 19px; + left: 35%; + background: var(--swatch-ink); + box-shadow: + 0 12px 0 var(--swatch-line), + 0 24px 0 var(--swatch-line); +} +.concept:nth-child(2) .swatch:before { + width: 0; +} +.concept:nth-child(2) .swatch:after { + height: 11px; + width: 55%; + left: 13%; + top: 16px; + box-shadow: 0 24px 0 var(--swatch-line); +} +.concept:nth-child(3) .swatch:after { + height: 2px; + box-shadow: + 0 8px 0 var(--swatch-ink), + 0 16px 0 var(--swatch-line), + 0 24px 0 var(--swatch-line); +} +.concept:nth-child(4) .swatch:before { + width: 100%; + height: 8px; +} +.concept:nth-child(4) .swatch:after { + top: 35px; + left: 15%; + width: 30%; +} +.concept:nth-child(5) .swatch:before { + width: 10%; + border-radius: 6px; +} +.concept:nth-child(5) .swatch:after { + height: 26px; + width: 28%; + top: 27px; + left: 30%; + box-shadow: 40px 0 0 var(--swatch-line); + border-radius: 4px; +} +.concept:nth-child(6) .swatch:before { + width: 33%; + opacity: 1; +} +.concept:nth-child(6) .swatch:after { + height: 20px; + left: 48%; + top: 25px; + box-shadow: 0 0 0 1px var(--swatch-ink); +} +.concept-info { + padding: 12px; + display: flex; + justify-content: space-between; + gap: 5px; + font-size: 15px; +} +.concept-info small { + color: #a6aaad; + font: + 12px Consolas, + monospace; +} +.concept-caption { + display: block; + padding: 0 12px 13px; + color: #a6aaad; + font-size: 12px; +} +.lab { + border: 1px solid #414447; + border-radius: 7px; + overflow: hidden; +} +.toolbar { + padding: 14px; + display: flex; + gap: 15px; + align-items: flex-end; + flex-wrap: wrap; + background: #1b1d1f; +} +.toolbar label { + display: flex; + flex-direction: column; + gap: 6px; + font-size: 12px; + color: #b6bbbe; +} +.toolbar label.compare { + flex-direction: row; + align-items: center; + height: 36px; + gap: 5px; +} +.toolbar select { + font-size: 13px; + max-width: 180px; +} +.toolbar input[type="color"] { + padding: 3px; + border: 1px solid #494c4f; + height: 36px; + width: 42px; + border-radius: 5px; + background: none; +} +.devices { + display: flex; + gap: 0; + margin: 0; + border: 0; + padding: 0; +} +.devices legend { + font-size: 12px; + color: #b6bbbe; + padding: 0 0 6px; +} +.devices button { + font-size: 12px; + border-radius: 0; +} +.devices button:first-of-type { + border-radius: 5px 0 0 5px; +} +.devices button:last-of-type { + border-radius: 0 5px 5px 0; +} +.devices button[aria-pressed="true"] { + background: #e4e8e1; + color: #181b16; +} +.stage-meta { + display: flex; + justify-content: space-between; + gap: 15px; + background: #232527; + padding: 12px 18px; + font-size: 12px; + color: #adb3b6; +} +.stage-meta > div { + display: flex; + gap: 16px; +} +#current-name { + color: #eef0ec; + font-weight: bold; +} +#dimensions { + font-family: Consolas, monospace; + white-space: nowrap; +} +.workspace { + display: flex; + gap: 18px; + padding: 22px; + overflow: auto; + background: #303335; + min-height: 650px; + align-items: flex-start; +} +.preview-pane { + min-width: 0; + flex: 1; +} +.frame-viewport { + overflow: auto; + margin: auto; + width: 100%; + background: #202224; + border-radius: 4px; + box-shadow: 0 8px 35px #0003; +} +iframe { + display: block; + border: 0; + width: 100%; + height: 900px; + background: white; +} +.frame-heading { + font: + 13px Consolas, + monospace; + margin: 0 0 10px; + color: #d4d9dc; +} +.frame-heading:empty { + display: none; +} +.workspace[data-device="tablet"] .frame-viewport { + max-width: 768px; +} +.workspace[data-device="mobile"] .frame-viewport { + max-width: 390px; +} +.workspace[data-device="mobile"] iframe { + height: 844px; +} +.workspace.comparing .preview-pane { + min-width: 340px; +} +.stage-note { + font-size: 12px; + color: #afb4b7; + margin: 0; + padding: 13px 18px; + background: #202224; +} +footer { + display: flex; + justify-content: space-between; + gap: 20px; + padding: 24px 0; + color: #92999e; + font-size: 11px; +} +footer > span:first-child { + font-family: Consolas, monospace; + letter-spacing: 1px; +} +#notice { + position: fixed; + bottom: 25px; + left: 50%; + transform: translateX(-50%); + background: #dcf8ad; + color: #15210d; + border-radius: 5px; + padding: 14px 20px; + display: none; + font-size: 14px; +} +.skip { + position: fixed; + top: -100px; + background: #dcf8ad; + color: black; + padding: 15px; + z-index: 100; +} +.skip:focus { + top: 5px; +} +@media (max-width: 1000px) { + .concepts { + grid-template-columns: repeat(3, 1fr); + } + .version { + display: none; + } + .intro-copy { + max-width: 250px; + } + .toolbar { + gap: 10px; + } +} +@media (max-width: 600px) { + .mast { + padding: 15px; + } + .brand { + font-size: 20px; + } + .brand > span:last-child { + display: none; + } + .mast-end { + gap: 6px; + } + .mast-end button { + font-size: 12px; + } + main { + padding: 0 15px; + } + .intro { + padding-top: 28px; + display: block; + } + .intro-copy { + margin-top: 20px; + font-size: 13px; + max-width: none; + } + .concepts { + gap: 7px; + } + .concept-info { + font-size: 14px; + } + .concept-caption { + font-size: 11px; + } + .swatch { + height: 62px; + } + .toolbar { + padding: 12px; + } + .toolbar label { + flex: 1; + min-width: 75px; + } + .toolbar select { + max-width: 100%; + width: 100%; + } + .workspace { + padding: 10px; + } + .stage-meta { + padding: 12px; + align-items: center; + } + #current-desc { + display: none; + } + footer { + flex-wrap: wrap; + } + .workspace.comparing { + flex-direction: column; + } + .workspace.comparing .preview-pane { + min-width: 0; + width: 100%; + } + .stage-note { + line-height: 1.5; + } + .concept-caption { + min-height: 42px; + } +} diff --git a/playground/gallery.js b/playground/gallery.js new file mode 100644 index 0000000..bd07f54 --- /dev/null +++ b/playground/gallery.js @@ -0,0 +1,313 @@ +import { concepts, tokensFor, cssVars } from "../concepts/registry.js"; +const $ = (s) => document.querySelector(s); +const defaults = { + concept: "relay", + second: "ledger", + page: "dashboard", + theme: "light", + density: "normal", + size: "desktop", + locale: "ru", + compare: false, + accents: {}, +}; +let state = { ...defaults }; +try { + state = { + ...defaults, + ...JSON.parse(localStorage.getItem("anidev.lab") || "{}"), + }; +} catch {} +const strings = { + page: ["Экран", "Page"], + theme: ["Тема", "Theme"], + accent: ["Акцент", "Accent"], + density: ["Плотность", "Density"], + viewport: ["Размер", "Viewport"], + compare: ["Сравнить", "Compare"], + second: ["Вторая концепция", "Second concept"], + note: [ + "Демонстрационные данные · Изменения сохраняются только в этом браузере · Ctrl/⌘ K — команды", + "Demo data · Changes are stored in this browser only · Ctrl/⌘ K — commands", + ], + research: ["Исследование и решения", "Research & decisions"], + status: [ + "Концепции на рассмотрении — финальная не выбрана", + "Explorations in review — no final concept selected", + ], +}; +function render() { + const en = state.locale === "en"; + document.documentElement.lang = state.locale; + $("#concepts").innerHTML = concepts + .map( + (c, i) => + ``, + ) + .join(""); + $("#second").innerHTML = concepts + .map( + (c) => + ``, + ) + .join(""); + for (const key of ["page", "theme", "density"]) + $("#" + key).value = state[key]; + $("#compare").checked = state.compare; + $("#compare-label").hidden = !state.compare; + $("#pane-b").hidden = !state.compare; + $("#workspace").classList.toggle("comparing", state.compare); + $("#workspace").dataset.device = state.size; + const c = concepts.find((c) => c.id === state.concept); + $("#accent").value = state.accents[c.id] || c.accent; + $("#current-name").textContent = c.name; + $("#current-desc").textContent = en ? c.descEn : c.desc; + $("#heading-a").textContent = state.compare ? "A / " + c.name : ""; + $("#heading-b").textContent = + "B / " + concepts.find((c) => c.id === state.second).name; + $("#dimensions").textContent = { + desktop: en ? "Desktop / fluid" : "Desktop / по ширине", + tablet: "768 × 900", + mobile: "390 × 844", + }[state.size]; + document + .querySelectorAll("[data-size]") + .forEach((b) => + b.setAttribute("aria-pressed", b.dataset.size === state.size), + ); + document + .querySelectorAll("[data-i]") + .forEach((e) => (e.textContent = strings[e.dataset.i][en ? 1 : 0])); + $("#locale").textContent = en ? "RU" : "EN"; + $("#export").textContent = en ? "Export system" : "Экспорт системы"; + $("h1").innerHTML = en + ? "One product.
Six perspectives." + : "Один продукт.
Шесть точек зрения."; + $(".intro-copy").innerHTML = en + ? "Working interfaces for infrastructure.
Explore the character. Inspect the details.
You choose the final direction." + : "Рабочие интерфейсы для инфраструктуры.
Исследуйте характер, проверьте детали.
Финальное направление выбираете вы."; + const labels = en + ? [ + "Dashboard", + "Users", + "Settings", + "Authentication", + "Components", + "Tokens", + ] + : [ + "Dashboard", + "Пользователи", + "Настройки", + "Авторизация", + "Компоненты", + "Токены", + ]; + [...$("#page").options].forEach((o, i) => (o.text = labels[i])); + [...$("#theme").options].forEach( + (o, i) => (o.text = (en ? ["Light", "Dark"] : ["Светлая", "Тёмная"])[i]), + ); + [...$("#density").options].forEach( + (o, i) => + (o.text = ( + en + ? ["Normal", "Compact", "Relaxed"] + : ["Обычная", "Компактная", "Свободная"] + )[i]), + ); + for (const side of ["a", "b"]) { + if (side === "b" && !state.compare) continue; + const concept = side === "a" ? state.concept : state.second; + const params = new URLSearchParams({ + concept, + page: state.page, + theme: state.theme, + density: state.density, + locale: state.locale, + accent: + state.accents[concept] || concepts.find((c) => c.id === concept).accent, + }); + const src = "frame.html?" + params; + if ($("#preview-" + side).getAttribute("src") !== src) + $("#preview-" + side).src = src; + } + try { + localStorage.setItem("anidev.lab", JSON.stringify(state)); + } catch {} +} +$("#concepts").addEventListener("click", (e) => { + const b = e.target.closest("[data-concept]"); + if (b) { + state.concept = b.dataset.concept; + render(); + } +}); +for (const key of ["page", "theme", "density", "second"]) + $("#" + key).addEventListener("change", (e) => { + state[key] = e.target.value; + render(); + }); +$("#accent").addEventListener("change", (e) => { + state.accents[state.concept] = e.target.value; + render(); +}); +$("#compare").addEventListener("change", (e) => { + state.compare = e.target.checked; + render(); +}); +document.querySelectorAll("[data-size]").forEach( + (b) => + (b.onclick = () => { + state.size = b.dataset.size; + render(); + }), +); +$("#locale").onclick = () => { + state.locale = state.locale === "ru" ? "en" : "ru"; + render(); +}; +function notice(text) { + $("#notice").textContent = text; + $("#notice").style.display = "block"; + setTimeout(() => ($("#notice").style.display = "none"), 4500); +} +// Uncompressed ZIP, UTF-8 filenames, CRC32: no runtime or export dependency. +function zip(files) { + const enc = new TextEncoder(); + let offset = 0; + const chunks = [], + central = []; + const u16 = (v, n) => { + v.push(n & 255, (n >>> 8) & 255); + }, + u32 = (v, n) => { + u16(v, n); + u16(v, n >>> 16); + }; + for (const [name, content] of Object.entries(files)) { + const bytes = enc.encode(content), + nb = enc.encode(name); + let crc = -1; + for (const b of bytes) { + crc ^= b; + for (let k = 0; k < 8; k++) + crc = (crc >>> 1) ^ (crc & 1 ? 0xedb88320 : 0); + } + crc = (crc ^ -1) >>> 0; + const h = []; + u32(h, 0x04034b50); + u16(h, 20); + u16(h, 0x800); + u16(h, 0); + u16(h, 0); + u16(h, 0); + u32(h, crc); + u32(h, bytes.length); + u32(h, bytes.length); + u16(h, nb.length); + u16(h, 0); + h.push(...nb); + chunks.push(new Uint8Array(h), bytes); + const c = []; + u32(c, 0x02014b50); + u16(c, 20); + u16(c, 20); + u16(c, 0x800); + u16(c, 0); + u16(c, 0); + u16(c, 0); + u32(c, crc); + u32(c, bytes.length); + u32(c, bytes.length); + u16(c, nb.length); + u16(c, 0); + u16(c, 0); + u16(c, 0); + u16(c, 0); + u32(c, 0); + u32(c, offset); + c.push(...nb); + central.push(new Uint8Array(c)); + offset += h.length + bytes.length; + } + const size = central.reduce((n, c) => n + c.length, 0), + end = []; + u32(end, 0x06054b50); + u16(end, 0); + u16(end, 0); + u16(end, central.length); + u16(end, central.length); + u32(end, size); + u32(end, offset); + u16(end, 0); + return new Blob([...chunks, ...central, new Uint8Array(end)], { + type: "application/zip", + }); +} +$("#export").onclick = async () => { + const button = $("#export"); + button.disabled = true; + try { + const c = concepts.find((c) => c.id === state.concept), + accent = state.accents[c.id] || c.accent; + const files = {}; + const paths = [ + "components/system.css", + "concepts/registry.js", + "playground/frame.html", + "playground/frame.js", + "tokens/schema.json", + "components/CONTRACT.md", + "patterns/UX.md", + "layouts/README.md", + "DESIGN.md", + "ANTI-SLOP.md", + ]; + const fetched = await Promise.all( + paths.map(async (p) => { + const r = await fetch("../" + p); + if (!r.ok) throw Error(p); + return [p, await r.text()]; + }), + ); + for (const [p, t] of fetched) files[p] = t; + for (const theme of ["light", "dark"]) { + const tokens = tokensFor(c.id, theme, accent, state.density); + files[`tokens/${theme}.json`] = JSON.stringify(tokens, null, 2); + files[`tokens/${theme}.css`] = `:root {\n${cssVars(tokens)}\n}\n`; + } + files["selection.json"] = JSON.stringify( + { + version: "0.1.0", + status: "candidate-export", + concept: c.id, + accent, + density: state.density, + theme: state.theme, + locale: state.locale, + }, + null, + 2, + ); + files["index.html"] = + `Anidev ${c.name} + + diff --git a/prompts/compare.md b/prompts/compare.md new file mode 100644 index 0000000..ccfbd4d --- /dev/null +++ b/prompts/compare.md @@ -0,0 +1,5 @@ +# Как оценивать варианты + +Откройте одинаковый экран в двух концепциях. Оцените по отдельности: скорость поиска нужного действия; информационную плотность; узнаваемость Anidev; читаемость таблицы и русского текста; удобство mobile; пригодность для ежедневной работы. Затем поменяйте тему и откройте диалог приглашения. + +Пример обратной связи: «Выбираю Signal, но навигацию хочу как у Relay; акцент #…; плотность compact; заголовки оставить моноширинными». Это основание для согласования итоговой системы, не инструкция автоматически смешать все лучшие детали. diff --git a/references/QA.md b/references/QA.md new file mode 100644 index 0000000..0c486c3 --- /dev/null +++ b/references/QA.md @@ -0,0 +1,40 @@ +# Проверка галереи + +27.11.2026, Windows, настоящий Microsoft Edge через Playwright 1.65.1. Проверки воспроизводятся командой `npm test` при работающем сервере. Browser report формируется в `test-results/report.json`. + +## Автоматическая проверка + +**230 passed / 0 failed**, ошибок JavaScript не зафиксировано. + +- Матрица 6 концепций × 2 темы × 3 разрешения × 6 экранов: 216 комбинаций. Разрешения 1440×900, 768×1024, 390×844. Проверяется загрузка и отсутствие горизонтального переполнения документа. Для таблиц допустим локальный скролл. +- Dashboard, users, settings, auth, components, tokens. Диалог приглашения открыт/закрыт во всех 36 комбинациях concept/theme/viewport. +- Поиск, фильтр роли, сортировка, пагинация, empty state, приглашение и дубль email, редактирование доступа, массовый выбор и подтверждение блокировки. +- Сохранение настроек и повторная загрузка, стрелки вкладок, native валидация входа, demo sign-in, команды с клавиатуры, удержание фокуса в dialog и возврат к инициатору. +- Drawer, dropdown, tooltip, контекстное меню Shift+F10/стрелки/Enter, recovery ошибки. +- EN для каждого экрана каждой концепции: нет кириллицы в отображаемом UI. RU проверяется матрицей. +- Галерея: переключатели, comparison, фактическая mobile-ширина iframe, пользовательский акцент, экспорт. Mobile-меню всех концепций и compact/relaxed на настройках. +- ZIP: 17 файлов, CRC всех записей проверен Python zipfile; проверено наличие токенов обеих тем и необходимых CSS/JS/HTML. Распакованный экспорт открыт отдельно: экран Ledger и modal работают, ошибок JavaScript нет. + +`node scripts/check.mjs`: шесть разных layout-грамматик, 36 конфигураций токенов (6×2×3), контраст основного/вторичного текста, акцента и статусов не ниже 4.5:1 на обеих поверхностях; JSON/CSS сгенерированы. + +## Визуальная проверка + +Скриншоты снимаются настоящим браузером, не являются макетами. Обзорные изображения: + +- [Светлая, desktop](concepts-light-desktop.jpg) +- [Тёмная, desktop](concepts-dark-desktop.jpg) +- [Светлая, mobile](concepts-light-mobile.jpg) +- [Тёмная, mobile](concepts-dark-mobile.jpg) +- [Галерея](gallery.png) + +Сырые 67 screenshots хранятся локально в `test-results/screenshots/`; в Git включены только обзорные изображения. Для пересборки: `node scripts/contact-sheets.mjs` после browser suite. + +Во время QA исправлены Windows-пути и относительные URL сервера, контраст тёмного акцента, сохранённые значения Cancel, числовая альтернатива графику, описание tooltip, возврат фокуса, размер мобильных контролов, читаемость Dock-навигации и лишняя полоса закрытой mobile-навигации. Два промежуточных сбоя были неоднозначными селекторами тестов после добавления компонентов; финальная матрица прошла после исправлений. + +## Ограничения + +Это работающая локальная лаборатория и спецификация кандидатов, не готовый production backend. Реальные email, SSO/OAuth, API и telemetry не подключены. Skeleton/ошибки — управляемые демонстрации. Изменения хранятся в браузере. + +Тесты Edge не заменяют проверку Firefox/Safari, screen reader и контента реального проекта. Полный аудит WCAG не заявляется. Внешний Impeccable CLI не запущен: в клоне нет бинарника Windows, а первая загрузка engine из sandbox не удалась. Его рекомендациям не приписывается автоматический PASS; QA проведён собственными проверками и Playwright. Поиск UI/UX Pro Max реально выполнялся локально. + +Финальная концепция и устанавливаемый Skill ждут выбора пользователя. Внешняя публикация Sites не выполнялась: запрос был на локальное приложение и Git push. diff --git a/references/RESEARCH.md b/references/RESEARCH.md new file mode 100644 index 0000000..eddfcfa --- /dev/null +++ b/references/RESEARCH.md @@ -0,0 +1,44 @@ +# Исследование Anidev + +Проверено 27.11.2026. Репозитории реально клонированы; идентификаторы коммитов и даты сохранены в [repository-audit.json](repository-audit.json). Это снимок, а не обещание неизменности upstream. Внешние файлы находятся только в игнорируемой `.research/`, не входят в push и экспорт. + +## Инструменты + +| Источник | Архитектура и пригодность | Что используем совместно | Что исключаем | Лицензия / последний проверенный коммит | +|---|---|---|---|---| +| [Impeccable](https://github.com/pbakaus/impeccable) | Skill + специализированные playbooks, CLI, детерминированный engine. Различает рабочие и рекламные поверхности | Разделение Operate/Persuade, узкий critique → audit → harden → polish, проверка результата в браузере | Shader/overdrive не нужны рабочим панелям; не устанавливаем всю систему и её hooks как обязательную зависимость | Apache-2.0; `2fc5e1459e` от 26.11.2026 | +| [Taste Skill](https://github.com/Leonxlnx/taste-skill) | Skill, библиотека направлений, starter/assets, scripts/checker/finish gate, локальная установка ссылкой | Осознанное art direction, система до страниц, проверка настоящего UI и повторное использование Git checkout | Правило «секция на экран», обязательные hero entrances, фотографии и сценические эффекты не переносим в admin | MIT; `952435f63a` от 27.11.2026 | +| [UI/UX Pro Max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) | CSV knowledge base, Python/BM25-поиск по UX/стилям/цветам/графикам/стекам, генерация system + overrides + token exports | Поиск по задаче, доступность, адаптивность таблиц, семантические токены. Реально запущены запросы `data table accessibility keyboard pagination` и `latency monitoring time series` | Результат генератора — подсказка, не бренд Anidev. Не переносим случайную палитру или рекомендуемую библиотеку без причины | MIT; `11ca2b3bdd` от 27.11.2026 | +| [No Slop UI](https://github.com/LeoStehlik/no-slop-ui) | Небольшой skill, banned patterns, palette/stack recipes, checklist, проверочные примеры | Плотность, реальные рабочие сценарии, сдержанные эффекты, проверка каждого экрана | Предпочтение shadcn/Sonner не универсально; абсолютные запреты антиквы/плавающих панелей несовместимы с исследованием шести направлений | MIT; `c5f80190f0` от 22.11.2026 | +| [Anti AI Slop](https://github.com/muris11/anti-ai-slop) | Набор тематических skills, taxonomy P0–P6, core filter, installer | Проверка назначения каждого решения, сходства случайных defaults, ошибок UX и правдоподобия данных | Не грузим весь каталог и установочный wizard. Фильтр качества не задаёт визуальный язык | MIT; `5768372bf3` от 30.09.2026 | +| [Frontend Craft](https://github.com/nattergabriel/frontend-craft) | Один skill + foundations, craft checklist, каталог признаков; пути нового дизайна и исправления существующего | Изучен как аналитический источник: полезно различать отсутствие направления и непоследовательность реализации | Не распространяем текст, checklist, код или упаковку: явная лицензия в проверенном дереве не найдена | Лицензия не найдена; `c0e0cea524` от 16.07.2026 | + +У всех источников доступна история и рабочее дерево на дату проверки. Последние коммиты показывают особенно свежие изменения у первых четырёх; сентябрьский/июльский snapshot остальных не означает, что они непригодны, но их конкретные рекомендации нужно перепроверять. Популярность не использовалась как критерий качества. Проверенные пакеты: Impeccable 4.11.1, Taste 2.5.1, No Slop 0.8.0 по их файлам. API GitHub ограничил запросы, поэтому доказательная база — clone и commit, а не кэшированные числа звёзд. + +## Разрешение конфликтов + +| Конфликт | Решение Anidev | +|---|---| +| Taste требует сцен и движения, No Slop запрещает трансформации | Публичная презентация может иметь art direction; операционные экраны используют только обратную связь. В этой галерее нет декоративного движения | +| No Slop предпочитает sans; другие источники предлагают контрастные пары | Проверяем sans/serif/mono как разные кандидаты. Для длинного текста и форм сохраняем читаемость и кириллицу | +| Источники рекомендуют React/shadcn, задача требует независимости | Native HTML/CSS/JS и семантические токены; framework adapters позже | +| Одни списки банят приёмы, другие судят по назначению | Запреты брифа обязательны. Остальные техники оцениваем по продуктовой причине и результату в браузере | +| Несколько источников повторяют focus/contrast/mobile/empty state | Один компонентный контракт и один QA-проход, без дублирующих prompt-блоков | + +Рекомендуемый набор для будущего агента: утверждённый Anidev Skill как единственный источник визуального языка; UI/UX Pro Max по конкретному вопросу; Impeccable по конкретной области для critique/audit/harden; один краткий Anidev anti-slop checklist. Внешние системы необязательны для работы экспортированной системы. + +## Продуктовые ориентиры + +Это интерпретации публичных материалов и документации; закрытые аккаунты и приватные панели не исследовались. + +- [Linear](https://linear.app/features): приоритет рабочей области, компактный контекст и быстрые действия. Для Anidev — Relay, без копирования фирменной оболочки. +- [Vercel Geist](https://vercel.com/geist/introduction): контрастная система и связность компонентов. Для Anidev — роли цветов, строгие границы и обе темы. +- [Raycast](https://www.raycast.com/): клавиатурный доступ и поиск команд. Для Anidev — Ctrl/⌘K с поиском и навигацией стрелками. +- [GitHub Primer](https://primer.style/): отделение product UI от brand UI и общие основы доступности. Для Anidev — повторяемость таблиц, форм и управляемых состояний. +- [Stripe Dashboard docs](https://docs.stripe.com/dashboard/basics): навигация по ресурсам, фильтры, управление участниками и ролями. Для Anidev — одинаковый рабочий сценарий пользователей во всех концепциях. +- [Notion](https://www.notion.com/product): спокойная контентная иерархия. Для Anidev — возможность последовательного чтения и редакционный кандидат Ledger. +- [Cloudflare](https://developers.cloudflare.com/fundamentals/concepts/accounts-and-zones/): контексты account/zone; [настройки профиля](https://developers.cloudflare.com/fundamentals/user-profiles/customize-account/) объединяют язык и appearance; [клавиатурные команды](https://developers.cloudflare.com/changelog/post/2026-05-04-keyboard-shortcuts/) управляют навигацией и таблицами. Для Anidev — явный контекст пространства и сервиса, переключатели языка/темы и команды. Закрытый dashboard не проверялся. + +## Лицензионное решение + +Ни один upstream skill не включён в распространяемые файлы. Наш код и инструкции написаны для этой задачи. Если позже заимствуются MIT-файлы, сохранить copyright/permission notice; для Apache — LICENSE и применимые notices и указание изменений. Frontend Craft не копировать до получения разрешения/лицензии. Шрифты в текущей версии системные; файлы шрифтов не распространяются. Лицензию самой Anidev определяет владелец репозитория; open-source лицензию от его имени не назначаем. diff --git a/references/concepts-dark-desktop.jpg b/references/concepts-dark-desktop.jpg new file mode 100644 index 0000000..5d4dc7e Binary files /dev/null and b/references/concepts-dark-desktop.jpg differ diff --git a/references/concepts-dark-mobile.jpg b/references/concepts-dark-mobile.jpg new file mode 100644 index 0000000..2ed9e2f Binary files /dev/null and b/references/concepts-dark-mobile.jpg differ diff --git a/references/concepts-light-desktop.jpg b/references/concepts-light-desktop.jpg new file mode 100644 index 0000000..e8b481f Binary files /dev/null and b/references/concepts-light-desktop.jpg differ diff --git a/references/concepts-light-mobile.jpg b/references/concepts-light-mobile.jpg new file mode 100644 index 0000000..c7dcd13 Binary files /dev/null and b/references/concepts-light-mobile.jpg differ diff --git a/references/gallery.png b/references/gallery.png new file mode 100644 index 0000000..e2db6d5 Binary files /dev/null and b/references/gallery.png differ diff --git a/references/qa-summary.json b/references/qa-summary.json new file mode 100644 index 0000000..d52d206 --- /dev/null +++ b/references/qa-summary.json @@ -0,0 +1,17 @@ +{ + "date": "2026-11-27T15:35:52.822Z", + "browser": "158.0.4370.45", + "passed": 230, + "failed": 0, + "errors": [], + "matrix": "6 concepts x 2 themes x 3 viewports x 6 screens", + "screenshots": 67, + "standaloneExport": "passed", + "zipCRC": "passed", + "tokenConfigurations": 36, + "limitations": [ + "Edge only; not a full WCAG audit", + "No production backend or real OAuth", + "Final concept and installable Skill require user selection" + ] +} diff --git a/references/repository-audit.json b/references/repository-audit.json new file mode 100644 index 0000000..77fc819 --- /dev/null +++ b/references/repository-audit.json @@ -0,0 +1,50 @@ +[ + { + "repository": "https://github.com/muris11/anti-ai-slop.git", + "commit": "5768372bf3272c7d59c354cec3a16f5c39d036bc", + "commitDate": "2026-09-30T14:58:18+07:00", + "checked": "2026-11-27", + "licenseFile": "LICENSE", + "license": "MIT" + }, + { + "repository": "https://github.com/nattergabriel/frontend-craft.git", + "commit": "c0e0cea5244ed36a8c4b7b76c27dfc4e5dc01011", + "commitDate": "2026-07-16T16:20:39+02:00", + "checked": "2026-11-27", + "licenseFile": null, + "license": "No license found; do not redistribute" + }, + { + "repository": "https://github.com/pbakaus/impeccable.git", + "commit": "2fc5e1459efbbf06d92c7306517c286bf12490cf", + "commitDate": "2026-11-26T02:23:55+01:00", + "checked": "2026-11-27", + "licenseFile": "LICENSE", + "license": "Apache-2.0" + }, + { + "repository": "https://github.com/LeoStehlik/no-slop-ui.git", + "commit": "c5f80190f0a6cbd906b81d54e79e2756931077fb", + "commitDate": "2026-11-22T16:15:17+01:00", + "checked": "2026-11-27", + "licenseFile": "LICENSE", + "license": "MIT" + }, + { + "repository": "https://github.com/Leonxlnx/taste-skill.git", + "commit": "952435f63acece7d2fcb4b4d3c1786c1c43603e0", + "commitDate": "2026-11-27T00:58:09+01:00", + "checked": "2026-11-27", + "licenseFile": "LICENSE", + "license": "MIT" + }, + { + "repository": "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git", + "commit": "11ca2b3bdd555649f278ee348c32a9302b24dcf1", + "commitDate": "2026-11-27T14:07:41+07:00", + "checked": "2026-11-27", + "licenseFile": "LICENSE", + "license": "MIT" + } +] \ No newline at end of file diff --git a/scripts/check.mjs b/scripts/check.mjs new file mode 100644 index 0000000..e931181 --- /dev/null +++ b/scripts/check.mjs @@ -0,0 +1,58 @@ +import assert from "node:assert/strict"; +import { readFile, mkdir, writeFile } from "node:fs/promises"; +import { concepts, tokensFor, cssVars } from "../concepts/registry.js"; +assert.equal(concepts.length, 6); +assert.equal(new Set(concepts.map((c) => c.layout)).size, 6); +const luminance = (hex) => + hex + .match(/\w\w/g) + .map((x) => parseInt(x, 16) / 255) + .map((x) => (x <= 0.04045 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4)) + .reduce((s, v, i) => s + v * [0.2126, 0.7152, 0.0722][i], 0); +const contrast = (a, b) => { + const x = luminance(a), + y = luminance(b); + return (Math.max(x, y) + 0.05) / (Math.min(x, y) + 0.05); +}; +for (const c of concepts) + for (const theme of ["light", "dark"]) + for (const density of ["compact", "normal", "relaxed"]) { + const t = tokensFor(c.id, theme, undefined, density); + for (const bg of ["color.bg", "color.surface"]) + for (const fg of [ + "color.text", + "color.muted", + "color.danger", + "color.success", + "color.accent", + ]) + assert.ok( + contrast(t[fg], t[bg]) >= 4.5, + `${c.id}/${theme}/${fg} contrast ${contrast(t[fg], t[bg])}`, + ); + assert.ok(contrast(t["color.accent"], t["color.on-accent"]) >= 4.5); + } +for (const c of concepts) + for (const theme of ["light", "dark"]) { + const tokens = tokensFor(c.id, theme); + await mkdir(`tokens/${c.id}`, { recursive: true }); + await writeFile( + `tokens/${c.id}/${theme}.json`, + JSON.stringify(tokens, null, 2) + "\n", + ); + await writeFile( + `tokens/${c.id}/${theme}.css`, + `:root {\n${cssVars(tokens)}\n}\n`, + ); + } +for (const file of [ + "playground/index.html", + "playground/frame.html", + "components/system.css", + "playground/frame.js", + "playground/gallery.js", +]) + assert.ok((await readFile(file, "utf8")).length > 100); +console.log( + "PASS: six layout grammars, 36 token sets, default text contrast, generated CSS/JSON.", +); diff --git a/scripts/contact-sheets.mjs b/scripts/contact-sheets.mjs new file mode 100644 index 0000000..efb5e85 --- /dev/null +++ b/scripts/contact-sheets.mjs @@ -0,0 +1,35 @@ +import { chromium } from "playwright"; +const base = process.env.BASE_URL || "http://127.0.0.1:4173"; +const browser = await chromium.launch({ + executablePath: + process.env.PLAYWRIGHT_EXECUTABLE_PATH || + (process.platform === "win32" + ? "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" + : undefined), + headless: true, +}); +try { + const page = await browser.newPage(); + for (const device of ["desktop", "mobile"]) + for (const theme of ["light", "dark"]) { + const width = device === "desktop" ? 640 : 300, + height = device === "desktop" ? 570 : 780; + await page.setViewportSize({ + width: width * 3, + height: (height + 35) * 2, + }); + await page.setContent( + `${["relay", "ledger", "signal", "axis", "dock", "grid"].map((c) => `
${c.toUpperCase()} / ${theme} / ${device}
`).join("")}`, + ); + await page + .locator("img") + .evaluateAll((imgs) => Promise.all(imgs.map((i) => i.decode()))); + await page.screenshot({ + path: `references/concepts-${theme}-${device}.jpg`, + type: "jpeg", + quality: 90, + }); + } +} finally { + await browser.close(); +} diff --git a/scripts/serve.mjs b/scripts/serve.mjs new file mode 100644 index 0000000..0dfe24e --- /dev/null +++ b/scripts/serve.mjs @@ -0,0 +1,44 @@ +import http from "node:http"; +import { readFile } from "node:fs/promises"; +import { fileURLToPath } from "node:url"; +import path from "node:path"; +const root = path.resolve(fileURLToPath(new URL("../", import.meta.url))); +const types = { + ".html": "text/html; charset=utf-8", + ".css": "text/css; charset=utf-8", + ".js": "text/javascript; charset=utf-8", + ".json": "application/json; charset=utf-8", + ".svg": "image/svg+xml", + ".md": "text/plain; charset=utf-8", +}; +const port = Number(process.env.PORT || 4173); +http + .createServer(async (req, res) => { + try { + const pathname = decodeURIComponent( + new URL(req.url, "http://localhost").pathname, + ); + if (pathname === "/") { + res.writeHead(302, { Location: "/playground/" }); + res.end(); + return; + } + const file = path.resolve( + root, + "." + (pathname.endsWith("/") ? pathname + "index.html" : pathname), + ); + if (!file.startsWith(root + path.sep)) throw Error(); + const data = await readFile(file); + res.writeHead(200, { + "Content-Type": types[path.extname(file)] || "application/octet-stream", + "Cache-Control": "no-store", + }); + res.end(data); + } catch { + res.writeHead(404); + res.end("Not found"); + } + }) + .listen(port, "127.0.0.1", () => + console.log(`Anidev Design System: http://127.0.0.1:${port}`), + ); diff --git a/tests/browser.mjs b/tests/browser.mjs new file mode 100644 index 0000000..82c401f --- /dev/null +++ b/tests/browser.mjs @@ -0,0 +1,329 @@ +import { chromium } from "playwright"; +import assert from "node:assert/strict"; +import { mkdir, writeFile } from "node:fs/promises"; +import { concepts } from "../concepts/registry.js"; +const base = process.env.BASE_URL || "http://127.0.0.1:4173"; +const executablePath = + process.env.PLAYWRIGHT_EXECUTABLE_PATH || + (process.platform === "win32" + ? "C:/Program Files (x86)/Microsoft/Edge/Application/msedge.exe" + : undefined); +const browser = await chromium.launch({ executablePath, headless: true }); +const context = await browser.newContext({ acceptDownloads: true }); +const page = await context.newPage(); +page.setDefaultTimeout(8000); +const errors = [], + failures = [], + cases = []; +page.on("pageerror", (e) => errors.push(e.message)); +await mkdir("test-results/screenshots", { recursive: true }); +const url = (c, p = "dashboard", theme = "light", locale = "ru") => + `${base}/playground/frame.html?${new URLSearchParams({ concept: c, page: p, theme, locale })}`; +async function check(name, fn) { + try { + await fn(); + cases.push({ name, status: "pass" }); + } catch (e) { + failures.push({ name, error: e.message }); + console.log("FAIL", name, e.message); + } +} +try { + await check("HTTP root and gallery", async () => { + const r = await page.goto(base); + assert.equal(r.status(), 200); + await page.locator("#concepts button").first().waitFor(); + assert.equal(await page.locator("#concepts button").count(), 6); + await page.frameLocator("#preview-a").locator("h1").waitFor(); + await page.screenshot({ path: "references/gallery.png", fullPage: true }); + }); + for (const c of concepts) + for (const theme of ["light", "dark"]) + for (const [device, width, height] of [ + ["desktop", 1440, 900], + ["tablet", 768, 1024], + ["mobile", 390, 844], + ]) { + await page.setViewportSize({ width, height }); + for (const p of [ + "dashboard", + "users", + "settings", + "auth", + "components", + "tokens", + ]) { + await check(`${c.id}/${theme}/${device}/${p}`, async () => { + await page.goto(url(c.id, p, theme)); + await page.locator("h1").waitFor(); + const overflow = await page.evaluate(() => ({ + scroll: document.documentElement.scrollWidth, + client: document.documentElement.clientWidth, + })); + assert.ok( + overflow.scroll <= overflow.client + 1, + JSON.stringify(overflow), + ); + if ( + p === "dashboard" || + (device === "desktop" && + theme === "light" && + ["users", "settings", "auth"].includes(p)) + ) + await page.screenshot({ + path: `test-results/screenshots/${c.id}-${theme}-${device}-${p}.png`, + fullPage: true, + }); + if (p === "dashboard") { + await page.locator("[data-action=invite]").first().click(); + assert.ok(await page.locator("#dialog").evaluate((d) => d.open)); + if (device === "desktop") + await page.screenshot({ + path: `test-results/screenshots/${c.id}-${theme}-modal.png`, + }); + await page.keyboard.press("Escape"); + assert.equal( + await page.locator("#dialog").evaluate((d) => d.open), + false, + ); + } + }); + } + } + await page.setViewportSize({ width: 1280, height: 900 }); + await check( + "User search, filter, pagination, sorting, empty state", + async () => { + await page.goto(url("relay", "users")); + await page.locator("#user-search").fill("anna"); + assert.equal(await page.locator("tbody tr").count(), 1); + await page.locator("#user-search").fill("no-such-person"); + await page.locator("[data-action=clear-filters]").click(); + await page.locator("[data-action=next]").click(); + assert.equal(await page.locator("tbody tr").count(), 3); + await page.locator("#role-filter").selectOption("admin"); + assert.equal(await page.locator("tbody tr").count(), 2); + await page.locator("[data-sort=name]").click(); + await page.locator("[data-action=reset-users]").click(); + }, + ); + await check("Invite validation, creation, duplicate detection", async () => { + await page.locator("[data-action=invite]:visible").click(); + await page.locator("#invite-form input[name=name]").fill("Test Member"); + await page + .locator("#invite-form input[name=email]") + .fill("test@example.com"); + await page.locator("#invite-form button[type=submit]").click(); + await page.locator("#user-search").fill("test@example.com"); + assert.equal(await page.locator("tbody tr").count(), 1); + await page.locator("[data-action=invite]:visible").click(); + await page.locator("#invite-form input[name=name]").fill("Duplicate"); + await page + .locator("#invite-form input[name=email]") + .fill("test@example.com"); + await page.locator("#invite-form button[type=submit]").click(); + assert.ok(await page.locator("#invite-error").innerText()); + await page.keyboard.press("Escape"); + }); + await check("Edit, selection and confirmed bulk suspension", async () => { + await page.locator("[data-edit]").first().click(); + await page.locator("#edit-user select[name=role]").selectOption("admin"); + await page.locator("#edit-user button[type=submit]").click(); + await page.locator("[data-select]").first().check(); + await page.locator("[data-action=bulk-suspend]").click(); + await page.locator("[data-action=confirm-suspend]").click(); + assert.match(await page.locator("tbody").innerText(), /Заблокирован/); + await page.locator("[data-action=reset-users]").click(); + }); + await check("Settings persistence and keyboard tabs", async () => { + await page.goto(url("grid", "settings")); + await page.locator("input[name=name]").fill("Anidev Test"); + await page.locator("#settings-form button[type=submit]").click(); + await page.reload(); + assert.equal( + await page.locator("input[name=name]").inputValue(), + "Anidev Test", + ); + await page.locator("#tab-general").focus(); + await page.keyboard.press("ArrowRight"); + assert.equal( + await page.locator("#tab-security").getAttribute("aria-selected"), + "true", + ); + await page.locator("#mfa").uncheck(); + await page.locator("#settings-form button[type=submit]").click(); + await page.reload(); + await page.locator("#tab-security").click(); + assert.equal(await page.locator("#mfa").isChecked(), false); + }); + await check("Auth native validation and demo sign in", async () => { + await page.goto(url("axis", "auth")); + await page.locator("input[name=email]").fill("test@example.com"); + await page.locator("input[name=password]").fill("short"); + await page.locator("#auth-form button[type=submit]").click(); + assert.equal(await page.locator("#auth-form").count(), 1); + await page.locator("input[name=password]").fill("long-password"); + await page.locator("#auth-form button[type=submit]").click(); + await page.locator(".health-line").waitFor(); + }); + await check("Command palette keyboard and modal focus trap", async () => { + await page.keyboard.press("Control+k"); + await page.locator("#command-search").fill("Пользователи"); + await page.keyboard.press("Enter"); + await page.locator("#user-search").waitFor(); + await page.locator("[data-action=invite]:visible").click(); + for (let i = 0; i < 12; i++) await page.keyboard.press("Tab"); + assert.equal( + await page.evaluate(() => document.activeElement.closest("dialog")?.id), + "dialog", + ); + await page.keyboard.press("Escape"); + assert.equal( + await page + .locator("[data-action=invite]:visible") + .evaluate((e) => e === document.activeElement), + true, + ); + }); + await check( + "Drawer, dropdown, tooltip, context menu and recovery states", + async () => { + await page.goto(url("dock", "components")); + await page.locator("[data-action=drawer]").click(); + assert.match( + await page.locator("#dialog").getAttribute("class"), + /drawer/, + ); + await page.keyboard.press("Escape"); + await page.locator("details:not(.chart-data) > summary").click(); + await page.locator("[data-action=rename]").click(); + await page.keyboard.press("Escape"); + await page.locator(".tooltip-wrap button").focus(); + assert.equal(await page.locator(".tooltip").isVisible(), true); + await page.locator(".context-target").focus(); + await page.keyboard.press("Shift+F10"); + await page.locator(".context-menu").waitFor(); + await page.keyboard.press("ArrowDown"); + await page.keyboard.press("Enter"); + await page.locator("dialog.drawer").waitFor(); + await page.keyboard.press("Escape"); + await page.locator("[data-action=retry]").click(); + assert.match( + await page.locator(".error-state").innerText(), + /Журнал загружен/, + ); + }, + ); + await check("EN localization for each screen and concept", async () => { + for (const c of concepts) + for (const p of [ + "dashboard", + "users", + "settings", + "auth", + "components", + "tokens", + ]) { + await page.goto(url(c.id, p, "dark", "en")); + await page.locator("h1").waitFor(); + assert.equal(await page.locator("html").getAttribute("lang"), "en"); + const text = await page.locator("body").innerText(); + assert.equal( + /[А-Яа-яЁё]/.test(text), + false, + `${c.id}/${p}: Russian text in EN`, + ); + } + }); + await check( + "Gallery controls, comparison and actual mobile viewport", + async () => { + await page.goto(base); + await page.locator("[data-concept=ledger]").click(); + await page.locator("#theme").selectOption("dark"); + await page.locator("#density").selectOption("compact"); + await page.locator("#page").selectOption("users"); + await page.locator("[data-size=mobile]").click(); + await page.locator("#compare").check(); + await page.locator("#second").selectOption("signal"); + await page.frameLocator("#preview-b").locator("#user-search").waitFor(); + assert.equal( + await page + .frameLocator("#preview-a") + .locator("body") + .getAttribute("data-concept"), + "ledger", + ); + assert.ok( + await page.locator("#preview-a").evaluate((e) => e.clientWidth <= 390), + ); + await page.locator("#accent").fill("#ffcc00"); + await page.locator("#accent").dispatchEvent("change"); + await page.frameLocator("#preview-a").locator("h1").waitFor(); + }, + ); + await check("Mobile navigation and density variants", async () => { + await page.setViewportSize({ width: 390, height: 844 }); + for (const c of concepts) { + await page.goto(url(c.id)); + await page.locator("[data-action=mobile-menu]").click(); + await page.locator(".nav-links [data-page=users]").click(); + await page.locator("#user-search").waitFor(); + for (const density of ["compact", "relaxed"]) { + await page.goto(url(c.id, "settings") + "&density=" + density); + await page.locator("h1").waitFor(); + assert.ok( + await page.evaluate( + () => document.documentElement.scrollWidth <= innerWidth + 1, + ), + ); + } + } + await page.setViewportSize({ width: 1280, height: 900 }); + await page.goto(base); + await page.locator("[data-concept=ledger]").click(); + }); + await check("Export archive download", async () => { + const download = page.waitForEvent("download"); + await page.locator("#export").click(); + const d = await download; + await d.saveAs("test-results/anidev-export.zip"); + assert.match(d.suggestedFilename(), /anidev-ledger.zip/); + }); + await check("Gallery mobile overflow", async () => { + await page.setViewportSize({ width: 390, height: 844 }); + await page.goto(base); + await page.locator("#concepts button").first().waitFor(); + assert.ok( + await page.evaluate( + () => document.documentElement.scrollWidth <= innerWidth + 1, + ), + ); + await page.screenshot({ + path: "test-results/screenshots/gallery-mobile.png", + fullPage: true, + }); + }); + await check("No runtime errors", async () => assert.deepEqual(errors, [])); +} finally { + await writeFile( + "test-results/report.json", + JSON.stringify( + { + date: new Date().toISOString(), + browser: await browser.version(), + passed: cases.length, + failed: failures.length, + cases, + failures, + errors, + }, + null, + 2, + ), + ); + await context.close(); + await browser.close(); +} +console.log(`Browser QA: ${cases.length} passed, ${failures.length} failed`); +if (failures.length) process.exitCode = 1; diff --git a/tokens/axis/dark.css b/tokens/axis/dark.css new file mode 100644 index 0000000..90e21b6 --- /dev/null +++ b/tokens/axis/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #141c28; +--color-surface: #1b2738; +--color-text: #e6edf8; +--color-muted: #a6bad6; +--color-border: #3b4f6c; +--color-accent: #7195be; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 7px; +--font-body: "Segoe UI", Arial, sans-serif; +--font-heading: "Segoe UI", Arial, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/axis/dark.json b/tokens/axis/dark.json new file mode 100644 index 0000000..4b171ae --- /dev/null +++ b/tokens/axis/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#141c28", + "color.surface": "#1b2738", + "color.text": "#e6edf8", + "color.muted": "#a6bad6", + "color.border": "#3b4f6c", + "color.accent": "#7195be", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "7px", + "font.body": "\"Segoe UI\", Arial, sans-serif", + "font.heading": "\"Segoe UI\", Arial, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "horizontal" +} diff --git a/tokens/axis/light.css b/tokens/axis/light.css new file mode 100644 index 0000000..3322a5c --- /dev/null +++ b/tokens/axis/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #f0f4fa; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #c8d7ed; +--color-accent: #285e9d; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 7px; +--font-body: "Segoe UI", Arial, sans-serif; +--font-heading: "Segoe UI", Arial, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/axis/light.json b/tokens/axis/light.json new file mode 100644 index 0000000..4087686 --- /dev/null +++ b/tokens/axis/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#f0f4fa", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#c8d7ed", + "color.accent": "#285e9d", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "7px", + "font.body": "\"Segoe UI\", Arial, sans-serif", + "font.heading": "\"Segoe UI\", Arial, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "horizontal" +} diff --git a/tokens/dock/dark.css b/tokens/dock/dark.css new file mode 100644 index 0000000..539dcce --- /dev/null +++ b/tokens/dock/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #211e1a; +--color-surface: #2d2821; +--color-text: #f1e7d9; +--color-muted: #c7b6a0; +--color-border: #5a4d3c; +--color-accent: #a58b70; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 12px; +--font-body: "Trebuchet MS", Arial, sans-serif; +--font-heading: "Trebuchet MS", Arial, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/dock/dark.json b/tokens/dock/dark.json new file mode 100644 index 0000000..dc72ace --- /dev/null +++ b/tokens/dock/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#211e1a", + "color.surface": "#2d2821", + "color.text": "#f1e7d9", + "color.muted": "#c7b6a0", + "color.border": "#5a4d3c", + "color.accent": "#a58b70", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "12px", + "font.body": "\"Trebuchet MS\", Arial, sans-serif", + "font.heading": "\"Trebuchet MS\", Arial, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "rail" +} diff --git a/tokens/dock/light.css b/tokens/dock/light.css new file mode 100644 index 0000000..2ad5e13 --- /dev/null +++ b/tokens/dock/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #f3f0eb; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #d5cbbb; +--color-accent: #765027; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 12px; +--font-body: "Trebuchet MS", Arial, sans-serif; +--font-heading: "Trebuchet MS", Arial, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/dock/light.json b/tokens/dock/light.json new file mode 100644 index 0000000..c95deb6 --- /dev/null +++ b/tokens/dock/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#f3f0eb", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#d5cbbb", + "color.accent": "#765027", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "12px", + "font.body": "\"Trebuchet MS\", Arial, sans-serif", + "font.heading": "\"Trebuchet MS\", Arial, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "rail" +} diff --git a/tokens/grid/dark.css b/tokens/grid/dark.css new file mode 100644 index 0000000..96f711e --- /dev/null +++ b/tokens/grid/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #191a18; +--color-surface: #252622; +--color-text: #f1f1e7; +--color-muted: #b8bcaf; +--color-border: #53574a; +--color-accent: #c37d6d; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 0px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Arial, Helvetica, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/grid/dark.json b/tokens/grid/dark.json new file mode 100644 index 0000000..8c5cd42 --- /dev/null +++ b/tokens/grid/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#191a18", + "color.surface": "#252622", + "color.text": "#f1f1e7", + "color.muted": "#b8bcaf", + "color.border": "#53574a", + "color.accent": "#c37d6d", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "0px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Arial, Helvetica, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "grid" +} diff --git a/tokens/grid/light.css b/tokens/grid/light.css new file mode 100644 index 0000000..8ee1cb0 --- /dev/null +++ b/tokens/grid/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #f6f5f1; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #bfbfb1; +--color-accent: #a53b21; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 0px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Arial, Helvetica, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/grid/light.json b/tokens/grid/light.json new file mode 100644 index 0000000..4bc1af3 --- /dev/null +++ b/tokens/grid/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#f6f5f1", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#bfbfb1", + "color.accent": "#a53b21", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "0px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Arial, Helvetica, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "grid" +} diff --git a/tokens/ledger/dark.css b/tokens/ledger/dark.css new file mode 100644 index 0000000..2f9da1d --- /dev/null +++ b/tokens/ledger/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #211e1a; +--color-surface: #2b2721; +--color-text: #efe5d6; +--color-muted: #c1b6a6; +--color-border: #584e41; +--color-accent: #bd7e6e; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 0px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Georgia, "Times New Roman", serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/ledger/dark.json b/tokens/ledger/dark.json new file mode 100644 index 0000000..643b631 --- /dev/null +++ b/tokens/ledger/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#211e1a", + "color.surface": "#2b2721", + "color.text": "#efe5d6", + "color.muted": "#c1b6a6", + "color.border": "#584e41", + "color.accent": "#bd7e6e", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "0px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Georgia, \"Times New Roman\", serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "editorial" +} diff --git a/tokens/ledger/light.css b/tokens/ledger/light.css new file mode 100644 index 0000000..64c8cc7 --- /dev/null +++ b/tokens/ledger/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #f5f0e7; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #c9bca7; +--color-accent: #9b3c25; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 0px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Georgia, "Times New Roman", serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/ledger/light.json b/tokens/ledger/light.json new file mode 100644 index 0000000..7ba6542 --- /dev/null +++ b/tokens/ledger/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#f5f0e7", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#c9bca7", + "color.accent": "#9b3c25", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "0px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Georgia, \"Times New Roman\", serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "editorial" +} diff --git a/tokens/relay/dark.css b/tokens/relay/dark.css new file mode 100644 index 0000000..c5bff34 --- /dev/null +++ b/tokens/relay/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #151c19; +--color-surface: #1b2520; +--color-text: #e4ece7; +--color-muted: #aabcb1; +--color-border: #3c4e42; +--color-accent: #689283; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 5px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Arial, Helvetica, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/relay/dark.json b/tokens/relay/dark.json new file mode 100644 index 0000000..d094088 --- /dev/null +++ b/tokens/relay/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#151c19", + "color.surface": "#1b2520", + "color.text": "#e4ece7", + "color.muted": "#aabcb1", + "color.border": "#3c4e42", + "color.accent": "#689283", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "5px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Arial, Helvetica, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "sidebar" +} diff --git a/tokens/relay/light.css b/tokens/relay/light.css new file mode 100644 index 0000000..d005070 --- /dev/null +++ b/tokens/relay/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #f6f8f6; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #ccd8cf; +--color-accent: #27634c; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 5px; +--font-body: Arial, Helvetica, sans-serif; +--font-heading: Arial, Helvetica, sans-serif; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/relay/light.json b/tokens/relay/light.json new file mode 100644 index 0000000..024defd --- /dev/null +++ b/tokens/relay/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#f6f8f6", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#ccd8cf", + "color.accent": "#27634c", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "5px", + "font.body": "Arial, Helvetica, sans-serif", + "font.heading": "Arial, Helvetica, sans-serif", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "sidebar" +} diff --git a/tokens/schema.json b/tokens/schema.json new file mode 100644 index 0000000..08baafe --- /dev/null +++ b/tokens/schema.json @@ -0,0 +1 @@ +{"$schema":"https://json-schema.org/draft/2020-12/schema","title":"Anidev semantic token map v0.1","type":"object","required":["color.bg","color.surface","color.text","color.muted","color.border","color.accent","color.on-accent","radius.control","font.body","font.heading","space.unit","size.control","layout.kind"],"additionalProperties":{"type":"string"},"description":"Flat framework-independent token map. CSS names replace dots with hyphens. This is a project format, not a claim of DTCG compliance."} diff --git a/tokens/signal/dark.css b/tokens/signal/dark.css new file mode 100644 index 0000000..af66879 --- /dev/null +++ b/tokens/signal/dark.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #101a13; +--color-surface: #16231a; +--color-text: #d4e8d9; +--color-muted: #a4bfa9; +--color-border: #36533e; +--color-accent: #579574; +--color-on-accent: #101810; +--color-danger: #ffafa5; +--color-success: #a2d3ab; +--radius-control: 0px; +--font-body: Consolas, "Courier New", monospace; +--font-heading: Consolas, "Courier New", monospace; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/signal/dark.json b/tokens/signal/dark.json new file mode 100644 index 0000000..da272b6 --- /dev/null +++ b/tokens/signal/dark.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#101a13", + "color.surface": "#16231a", + "color.text": "#d4e8d9", + "color.muted": "#a4bfa9", + "color.border": "#36533e", + "color.accent": "#579574", + "color.on-accent": "#101810", + "color.danger": "#ffafa5", + "color.success": "#a2d3ab", + "radius.control": "0px", + "font.body": "Consolas, \"Courier New\", monospace", + "font.heading": "Consolas, \"Courier New\", monospace", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "terminal" +} diff --git a/tokens/signal/light.css b/tokens/signal/light.css new file mode 100644 index 0000000..e45e281 --- /dev/null +++ b/tokens/signal/light.css @@ -0,0 +1,19 @@ +:root { +--color-bg: #eaf0e9; +--color-surface: #ffffff; +--color-text: #202622; +--color-muted: #59635e; +--color-border: #b6cbbb; +--color-accent: #26754b; +--color-on-accent: #ffffff; +--color-danger: #a22923; +--color-success: #26623b; +--radius-control: 0px; +--font-body: Consolas, "Courier New", monospace; +--font-heading: Consolas, "Courier New", monospace; +--space-unit: 4px; +--space-section: 26px; +--size-control: 40px; +--space-cell: 13px; +--motion-duration: 120ms; +} diff --git a/tokens/signal/light.json b/tokens/signal/light.json new file mode 100644 index 0000000..e2b35f9 --- /dev/null +++ b/tokens/signal/light.json @@ -0,0 +1,20 @@ +{ + "color.bg": "#eaf0e9", + "color.surface": "#ffffff", + "color.text": "#202622", + "color.muted": "#59635e", + "color.border": "#b6cbbb", + "color.accent": "#26754b", + "color.on-accent": "#ffffff", + "color.danger": "#a22923", + "color.success": "#26623b", + "radius.control": "0px", + "font.body": "Consolas, \"Courier New\", monospace", + "font.heading": "Consolas, \"Courier New\", monospace", + "space.unit": "4px", + "space.section": "26px", + "size.control": "40px", + "space.cell": "13px", + "motion.duration": "120ms", + "layout.kind": "terminal" +}