Apply neo-kinpaku design system and improve live picker UX

Restyle the live picker to match the site kinpaku kit, persist pick mode
in localStorage, fix DESIGN.md color swatches in the parser, and land the
neo-kinpaku site refresh with new tokens, assets, palette script, and
detector rules.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Paul Bakaus
2026-05-27 10:24:25 -07:00
co-authored by Cursor
parent d32cd832fb
commit 7648af0095
267 changed files with 35621 additions and 5865 deletions
+14 -3
View File
@@ -2,23 +2,35 @@
// `behavior: 'instant'` explicitly overrides any CSS `scroll-behavior: smooth`
// from a stylesheet we don't own; `behavior: 'auto'` would defer to CSS.
export function initAnchorScroll() {
const getAnchorOffset = () => {
const header = document.querySelector('[data-site-header]');
return (header?.getBoundingClientRect().height || 0) + 28;
};
document.querySelectorAll('a[href^="#"]').forEach((anchor) => {
anchor.addEventListener("click", (e) => {
e.preventDefault();
const target = document.querySelector(anchor.getAttribute("href"));
if (target) {
const offset = 40;
const offset = getAnchorOffset();
const targetPosition = target.getBoundingClientRect().top + window.scrollY - offset;
window.scrollTo({ top: targetPosition, behavior: 'instant' });
}
});
});
return getAnchorOffset;
}
export function initHashTracking() {
const sections = document.querySelectorAll('section[id]');
if (!sections.length) return;
const getAnchorOffset = () => {
const header = document.querySelector('[data-site-header]');
return (header?.getBoundingClientRect().height || 0) + 28;
};
let currentHash = window.location.hash.slice(1) || '';
let ticking = false;
@@ -88,7 +100,7 @@ export function initHashTracking() {
currentHash = hash;
let clicked = false;
const jump = () => {
const offset = 40;
const offset = getAnchorOffset();
const targetPosition = target.getBoundingClientRect().top + window.scrollY - offset;
window.scrollTo({ top: targetPosition, behavior: 'instant' });
if (!clicked && hash.startsWith('cmd-') && target.classList.contains('manual-entry')) {
@@ -104,4 +116,3 @@ export function initHashTracking() {
// No hash — don't set one on initial load
}
}