Files
Jyotisha/frontend/src/lib/chart-view-varga.ts
T
Jesse_ChenandClaude Opus 5.5 ae18952e51
Independent Staging Quality Gate / validate (push) Successful in 15m27s
Independent Staging Quality Gate / publish (push) Successful in 3m42s
fix(report,chart): blank columns — drop Kranti, split Ashtakavarga house SAV, ascendant nakshatra, engine varga dignity, no duplicate charts (BUG-1199..1203)
- 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
2026-10-03 09:11:15 +08:00

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;
}