@zodiacs/engine 0.1.1-rc.15 → 1.0.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.
- package/CHANGELOG.md +891 -0
- package/LICENSING.md +192 -12
- package/NOTICE +96 -2
- package/README.md +296 -66
- package/dist/{api-CoB_kqE3.d.ts → api-WbxJ4Wj-.d.ts} +15 -10
- package/dist/ayanamsa--YQ46fET.d.ts +134 -0
- package/dist/calc.d.ts +390 -0
- package/dist/calc.js +1039 -0
- package/dist/chunk-47ERTK5X.js +27 -0
- package/dist/chunk-7TRLIFFI.js +56 -0
- package/dist/chunk-A3U2ZS2W.js +29 -0
- package/dist/{chunk-KHBLFXFG.js → chunk-B5LKF437.js} +29 -28
- package/dist/{chunk-ONBZ4HK7.js → chunk-BHJXUY67.js} +4 -2
- package/dist/{chunk-OYGRVGXD.js → chunk-CHSYDKBL.js} +3 -3
- package/dist/{chunk-ZHVI3KWJ.js → chunk-DMGHYCDI.js} +4 -4
- package/dist/{chunk-CWI4YUDL.js → chunk-FTX3JDJA.js} +21 -18
- package/dist/{chunk-MFF3VKO3.js → chunk-OG4OYTJJ.js} +47 -42
- package/dist/{chunk-ZZPITHQS.js → chunk-SRXBTP5H.js} +199 -65
- package/dist/{chunk-AECKV73C.js → chunk-TSS2SZWQ.js} +8 -2
- package/dist/chunk-WS3TDSP3.js +474 -0
- package/dist/chunk-YIITY7Q7.js +483 -0
- package/dist/crossings.d.ts +8 -7
- package/dist/crossings.js +1 -1
- package/dist/deltat.d.ts +28 -3
- package/dist/deltat.js +1 -1
- package/dist/geo.d.ts +33 -12
- package/dist/geo.js +17 -458
- package/dist/{internal-math-BbktkHCc.d.ts → houses-CFERsAlK.d.ts} +14 -160
- package/dist/houses-extra.d.ts +95 -0
- package/dist/houses-extra.js +339 -0
- package/dist/index.d.ts +34 -48
- package/dist/index.js +31 -23
- package/dist/internal-math-DJJ8BYex.d.ts +174 -0
- package/dist/internal-math.d.ts +3 -2
- package/dist/internal-math.js +2 -2
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +5 -5
- package/dist/receipt.d.ts +2 -243
- package/dist/receipt.js +78 -37
- package/dist/reference-span-CILpclrz.d.ts +40 -0
- package/dist/rulers-Dla6h_Sm.d.ts +15 -0
- package/dist/sky.d.ts +173 -0
- package/dist/sky.js +379 -0
- package/dist/techniques.d.ts +453 -0
- package/dist/techniques.js +823 -0
- package/dist/timing.d.ts +113 -17
- package/dist/timing.js +98 -64
- package/dist/{types-BsWaqwU_.d.ts → types-B-yb_tGL.d.ts} +23 -11
- package/dist/vedic.d.ts +42 -124
- package/dist/vedic.js +44 -458
- package/dist/window.d.ts +180 -0
- package/dist/window.js +960 -0
- package/dist/zone-history-ghdyO0Sc.d.ts +268 -0
- package/package.json +25 -3
package/dist/timing.d.ts
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { T as TraditionalPlanet } from './rulers-Dla6h_Sm.js';
|
|
2
|
+
export { C as CHALDEAN_ORDER, a as TRADITIONAL_RULERS } from './rulers-Dla6h_Sm.js';
|
|
3
|
+
import { B as BodyName, s as PointName, Z as ZodiacSign, b as HouseNumber, D as DateInput, k as Sect } from './types-B-yb_tGL.js';
|
|
4
|
+
import { N as NatalSource } from './api-WbxJ4Wj-.js';
|
|
3
5
|
import './deltat.js';
|
|
4
6
|
import './crossings.js';
|
|
5
7
|
|
|
6
|
-
/** The seven visible planets of the traditional rulership scheme. */
|
|
7
|
-
type TraditionalPlanet = "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn";
|
|
8
|
-
/** The traditional domicile ruler of each sign; the outer planets rule none. */
|
|
9
|
-
declare const TRADITIONAL_RULERS: Readonly<Record<ZodiacSign, TraditionalPlanet>>;
|
|
10
|
-
/** The seven planets in descending order of their spheres, Saturn to the Moon. */
|
|
11
|
-
declare const CHALDEAN_ORDER: readonly TraditionalPlanet[];
|
|
12
|
-
|
|
13
8
|
/** The four angles of a chart with a birth time and place. */
|
|
14
9
|
type AngleName = "Ascendant" | "Midheaven" | "Descendant" | "Imum Coeli";
|
|
15
10
|
/** A natal longitude a technique can start from or direct: a body, an angle or a chart point. */
|
|
@@ -113,9 +108,9 @@ interface ProfectionAt {
|
|
|
113
108
|
/** Options for the dated profections. */
|
|
114
109
|
interface ProfectionOptions {
|
|
115
110
|
/** The natal body, angle or chart point to profect; `"Ascendant"` by default. */
|
|
116
|
-
readonly point?: ChartLongitudeName;
|
|
111
|
+
readonly point?: ChartLongitudeName | undefined;
|
|
117
112
|
/** `"solar"` by default. */
|
|
118
|
-
readonly months?: ProfectionMonthConvention;
|
|
113
|
+
readonly months?: ProfectionMonthConvention | undefined;
|
|
119
114
|
}
|
|
120
115
|
/**
|
|
121
116
|
* The profection year of an age, dated, with its months. Year n runs from the
|
|
@@ -208,12 +203,12 @@ interface FirdariaAt {
|
|
|
208
203
|
/** Options for the firdaria functions. */
|
|
209
204
|
interface FirdariaOptions {
|
|
210
205
|
/** Where the nodes fall by night; `"abu-mashar"` by default. */
|
|
211
|
-
readonly variant?: FirdariaVariant;
|
|
206
|
+
readonly variant?: FirdariaVariant | undefined;
|
|
212
207
|
}
|
|
213
208
|
/** Options for {@link firdaria}. */
|
|
214
209
|
interface FirdariaTimelineOptions extends FirdariaOptions {
|
|
215
210
|
/** 75-year cycles to date, 1 to 4; 1 by default. */
|
|
216
|
-
readonly cycles?: number;
|
|
211
|
+
readonly cycles?: number | undefined;
|
|
217
212
|
}
|
|
218
213
|
/**
|
|
219
214
|
* The firdaria lords in order: by day the planets from the Sun, by night from
|
|
@@ -320,14 +315,14 @@ interface ReleasingAt {
|
|
|
320
315
|
/** Options for {@link releasingPeriods} and {@link zodiacalReleasing}. */
|
|
321
316
|
interface ReleasingOptions {
|
|
322
317
|
/** The deepest level, 1 to 4; 2 by default. */
|
|
323
|
-
readonly levels?: ReleasingLevel;
|
|
318
|
+
readonly levels?: ReleasingLevel | undefined;
|
|
324
319
|
/** `"valens-360"` by default. */
|
|
325
|
-
readonly years?: ReleasingYearConvention;
|
|
320
|
+
readonly years?: ReleasingYearConvention | undefined;
|
|
326
321
|
}
|
|
327
322
|
/** Options for {@link releasingAt} and {@link zodiacalReleasingAt}. */
|
|
328
323
|
interface ReleasingAtOptions {
|
|
329
324
|
/** `"valens-360"` by default. */
|
|
330
|
-
readonly years?: ReleasingYearConvention;
|
|
325
|
+
readonly years?: ReleasingYearConvention | undefined;
|
|
331
326
|
}
|
|
332
327
|
/**
|
|
333
328
|
* The periods of levels 1 to `options.levels` (2 by default) that overlap
|
|
@@ -411,4 +406,105 @@ declare function directLongitudes(rows: readonly {
|
|
|
411
406
|
*/
|
|
412
407
|
declare function solarArcDirections(natal: NatalSource, target: DateInput): SolarArcDirections;
|
|
413
408
|
|
|
414
|
-
|
|
409
|
+
/**
|
|
410
|
+
* The bodies a return can be asked for.
|
|
411
|
+
*
|
|
412
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
413
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
414
|
+
* release.
|
|
415
|
+
*/
|
|
416
|
+
type ReturnBody = "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto";
|
|
417
|
+
/**
|
|
418
|
+
* The bodies a return can be asked for, in the order of ReturnBody.
|
|
419
|
+
*
|
|
420
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
421
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
422
|
+
* release.
|
|
423
|
+
*/
|
|
424
|
+
declare const RETURN_BODIES: readonly ReturnBody[];
|
|
425
|
+
/**
|
|
426
|
+
* Days between the coarse samples of each body's search: two steps are
|
|
427
|
+
* shorter than the shortest time between two stations from 1800 to 2200
|
|
428
|
+
* (19.75 days for Mercury, 40.75 for Venus, 59.75 for Mars, longer for the
|
|
429
|
+
* others), and one step moves the Moon at most 15.4°.
|
|
430
|
+
*
|
|
431
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
432
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
433
|
+
* release.
|
|
434
|
+
*/
|
|
435
|
+
declare const RETURN_STEP_DAYS: Readonly<Record<ReturnBody, number>>;
|
|
436
|
+
/**
|
|
437
|
+
* One return: an instant in the window at which the body is on its natal longitude.
|
|
438
|
+
*
|
|
439
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
440
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
441
|
+
* release.
|
|
442
|
+
*/
|
|
443
|
+
interface PlanetaryReturn {
|
|
444
|
+
readonly at: Date;
|
|
445
|
+
/** True when the body was moving backward through the degree. */
|
|
446
|
+
readonly retrograde: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* The pass it belongs to, from 1 in the window. A pass is one approach to
|
|
449
|
+
* the degree: a single direct return, or direct, retrograde and direct
|
|
450
|
+
* returns around a station.
|
|
451
|
+
*/
|
|
452
|
+
readonly pass: number;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* `stepDays` (default {@link RETURN_STEP_DAYS}) and `maxSamples`, a budget of longitude evaluations.
|
|
456
|
+
*
|
|
457
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
458
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
459
|
+
* release.
|
|
460
|
+
*/
|
|
461
|
+
interface PlanetaryReturnOptions {
|
|
462
|
+
readonly stepDays?: number | undefined;
|
|
463
|
+
readonly maxSamples?: number | undefined;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* The search's verdict with its returns: `"complete"` with every return it
|
|
467
|
+
* found, or `"refused"` with none when the budget ran out. Both carry the
|
|
468
|
+
* body, its natal longitude (the chart's, degrees in [0, 360)), the window,
|
|
469
|
+
* the longitude evaluations made (`samples`) and the result's flags.
|
|
470
|
+
*
|
|
471
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
472
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
473
|
+
* release.
|
|
474
|
+
*/
|
|
475
|
+
type PlanetaryReturns = {
|
|
476
|
+
readonly status: "complete";
|
|
477
|
+
readonly body: ReturnBody;
|
|
478
|
+
readonly natalLongitude: number;
|
|
479
|
+
readonly from: Date;
|
|
480
|
+
readonly to: Date;
|
|
481
|
+
readonly samples: number;
|
|
482
|
+
readonly flags: readonly TimingFlag[];
|
|
483
|
+
readonly returns: readonly PlanetaryReturn[];
|
|
484
|
+
} | {
|
|
485
|
+
readonly status: "refused";
|
|
486
|
+
readonly reason: "sample-budget";
|
|
487
|
+
readonly maxSamples: number;
|
|
488
|
+
readonly body: ReturnBody;
|
|
489
|
+
readonly natalLongitude: number;
|
|
490
|
+
readonly from: Date;
|
|
491
|
+
readonly to: Date;
|
|
492
|
+
readonly samples: number;
|
|
493
|
+
readonly flags: readonly TimingFlag[];
|
|
494
|
+
readonly returns: readonly [];
|
|
495
|
+
};
|
|
496
|
+
/**
|
|
497
|
+
* Every return of `body` to its natal longitude in (from, to]: the chart's
|
|
498
|
+
* own longitude of the body, then `searchLongitudeCrossings` over the window
|
|
499
|
+
* at the body's step. Retrograde returns are reported with direct ones. The
|
|
500
|
+
* search assumes smooth motion with at most one station in two steps; within
|
|
501
|
+
* that it finds a pair of returns around a station that falls between two
|
|
502
|
+
* samples. Invalid input throws RangeError. Frozen.
|
|
503
|
+
*
|
|
504
|
+
* @experimental Added in 0.1.1-rc.16: how returns
|
|
505
|
+
* are grouped into passes, and the searches' steps, may change in a minor
|
|
506
|
+
* release.
|
|
507
|
+
*/
|
|
508
|
+
declare function planetaryReturns(natal: NatalSource, body: ReturnBody, from: DateInput, to: DateInput, options?: PlanetaryReturnOptions): PlanetaryReturns;
|
|
509
|
+
|
|
510
|
+
export { type AngleName, type AnnualProfection, type ChartLongitudeName, DEFAULT_FIRDARIA_VARIANT, DEFAULT_PROFECTION_MONTHS, DEFAULT_RELEASING_YEARS, type DatedFirdariaPeriod, type DatedFirdariaSubPeriod, type DirectedLongitude, type DirectedPosition, FIRDARIA_CYCLE_YEARS, FIRDARIA_VARIANTS, FIRDARIA_YEARS, type FirdariaAt, type FirdariaConventions, type FirdariaLord, type FirdariaOptions, type FirdariaPeriod, type FirdariaSubPeriod, type FirdariaTimeline, type FirdariaTimelineOptions, type FirdariaVariant, PROFECTION_MONTH_CONVENTIONS, type PlanetaryReturn, type PlanetaryReturnOptions, type PlanetaryReturns, type ProfectionAt, type ProfectionConventions, type ProfectionMonth, type ProfectionMonthConvention, type ProfectionOptions, type ProfectionOrigin, type ProfectionSpan, type ProfectionYear, type ProfectionYearSpan, RELEASING_CYCLE_UNITS, RELEASING_UNIT_DAYS, RELEASING_YEAR_CONVENTIONS, RETURN_BODIES, RETURN_STEP_DAYS, type ReleasingAt, type ReleasingAtOptions, type ReleasingConventions, type ReleasingLevel, type ReleasingLot, type ReleasingOptions, type ReleasingOrigin, type ReleasingPeriod, type ReleasingTimeline, type ReleasingYearConvention, type ReturnBody, type SolarArc, type SolarArcDirections, type TimingFlag, type TimingOrigin, TraditionalPlanet, VALENS_MINOR_YEARS, annualProfection, directLongitudes, firdaria, firdariaAt, firdariaPeriods, firdariaSequence, planetaryReturns, profectionAt, profectionYear, releasingAt, releasingPeriods, solarArc, solarArcDirections, zodiacalReleasing, zodiacalReleasingAt };
|
package/dist/timing.js
CHANGED
|
@@ -1,86 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CHALDEAN_ORDER,
|
|
3
|
+
TRADITIONAL_RULERS
|
|
4
|
+
} from "./chunk-A3U2ZS2W.js";
|
|
5
|
+
import {
|
|
6
|
+
readOptions
|
|
7
|
+
} from "./chunk-47ERTK5X.js";
|
|
1
8
|
import {
|
|
2
9
|
PROGRESSION_DAYS_PER_YEAR,
|
|
3
10
|
progressedBodies,
|
|
4
11
|
progressedInstant
|
|
5
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-CHSYDKBL.js";
|
|
6
13
|
import {
|
|
7
14
|
chartDeclinations,
|
|
8
15
|
chartPoints,
|
|
9
16
|
findLongitudeCrossings,
|
|
10
17
|
resolvedChart,
|
|
18
|
+
searchLongitudeCrossings,
|
|
11
19
|
utcOf
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-AECKV73C.js";
|
|
14
|
-
import "./chunk-PFGUCNOK.js";
|
|
15
|
-
import {
|
|
16
|
-
bodyLongitude
|
|
17
|
-
} from "./chunk-ZZPITHQS.js";
|
|
18
|
-
import "./chunk-ZHVI3KWJ.js";
|
|
20
|
+
} from "./chunk-FTX3JDJA.js";
|
|
19
21
|
import {
|
|
20
22
|
dateFrom
|
|
21
23
|
} from "./chunk-CPALRSPC.js";
|
|
24
|
+
import "./chunk-TSS2SZWQ.js";
|
|
25
|
+
import "./chunk-PFGUCNOK.js";
|
|
26
|
+
import {
|
|
27
|
+
bodyLongitude
|
|
28
|
+
} from "./chunk-SRXBTP5H.js";
|
|
22
29
|
import {
|
|
23
30
|
outsideReferenceSpan
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-B5LKF437.js";
|
|
32
|
+
import "./chunk-BHJXUY67.js";
|
|
33
|
+
import "./chunk-DMGHYCDI.js";
|
|
26
34
|
import {
|
|
27
|
-
|
|
35
|
+
SIGN_SLUGS,
|
|
28
36
|
degreeInSign,
|
|
29
37
|
normalizeLongitude,
|
|
30
38
|
signForLongitude,
|
|
31
39
|
signIndexForLongitude
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
|
|
34
|
-
// src/timing/rulers.ts
|
|
35
|
-
var TRADITIONAL_RULERS = /* @__PURE__ */ Object.freeze({
|
|
36
|
-
aries: "Mars",
|
|
37
|
-
taurus: "Venus",
|
|
38
|
-
gemini: "Mercury",
|
|
39
|
-
cancer: "Moon",
|
|
40
|
-
leo: "Sun",
|
|
41
|
-
virgo: "Mercury",
|
|
42
|
-
libra: "Venus",
|
|
43
|
-
scorpio: "Mars",
|
|
44
|
-
sagittarius: "Jupiter",
|
|
45
|
-
capricorn: "Saturn",
|
|
46
|
-
aquarius: "Saturn",
|
|
47
|
-
pisces: "Jupiter"
|
|
48
|
-
});
|
|
49
|
-
var CHALDEAN_ORDER = /* @__PURE__ */ Object.freeze([
|
|
50
|
-
"Saturn",
|
|
51
|
-
"Jupiter",
|
|
52
|
-
"Mars",
|
|
53
|
-
"Sun",
|
|
54
|
-
"Venus",
|
|
55
|
-
"Mercury",
|
|
56
|
-
"Moon"
|
|
57
|
-
]);
|
|
40
|
+
} from "./chunk-OG4OYTJJ.js";
|
|
58
41
|
|
|
59
42
|
// src/timing/shared.ts
|
|
60
43
|
var DAY_MS = 864e5;
|
|
61
44
|
var MAX_DATE_MS = 864e13;
|
|
62
|
-
function readOptions(value, allowed, label) {
|
|
63
|
-
const out = /* @__PURE__ */ Object.create(null);
|
|
64
|
-
if (value === void 0) return out;
|
|
65
|
-
if (value === null || typeof value !== "object" || Array.isArray(value)) {
|
|
66
|
-
throw new RangeError(`${label} must be an options object.`);
|
|
67
|
-
}
|
|
68
|
-
const prototype = Object.getPrototypeOf(value);
|
|
69
|
-
if (prototype !== Object.prototype && prototype !== null) {
|
|
70
|
-
throw new RangeError(`${label} must be a plain options object.`);
|
|
71
|
-
}
|
|
72
|
-
for (const key of Reflect.ownKeys(value)) {
|
|
73
|
-
if (typeof key !== "string" || !allowed.includes(key)) {
|
|
74
|
-
throw new RangeError(`${label} has an unknown option: ${String(key)}.`);
|
|
75
|
-
}
|
|
76
|
-
const slot = Object.getOwnPropertyDescriptor(value, key);
|
|
77
|
-
if (!slot || !("value" in slot) || !slot.enumerable) {
|
|
78
|
-
throw new RangeError(`${label} must contain only plain data properties.`);
|
|
79
|
-
}
|
|
80
|
-
if (slot.value !== void 0) out[key] = slot.value;
|
|
81
|
-
}
|
|
82
|
-
return out;
|
|
83
|
-
}
|
|
84
45
|
function oneOf(value, allowed, fallback, label) {
|
|
85
46
|
if (value === void 0) return fallback;
|
|
86
47
|
if (typeof value === "string" && allowed.includes(value)) return value;
|
|
@@ -94,7 +55,7 @@ function integerIn(value, minimum, maximum, label) {
|
|
|
94
55
|
}
|
|
95
56
|
function startSign(value, label) {
|
|
96
57
|
if (typeof value === "string") {
|
|
97
|
-
const index =
|
|
58
|
+
const index = SIGN_SLUGS.indexOf(value);
|
|
98
59
|
if (index >= 0) return { index, lon: null };
|
|
99
60
|
} else if (typeof value === "number" && Number.isFinite(value)) {
|
|
100
61
|
const lon = normalizeLongitude(value);
|
|
@@ -106,7 +67,7 @@ function originOf(index, lon, point) {
|
|
|
106
67
|
return Object.freeze({ point, lon, sign: signAt(index) });
|
|
107
68
|
}
|
|
108
69
|
function signAt(index) {
|
|
109
|
-
const sign =
|
|
70
|
+
const sign = SIGN_SLUGS[(index % 12 + 12) % 12];
|
|
110
71
|
if (sign === void 0) throw new RangeError("Could not resolve zodiac sign.");
|
|
111
72
|
return sign;
|
|
112
73
|
}
|
|
@@ -578,15 +539,15 @@ var RELEASING_YEAR_CONVENTIONS = /* @__PURE__ */ Object.freeze([
|
|
|
578
539
|
]);
|
|
579
540
|
var DEFAULT_RELEASING_YEARS = "valens-360";
|
|
580
541
|
var RELEASING_UNIT_DAYS = /* @__PURE__ */ Object.freeze({
|
|
581
|
-
"valens-360": /* @__PURE__ */ Object.freeze([360, 30, 2.5,
|
|
582
|
-
"julian-365.25": /* @__PURE__ */ Object.freeze([365.25,
|
|
542
|
+
"valens-360": /* @__PURE__ */ Object.freeze([360, 30, 2.5, 0.20833333333333334]),
|
|
543
|
+
"julian-365.25": /* @__PURE__ */ Object.freeze([365.25, 30.4375, 2.5364583333333335, 0.2113715277777778])
|
|
583
544
|
});
|
|
584
545
|
var LEVEL4_UNIT_MS = /* @__PURE__ */ Object.freeze({
|
|
585
546
|
"valens-360": 18e6,
|
|
586
547
|
"julian-365.25": 18262500
|
|
587
548
|
});
|
|
588
549
|
var LEVEL_SCALE = /* @__PURE__ */ Object.freeze({ 1: 1728, 2: 144, 3: 12, 4: 1 });
|
|
589
|
-
var MINOR = /* @__PURE__ */ Object.freeze(/* @__PURE__ */
|
|
550
|
+
var MINOR = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ SIGN_SLUGS.map((sign) => VALENS_MINOR_YEARS[sign]));
|
|
590
551
|
var MAX_PERIODS = 1e5;
|
|
591
552
|
var CONVENTIONS = /* @__PURE__ */ new Map();
|
|
592
553
|
function conventionsFor3(years) {
|
|
@@ -820,6 +781,76 @@ function solarArcDirections(natal, target) {
|
|
|
820
781
|
const flags = timingFlags([arc.birth.getTime(), arc.progressed.getTime()], sectContradictsAltitude(chart, points));
|
|
821
782
|
return Object.freeze({ arc, positions: Object.freeze(positions), flags });
|
|
822
783
|
}
|
|
784
|
+
|
|
785
|
+
// src/timing/planetary-returns.ts
|
|
786
|
+
var RETURN_BODIES = /* @__PURE__ */ Object.freeze([
|
|
787
|
+
"Sun",
|
|
788
|
+
"Moon",
|
|
789
|
+
"Mercury",
|
|
790
|
+
"Venus",
|
|
791
|
+
"Mars",
|
|
792
|
+
"Jupiter",
|
|
793
|
+
"Saturn",
|
|
794
|
+
"Uranus",
|
|
795
|
+
"Neptune",
|
|
796
|
+
"Pluto"
|
|
797
|
+
]);
|
|
798
|
+
var RETURN_STEP_DAYS = /* @__PURE__ */ Object.freeze({
|
|
799
|
+
Sun: 5,
|
|
800
|
+
Moon: 1,
|
|
801
|
+
Mercury: 2,
|
|
802
|
+
Venus: 4,
|
|
803
|
+
Mars: 5,
|
|
804
|
+
Jupiter: 5,
|
|
805
|
+
Saturn: 5,
|
|
806
|
+
Uranus: 5,
|
|
807
|
+
Neptune: 5,
|
|
808
|
+
Pluto: 5
|
|
809
|
+
});
|
|
810
|
+
function planetaryReturns(natal, body, from, to, options) {
|
|
811
|
+
if (typeof body !== "string" || !RETURN_BODIES.includes(body)) {
|
|
812
|
+
throw new RangeError(`body must be one of ${RETURN_BODIES.join(", ")}.`);
|
|
813
|
+
}
|
|
814
|
+
const start = dateFrom(from, "from");
|
|
815
|
+
const end = dateFrom(to, "to");
|
|
816
|
+
const read = readOptions(options, ["stepDays", "maxSamples"], "planetaryReturns options");
|
|
817
|
+
const stepDays = read.stepDays === void 0 ? RETURN_STEP_DAYS[body] : read.stepDays;
|
|
818
|
+
const { chart } = guarded(() => resolvedChart(natal));
|
|
819
|
+
const natalBody = chart.bodies.find((row) => row.body === body);
|
|
820
|
+
if (!natalBody) throw new RangeError(`The chart has no ${body}.`);
|
|
821
|
+
const natalLongitude = natalBody.lon;
|
|
822
|
+
const search = guarded(
|
|
823
|
+
() => searchLongitudeCrossings(body, natalLongitude, start, end, {
|
|
824
|
+
stepDays,
|
|
825
|
+
...read.maxSamples === void 0 ? {} : { maxSamples: read.maxSamples }
|
|
826
|
+
})
|
|
827
|
+
);
|
|
828
|
+
const common = {
|
|
829
|
+
body,
|
|
830
|
+
natalLongitude,
|
|
831
|
+
from: start,
|
|
832
|
+
to: end,
|
|
833
|
+
samples: search.samples,
|
|
834
|
+
flags: timingFlags([utcOf(chart.input).getTime(), start.getTime(), end.getTime()], false)
|
|
835
|
+
};
|
|
836
|
+
if (search.status === "refused") {
|
|
837
|
+
return Object.freeze({
|
|
838
|
+
...common,
|
|
839
|
+
status: "refused",
|
|
840
|
+
reason: search.reason,
|
|
841
|
+
maxSamples: search.maxSamples,
|
|
842
|
+
returns: Object.freeze([])
|
|
843
|
+
});
|
|
844
|
+
}
|
|
845
|
+
let pass = 0;
|
|
846
|
+
let previousDirect = true;
|
|
847
|
+
const returns = search.crossings.map((crossing) => {
|
|
848
|
+
if (pass === 0 || previousDirect && !crossing.retrograde) pass += 1;
|
|
849
|
+
previousDirect = !crossing.retrograde;
|
|
850
|
+
return Object.freeze({ at: crossing.at, retrograde: crossing.retrograde, pass });
|
|
851
|
+
});
|
|
852
|
+
return Object.freeze({ ...common, status: "complete", returns: Object.freeze(returns) });
|
|
853
|
+
}
|
|
823
854
|
export {
|
|
824
855
|
CHALDEAN_ORDER,
|
|
825
856
|
DEFAULT_FIRDARIA_VARIANT,
|
|
@@ -832,6 +863,8 @@ export {
|
|
|
832
863
|
RELEASING_CYCLE_UNITS,
|
|
833
864
|
RELEASING_UNIT_DAYS,
|
|
834
865
|
RELEASING_YEAR_CONVENTIONS,
|
|
866
|
+
RETURN_BODIES,
|
|
867
|
+
RETURN_STEP_DAYS,
|
|
835
868
|
TRADITIONAL_RULERS,
|
|
836
869
|
VALENS_MINOR_YEARS,
|
|
837
870
|
annualProfection,
|
|
@@ -840,6 +873,7 @@ export {
|
|
|
840
873
|
firdariaAt,
|
|
841
874
|
firdariaPeriods,
|
|
842
875
|
firdariaSequence,
|
|
876
|
+
planetaryReturns,
|
|
843
877
|
profectionAt,
|
|
844
878
|
profectionYear,
|
|
845
879
|
releasingAt,
|
|
@@ -2,6 +2,12 @@ import { DeltaT } from './deltat.js';
|
|
|
2
2
|
|
|
3
3
|
/** The scale an input instant is on. UTC unless a caller says otherwise. */
|
|
4
4
|
type TimeScaleName = "utc" | "ut1" | "tt";
|
|
5
|
+
/**
|
|
6
|
+
* The ΔT model name for a value derived from leap seconds and IERS UT1 − UTC:
|
|
7
|
+
* a chart's from 1972 to the end of the IERS UT1 table. DELTA_T_MODEL names
|
|
8
|
+
* the model used at every other instant.
|
|
9
|
+
*/
|
|
10
|
+
declare const DELTA_T_IERS_MODEL = "iers-utc/1";
|
|
5
11
|
/** UT1 − UTC as used: IERS observed or predicted, or 0 within 0.9 s outside the table. */
|
|
6
12
|
interface Ut1MinusUtc {
|
|
7
13
|
seconds: number;
|
|
@@ -32,12 +38,12 @@ type Modality = "cardinal" | "fixed" | "mutable";
|
|
|
32
38
|
type Polarity = "day" | "night";
|
|
33
39
|
type HouseNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
34
40
|
interface SignDefinition {
|
|
35
|
-
slug: ZodiacSign;
|
|
36
|
-
name: string;
|
|
37
|
-
element: Element;
|
|
38
|
-
modality: Modality;
|
|
39
|
-
polarity: Polarity;
|
|
40
|
-
naturalHouse: HouseNumber;
|
|
41
|
+
readonly slug: ZodiacSign;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
readonly element: Element;
|
|
44
|
+
readonly modality: Modality;
|
|
45
|
+
readonly polarity: Polarity;
|
|
46
|
+
readonly naturalHouse: HouseNumber;
|
|
41
47
|
}
|
|
42
48
|
type BodyName = "Sun" | "Moon" | "Mercury" | "Venus" | "Mars" | "Jupiter" | "Saturn" | "Uranus" | "Neptune" | "Pluto" | "North Node" | "South Node";
|
|
43
49
|
type HouseSystem = "whole" | "placidus" | "porphyry" | "equal" | "equal-mc" | "vehlow" | "koch" | "regiomontanus" | "campanus" | "topocentric" | "alcabitius" | "morinus" | "meridian";
|
|
@@ -47,7 +53,11 @@ type ChartFlag = "dst-gap" | "dst-fold" | "lmt" | "no-time" | "polar-fallback" |
|
|
|
47
53
|
* when starting from a local wall time and IANA timezone.
|
|
48
54
|
*/
|
|
49
55
|
interface BirthInput {
|
|
50
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The instant, on the scale `timeScale` names: UTC by default, and UT1 or
|
|
58
|
+
* TT when `timeScale` says so. The field keeps its name on every scale,
|
|
59
|
+
* because receipts record it under that name (docs/time.md).
|
|
60
|
+
*/
|
|
51
61
|
utc: DateInput;
|
|
52
62
|
/** "utc" (default), "ut1" or "tt" (docs/time.md). */
|
|
53
63
|
timeScale?: TimeScaleName;
|
|
@@ -69,6 +79,7 @@ interface BirthInput {
|
|
|
69
79
|
deltaT?: number;
|
|
70
80
|
}
|
|
71
81
|
interface ChartInput {
|
|
82
|
+
/** The instant as given, on the scale `timeScale` names (UTC when it is absent), as BirthInput.utc. */
|
|
72
83
|
utc: Date;
|
|
73
84
|
/** Present when the instant is not UTC. */
|
|
74
85
|
timeScale?: Exclude<TimeScaleName, "utc">;
|
|
@@ -215,14 +226,15 @@ interface MoonPhase {
|
|
|
215
226
|
name: MoonPhaseName;
|
|
216
227
|
waxing: boolean;
|
|
217
228
|
}
|
|
218
|
-
|
|
229
|
+
/** This package's version, as package.json names it. A string: it changes with every release. */
|
|
230
|
+
declare const ENGINE_VERSION: string;
|
|
219
231
|
/**
|
|
220
232
|
* The ephemeris underneath every position. The dependency is pinned to this
|
|
221
233
|
* exact version, so receipts can name it without asking the caller.
|
|
222
234
|
*/
|
|
223
235
|
declare const EPHEMERIS: Readonly<{
|
|
224
|
-
|
|
225
|
-
|
|
236
|
+
name: "astronomy-engine";
|
|
237
|
+
version: string;
|
|
226
238
|
}>;
|
|
227
239
|
|
|
228
|
-
export { type Angles as A, type BodyName as B, type ChartInput as C, type DateInput as D, type Element as E, type HouseSystem as H, type InterAspect as I, type LeapSeconds as L, type MoonPhase as M, type PairSummary as P, type SynastryResult as S, type TimeScaleName as T, type Ut1MinusUtc as U, type ZodiacSign as Z, type
|
|
240
|
+
export { type Angles as A, type BodyName as B, type ChartInput as C, type DateInput as D, type Element as E, type HouseSystem as H, type InterAspect as I, type LeapSeconds as L, type MoonPhase as M, type PairSummary as P, type SynastryResult as S, type TimeScaleName as T, type Ut1MinusUtc as U, type ZodiacSign as Z, type Houses as a, type HouseNumber as b, type BodyPosition as c, type Chart as d, type TimeScale as e, type AspectType as f, type ChartFlag as g, type BirthInput as h, type ChartPoints as i, type TransitResult as j, type Sect as k, type MinimalBody as l, type Modality as m, type Aspect as n, DELTA_T_IERS_MODEL 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 };
|