@zodiacs/engine 0.1.1-rc.14 → 0.1.1-rc.16

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 (64) hide show
  1. package/CHANGELOG.md +797 -6
  2. package/LICENSING.md +354 -21
  3. package/NOTICE +166 -9
  4. package/README.md +327 -84
  5. package/dist/api-VOW6Umy5.d.ts +197 -0
  6. package/dist/calc.d.ts +279 -0
  7. package/dist/calc.js +853 -0
  8. package/dist/{chunk-NAJ735VN.js → chunk-2OWGBT3O.js} +1 -1
  9. package/dist/{chunk-4OSOCZY2.js → chunk-4NV4ZEFZ.js} +21 -6
  10. package/dist/chunk-A3U2ZS2W.js +29 -0
  11. package/dist/chunk-I7O5EGFV.js +25 -0
  12. package/dist/chunk-KFTJMMG7.js +61 -0
  13. package/dist/chunk-KHBLFXFG.js +227 -0
  14. package/dist/chunk-L6ZHWJZ6.js +355 -0
  15. package/dist/chunk-N4B5JNMA.js +473 -0
  16. package/dist/chunk-O3NJRGJ2.js +56 -0
  17. package/dist/{chunk-RETEVD4F.js → chunk-WOU7JVD3.js} +293 -154
  18. package/dist/crossings.d.ts +1 -1
  19. package/dist/deltat.d.ts +8 -8
  20. package/dist/geo.d.ts +137 -8
  21. package/dist/geo.js +28 -166
  22. package/dist/houses-extra.d.ts +81 -0
  23. package/dist/houses-extra.js +337 -0
  24. package/dist/houses-q1O2GGp4.d.ts +128 -0
  25. package/dist/index.d.ts +8 -201
  26. package/dist/index.js +38 -315
  27. package/dist/internal-math-CmJ9xtaW.d.ts +160 -0
  28. package/dist/internal-math.d.ts +3 -2
  29. package/dist/internal-math.js +2 -2
  30. package/dist/internal.d.ts +2 -1
  31. package/dist/internal.js +4 -4
  32. package/dist/receipt.d.ts +74 -29
  33. package/dist/receipt.js +194 -33
  34. package/dist/rulers-9wljfVaO.d.ts +10 -0
  35. package/dist/sky.d.ts +158 -0
  36. package/dist/sky.js +377 -0
  37. package/dist/techniques.d.ts +410 -0
  38. package/dist/techniques.js +830 -0
  39. package/dist/timing.d.ts +473 -0
  40. package/dist/timing.js +904 -0
  41. package/dist/{types-CeafogFp.d.ts → types-B4MCoCCS.d.ts} +35 -4
  42. package/dist/tzdb-2025c-00-6GVG6RYL.js +6 -0
  43. package/dist/tzdb-2025c-01-CEYMG3LE.js +6 -0
  44. package/dist/tzdb-2025c-02-NWQJCVUU.js +6 -0
  45. package/dist/tzdb-2025c-03-PLHP6VH4.js +6 -0
  46. package/dist/tzdb-2025c-04-MEKUJA6M.js +6 -0
  47. package/dist/tzdb-2025c-05-3K5YKZBL.js +6 -0
  48. package/dist/tzdb-2025c-06-L2VV5XJV.js +6 -0
  49. package/dist/tzdb-2025c-07-H3GLGJGY.js +6 -0
  50. package/dist/tzdb-2025c-08-DA7QQIGD.js +6 -0
  51. package/dist/tzdb-2025c-09-MTXIO3QL.js +6 -0
  52. package/dist/tzdb-2025c-10-ASL4UW5C.js +6 -0
  53. package/dist/tzdb-2025c-11-EQEOANYB.js +6 -0
  54. package/dist/tzdb-2025c-12-NKCCXJ5G.js +6 -0
  55. package/dist/tzdb-2025c-13-DYTF3UC7.js +6 -0
  56. package/dist/tzdb-2025c-14-C25H45R5.js +6 -0
  57. package/dist/tzdb-2025c-15-7OYYZWRY.js +6 -0
  58. package/dist/vedic.d.ts +393 -0
  59. package/dist/vedic.js +930 -0
  60. package/dist/window.d.ts +178 -0
  61. package/dist/window.js +961 -0
  62. package/package.json +31 -3
  63. package/dist/chunk-GFT24GFR.js +0 -25
  64. package/dist/internal-math-BE2hcSHd.d.ts +0 -271
