// Caret landing — primitives: Icon (Lucide), KeyCap, KeyCombo, Eyebrow, Alias
const { useState, useEffect, useRef } = React;
function pascal(n){ return n.replace(/(^|-)([a-z])/g,(_,__,c)=>c.toUpperCase()); }
function Icon({ name, size = 22, stroke = 2, color = 'currentColor', style, fill = 'none' }) {
const entry = window.lucide && window.lucide.icons && window.lucide.icons[pascal(name)];
// lucide 0.4xx: entry = ["svg", attrs, [ [tag, attrs], ... ]]
const children = (Array.isArray(entry) && Array.isArray(entry[2])) ? entry[2] : [];
return (
);
}
// A single physical key. dark = use the HUD (dark surface) variant.
function Key({ children, dark, lg }) {
const cls = (dark ? 'kbd-d' : 'kbd') + (lg ? ' kbd-lg' : '');
return {children};
}
// A combo like ⌥ + Space rendered as separate caps.
function Combo({ keys, dark, lg, sep = false }) {
return (
{keys.map((k, i) => (