@zodiacs/engine 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.md +1020 -0
  2. package/LICENSING.md +168 -27
  3. package/NOTICE +78 -12
  4. package/README.md +288 -44
  5. package/dist/{api-WbxJ4Wj-.d.ts → api-ChL1N2Sr.d.ts} +33 -2
  6. package/dist/{ayanamsa--YQ46fET.d.ts → ayanamsa-ClFzkKmV.d.ts} +2 -1
  7. package/dist/calc.d.ts +90 -4
  8. package/dist/calc.js +360 -126
  9. package/dist/chunk-2PZYJQV5.js +83 -0
  10. package/dist/{chunk-7TRLIFFI.js → chunk-4XOYTBLS.js} +1 -1
  11. package/dist/chunk-767FTO7O.js +48 -0
  12. package/dist/{chunk-YIITY7Q7.js → chunk-7Y2F2IWN.js} +19 -17
  13. package/dist/{chunk-OG4OYTJJ.js → chunk-B4M2Y7FT.js} +1 -129
  14. package/dist/{chunk-PFGUCNOK.js → chunk-BMDASNPB.js} +6 -6
  15. package/dist/chunk-I3L4POY7.js +18 -0
  16. package/dist/{chunk-CHSYDKBL.js → chunk-LNGURVNH.js} +3 -3
  17. package/dist/{chunk-DMGHYCDI.js → chunk-NNOSOOWS.js} +1 -1
  18. package/dist/chunk-OVXQQEXL.js +41 -0
  19. package/dist/{chunk-SRXBTP5H.js → chunk-QLIEEICB.js} +201 -190
  20. package/dist/chunk-RMBWKZI2.js +130 -0
  21. package/dist/{chunk-FTX3JDJA.js → chunk-TZVPZHZM.js} +42 -23
  22. package/dist/{chunk-WS3TDSP3.js → chunk-WBTWY2OB.js} +7 -3
  23. package/dist/chunk-Y4E3WJU5.js +87 -0
  24. package/dist/chunk-YPU3MDNI.js +852 -0
  25. package/dist/conventions.d.ts +70 -0
  26. package/dist/conventions.js +26 -0
  27. package/dist/crossings.d.ts +15 -4
  28. package/dist/de440-pack.d.ts +43 -0
  29. package/dist/de440-pack.js +16 -0
  30. package/dist/de440.d.ts +113 -0
  31. package/dist/de440.js +19 -0
  32. package/dist/ephemeris-exTSqBgb.d.ts +60 -0
  33. package/dist/geo.d.ts +16 -4
  34. package/dist/geo.js +2 -2
  35. package/dist/{houses-CFERsAlK.d.ts → houses-Bh7GCnPi.d.ts} +3 -3
  36. package/dist/houses-extra.d.ts +5 -4
  37. package/dist/index.d.ts +8 -6
  38. package/dist/index.js +40 -28
  39. package/dist/{internal-math-DJJ8BYex.d.ts → internal-math-CxenuGfm.d.ts} +2 -2
  40. package/dist/internal-math.d.ts +4 -3
  41. package/dist/internal-math.js +14 -12
  42. package/dist/internal.d.ts +16 -7
  43. package/dist/internal.js +25 -4
  44. package/dist/lite-composite.js +114 -0
  45. package/dist/lite-declinations.js +253 -0
  46. package/dist/lite-dignities.js +333 -0
  47. package/dist/lite-sect.js +72 -0
  48. package/dist/lite.d.ts +82 -0
  49. package/dist/lite.js +4 -0
  50. package/dist/receipt.d.ts +3 -2
  51. package/dist/receipt.js +143 -65
  52. package/dist/{rulers-Dla6h_Sm.d.ts → rulers-CSSWtiWF.d.ts} +1 -1
  53. package/dist/sky.d.ts +4 -3
  54. package/dist/sky.js +17 -10
  55. package/dist/techniques.d.ts +102 -6
  56. package/dist/techniques.js +131 -56
  57. package/dist/time-bands-CZA9AlLg.d.ts +36 -0
  58. package/dist/time-scale-DIFNa0gz.d.ts +47 -0
  59. package/dist/time.d.ts +81 -0
  60. package/dist/time.js +74 -0
  61. package/dist/timing.d.ts +6 -5
  62. package/dist/timing.js +24 -17
  63. package/dist/types-DpPdtXgO.d.ts +335 -0
  64. package/dist/vedic.d.ts +112 -4
  65. package/dist/vedic.js +369 -14
  66. package/dist/window.d.ts +22 -2
  67. package/dist/window.js +86 -28
  68. package/dist/{zone-history-ghdyO0Sc.d.ts → zone-history-BxmDCcTK.d.ts} +32 -10
  69. package/package.json +24 -3
  70. package/dist/types-B-yb_tGL.d.ts +0 -240
