2026-11-16 06:37:59 +00:00
|
|
|
|
import { ANGLES, ASPECTS, POINTS, SIGNS, dms, orbText, pointName, signName } from "@/lib/astro";
|
2026-11-17 07:11:16 +00:00
|
|
|
|
import type { Aspect, Chart, Position } from "@/lib/types";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
function Pos({ p }: { p: Position }) {
|
|
|
|
|
|
return (
|
|
|
|
|
|
<>
|
|
|
|
|
|
{dms(p.degree_in_sign_dms)} <span className="sym">{SIGNS[p.sign]?.glyph}</span> {signName(p.sign)}
|
|
|
|
|
|
</>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-16 06:37:59 +00:00
|
|
|
|
/** Sun, Moon and Ascendant signs. */
|
|
|
|
|
|
export function BigThree({ chart }: { chart: Chart }) {
|
|
|
|
|
|
const result = chart.chart;
|
|
|
|
|
|
const timeKnown = chart.highlights.time_known;
|
|
|
|
|
|
const sun = result.points.find((p) => p.id === "sun");
|
|
|
|
|
|
const moon = result.points.find((p) => p.id === "moon");
|
|
|
|
|
|
const asc = result.angles?.ascendant;
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className="big3">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span className="muted">Nap</span>
|
|
|
|
|
|
<span className="glyph sym">{SIGNS[chart.highlights.sun ?? ""]?.glyph}</span>
|
|
|
|
|
|
<strong>{signName(chart.highlights.sun)}</strong>
|
|
|
|
|
|
{sun && <span className="muted num">{dms(sun.degree_in_sign_dms)}</span>}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span className="muted">Hold{!timeKnown && " (közelítő)"}</span>
|
|
|
|
|
|
<span className="glyph sym">{SIGNS[chart.highlights.moon ?? ""]?.glyph}</span>
|
|
|
|
|
|
<strong>{signName(chart.highlights.moon)}</strong>
|
|
|
|
|
|
{moon && <span className="muted num">{dms(moon.degree_in_sign_dms)}</span>}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span className="muted">Aszcendens</span>
|
|
|
|
|
|
{timeKnown ? (
|
|
|
|
|
|
<>
|
|
|
|
|
|
<span className="glyph sym">{SIGNS[chart.highlights.ascendant ?? ""]?.glyph}</span>
|
|
|
|
|
|
<strong>{signName(chart.highlights.ascendant)}</strong>
|
|
|
|
|
|
{typeof asc === "object" && asc && <span className="muted num">{dms(asc.degree_in_sign_dms)}</span>}
|
|
|
|
|
|
</>
|
|
|
|
|
|
) : (
|
|
|
|
|
|
<strong className="muted">–</strong>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-17 07:11:16 +00:00
|
|
|
|
// Rows and columns of the aspect grid: the points drawn on the wheel, then the angles.
|
|
|
|
|
|
const GRID_POINTS = [
|
|
|
|
|
|
"sun",
|
|
|
|
|
|
"moon",
|
|
|
|
|
|
"mercury",
|
|
|
|
|
|
"venus",
|
|
|
|
|
|
"mars",
|
|
|
|
|
|
"jupiter",
|
|
|
|
|
|
"saturn",
|
|
|
|
|
|
"uranus",
|
|
|
|
|
|
"neptune",
|
|
|
|
|
|
"pluto",
|
|
|
|
|
|
"north_node",
|
|
|
|
|
|
"lilith",
|
|
|
|
|
|
"chiron",
|
|
|
|
|
|
];
|
|
|
|
|
|
const GRID_ANGLES: [string, string][] = [
|
|
|
|
|
|
["ascendant", "AC"],
|
|
|
|
|
|
["midheaven", "MC"],
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
/** The usual triangular aspect grid: only the aspect symbols, the values are in the details below. */
|
|
|
|
|
|
function AspectGrid({ chart }: { chart: Chart }) {
|
|
|
|
|
|
const result = chart.chart;
|
|
|
|
|
|
const present = new Set(result.points.map((p) => p.id));
|
|
|
|
|
|
const rows: [string, string][] = GRID_POINTS.filter((id) => present.has(id)).map((id) => [
|
|
|
|
|
|
id,
|
|
|
|
|
|
POINTS[id]?.glyph ?? id,
|
|
|
|
|
|
]);
|
|
|
|
|
|
if (chart.highlights.time_known) {
|
|
|
|
|
|
for (const [key, label] of GRID_ANGLES) if (result.angles?.[key]) rows.push([key, label]);
|
|
|
|
|
|
}
|
|
|
|
|
|
const byPair = new Map<string, Aspect>();
|
|
|
|
|
|
for (const a of result.aspects ?? []) {
|
|
|
|
|
|
byPair.set(`${a.point1}|${a.point2}`, a);
|
|
|
|
|
|
byPair.set(`${a.point2}|${a.point1}`, a);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className="aspect-grid-wrap">
|
|
|
|
|
|
<table className="aspect-grid" aria-label="Fényszögmátrix">
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{rows.map(([id, label], i) => (
|
|
|
|
|
|
<tr key={id}>
|
|
|
|
|
|
{rows.slice(0, i).map(([other]) => {
|
|
|
|
|
|
const a = byPair.get(`${id}|${other}`);
|
|
|
|
|
|
const info = a ? ASPECTS[a.aspect] : undefined;
|
|
|
|
|
|
const text = a ? `${pointName(other)} ${info?.hu ?? a.aspect} ${pointName(id)}` : undefined;
|
|
|
|
|
|
return (
|
|
|
|
|
|
<td key={other} title={text}>
|
|
|
|
|
|
{a && (
|
|
|
|
|
|
<span className={`sym asp asp-${a.aspect}`} aria-label={text} role="img">
|
|
|
|
|
|
{info?.glyph ?? "?"}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</td>
|
|
|
|
|
|
);
|
|
|
|
|
|
})}
|
|
|
|
|
|
<th scope="row" title={pointName(id)}>
|
|
|
|
|
|
<span className={label.length > 2 ? "sym" : "grid-angle"} aria-label={pointName(id)} role="img">
|
|
|
|
|
|
{label}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</th>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-11-16 06:37:59 +00:00
|
|
|
|
/** Positions, angles, house cusps and aspects of a natal chart. */
|
2026-11-15 21:00:50 +00:00
|
|
|
|
export function ChartTables({ chart }: { chart: Chart }) {
|
|
|
|
|
|
const result = chart.chart;
|
|
|
|
|
|
const timeKnown = chart.highlights.time_known;
|
2026-11-16 06:37:59 +00:00
|
|
|
|
const angles = ANGLES.map(([key, label]) => [label, result.angles?.[key]] as const).filter(
|
2026-11-15 21:00:50 +00:00
|
|
|
|
(a): a is readonly [string, Position] => typeof a[1] === "object" && a[1] !== null,
|
|
|
|
|
|
);
|
|
|
|
|
|
const fortune = result.lots?.fortune;
|
2026-11-16 06:37:59 +00:00
|
|
|
|
const aspects = [...(result.aspects ?? [])].sort((a, b) => a.orb - b.orb);
|
2026-11-15 21:00:50 +00:00
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
<div className="field" style={{ gap: 24 }}>
|
|
|
|
|
|
<div className="grid-2" style={{ alignItems: "start" }}>
|
|
|
|
|
|
<div className="table-wrap">
|
|
|
|
|
|
<h3 style={{ marginBottom: 8 }}>Bolygók és pontok</h3>
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th scope="col">Pont</th>
|
|
|
|
|
|
<th scope="col">Pozíció</th>
|
|
|
|
|
|
{timeKnown && <th scope="col">Ház</th>}
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{result.points.map((p) => (
|
|
|
|
|
|
<tr key={p.id}>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span className="sym" aria-hidden="true">
|
|
|
|
|
|
{POINTS[p.id]?.glyph}
|
|
|
|
|
|
</span>{" "}
|
|
|
|
|
|
{POINTS[p.id]?.hu ?? p.id}
|
|
|
|
|
|
{p.retrograde && (
|
|
|
|
|
|
<abbr className="retro" title="retrográd">
|
|
|
|
|
|
R
|
|
|
|
|
|
</abbr>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td className="num">
|
|
|
|
|
|
<Pos p={p} />
|
|
|
|
|
|
</td>
|
|
|
|
|
|
{timeKnown && <td className="num">{p.house ? `${p.house}.` : "–"}</td>}
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
))}
|
|
|
|
|
|
{timeKnown && fortune && (
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<td>Szerencsepont</td>
|
|
|
|
|
|
<td className="num">
|
|
|
|
|
|
<Pos p={fortune} />
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td className="num">{fortune.house ? `${fortune.house}.` : "–"}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
{timeKnown && (
|
|
|
|
|
|
<div className="field" style={{ gap: 24 }}>
|
|
|
|
|
|
<div className="table-wrap">
|
|
|
|
|
|
<h3 style={{ marginBottom: 8 }}>Tengelyek</h3>
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{angles.map(([label, p]) => (
|
|
|
|
|
|
<tr key={label}>
|
|
|
|
|
|
<td>{label}</td>
|
|
|
|
|
|
<td className="num">
|
|
|
|
|
|
<Pos p={p} />
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
{result.houses && (
|
|
|
|
|
|
<div className="table-wrap">
|
|
|
|
|
|
<h3 style={{ marginBottom: 8 }}>Házcsúcsok (Placidus)</h3>
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{result.houses.cusps.map((c) => (
|
|
|
|
|
|
<tr key={c.house}>
|
|
|
|
|
|
<td>{c.house}. ház</td>
|
|
|
|
|
|
<td className="num">
|
|
|
|
|
|
<Pos p={c} />
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
))}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
2026-11-16 06:37:59 +00:00
|
|
|
|
{aspects.length > 0 && (
|
2026-11-17 07:11:16 +00:00
|
|
|
|
<div className="field" style={{ gap: 12 }}>
|
|
|
|
|
|
<h3>Fényszögek</h3>
|
|
|
|
|
|
<AspectGrid chart={chart} />
|
|
|
|
|
|
<details className="details">
|
|
|
|
|
|
<summary>Részletek: orbisz, közeledő vagy távolodó</summary>
|
|
|
|
|
|
<div className="table-wrap">
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
<th scope="col">Fényszög</th>
|
|
|
|
|
|
<th scope="col">Orbisz</th>
|
|
|
|
|
|
<th scope="col">
|
|
|
|
|
|
<span className="sr-only">Közeledő vagy távolodó</span>
|
|
|
|
|
|
</th>
|
2026-11-16 06:37:59 +00:00
|
|
|
|
</tr>
|
2026-11-17 07:11:16 +00:00
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
{aspects.map((a) => {
|
|
|
|
|
|
const info = ASPECTS[a.aspect];
|
|
|
|
|
|
return (
|
|
|
|
|
|
<tr key={`${a.point1}-${a.point2}-${a.aspect}`}>
|
|
|
|
|
|
<td>
|
|
|
|
|
|
<span className="sym" aria-hidden="true">
|
|
|
|
|
|
{POINTS[a.point1]?.glyph}
|
|
|
|
|
|
</span>{" "}
|
|
|
|
|
|
{pointName(a.point1)}{" "}
|
|
|
|
|
|
<span className={`aspect-tag aspect-${info?.kind ?? "neutral"}`}>
|
|
|
|
|
|
<span className="sym" aria-hidden="true">
|
|
|
|
|
|
{info?.glyph}
|
|
|
|
|
|
</span>{" "}
|
|
|
|
|
|
{info?.hu ?? a.aspect}
|
|
|
|
|
|
</span>{" "}
|
|
|
|
|
|
<span className="sym" aria-hidden="true">
|
|
|
|
|
|
{POINTS[a.point2]?.glyph}
|
|
|
|
|
|
</span>{" "}
|
|
|
|
|
|
{pointName(a.point2)}
|
|
|
|
|
|
</td>
|
|
|
|
|
|
<td className="num">{orbText(a.orb)}</td>
|
|
|
|
|
|
<td className="muted" style={{ fontSize: 13 }}>
|
|
|
|
|
|
{a.applying === true ? "közeledő" : a.applying === false ? "távolodó" : ""}
|
|
|
|
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
);
|
|
|
|
|
|
})}
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</details>
|
2026-11-16 06:37:59 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
)}
|
2026-11-15 21:00:50 +00:00
|
|
|
|
{!timeKnown && (
|
|
|
|
|
|
<p className="hint">
|
|
|
|
|
|
Születési idő nélkül a házak, a tengelyek és az Aszcendens nem számolhatók; a Hold helyzete a nap folyamán akár
|
|
|
|
|
|
jegyet is válthat, ezért közelítő.
|
|
|
|
|
|
</p>
|
|
|
|
|
|
)}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|