@@ -0,0 +1,178 @@
1
+ import { H as HouseSystem, B as BodyName, Z as ZodiacSign, b as HouseNumber, g as AspectType, D as DateInput } from './types-B4MCoCCS.js';
2
+ import './deltat.js';
3
+
4
+ /** How far this release's switch instants have been checked. */
5
+ declare const WINDOW_VERIFICATION = "sampled at one-second resolution";
6
+ /** The longest window accepted: 48 hours, in milliseconds. */
7
+ declare const MAX_WINDOW_MS = 172800000;
8
+ /**
9
+ * Upper bounds on each body's longitude rate, degrees per day: twice the
10
+ * largest rate the engine's own positions reach from 1800 to 2200, scanned
11
+ * every hour for the Moon and the nodes, every three hours for Mercury, Venus
12
+ * and Mars, every six for the Sun and daily for the rest.
13
+ */
14
+ declare const WINDOW_RATE_BOUNDS: Readonly<Record<BodyName, number>>;
15
+ /** A rounding model: the true instant is uniform over the rounding unit of the record. */
16
+ interface WindowRounding {
17
+ /** The recorded time, resolved to an instant. */
18
+ recorded: DateInput;
19
+ /** The rounding unit, in minutes. */
20
+ minutes: number;
21
+ /**
22
+ * "nearest" (the default): the record is the nearest multiple of the unit,
23
+ * so the true instant lies within half a unit of it. "down": the record is
24
+ * the start of its unit, as a clock read without rounding up.
25
+ */
26
+ mode?: "nearest" | "down";
27
+ }
28
+ /**
29
+ * A window of possible birth instants, resolved by the caller, and a place.
30
+ * Give `start` and `end`, or `at` and `minutes` for [at − minutes, at +
31
+ * minutes), or only `rounding`, whose unit is then the window.
32
+ */
33
+ interface BirthWindowInput {
34
+ /** The first instant of the window. */
35
+ start?: DateInput;
36
+ /** The end of the window, which it does not include. */
37
+ end?: DateInput;
38
+ at?: DateInput;
39
+ /** Minutes either side of `at`, to the nearest millisecond. */
40
+ minutes?: number;
41
+ latitude: number;
42
+ longitude: number;
43
+ /** Defaults to "whole", as for natalChart. */
44
+ houseSystem?: HouseSystem;
45
+ /** A second prior for the cells' shares; its unit must lie inside the window. */
46
+ rounding?: WindowRounding;
47
+ }
48
+ interface WindowAspect {
49
+ a: BodyName;
50
+ b: BodyName;
51
+ type: AspectType;
52
+ }
53
+ /** The discrete features of the chart, as natalChart would give them, throughout a cell. */
54
+ interface WindowFeatures {
55
+ /** Each body's sign; null for the nodes inside an unresolved interval. */
56
+ signs: Record<BodyName, ZodiacSign | null>;
57
+ ascendant: ZodiacSign;
58
+ midheaven: ZodiacSign;
59
+ /**
60
+ * Each body's house, as houseOf gives it from the chart's cusps; null for
61
+ * the nodes inside an unresolved interval where the houses are whole signs.
62
+ */
63
+ houses: Record<BodyName, HouseNumber | null>;
64
+ /** The aspects in orb, in natalChart's pair order. */
65
+ aspects: WindowAspect[];
66
+ /** The house system used: the requested one, or "whole" where Placidus or Koch falls back. */
67
+ houseSystem: HouseSystem;
68
+ }
69
+ interface BirthWindowCell {
70
+ /** First instant of the cell. */
71
+ start: Date;
72
+ /** End of the cell, which it does not include. */
73
+ end: Date;
74
+ milliseconds: number;
75
+ /** Share of the window under a uniform prior. */
76
+ share: number;
77
+ /** Share under the rounding model, when one was given. */
78
+ roundedShare?: number;
79
+ features: WindowFeatures;
80
+ }
81
+ /** A change to or from null opens or closes an unresolved interval; it is not a crossing. */
82
+ type WindowChange = {
83
+ feature: "sign";
84
+ body: BodyName;
85
+ from: ZodiacSign | null;
86
+ to: ZodiacSign | null;
87
+ } | {
88
+ feature: "ascendant" | "midheaven";
89
+ from: ZodiacSign;
90
+ to: ZodiacSign;
91
+ } | {
92
+ feature: "house";
93
+ body: BodyName;
94
+ from: HouseNumber | null;
95
+ to: HouseNumber | null;
96
+ } | {
97
+ feature: "aspect";
98
+ a: BodyName;
99
+ b: BodyName;
100
+ from: AspectType | null;
101
+ to: AspectType | null;
102
+ } | {
103
+ feature: "house-system";
104
+ from: HouseSystem;
105
+ to: HouseSystem;
106
+ };
107
+ interface BirthWindowSwitch {
108
+ /**
109
+ * The first millisecond with the new features: the engine's value at the
110
+ * millisecond before differs, so the crossing lies in (at − 1 ms, at].
111
+ */
112
+ at: Date;
113
+ changes: WindowChange[];
114
+ }
115
+ /** Where the node's jitter would outlast the budget: these features are null in every cell of [start, end). */
116
+ interface WindowUnresolved {
117
+ start: Date;
118
+ /** The first instant at which they are resolved again. */
119
+ end: Date;
120
+ milliseconds: number;
121
+ features: {
122
+ feature: "sign" | "house";
123
+ body: "North Node" | "South Node";
124
+ }[];
125
+ }
126
+ type BirthWindowFlag = "polar-fallback"
127
+ /** An interval's end-to-end change broke a bound; completeness is then not established. */
128
+ | "bound-exceeded"
129
+ /** The result lists unresolved intervals. */
130
+ | "node-unresolved";
131
+ interface BirthWindow {
132
+ schema: "zodiacs.birth-window.v1";
133
+ /** How far the switch instants have been checked: dense one-second sampling, not proof. */
134
+ verification: typeof WINDOW_VERIFICATION;
135
+ start: Date;
136
+ end: Date;
137
+ latitude: number;
138
+ longitude: number;
139
+ /** The requested house system. */
140
+ houseSystem: HouseSystem;
141
+ rounding: {
142
+ recorded: Date;
143
+ minutes: number;
144
+ mode: "nearest" | "down";
145
+ start: Date;
146
+ end: Date;
147
+ } | null;
148
+ /** Cells in time order; they tile [start, end). */
149
+ cells: BirthWindowCell[];
150
+ /** Switches in time order, one per cell boundary. */
151
+ switches: BirthWindowSwitch[];
152
+ /** Intervals left unresolved, in time order; empty unless `node-unresolved` is flagged. */
153
+ unresolved: WindowUnresolved[];
154
+ flags: BirthWindowFlag[];
155
+ engineVersion: string;
156
+ }
157
+ /** Thrown when a window needs more evaluated instants than the search allows. An Error, not a RangeError. */
158
+ declare class WindowBudgetError extends Error {
159
+ readonly name = "WindowBudgetError";
160
+ /** The instants the search allows. */
161
+ readonly limit = 2000000;
162
+ constructor();
163
+ }
164
+ /**
165
+ * Partition a birth-time window, [start, end) of at most 48 hours inside
166
+ * REFERENCE_SPAN, into cells within which each body's sign and house, the
167
+ * signs of the ascendant and midheaven, the aspects in orb and any Placidus or
168
+ * Koch fallback are constant. Values are the engine's own at each millisecond,
169
+ * as a lone natalChart call computes them. Where the search's bounds hold
170
+ * (README), each cell holds natalChart's features at every millisecond, except
171
+ * the nodes' in the intervals listed in `unresolved`, which are null. Labelled
172
+ * {@link WINDOW_VERIFICATION}: checked against dense sampling, not proven.
173
+ * Throws RangeError for invalid input, and WindowBudgetError, which is not a
174
+ * RangeError, when the search would need more than two million instants.
175
+ */
176
+ declare function birthWindow(input: BirthWindowInput): BirthWindow;
177
+
178
+ export { type BirthWindow, type BirthWindowCell, type BirthWindowFlag, type BirthWindowInput, type BirthWindowSwitch, MAX_WINDOW_MS, WINDOW_RATE_BOUNDS, WINDOW_VERIFICATION, type WindowAspect, WindowBudgetError, type WindowChange, type WindowFeatures, type WindowRounding, type WindowUnresolved, birthWindow };