package/dist/timing.js CHANGED
@@ -1,15 +1,12 @@
1
- import {
2
- CHALDEAN_ORDER,
3
- TRADITIONAL_RULERS
4
- } from "./chunk-A3U2ZS2W.js";
5
- import {
6
- readOptions
7
- } from "./chunk-47ERTK5X.js";
8
1
  import {
9
2
  PROGRESSION_DAYS_PER_YEAR,
10
3
  progressedBodies,
11
4
  progressedInstant
12
- } from "./chunk-CHSYDKBL.js";
5
+ } from "./chunk-LNGURVNH.js";
6
+ import {
7
+ CHALDEAN_ORDER,
8
+ TRADITIONAL_RULERS
9
+ } from "./chunk-A3U2ZS2W.js";
13
10
  import {
14
11
  chartDeclinations,
15
12
  chartPoints,
@@ -17,27 +14,36 @@ import {
17
14
  resolvedChart,
18
15
  searchLongitudeCrossings,
19
16
  utcOf
20
- } from "./chunk-FTX3JDJA.js";
17
+ } from "./chunk-TZVPZHZM.js";
18
+ import {
19
+ readOptions
20
+ } from "./chunk-47ERTK5X.js";
21
+ import {
22
+ bodyLongitude,
23
+ fallbacksAt
24
+ } from "./chunk-QLIEEICB.js";
21
25
  import {
22
26
  dateFrom
23
27
  } from "./chunk-CPALRSPC.js";
24
- import "./chunk-TSS2SZWQ.js";
25
- import "./chunk-PFGUCNOK.js";
26
- import {
27
- bodyLongitude
28
- } from "./chunk-SRXBTP5H.js";
28
+ import "./chunk-B4M2Y7FT.js";
29
+ import "./chunk-2PZYJQV5.js";
29
30
  import {
30
31
  outsideReferenceSpan
31
32
  } from "./chunk-B5LKF437.js";
32
- import "./chunk-BHJXUY67.js";
33
- import "./chunk-DMGHYCDI.js";
33
+ import "./chunk-TSS2SZWQ.js";
34
+ import "./chunk-767FTO7O.js";
35
+ import "./chunk-YPU3MDNI.js";
36
+ import "./chunk-Y4E3WJU5.js";
37
+ import "./chunk-NNOSOOWS.js";
34
38
  import {
35
39
  SIGN_SLUGS,
36
40
  degreeInSign,
37
41
  normalizeLongitude,
38
42
  signForLongitude,
39
43
  signIndexForLongitude
40
- } from "./chunk-OG4OYTJJ.js";
44
+ } from "./chunk-RMBWKZI2.js";
45
+ import "./chunk-BHJXUY67.js";
46
+ import "./chunk-BMDASNPB.js";
41
47
 
42
48
  // src/timing/shared.ts
43
49
  var DAY_MS = 864e5;
@@ -100,6 +106,7 @@ function timingFlags(instants, sectContradicted) {
100
106
  flags.push("outside-reference-span");
101
107
  }
102
108
  if (sectContradicted) flags.push("sect-contradicts-altitude");
109
+ flags.push(...fallbacksAt(instants));
103
110
  return Object.freeze(flags);
104
111
  }
