/** * 紫微宫位详查:在已排好的命盘上聚焦一宫,列出本宫星曜与自化、空宫借对宫、 * 三方四正、夹宫、宫干四化飞出与飞入来源;指定运限层次时叠加运限宫与运限四化。 * 只陈述盘面事实,不下吉凶结论。 */ import type { ZiweiInput, ZiweiOutput } from './types.js'; export declare const ZIWEI_PALACE_RULE_VERSION = "ziwei-palace-2026.10"; /** 对外宫名;「仆役」作为「交友」的别名接受 */ export declare const ZIWEI_PALACE_NAMES: readonly ["命宫", "兄弟", "夫妻", "子女", "财帛", "疾厄", "迁移", "交友", "官禄", "田宅", "福德", "父母"]; export declare const ZIWEI_PALACE_SCOPES: readonly ["natal", "decadal", "yearly", "monthly", "daily", "hourly"]; export type ZiweiPalaceScope = typeof ZIWEI_PALACE_SCOPES[number]; export declare const ZIWEI_SCOPE_LABELS: Record; export interface ZiweiPalaceSelector { /** 宫名;非本命层次时指该运限的宫名 */ palace: string; scope?: ZiweiPalaceScope; /** 运限目标日期 YYYY-MM-DD(非本命层次必填) */ targetDate?: string; /** 流时时辰序号 0–12(流时层次必填) */ targetTimeIndex?: number; } export type ZiweiStarGroup = '主星及四化' | '辅星' | '杂曜'; export interface ZiweiPalaceStarFact { palace: string; name: string; group: ZiweiStarGroup; brightness?: string; mutagen?: string; selfMutagen?: string; oppositeMutagen?: string; } export interface ZiweiPalaceFact { name: string; index: number; stem: string; branch: string; isBodyPalace: boolean; isOriginalPalace: boolean; stars: ZiweiPalaceStarFact[]; } export interface ZiweiMutagenFlight { mutagen: string; star: string; fromPalace: string; fromStem: string; /** 星曜所在的本命宫位;星不在盘上时为 null */ toPalace: string | null; } export interface ZiweiFlankPattern { name: string; stars: [{ palace: string; star: string; }, { palace: string; star: string; }]; } export interface ZiweiPalaceOverlay { scope: ZiweiPalaceScope; label: string; stem: string; branch: string; /** 所查的运限宫名 */ scopePalace: string; /** 运限宫落入的本命宫位 */ natalPalace: string; /** 运限命宫落入的本命宫位 */ soulInNatal?: string; targetDate: string; targetTimeIndex?: number; mutagens: Array<{ mutagen: string; star: string; natalPalace: string | null; scopePalace: string | null; }>; } export interface ZiweiPalaceOutput { query: { palace: string; scope: ZiweiPalaceScope; targetDate?: string; targetTimeIndex?: number; }; palace: ZiweiPalaceFact; borrowed?: { from: ZiweiPalaceFact; stars: ZiweiPalaceStarFact[]; }; sanFang: Array<{ role: '本宫' | '三合' | '对宫'; palace: ZiweiPalaceFact; }>; flanks: { palaces: [ZiweiPalaceFact, ZiweiPalaceFact]; patterns: ZiweiFlankPattern[]; }; fliesOut: ZiweiMutagenFlight[]; fliesIn: ZiweiMutagenFlight[]; overlay?: ZiweiPalaceOverlay; calculationOptions: Record & { ruleVersion: string; }; } export declare function deriveZiweiPalace(chart: ZiweiOutput, selector: ZiweiPalaceSelector, baseInput: ZiweiInput): ZiweiPalaceOutput; //# sourceMappingURL=palace.d.ts.map