@zodiacs/engine 1.0.0 → 2.0.0-rc.2

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 +1244 -0
  2. package/LICENSING.md +172 -27
  3. package/NOTICE +78 -12
  4. package/README.md +344 -59
  5. package/dist/{api-WbxJ4Wj-.d.ts → api-C_SVd9BJ.d.ts} +39 -3
  6. package/dist/{ayanamsa--YQ46fET.d.ts → ayanamsa-Clgkekhh.d.ts} +2 -1
  7. package/dist/calc.d.ts +91 -4
  8. package/dist/calc.js +368 -126
  9. package/dist/chunk-CV53HA7R.js +87 -0
  10. package/dist/chunk-EEW7746S.js +83 -0
  11. package/dist/{chunk-WS3TDSP3.js → chunk-FVGA776A.js} +7 -3
  12. package/dist/chunk-HNVGWN3S.js +852 -0
  13. package/dist/chunk-I3L4POY7.js +18 -0
  14. package/dist/{chunk-FTX3JDJA.js → chunk-IXFUYEUF.js} +65 -29
  15. package/dist/{chunk-7TRLIFFI.js → chunk-LWZS7HI3.js} +1 -1
  16. package/dist/{chunk-CHSYDKBL.js → chunk-N4UQLCBN.js} +3 -3
  17. package/dist/{chunk-YIITY7Q7.js → chunk-NX4PHQBL.js} +34 -22
  18. package/dist/chunk-OVXQQEXL.js +41 -0
  19. package/dist/{chunk-SRXBTP5H.js → chunk-PNXIA7MI.js} +217 -192
  20. package/dist/chunk-RMBWKZI2.js +130 -0
  21. package/dist/{chunk-DMGHYCDI.js → chunk-SCRO6HWB.js} +5 -3
  22. package/dist/{chunk-OG4OYTJJ.js → chunk-T6F4FYYS.js} +1 -129
  23. package/dist/chunk-UXY4RU57.js +48 -0
  24. package/dist/{chunk-PFGUCNOK.js → chunk-WONTOC5W.js} +7 -6
  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-D1lM832F.d.ts +64 -0
  33. package/dist/geo.d.ts +28 -7
  34. package/dist/geo.js +2 -2
  35. package/dist/houses-extra.d.ts +5 -4
  36. package/dist/{houses-CFERsAlK.d.ts → houses-icK01yXi.d.ts} +3 -3
  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-BGX23p4h.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 +156 -67
  52. package/dist/{rulers-Dla6h_Sm.d.ts → rulers-CpS9qkvu.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-BCnyWBQZ.d.ts +352 -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-0XzMGx9V.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-N4UQLCBN.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-IXFUYEUF.js";
18
+ import {
19
+ readOptions
20
+ } from "./chunk-47ERTK5X.js";
21
+ import {
22
+ bodyLongitude,
23
+ fallbacksAt
24
+ } from "./chunk-PNXIA7MI.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-T6F4FYYS.js";
29
+ import "./chunk-EEW7746S.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-UXY4RU57.js";
35
+ import "./chunk-HNVGWN3S.js";
36
+ import "./chunk-CV53HA7R.js";
37
+ import "./chunk-SCRO6HWB.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-WONTOC5W.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,352 @@
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
+ /**
59
+ * `"delta-t-extrapolated"`: a result that moves with a ΔT extrapolated past the IERS table (docs/time.md).
60
+ * `"calendar-unknown"`: a local date resolved with no country the Gregorian adoption table dates that falls in
61
+ * the days one of its changeovers skipped, where the zone does not rule that changeover out, so whether it was
62
+ * in civil use where it was written is not known (docs/time.md).
63
+ * `"polar-angles"`: the angles were computed inside the polar circle, |latitude| ≥ 90° − ε, where the ascendant
64
+ * turns half a circle twice a sidereal day and is 0° or 180° at the poles (docs/houses.md).
65
+ */
66
+ type ChartFlag = "dst-gap" | "dst-fold" | "lmt" | "calendar-unknown" | "no-time" | "polar-fallback" | "polar-angles" | "outside-reference-span" | "delta-t-extrapolated" | EphemerisFallback;
67
+ /**
68
+ * Why a result that would have come from the shipped DE440 pack, the default
69
+ * source, came from astronomy-engine instead; the result carries it as a flag
70
+ * and names astronomy-engine as its ephemeris, so the fallback is never
71
+ * silent. `"de440-unavailable"`: the pack could not be opened, because its
72
+ * bytes are missing, are not the sealed pack's (their SHA-256 differs) or
73
+ * cannot be decoded; `defaultEphemeris().de440.error` says which.
74
+ * `"outside-de440-span"`: an instant the result was computed at is outside
75
+ * the pack's coverage less a day at each end (`defaultEphemeris()` gives the
76
+ * ends; 1790-01-02 to 2209-12-31 at least). Neither is set after
77
+ * `setDefaultEphemeris("astronomy-engine")`, the caller's own choice, where
78
+ * the result still names astronomy-engine, nor inside `withEphemeris`.
79
+ */
80
+ type EphemerisFallback = "de440-unavailable" | "outside-de440-span";
81
+ /**
82
+ * A bare value (a Date, a longitude, a list of signs) with the label it
83
+ * cannot carry itself: the ephemeris its positions came from and the flags
84
+ * that say why that is astronomy-engine where the shipped DE440 pack was the
85
+ * default. What each `…Detailed` function of the techniques and internal
86
+ * entries returns, beside the plain function, which returns `value` alone
87
+ * and is unchanged.
88
+ */
89
+ interface DetailedResult<T, F extends string = EphemerisFallback> {
90
+ /** What the plain function returns, the same value. */
91
+ readonly value: T;
92
+ /** `{ name: "jpl-de440", version }` on the pack; astronomy-engine's name and version where any position was its. */
93
+ readonly ephemeris: {
94
+ readonly name: string;
95
+ readonly version: string;
96
+ };
97
+ /**
98
+ * `"de440-unavailable"` or `"outside-de440-span"` on a fallback, none on the pack or after the caller chose
99
+ * astronomy-engine; in the techniques entry also `"outside-reference-span"`, first, where a position was read
100
+ * outside 1800 to 2200.
101
+ */
102
+ readonly flags: readonly F[];
103
+ }
104
+ /**
105
+ * A resolved birth instant. Use `resolveBirth` from `@zodiacs/engine/geo`
106
+ * when starting from a local wall time and IANA timezone.
107
+ */
108
+ interface BirthInput {
109
+ /**
110
+ * The instant, on the scale `timeScale` names: UTC by default, and UT1 or
111
+ * TT when `timeScale` says so. The field keeps its name on every scale,
112
+ * because receipts record it under that name (docs/time.md). A calendar
113
+ * date string with no time, such as "1990-05-03", reads as 00:00 UTC and
114
+ * is refused with a RangeError unless `timeKnown` is false.
115
+ */
116
+ utc: DateInput;
117
+ /** "utc" (default), "ut1" or "tt" (docs/time.md). */
118
+ timeScale?: TimeScaleName;
119
+ latitude?: number;
120
+ longitude?: number;
121
+ houseSystem?: HouseSystem;
122
+ /** False means `utc` is a caller-supplied reference instant and suppresses angles/houses.
123
+ * It does not establish a UTC-noon or local-noon convention by itself. */
124
+ timeKnown?: boolean;
125
+ /** Up to 64 known flags. Duplicate claims normalize to one value. Time flags
126
+ * are caller assertions; no-time/polar-fallback echoes must match calculation.
127
+ * natalChart returns canonical semantic flags, not the raw submitted array. */
128
+ flags?: readonly ChartFlag[];
129
+ /**
130
+ * Fix ΔT (TT − UT1) at this many seconds instead of the engine's time
131
+ * basis; UT1 still comes from the instant. The chart then reports
132
+ * `deltaT.model` "pinned". Finite, at most 1e10 in size.
133
+ */
134
+ deltaT?: number;
135
+ }
136
+ interface ChartInput {
137
+ /** The instant as given, on the scale `timeScale` names (UTC when it is absent), as BirthInput.utc. */
138
+ utc: Date;
139
+ /** Present when the instant is not UTC. */
140
+ timeScale?: Exclude<TimeScaleName, "utc">;
141
+ /** A caller's fixed ΔT (TT − UT1) in seconds, as BirthInput.deltaT; the engine's time basis when absent. */
142
+ deltaT?: number;
143
+ latitude?: number;
144
+ longitude?: number;
145
+ houseSystem: HouseSystem;
146
+ timeKnown: boolean;
147
+ flags?: readonly ChartFlag[];
148
+ }
149
+ interface BodyPosition {
150
+ body: BodyName;
151
+ /** Tropical ecliptic longitude of date, degrees in [0, 360). */
152
+ lon: number;
153
+ /** Ecliptic latitude, degrees (zero for the Moon nodes). */
154
+ lat: number;
155
+ /**
156
+ * Longitude speed in degrees/day, the derivative of `lon` over plus/minus
157
+ * 0.001 day (the nodes: plus/minus 0.25 day); negative means retrograde.
158
+ */
159
+ speed: number;
160
+ retrograde: boolean;
161
+ sign: ZodiacSign;
162
+ /** Longitude inside `sign`, degrees in [0, 30). */
163
+ degree: number;
164
+ /**
165
+ * The ephemeris this position came from, on every position the engine
166
+ * computes from 1.1.0-rc.10: `"jpl-de440"`, `"astronomy-engine"`, or the
167
+ * name of the source `withEphemeris` ran the call with.
168
+ */
169
+ ephemeris?: string;
170
+ /** Present when `ephemeris` is astronomy-engine as a fallback from the shipped DE440 pack, and says why. */
171
+ fallback?: EphemerisFallback;
172
+ /**
173
+ * On the rows of `positions()`, `transits()`' `positions` and `progressedBodies()`, from the release after
174
+ * 1.1.0: the flags a chart at the same instant carries, where there are any (a chart's own bodies leave them to
175
+ * the chart's `flags`): `"outside-reference-span"`, `"delta-t-extrapolated"`, then the fallback, as `fallback`.
176
+ */
177
+ flags?: InstantFlag[];
178
+ }
179
+ /** The flags an instant itself gives a result, whatever the place and birth settings; see `BodyPosition.flags`. */
180
+ type InstantFlag = "outside-reference-span" | "delta-t-extrapolated" | EphemerisFallback;
181
+ /** A chart point that is not a body; see `chartPoints`. */
182
+ 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";
183
+ /** Day when the Sun is above the horizon, night when it is below. */
184
+ type Sect = "day" | "night";
185
+ interface PointPosition {
186
+ point: PointName;
187
+ /** Tropical longitude of date, degrees in [0, 360). */
188
+ lon: number;
189
+ /** Ecliptic latitude, degrees; zero except for Black Moon Lilith. */
190
+ lat: number;
191
+ /**
192
+ * Longitude speed in degrees/day, the derivative of `lon` over plus/minus
193
+ * 0.001 day, for the mean node and Black Moon Lilith; null for the points the
194
+ * chart's angles fix.
195
+ */
196
+ speed: number | null;
197
+ sign: ZodiacSign;
198
+ /** Longitude inside `sign`, degrees in [0, 30). */
199
+ degree: number;
200
+ }
201
+ interface ChartPoints {
202
+ /** The chart's sect; null when it has no angles. */
203
+ sect: Sect | null;
204
+ /**
205
+ * The mean node and its opposite point and Black Moon Lilith always; the
206
+ * Vertex, the East Point and the seven lots only when the chart has angles.
207
+ */
208
+ points: PointPosition[];
209
+ /**
210
+ * From 1.1.0-rc.12: the ephemeris of the chart the points were derived
211
+ * from, its own `ephemeris` (`"jpl-de440"` on the shipped pack,
212
+ * astronomy-engine's name and version where the chart was computed on
213
+ * it); null for a supplied chart that names none (one from 1.1.0-rc.9 or
214
+ * earlier).
215
+ */
216
+ ephemeris: {
217
+ readonly name: string;
218
+ readonly version: string;
219
+ } | null;
220
+ /**
221
+ * From 1.1.0-rc.12: the chart's fallback flags (`EphemerisFallback`),
222
+ * `"de440-unavailable"` or `"outside-de440-span"` where its bodies are
223
+ * astronomy-engine's as a fallback from the shipped pack; none on the pack,
224
+ * after the caller chose astronomy-engine, or inside `withEphemeris`.
225
+ */
226
+ flags: EphemerisFallback[];
227
+ }
228
+ interface Angles {
229
+ asc: number;
230
+ mc: number;
231
+ dsc: number;
232
+ ic: number;
233
+ }
234
+ interface Houses {
235
+ system: HouseSystem;
236
+ /** Cusp longitudes; array index zero is the first house. */
237
+ cusps: number[];
238
+ }
239
+ type AspectType = "conjunction" | "sextile" | "square" | "trine" | "opposition";
240
+ interface Aspect {
241
+ a: BodyName;
242
+ b: BodyName;
243
+ type: AspectType;
244
+ /** Deviation from exact, in degrees. */
245
+ orb: number;
246
+ /**
247
+ * True only when the orb is strictly decreasing at the chart instant, judged
248
+ * from the two longitude speeds. False when separating, when exact, and when
249
+ * the relative speed is below STATIONARY_RELATIVE_SPEED; aspectMotion tells
250
+ * the last case apart.
251
+ */
252
+ applying: boolean;
253
+ }
254
+ interface Chart {
255
+ input: ChartInput;
256
+ bodies: BodyPosition[];
257
+ /** Present only when a time and coordinates are available. */
258
+ angles: Angles | null;
259
+ houses: Houses | null;
260
+ aspects: Aspect[];
261
+ flags: ChartFlag[];
262
+ /** The ΔT (TT − UT1) the chart was computed with, its band and its source. */
263
+ deltaT: DeltaT;
264
+ /** How the instant became UT1 (for the angles) and TT (for the positions). */
265
+ timeScale: TimeScale;
266
+ engineVersion: string;
267
+ /**
268
+ * The ephemeris the bodies came from, on every chart from 1.1.0-rc.10:
269
+ * `"jpl-de440"` with the pack's SHA-256 for the shipped DE440 pack, the
270
+ * default source inside its years (`defaultEphemeris`); `"astronomy-engine"`
271
+ * with its version where the chart was computed on it, whether by the
272
+ * caller's choice (`setDefaultEphemeris`) or as a fallback, which `flags`
273
+ * then says (`"de440-unavailable"`, `"outside-de440-span"`); or the name
274
+ * of the source `withEphemeris` ran the chart with. Optional in the type
275
+ * because a chart from 1.1.0-rc.9 or earlier lacks it on astronomy-engine.
276
+ */
277
+ ephemeris?: {
278
+ readonly name: string;
279
+ readonly version: string;
280
+ };
281
+ }
282
+ interface MinimalBody {
283
+ body: string;
284
+ lon: number;
285
+ }
286
+ interface InterAspect {
287
+ /** Body in the first chart (or the moving body for `transits`). */
288
+ a: string;
289
+ aLon: number;
290
+ /** Body in the second chart (or the natal body for `transits`). */
291
+ b: string;
292
+ bLon: number;
293
+ type: AspectType;
294
+ orb: number;
295
+ }
296
+ interface PairSummary {
297
+ aspects: InterAspect[];
298
+ top: InterAspect[];
299
+ counts: Record<AspectType, number>;
300
+ easeful: number;
301
+ charged: number;
302
+ elements: {
303
+ a: Record<Element, number>;
304
+ b: Record<Element, number>;
305
+ };
306
+ modalities: {
307
+ a: Record<Modality, number>;
308
+ b: Record<Modality, number>;
309
+ };
310
+ }
311
+ interface SynastryResult extends PairSummary {
312
+ a: Chart;
313
+ b: Chart;
314
+ }
315
+ interface TransitResult {
316
+ natal: Chart;
317
+ at: Date;
318
+ positions: BodyPosition[];
319
+ /** Moving-body-to-natal-body aspects, sorted by orb. */
320
+ aspects: InterAspect[];
321
+ }
322
+ type MoonPhaseName = "New Moon" | "Waxing Crescent" | "First Quarter" | "Waxing Gibbous" | "Full Moon" | "Waning Gibbous" | "Last Quarter" | "Waning Crescent";
323
+ interface MoonPhase {
324
+ at: Date;
325
+ /** Elongation Moon minus Sun: 0 = new, 180 = full. */
326
+ angle: number;
327
+ /** Illuminated fraction in [0, 1]. */
328
+ illumination: number;
329
+ name: MoonPhaseName;
330
+ waxing: boolean;
331
+ /** The ephemeris the Sun and the Moon came from, as a BodyPosition names it; set by the engine from 1.1.0-rc.10. */
332
+ ephemeris?: string;
333
+ /** Present when `ephemeris` is astronomy-engine as a fallback from the shipped DE440 pack, and says why. */
334
+ fallback?: EphemerisFallback;
335
+ }
336
+ /** This package's version, as package.json names it. A string: it changes with every release. */
337
+ declare const ENGINE_VERSION: string;
338
+ /**
339
+ * astronomy-engine, the ephemeris the engine computes on where the shipped
340
+ * DE440 pack is not the source: outside the pack's years, after
341
+ * `setDefaultEphemeris("astronomy-engine")`, and in the entries that compute
342
+ * on it themselves (calc, window, the sky entry's rising and setting). The
343
+ * dependency is pinned to this exact version, so receipts can name it
344
+ * without asking the caller. Until 1.1.0-rc.7 it was underneath every
345
+ * position.
346
+ */
347
+ declare const EPHEMERIS: Readonly<{
348
+ name: "astronomy-engine";
349
+ version: string;
350
+ }>;
351
+
352
+ 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 InstantFlag as r, type MoonPhaseName as s, type PointName as t, type PointPosition as u, type Polarity as v, type SignDefinition as w, type SourceBody as x };
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-BCnyWBQZ.js';
2
+ import { b as AyanamsaValue, A as AyanamsaName, c as AyanamsaDefinition } from './ayanamsa-Clgkekhh.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-Clgkekhh.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 };