105
112
  function chartLongitudes(chart, points) {
@@ -0,0 +1,335 @@
1
+ import { DeltaT } from './deltat.js';
2
+ import { a as TimeScaleName, T as TimeScale } from './time-scale-DIFNa0gz.js';
3
+
4
+ /** Public, serializable vocabulary shared by the chart APIs. */
5
+
6
+ type DateInput = Date | string | number;
7
+ type ZodiacSign = "aries" | "taurus" | "gemini" | "cancer" | "leo" | "virgo" | "libra" | "scorpio" | "sagittarius" | "capricorn" | "aquarius" | "pisces";
8
+ type Element = "fire" | "earth" | "air" | "water";
9
+ type Modality = "cardinal" | "fixed" | "mutable";
10
+ type Polarity = "day" | "night";
11
+ type HouseNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
12
+ interface SignDefinition {
13
+ readonly slug: ZodiacSign;
14
+ readonly name: string;
15
+ readonly element: Element;
16
+ readonly modality: Modality;
17
+ readonly polarity: Polarity;
18
+ readonly naturalHouse: HouseNumber;
19
+ }
20
+ type BodyName = "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto" | "North Node" | "South Node";
21
+ /** A body whose apparent place a position source gives; the nodes come from its `trueNode`. */
22
+ type SourceBody = Exclude<BodyName, "North Node" | "South Node">;
23
+ /**
24
+ * Where the engine takes body positions from instead of astronomy-engine,
25
+ * inside `withEphemeris`: for example the source `@zodiacs/engine/de440`
26
+ * opens. `place` gives a body's apparent geocentric longitude in [0, 360)
27
+ * and latitude, degrees, on the true ecliptic and equinox of date, at
28
+ * `ttDays`, TT days past J2000.0; `trueNode` the longitude of the Moon's true
29
+ * node there. `ephemeris` is what a receipt names. Either may throw for an
30
+ * instant the source does not cover.
31
+ */
32
+ interface PositionSource {
33
+ readonly ephemeris: {
34
+ readonly name: string;
35
+ readonly version: string;
36
+ };
37
+ /**
38
+ * `dist`, where a source gives it: the distance along the light path, au. The shipped DE440 pack's source gives it,
39
+ * and from 1.1.0-rc.12 `behindDisc`: whether the body is behind the Sun's disc, where its reduction bends no light
40
+ * and so its place steps at the limb. A source that gives `behindDisc` takes `behind`, when given, as that decision
41
+ * instead of making it at `ttDays`; the engine passes a speed's middle instant's decision to its two samples.
42
+ */
43
+ place(body: SourceBody, ttDays: number, behind?: boolean): {
44
+ lon: number;
45
+ lat: number;
46
+ dist?: number;
47
+ behindDisc?: boolean;
48
+ };
49
+ trueNode(ttDays: number): number;
50
+ /**
51
+ * Optional: the instants in [fromTtDays, toTtDays], ascending, at which a
52
+ * place or the node may step by more than rounding (a DE440 pack's record
53
+ * boundaries). A source without it is taken to be smooth.
54
+ */
55
+ steps?(fromTtDays: number, toTtDays: number): number[];
56
+ }
57
+ type HouseSystem = "whole" | "placidus" | "porphyry" | "equal" | "equal-mc" | "vehlow" | "koch" | "regiomontanus" | "campanus" | "topocentric" | "alcabitius" | "morinus" | "meridian";
58
+ /** `"delta-t-extrapolated"`: a result that moves with a ΔT extrapolated past the IERS table (docs/time.md). */
59
+ type ChartFlag = "dst-gap" | "dst-fold" | "lmt" | "no-time" | "polar-fallback" | "outside-reference-span" | "delta-t-extrapolated" | EphemerisFallback;
60
+ /**
61
+ * Why a result that would have come from the shipped DE440 pack, the default
62
+ * source, came from astronomy-engine instead; the result carries it as a flag
63
+ * and names astronomy-engine as its ephemeris, so the fallback is never
64
+ * silent. `"de440-unavailable"`: the pack could not be opened, because its
65
+ * bytes are missing, are not the sealed pack's (their SHA-256 differs) or
66
+ * cannot be decoded; `defaultEphemeris().de440.error` says which.
67
+ * `"outside-de440-span"`: an instant the result was computed at is outside
68
+ * the pack's coverage less a day at each end (`defaultEphemeris()` gives the
69
+ * ends; 1790-01-02 to 2209-12-31 at least). Neither is set after
70
+ * `setDefaultEphemeris("astronomy-engine")`, the caller's own choice, where
71
+ * the result still names astronomy-engine, nor inside `withEphemeris`.
72
+ */
73
+ type EphemerisFallback = "de440-unavailable" | "outside-de440-span";
74
+ /**
75
+ * A bare value (a Date, a longitude, a list of signs) with the label it
76
+ * cannot carry itself: the ephemeris its positions came from and the flags
77
+ * that say why that is astronomy-engine where the shipped DE440 pack was the
78
+ * default. What each `…Detailed` function of the techniques and internal
79
+ * entries returns, beside the plain function, which returns `value` alone
80
+ * and is unchanged.
81
+ */
82
+ interface DetailedResult<T, F extends string = EphemerisFallback> {
83
+ /** What the plain function returns, the same value. */
84
+ readonly value: T;
85
+ /** `{ name: "jpl-de440", version }` on the pack; astronomy-engine's name and version where any position was its. */
86
+ readonly ephemeris: {
87
+ readonly name: string;
88
+ readonly version: string;
89
+ };
90
+ /**
91
+ * `"de440-unavailable"` or `"outside-de440-span"` on a fallback, none on the pack or after the caller chose
92
+ * astronomy-engine; in the techniques entry also `"outside-reference-span"`, first, where a position was read
93
+ * outside 1800 to 2200.
94
+ */
95
+ readonly flags: readonly F[];
96
+ }
97
+ /**
98
+ * A resolved birth instant. Use `resolveBirth` from `@zodiacs/engine/geo`
99
+ * when starting from a local wall time and IANA timezone.
100
+ */
101
+ interface BirthInput {
102
+ /**
103
+ * The instant, on the scale `timeScale` names: UTC by default, and UT1 or
104
+ * TT when `timeScale` says so. The field keeps its name on every scale,
105
+ * because receipts record it under that name (docs/time.md).
106
+ */
107
+ utc: DateInput;
108
+ /** "utc" (default), "ut1" or "tt" (docs/time.md). */
109
+ timeScale?: TimeScaleName;
110
+ latitude?: number;
111
+ longitude?: number;
112
+ houseSystem?: HouseSystem;
113
+ /** False means `utc` is a caller-supplied reference instant and suppresses angles/houses.
114
+ * It does not establish a UTC-noon or local-noon convention by itself. */
115
+ timeKnown?: boolean;
116
+ /** Up to 64 known flags. Duplicate claims normalize to one value. Time flags
117
+ * are caller assertions; no-time/polar-fallback echoes must match calculation.
118
+ * natalChart returns canonical semantic flags, not the raw submitted array. */
119
+ flags?: readonly ChartFlag[];
120
+ /**
121
+ * Fix ΔT (TT − UT1) at this many seconds instead of the engine's time
122
+ * basis; UT1 still comes from the instant. The chart then reports
123
+ * `deltaT.model` "pinned". Finite, at most 1e10 in size.
124
+ */
125
+ deltaT?: number;
126
+ }
127
+ interface ChartInput {
128
+ /** The instant as given, on the scale `timeScale` names (UTC when it is absent), as BirthInput.utc. */
129
+ utc: Date;
130
+ /** Present when the instant is not UTC. */
131
+ timeScale?: Exclude<TimeScaleName, "utc">;
132
+ /** A caller's fixed ΔT (TT − UT1) in seconds, as BirthInput.deltaT; the engine's time basis when absent. */
133
+ deltaT?: number;
134
+ latitude?: number;
135
+ longitude?: number;
136
+ houseSystem: HouseSystem;
137
+ timeKnown: boolean;
138
+ flags?: readonly ChartFlag[];
139
+ }
140
+ interface BodyPosition {
141
+ body: BodyName;
142
+ /** Tropical ecliptic longitude of date, degrees in [0, 360). */
143
+ lon: number;
144
+ /** Ecliptic latitude, degrees (zero for the Moon nodes). */
145
+ lat: number;
146
+ /**
147
+ * Longitude speed in degrees/day, the derivative of `lon` over plus/minus
148
+ * 0.001 day (the nodes: plus/minus 0.25 day); negative means retrograde.
149
+ */
150
+ speed: number;
151
+ retrograde: boolean;
152
+ sign: ZodiacSign;
153
+ /** Longitude inside `sign`, degrees in [0, 30). */
154
+ degree: number;
155
+ /**
156
+ * The ephemeris this position came from, on every position the engine
157
+ * computes from 1.1.0-rc.10: `"jpl-de440"`, `"astronomy-engine"`, or the
158
+ * name of the source `withEphemeris` ran the call with.
159
+ */
160
+ ephemeris?: string;
161
+ /** Present when `ephemeris` is astronomy-engine as a fallback from the shipped DE440 pack, and says why. */
162
+ fallback?: EphemerisFallback;
163
+ }
164
+ /** A chart point that is not a body; see `chartPoints`. */
165
+ type PointName = "Mean Node" | "Mean South Node" | "Black Moon Lilith" | "Vertex" | "East Point" | "Lot of Fortune" | "Lot of Spirit" | "Lot of Eros" | "Lot of Necessity" | "Lot of Courage" | "Lot of Victory" | "Lot of Nemesis";
166
+ /** Day when the Sun is above the horizon, night when it is below. */
167
+ type Sect = "day" | "night";
168
+ interface PointPosition {
169
+ point: PointName;
170
+ /** Tropical longitude of date, degrees in [0, 360). */
171
+ lon: number;
172
+ /** Ecliptic latitude, degrees; zero except for Black Moon Lilith. */
173
+ lat: number;
174
+ /**
175
+ * Longitude speed in degrees/day, the derivative of `lon` over plus/minus
176
+ * 0.001 day, for the mean node and Black Moon Lilith; null for the points the
177
+ * chart's angles fix.
178
+ */
179
+ speed: number | null;
180
+ sign: ZodiacSign;
181
+ /** Longitude inside `sign`, degrees in [0, 30). */
182
+ degree: number;
183
+ }
184
+ interface ChartPoints {
185
+ /** The chart's sect; null when it has no angles. */
186
+ sect: Sect | null;
187
+ /**
188
+ * The mean node and its opposite point and Black Moon Lilith always; the
189
+ * Vertex, the East Point and the seven lots only when the chart has angles.
190
+ */
191
+ points: PointPosition[];
192
+ /**
193
+ * From 1.1.0-rc.12: the ephemeris of the chart the points were derived
194
+ * from, its own `ephemeris` (`"jpl-de440"` on the shipped pack,
195
+ * astronomy-engine's name and version where the chart was computed on
196
+ * it); null for a supplied chart that names none (one from 1.1.0-rc.9 or
197
+ * earlier).
198
+ */
199
+ ephemeris: {
200
+ readonly name: string;
201
+ readonly version: string;
202
+ } | null;
203
+ /**
204
+ * From 1.1.0-rc.12: the chart's fallback flags (`EphemerisFallback`),
205
+ * `"de440-unavailable"` or `"outside-de440-span"` where its bodies are
206
+ * astronomy-engine's as a fallback from the shipped pack; none on the pack,
207
+ * after the caller chose astronomy-engine, or inside `withEphemeris`.
208
+ */
209
+ flags: EphemerisFallback[];
210
+ }
211
+ interface Angles {
212
+ asc: number;
213
+ mc: number;
214
+ dsc: number;
215
+ ic: number;
216
+ }
217
+ interface Houses {
218
+ system: HouseSystem;
219
+ /** Cusp longitudes; array index zero is the first house. */
220
+ cusps: number[];
221
+ }
222
+ type AspectType = "conjunction" | "sextile" | "square" | "trine" | "opposition";
223
+ interface Aspect {
224
+ a: BodyName;
225
+ b: BodyName;
226
+ type: AspectType;
227
+ /** Deviation from exact, in degrees. */
228
+ orb: number;
229
+ /**
230
+ * True only when the orb is strictly decreasing at the chart instant, judged
231
+ * from the two longitude speeds. False when separating, when exact, and when
232
+ * the relative speed is below STATIONARY_RELATIVE_SPEED; aspectMotion tells
233
+ * the last case apart.
234
+ */
235
+ applying: boolean;
236
+ }
237
+ interface Chart {
238
+ input: ChartInput;
239
+ bodies: BodyPosition[];
240
+ /** Present only when a time and coordinates are available. */
241
+ angles: Angles | null;
242
+ houses: Houses | null;
243
+ aspects: Aspect[];
244
+ flags: ChartFlag[];
245
+ /** The ΔT (TT − UT1) the chart was computed with, its band and its source. */
246
+ deltaT: DeltaT;
247
+ /** How the instant became UT1 (for the angles) and TT (for the positions). */
248
+ timeScale: TimeScale;
249
+ engineVersion: string;
250
+ /**
251
+ * The ephemeris the bodies came from, on every chart from 1.1.0-rc.10:
252
+ * `"jpl-de440"` with the pack's SHA-256 for the shipped DE440 pack, the
253
+ * default source inside its years (`defaultEphemeris`); `"astronomy-engine"`
254
+ * with its version where the chart was computed on it, whether by the
255
+ * caller's choice (`setDefaultEphemeris`) or as a fallback, which `flags`
256
+ * then says (`"de440-unavailable"`, `"outside-de440-span"`); or the name
257
+ * of the source `withEphemeris` ran the chart with. Optional in the type
258
+ * because a chart from 1.1.0-rc.9 or earlier lacks it on astronomy-engine.
259
+ */
260
+ ephemeris?: {
261
+ readonly name: string;
262
+ readonly version: string;
263
+ };
264
+ }
265
+ interface MinimalBody {
266
+ body: string;
267
+ lon: number;
268
+ }
269
+ interface InterAspect {
270
+ /** Body in the first chart (or the moving body for `transits`). */
271
+ a: string;
272
+ aLon: number;
273
+ /** Body in the second chart (or the natal body for `transits`). */
274
+ b: string;
275
+ bLon: number;
276
+ type: AspectType;
277
+ orb: number;
278
+ }
279
+ interface PairSummary {
280
+ aspects: InterAspect[];
281
+ top: InterAspect[];
282
+ counts: Record<AspectType, number>;
283
+ easeful: number;
284
+ charged: number;
285
+ elements: {
286
+ a: Record<Element, number>;
287
+ b: Record<Element, number>;
288
+ };
289
+ modalities: {
290
+ a: Record<Modality, number>;
291
+ b: Record<Modality, number>;
292
+ };
293
+ }
294
+ interface SynastryResult extends PairSummary {
295
+ a: Chart;
296
+ b: Chart;
297
+ }
298
+ interface TransitResult {
299
+ natal: Chart;
300
+ at: Date;
301
+ positions: BodyPosition[];
302
+ /** Moving-body-to-natal-body aspects, sorted by orb. */
303
+ aspects: InterAspect[];
304
+ }
305
+ type MoonPhaseName = "New Moon" | "Waxing Crescent" | "First Quarter" | "Waxing Gibbous" | "Full Moon" | "Waning Gibbous" | "Last Quarter" | "Waning Crescent";
306
+ interface MoonPhase {
307
+ at: Date;
308
+ /** Elongation Moon minus Sun: 0 = new, 180 = full. */
309
+ angle: number;
310
+ /** Illuminated fraction in [0, 1]. */
311
+ illumination: number;
312
+ name: MoonPhaseName;
313
+ waxing: boolean;
314
+ /** The ephemeris the Sun and the Moon came from, as a BodyPosition names it; set by the engine from 1.1.0-rc.10. */
315
+ ephemeris?: string;
316
+ /** Present when `ephemeris` is astronomy-engine as a fallback from the shipped DE440 pack, and says why. */
317
+ fallback?: EphemerisFallback;
318
+ }
319
+ /** This package's version, as package.json names it. A string: it changes with every release. */
320
+ declare const ENGINE_VERSION: string;
321
+ /**
322
+ * astronomy-engine, the ephemeris the engine computes on where the shipped
323
+ * DE440 pack is not the source: outside the pack's years, after
324
+ * `setDefaultEphemeris("astronomy-engine")`, and in the entries that compute
325
+ * on it themselves (calc, window, the sky entry's rising and setting). The
326
+ * dependency is pinned to this exact version, so receipts can name it
327
+ * without asking the caller. Until 1.1.0-rc.7 it was underneath every
328
+ * position.
329
+ */
330
+ declare const EPHEMERIS: Readonly<{
331
+ name: "astronomy-engine";
332
+ version: string;
333
+ }>;
334
+
335
+ export { type Angles as A, type BodyName as B, type ChartInput as C, type DetailedResult as D, type EphemerisFallback as E, type HouseSystem as H, type InterAspect as I, type MoonPhase as M, type PositionSource as P, type SynastryResult as S, type TransitResult as T, type ZodiacSign as Z, type Houses as a, type HouseNumber as b, type BodyPosition as c, type Chart as d, type DateInput as e, type AspectType as f, type ChartFlag as g, type BirthInput as h, type ChartPoints as i, type Sect as j, type MinimalBody as k, type Element as l, type Modality as m, type PairSummary as n, type Aspect as o, ENGINE_VERSION as p, EPHEMERIS as q, type MoonPhaseName as r, type PointName as s, type PointPosition as t, type Polarity as u, type SignDefinition as v, type SourceBody as w };
package/dist/vedic.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- import { B as BodyName, H as HouseSystem, g as ChartFlag, D as DateInput, d as Chart, h as BirthInput, Z as ZodiacSign } from './types-B-yb_tGL.js';
2
- import { b as AyanamsaValue, A as AyanamsaName, c as AyanamsaDefinition } from './ayanamsa--YQ46fET.js';
3
- export { d as AYANAMSAS, e as AyanamsaFlag, f as AyanamsaOptions, a as AyanamsaPrecessionModel, C as CatalogueStar, E as EpochAyanamsa, L as LinearAyanamsa, S as StarAyanamsa, U as UserAyanamsaInput, g as ayanamsa, u as userAyanamsa } from './ayanamsa--YQ46fET.js';
1
+ import { B as BodyName, H as HouseSystem, g as ChartFlag, e as DateInput, d as Chart, h as BirthInput, Z as ZodiacSign } from './types-DpPdtXgO.js';
2
+ import { b as AyanamsaValue, A as AyanamsaName, c as AyanamsaDefinition } from './ayanamsa-ClFzkKmV.js';
3
+ export { d as AYANAMSAS, e as AyanamsaFlag, f as AyanamsaOptions, a as AyanamsaPrecessionModel, C as CatalogueStar, E as EpochAyanamsa, L as LinearAyanamsa, S as StarAyanamsa, U as UserAyanamsaInput, g as ayanamsa, u as userAyanamsa } from './ayanamsa-ClFzkKmV.js';
4
+ import { T as TimeScale } from './time-scale-DIFNa0gz.js';
4
5
  import './deltat.js';
5
6
 
6
7
  /**
@@ -141,6 +142,113 @@ interface VargaPosition {
141
142
  */
142
143
  declare function vargaOf(position: SiderealLongitude, varga: VargaName, scheme?: VargaScheme): VargaPosition;
143
144
 
145
+ /**
146
+ * A point whose varga signs vargaSensitivity follows. "Mean Node" and "Mean
147
+ * South Node" are chartPoints' mean nodes; siderealChart's North and South
148
+ * Node are the true node, which is not offered.
149
+ */
150
+ type VargaPoint = "Ascendant" | "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto" | "Mean Node" | "Mean South Node";
151
+ /** The points vargaSensitivity can search, in the order of its rows. */
152
+ declare const VARGA_POINTS: readonly VargaPoint[];
153
+ /** vargaSensitivity's options. A key not named here is refused with a RangeError. */
154
+ interface VargaSensitivityOptions {
155
+ /** Distinct VARGA_POINTS; default the Ascendant, the Sun to Saturn and the two mean nodes. */
156
+ readonly points?: readonly VargaPoint[] | undefined;
157
+ /** Distinct vargas of the sixteen; default all. */
158
+ readonly vargas?: readonly VargaName[] | undefined;
159
+ /** Also the cyclic D2 and D3, for whichever of the two is asked for; default false. */
160
+ readonly cyclic?: boolean | undefined;
161
+ /** Whole minutes searched on each side of the birth, 1 to 2,880; default 1,440. */
162
+ readonly horizonMinutes?: number | undefined;
163
+ }
164
+ /** A change of a row's varga sign. */
165
+ interface VargaChange {
166
+ /** The first millisecond with the new sign, ISO 8601 on the chart's input scale, named as ChartInput.utc is. */
167
+ readonly at: string;
168
+ /** (at − birth) / 60,000: zero or negative for `previous`, positive for `next`. */
169
+ readonly minutes: number;
170
+ /** The change boundary crossed, degrees: the double nearest T / 7560 for a whole tick T. */
171
+ readonly boundary: number;
172
+ /** The sign at at − 1 ms. */
173
+ readonly from: ZodiacSign;
174
+ /** The sign at at. */
175
+ readonly to: ZodiacSign;
176
+ }
177
+ /** Why a row was not computed. A minor release may add a reason. */
178
+ type VargaRefusalReason = "no-angles" | "polar" | "out-of-range" | "rate-bound" | "evaluation-budget";
179
+ interface VargaRefusal {
180
+ readonly status: "refused";
181
+ readonly reason: VargaRefusalReason;
182
+ readonly detail: string;
183
+ }
184
+ /** One point in one varga: its sign at the birth, and the changes on either side. */
185
+ interface VargaSensitivityRow {
186
+ readonly point: VargaPoint;
187
+ readonly varga: VargaName;
188
+ readonly scheme: VargaScheme;
189
+ /** vargaOf at the birth instant; null when the row was refused before the point was evaluated. */
190
+ readonly position: VargaPosition | null;
191
+ /** The change into the birth sign: the sign holds from `previous.at` to the birth; null if none in `searched`. */
192
+ readonly previous: VargaChange | null;
193
+ /** The first change after the birth; null if none in `searched`. */
194
+ readonly next: VargaChange | null;
195
+ /** What "none missed" rests on: "derived" bounds (the Ascendant, the mean nodes) or "scanned" ones (the bodies). */
196
+ readonly completeness: "derived" | "scanned";
197
+ /** Set when the row was not computed; `previous` and `next` are then null and say nothing. */
198
+ readonly refusal: VargaRefusal | null;
199
+ }
200
+ /** vargaSensitivity's result, frozen. */
201
+ interface VargaSensitivity {
202
+ /** The ayanamsa's name. */
203
+ readonly ayanamsa: string;
204
+ /** The birth instant as given, ISO 8601 on its input scale. */
205
+ readonly utc: string;
206
+ /** How the birth instant became UT1 and TT, as a chart's `timeScale`. */
207
+ readonly timeScale: TimeScale;
208
+ readonly horizonMinutes: number;
209
+ /**
210
+ * The span searched, ISO 8601 on the input scale: the horizon, cut where an
211
+ * instant's UT1 or TT would leave REFERENCE_SPAN; the birth instant alone when
212
+ * every row is refused with `out-of-range`.
213
+ */
214
+ readonly searched: {
215
+ readonly from: string;
216
+ readonly to: string;
217
+ };
218
+ /** What the instants are exact against, and what "none missed" rests on. */
219
+ readonly verification: string;
220
+ /** Point by point in VARGA_POINTS order; within a point, the vargas in VARGAS order, a cyclic row after its Parashari one. */
221
+ readonly rows: readonly VargaSensitivityRow[];
222
+ /** The evaluations of its longitude the call made for each point asked, of the call's budget of 2,000,000. */
223
+ readonly evaluations: Readonly<Partial<Record<VargaPoint, number>>>;
224
+ /** The chart's flags and the ayanamsa's, as siderealChart gives them. */
225
+ readonly flags: readonly ChartFlag[];
226
+ }
227
+ /**
228
+ * The first millisecond before and after the birth at which each point's varga
229
+ * sign changes, in the engine's own arithmetic on the chart's clock (its input
230
+ * scale and any pinned ΔT), within `horizonMinutes` on each side. The birth is
231
+ * read as siderealChart reads it; a supplied Chart gives the instant, the place
232
+ * and the clock, and every position is computed again from them. Each change is
233
+ * the first millisecond at which the point's sidereal longitude, as
234
+ * siderealChart (for the mean nodes, chartPoints with the chart's
235
+ * ayanamsaValue) gives it, lies outside the varga run holding it at the birth:
236
+ * a run is the arc between two boundaries at which the sign changes, so a run
237
+ * can span a sign start.
238
+ *
239
+ * Malformed input throws RangeError: options that are not a plain object of
240
+ * data properties, an option key not named, points or vargas not given as an
241
+ * array, an unknown or repeated point or varga, `cyclic` other than true or
242
+ * false, a horizon that is not a whole number of minutes from 1 to 2,880, and
243
+ * whatever siderealChart refuses. What cannot be computed is
244
+ * a refusal on the rows it touches: `no-angles` and `polar` (beyond 66°) for the
245
+ * Ascendant, `out-of-range` for every row when the birth's UT1 or TT lies
246
+ * outside REFERENCE_SPAN, `rate-bound` for a point that moved as its bound says
247
+ * it cannot, and `evaluation-budget` for the point in progress and those after
248
+ * it once the call has made 2,000,000 evaluations. See docs/vedic.md.
249
+ */
250
+ declare function vargaSensitivity(natal: Chart | BirthInput, ayanamsa: AyanamsaName | AyanamsaDefinition, options?: VargaSensitivityOptions): VargaSensitivity;
251
+
144
252
  /**
145
253
  * Traditional sign rulers, Aries to Pisces (BPHS 4, Santhanam 1984): the same
146
254
  * rulers as `@zodiacs/engine/techniques`'s DOMICILE_RULERS and
@@ -309,4 +417,4 @@ declare function yoginiDasha(moon: SiderealLongitude, options?: CycleOptions): D
309
417
  */
310
418
  declare function ashtottariDasha(moon: SiderealLongitude, options?: CycleOptions): DashaResult;
311
419
 
312
- export { ASHTOTTARI_YEARS, AyanamsaDefinition, AyanamsaName, AyanamsaValue, type CycleOptions, DASHA_LEVELS, DASHA_YEAR_DAYS, type DashaAtOptions, type DashaLevelName, type DashaOptions, type DashaPeriod, type DashaResult, type DashaSystem, type DashaYearLength, KP_SUBS, type KpLords, type KpSub, NAKSHATRAS, type NakshatraName, type NakshatraPosition, SIGN_LORDS, type SiderealBody, type SiderealChart, type SiderealDeclaration, type SiderealLongitude, type SignLord, VARGAS, VIMSHOTTARI_LORDS, VIMSHOTTARI_YEARS, type VargaDefinition, type VargaName, type VargaPosition, type VargaScheme, type VimshottariLord, YOGINIS, ashtottariDasha, dashaSubperiods, declareSiderealLongitude, kpLordsOf, nakshatraOf, siderealChart, siderealLongitude, vargaOf, vimshottariAt, vimshottariDasha, yoginiDasha };
420
+ export { ASHTOTTARI_YEARS, AyanamsaDefinition, AyanamsaName, AyanamsaValue, type CycleOptions, DASHA_LEVELS, DASHA_YEAR_DAYS, type DashaAtOptions, type DashaLevelName, type DashaOptions, type DashaPeriod, type DashaResult, type DashaSystem, type DashaYearLength, KP_SUBS, type KpLords, type KpSub, NAKSHATRAS, type NakshatraName, type NakshatraPosition, SIGN_LORDS, type SiderealBody, type SiderealChart, type SiderealDeclaration, type SiderealLongitude, type SignLord, VARGAS, VARGA_POINTS, VIMSHOTTARI_LORDS, VIMSHOTTARI_YEARS, type VargaChange, type VargaDefinition, type VargaName, type VargaPoint, type VargaPosition, type VargaRefusal, type VargaRefusalReason, type VargaScheme, type VargaSensitivity, type VargaSensitivityOptions, type VargaSensitivityRow, type VimshottariLord, YOGINIS, ashtottariDasha, dashaSubperiods, declareSiderealLongitude, kpLordsOf, nakshatraOf, siderealChart, siderealLongitude, vargaOf, vargaSensitivity, vimshottariAt, vimshottariDasha, yoginiDasha };