- Report p33 table: no Kranti column (no producer; materials.kranti stays blocked). - Report p53 table: the "SAV" column was the with-Lagna total (386). Split in the reader into SAV / Lagna BAV / SAV + Lagna with a totals row; ashtakavarga.py is untouched (frozen rectification identity, ERR-115). - /api/chart ascendant carries nakshatra / pada / lord (_nakshatra_fields shared with the nine bodies); chart cache schema 4 -> 5. - /api/varga_full bodies carry dignity_level from varga_dignity_level, the function the Vimsopaka path now shares (A/B identical); the chart page shows the D1 status wording and no longer derives a three-level dignity itself. - Report page draws each chart once: the trailing block skips charts the body already fenced (same rule as the export); the birth-time caveat moves under the body's chart heading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017eEAG8HD3mm8gsKXgk8uU8
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import tables from "./vedic-chart-tables.json";
|
|
|
|
/**
|
|
* The engine's dignity levels (`jyotish_engine._get_dignity_level`). A
|
|
* divisional row carries the level `/api/varga_full` computed with
|
|
* `varga_dignity_level`, the Vimsopaka function; the page never recomputes it.
|
|
*/
|
|
export const VARGA_DIGNITY_LEVELS = [
|
|
"EXALTED",
|
|
"MOOLATRIKONA",
|
|
"OWN_SIGN",
|
|
"GREAT_FRIEND",
|
|
"FRIEND",
|
|
"NEUTRAL",
|
|
"ENEMY",
|
|
"GREAT_ENEMY",
|
|
"DEBILITATED",
|
|
"NEECHA_BHANGA",
|
|
] as const;
|
|
|
|
export type VargaDignity = (typeof VARGA_DIGNITY_LEVELS)[number];
|
|
|
|
const VARGA_MEANING: Readonly<Record<string, string>> = tables.vargaMeaning;
|
|
|
|
/** Same wording as the D1 "状态" column (`jyotish_engine.DIGNITY_LABELS`). */
|
|
export const VARGA_DIGNITY_LABEL: Readonly<Record<VargaDignity, string>> = tables.dignityLabels;
|
|
|
|
export function vargaDignityLevel(value: unknown): VargaDignity | null {
|
|
return typeof value === "string" && (VARGA_DIGNITY_LEVELS as readonly string[]).includes(value)
|
|
? value as VargaDignity
|
|
: null;
|
|
}
|
|
|
|
/** The engine's own one-line use of a D-number chart (`VargaType.meaning`). */
|
|
export function vargaMeaning(division: number): string | null {
|
|
return VARGA_MEANING[String(division)] ?? null;
|
|
}
|