/* 共有UIパーツ */ function Stars({ n, max = 5 }) { return ( {Array.from({ length: max }).map((_, i) => ( ))} ); } function Placeholder({ tag, className = "", style = {}, note }) { return (
{tag} {note ? <>
{note} : null}
); } /* 画像があれば 、無ければプレースホルダー */ function Media({ imgKey, src, tag, note, className = "", style = {}, contain = false, position }) { const url = src || (window.SAKE_IMG && window.SAKE_IMG[imgKey]); if (!url) return ; return (
{tag}
); } /* 味のタイプ 3軸 */ const AXIS_DEFS = [ { key: "sweet", l: "甘口", r: "辛口" }, { key: "body", l: "淡麗", r: "濃醇" }, { key: "mature", l: "華やか", r: "熟成" }, ]; function TasteAxes({ axes }) { return (
{AXIS_DEFS.map((d) => (
{d.l} {d.r}
))}
); } /* 小さな線アイコン(墨/藍の線画・自前SVGは単純図形のみ) */ function Icon({ name }) { const s = { width: 22, height: 22, fill: "none", stroke: "currentColor", strokeWidth: 1.6, strokeLinecap: "round", strokeLinejoin: "round" }; switch (name) { case "budget": return (); case "taste": return (); case "scene": return (); case "arrow": return (); case "check": return (); case "down": return (); case "ext": return (); default: return null; } } Object.assign(window, { Stars, Placeholder, Media, TasteAxes, Icon, AXIS_DEFS });