Keep approved Dock and add row feedback with stable themed scrollbars
This commit is contained in:
1 parent
c41a5e4276
commit
645afe3ebf
101 files changed
+580
-1348
No files matched your search
+2
-4
@@ -1,5 +1,3 @@
|
||||
# Кандидатные направления
|
||||
# Утверждённый дизайн
|
||||
|
||||
Имена, назначение, композиция, шрифт и палитры: `registry.js`. Описание различий: `../DESIGN.md`. Одни и те же экраны: `../playground/frame.js`.
|
||||
|
||||
Порядок Relay / Ledger / Signal / Axis / Dock / Grid — порядок просмотра, не рекомендация. Финальная концепция не выбрана.
|
||||
registry.js содержит только Dock, утверждённый 30.11.2026. Старые URL и настройки с другими именами используют Dock. История исследования — в Git и references/RESEARCH.md, без переключателя альтернатив в продукте.
|
||||
+11
-93
@@ -1,64 +1,4 @@
|
||||
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",
|
||||
@@ -78,32 +18,12 @@ export const concepts = [
|
||||
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: ["#111f26", "#192c34", "#e3f2f3", "#a5bec5", "#3b535c"],
|
||||
grid: ["#191a18", "#252622", "#f1f1e7", "#b8bcaf", "#53574a"],
|
||||
};
|
||||
const p = palettes[c.id];
|
||||
let selected = accent || (dark ? c.darkAccent || c.accent : c.accent);
|
||||
@@ -118,7 +38,13 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
|
||||
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, c.surface || "#ffffff"];
|
||||
const rowHover = dark ? "#27434b" : "#dcebed";
|
||||
const rowActive = dark ? "#2b4a53" : "#cde3e5";
|
||||
const backgrounds = [
|
||||
...(dark ? [p[0], p[1]] : [c.bg, c.surface || "#ffffff"]),
|
||||
rowHover,
|
||||
rowActive,
|
||||
];
|
||||
for (
|
||||
let i = 0;
|
||||
i < 100 && backgrounds.some((bg) => contrast(selected, bg) < 4.5);
|
||||
@@ -153,22 +79,14 @@ export function tokensFor(id, theme = "light", accent, density = "normal") {
|
||||
"color.on-accent": on,
|
||||
"color.danger": dark ? "#ffafa5" : "#a22923",
|
||||
"color.success": dark ? "#a2d3ab" : "#26623b",
|
||||
"color.row-hover": rowHover,
|
||||
"color.row-active": rowActive,
|
||||
"radius.control": c.radius,
|
||||
"font.body": c.id === "ledger" ? "Arial, Helvetica, sans-serif" : c.font,
|
||||
"font.body": c.font,
|
||||
"font.heading": c.font,
|
||||
"space.unit": "4px",
|
||||
"space.section":
|
||||
c.id === "dock"
|
||||
? density === "compact"
|
||||
? "14px"
|
||||
: density === "relaxed"
|
||||
? "28px"
|
||||
: "20px"
|
||||
: density === "compact"
|
||||
? "18px"
|
||||
: density === "relaxed"
|
||||
? "36px"
|
||||
: "26px",
|
||||
density === "compact" ? "14px" : density === "relaxed" ? "28px" : "20px",
|
||||
"size.control":
|
||||
density === "compact" ? "34px" : density === "relaxed" ? "46px" : "40px",
|
||||
"space.cell":
|
||||
|
||||
Reference in new issue
Block a user