2026-11-16 06:37:59 +00:00
|
|
|
|
import { ANGLES, ASPECTS, POINTS, SIGNS, dms, orbText, pointName, signName } from "@/lib/astro";
|
2026-11-15 21:00:50 +00:00
|
|
|
|
import type { Chart, Position } from "@/lib/types";
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** 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 && (
|
|
|
|
|
|
<div className="table-wrap">
|
|
|
|
|
|
<h3 style={{ marginBottom: 8 }}>Fényszögek</h3>
|
|
|
|
|
|
<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>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</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>
|
|
|
|
|
|
)}
|
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>
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|