@zodiacs/engine 0.1.1-rc.16 → 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 (80) hide show
  1. package/CHANGELOG.md +1478 -0
  2. package/LICENSING.md +184 -30
  3. package/NOTICE +81 -14
  4. package/README.md +345 -67
  5. package/dist/{api-VOW6Umy5.d.ts → api-ChL1N2Sr.d.ts} +44 -7
  6. package/dist/ayanamsa-ClFzkKmV.d.ts +135 -0
  7. package/dist/calc.d.ts +218 -21
  8. package/dist/calc.js +580 -160
  9. package/dist/chunk-2PZYJQV5.js +83 -0
  10. package/dist/chunk-47ERTK5X.js +27 -0
  11. package/dist/{chunk-O3NJRGJ2.js → chunk-4XOYTBLS.js} +1 -1
  12. package/dist/chunk-767FTO7O.js +48 -0
  13. package/dist/{chunk-N4B5JNMA.js → chunk-7Y2F2IWN.js} +40 -28
  14. package/dist/chunk-B4M2Y7FT.js +96 -0
  15. package/dist/{chunk-KHBLFXFG.js → chunk-B5LKF437.js} +29 -28
  16. package/dist/{chunk-ONBZ4HK7.js → chunk-BHJXUY67.js} +4 -2
  17. package/dist/{chunk-PFGUCNOK.js → chunk-BMDASNPB.js} +6 -6
  18. package/dist/chunk-I3L4POY7.js +18 -0
  19. package/dist/{chunk-I7O5EGFV.js → chunk-LNGURVNH.js} +3 -3
  20. package/dist/{chunk-4NV4ZEFZ.js → chunk-NNOSOOWS.js} +4 -4
  21. package/dist/chunk-OVXQQEXL.js +41 -0
  22. package/dist/{chunk-WOU7JVD3.js → chunk-QLIEEICB.js} +205 -194
  23. package/dist/chunk-RMBWKZI2.js +130 -0
  24. package/dist/{chunk-AECKV73C.js → chunk-TSS2SZWQ.js} +8 -2
  25. package/dist/{chunk-L6ZHWJZ6.js → chunk-TZVPZHZM.js} +51 -29
  26. package/dist/chunk-WBTWY2OB.js +478 -0
  27. package/dist/chunk-Y4E3WJU5.js +87 -0
  28. package/dist/chunk-YPU3MDNI.js +852 -0
  29. package/dist/conventions.d.ts +70 -0
  30. package/dist/conventions.js +26 -0
  31. package/dist/crossings.d.ts +22 -10
  32. package/dist/crossings.js +1 -1
  33. package/dist/de440-pack.d.ts +43 -0
  34. package/dist/de440-pack.js +16 -0
  35. package/dist/de440.d.ts +113 -0
  36. package/dist/de440.js +19 -0
  37. package/dist/deltat.d.ts +28 -3
  38. package/dist/deltat.js +1 -1
  39. package/dist/ephemeris-exTSqBgb.d.ts +60 -0
  40. package/dist/geo.d.ts +46 -13
  41. package/dist/geo.js +4 -2
  42. package/dist/{houses-q1O2GGp4.d.ts → houses-Bh7GCnPi.d.ts} +14 -4
  43. package/dist/houses-extra.d.ts +22 -7
  44. package/dist/houses-extra.js +4 -2
  45. package/dist/index.d.ts +36 -49
  46. package/dist/index.js +54 -34
  47. package/dist/{internal-math-CmJ9xtaW.d.ts → internal-math-CxenuGfm.d.ts} +41 -27
  48. package/dist/internal-math.d.ts +4 -3
  49. package/dist/internal-math.js +14 -12
  50. package/dist/internal.d.ts +16 -7
  51. package/dist/internal.js +27 -6
  52. package/dist/lite-composite.js +114 -0
  53. package/dist/lite-declinations.js +253 -0
  54. package/dist/lite-dignities.js +333 -0
  55. package/dist/lite-sect.js +72 -0
  56. package/dist/lite.d.ts +82 -0
  57. package/dist/lite.js +4 -0
  58. package/dist/receipt.d.ts +3 -268
  59. package/dist/receipt.js +202 -89
  60. package/dist/reference-span-CILpclrz.d.ts +40 -0
  61. package/dist/{rulers-9wljfVaO.d.ts → rulers-CSSWtiWF.d.ts} +7 -2
  62. package/dist/sky.d.ts +26 -10
  63. package/dist/sky.js +23 -14
  64. package/dist/techniques.d.ts +160 -21
  65. package/dist/techniques.js +157 -89
  66. package/dist/time-bands-CZA9AlLg.d.ts +36 -0
  67. package/dist/time-scale-DIFNa0gz.d.ts +47 -0
  68. package/dist/time.d.ts +81 -0
  69. package/dist/time.js +74 -0
  70. package/dist/timing.d.ts +55 -17
  71. package/dist/timing.js +33 -45
  72. package/dist/types-DpPdtXgO.d.ts +335 -0
  73. package/dist/vedic.d.ts +150 -123
  74. package/dist/vedic.js +398 -440
  75. package/dist/window.d.ts +102 -80
  76. package/dist/window.js +108 -51
  77. package/dist/zone-history-BxmDCcTK.d.ts +290 -0
  78. package/package.json +26 -3
  79. package/dist/chunk-2OWGBT3O.js +0 -219
  80. package/dist/types-B4MCoCCS.d.ts +0 -228
package/dist/receipt.d.ts CHANGED
@@ -1,269 +1,4 @@
1
- import { T as TimeScaleName, H as HouseSystem, e as ChartFlag, d as Chart, f as BirthInput } from './types-B4MCoCCS.js';
1
+ import './time-scale-DIFNa0gz.js';
2
+ import './types-DpPdtXgO.js';
2
3
  import './deltat.js';
3
-
4
- /** Zodiacs-owned draft vocabulary; not an industry interoperability standard. */
5
- declare const NATAL_ENVELOPE_SCHEMA = "zodiacs.natal-envelope.draft-v1";
6
- declare const NATAL_RECEIPT_SCHEMA = "zodiacs.calculation-receipt.draft-v1";
7
- declare const NATAL_DIAGNOSTIC_SCHEMA = "zodiacs.natal-diagnostic.draft-v1";
8
- declare const NATAL_ENVELOPE_LIMITS: Readonly<{
9
- bytes: 65536;
10
- depth: 12;
11
- nodes: 4096;
12
- }>;
13
- type NatalEnvelopeErrorCode = "invalid_json" | "invalid_shape" | "invalid_value" | "inconsistent_result" | "invalid_context" | "size_limit" | "complexity_limit" | "unsupported_version" | "unsupported_feature";
14
- declare class NatalEnvelopeError extends Error {
15
- readonly code: NatalEnvelopeErrorCode;
16
- constructor(code: NatalEnvelopeErrorCode);
17
- }
18
- type NatalJsonValue = null | boolean | number | string | NatalJsonValue[] | NatalJsonObject;
19
- interface NatalJsonObject {
20
- [key: string]: NatalJsonValue;
21
- }
22
- type NatalReference = "supplied-instant" | "utc-noon" | "local-noon";
23
- /** A clock change a local resolution records. */
24
- interface NatalZoneTransition {
25
- at: string;
26
- offsetBeforeMinutes: number;
27
- offsetAfterMinutes: number;
28
- cause: "dst" | "legal-change" | "date-line";
29
- }
30
- /**
31
- * Captured assertions, checked arithmetically without consulting today's
32
- * Intl/tzdb. The fields after `policy` are optional from the time-basis
33
- * conventions set on, so a record in rc.14's shape is accepted, and absent
34
- * before it; each one given is checked. `resolveLocalToUtc` returns the whole
35
- * object as `localResolution` (docs/time.md).
36
- */
37
- interface NatalLocalResolution {
38
- /** The proleptic Gregorian date resolved. */
39
- date: string;
40
- time: string;
41
- timeZone: string;
42
- /** Offset at the resolved instant, minutes east of UTC; may be fractional. */
43
- offsetMinutes: number;
44
- /** Forward wall-clock shift; positive only for a reported gap. */
45
- gapShiftMinutes: number;
46
- policy: {
47
- fold: "earlier";
48
- gap: "shift-forward";
49
- };
50
- calendar?: "gregorian" | "julian";
51
- writtenDate?: string;
52
- tzdbVersion?: string | null;
53
- dataForm?: "main+backzone" | "main" | "host";
54
- clock?: "local-mean-time" | "legal";
55
- transition?: NatalZoneTransition | null;
56
- localMeanTime?: {
57
- longitude: number;
58
- zoneOffsetMinutes: number;
59
- } | null;
60
- }
61
- /** Supplied facts are claims, including hashes. This codec authenticates none of them. */
62
- interface NatalProvenanceClaims {
63
- source?: {
64
- repository: string;
65
- commit: string;
66
- };
67
- artifact?: {
68
- sha256: string;
69
- packageVersion: string;
70
- distributionRepository?: string;
71
- distributionCommit?: string;
72
- };
73
- runtime?: {
74
- name: string;
75
- version?: string;
76
- icuVersion?: string;
77
- tzdbVersion?: string;
78
- };
79
- ephemeris?: {
80
- name: "astronomy-engine";
81
- version: string;
82
- };
83
- }
84
- interface NatalEnvelopeContext {
85
- /** Omission never infers noon, including when timeKnown is false. */
86
- reference?: NatalReference;
87
- /** Original validated ISO spelling when captured; no zone/offset meaning is inferred. */
88
- sourceInstant?: string | null;
89
- localResolution?: NatalLocalResolution | null;
90
- provenance?: NatalProvenanceClaims;
91
- /** Optional JSON data only. Never executed, rendered, fetched or used for replay. */
92
- extensions?: NatalJsonObject;
93
- }
94
- /** The conventions engine versions 0.1.1-rc.3 to rc.6 recorded. Their receipts stay readable. */
95
- declare const CONVENTIONS_RC3: Readonly<{
96
- readonly calendar: "proleptic-gregorian";
97
- readonly zodiac: "tropical";
98
- readonly planetPositions: "apparent-geocentric-ecliptic-of-date";
99
- readonly moonPosition: "astronomy-engine-ecliptic-geo-moon";
100
- readonly moonNodes: "instantaneous-geocentric-moon-orbit-plane";
101
- readonly angles: "gast-and-mean-obliquity";
102
- readonly longitudeUnit: "degrees-[0,360)";
103
- readonly speed: "degrees-per-day;central-difference-plus-minus-0.25-day";
104
- readonly aspects: "major-aspects;sun-moon-eight-planets;no-nodes";
105
- }>;
106
- /** The conventions engine version 0.1.1-rc.7 recorded. Its receipts stay readable. */
107
- declare const CONVENTIONS_RC7: Readonly<{
108
- readonly angles: "gast-and-true-obliquity";
109
- readonly speed: "degrees-per-day;central-difference-plus-minus-0.001-day;nodes-plus-minus-0.25-day";
110
- readonly aspects: "major-aspects;sun-moon-eight-planets;no-nodes;applying-instantaneous-orb-rate";
111
- readonly calendar: "proleptic-gregorian";
112
- readonly zodiac: "tropical";
113
- readonly planetPositions: "apparent-geocentric-ecliptic-of-date";
114
- readonly moonPosition: "astronomy-engine-ecliptic-geo-moon";
115
- readonly moonNodes: "instantaneous-geocentric-moon-orbit-plane";
116
- readonly longitudeUnit: "degrees-[0,360)";
117
- }>;
118
- /**
119
- * The conventions engine versions 0.1.1-rc.8 to rc.14 recorded: the planets
120
- * corrected for light time and aberration but not for gravitational
121
- * deflection, the Moon's series for neither, and the instant read as UT1.
122
- * Their receipts stay readable.
123
- */
124
- declare const CONVENTIONS_RC8: Readonly<{
125
- readonly planetPositions: "aberrated-geocentric-ecliptic-of-date;no-deflection";
126
- readonly moonPosition: "astronomy-engine-ecliptic-geo-moon;no-light-time;no-aberration";
127
- readonly deltaT: "tt-minus-ut1;ut1-read-as-utc;value-in-result";
128
- readonly angles: "gast-and-true-obliquity";
129
- readonly speed: "degrees-per-day;central-difference-plus-minus-0.001-day;nodes-plus-minus-0.25-day";
130
- readonly aspects: "major-aspects;sun-moon-eight-planets;no-nodes;applying-instantaneous-orb-rate";
131
- readonly calendar: "proleptic-gregorian";
132
- readonly zodiac: "tropical";
133
- readonly moonNodes: "instantaneous-geocentric-moon-orbit-plane";
134
- readonly longitudeUnit: "degrees-[0,360)";
135
- }>;
136
- /**
137
- * The conventions engine version 0.1.1-rc.15 recorded: the rc.8 set, with the
138
- * time basis in the result (`result.timeScale`, docs/time.md) and local times
139
- * resolved on the shipped tzdb history before 1970, their flags from its
140
- * records. Its engine took astronomy-engine's nutation, the five largest terms
141
- * of IAU 2000B, which the set does not name. Its receipts stay readable.
142
- */
143
- declare const CONVENTIONS_RC15: Readonly<{
144
- readonly deltaT: "tt-minus-ut1;value-in-result";
145
- readonly timeScale: "tt-from-leap-seconds-and-ut1-from-iers-1972-to-table-end;delta-t-model-otherwise;in-result";
146
- readonly localTime: "tzdb-shards-before-1970;host-intl-from-1970;flags-from-transition-record";
147
- readonly planetPositions: "aberrated-geocentric-ecliptic-of-date;no-deflection";
148
- readonly moonPosition: "astronomy-engine-ecliptic-geo-moon;no-light-time;no-aberration";
149
- readonly angles: "gast-and-true-obliquity";
150
- readonly speed: "degrees-per-day;central-difference-plus-minus-0.001-day;nodes-plus-minus-0.25-day";
151
- readonly aspects: "major-aspects;sun-moon-eight-planets;no-nodes;applying-instantaneous-orb-rate";
152
- readonly calendar: "proleptic-gregorian";
153
- readonly zodiac: "tropical";
154
- readonly moonNodes: "instantaneous-geocentric-moon-orbit-plane";
155
- readonly longitudeUnit: "degrees-[0,360)";
156
- }>;
157
- /**
158
- * The conventions this engine records: the rc.15 set, naming the nutation,
159
- * the engine's own IAU 2000B series (all 77 luni-solar terms and the planetary
160
- * offsets, src/nutation.ts) with the two largest complementary terms of the
161
- * equation of the equinoxes, and the Moon as astronomy-engine's geocentric
162
- * series (GeoMoon) turned to the ecliptic of date by it.
163
- */
164
- declare const CONVENTIONS: Readonly<{
165
- readonly moonPosition: "astronomy-engine-geo-moon;no-light-time;no-aberration";
166
- readonly nutation: "iau2000b;equation-of-equinoxes-with-two-complementary-terms";
167
- readonly deltaT: "tt-minus-ut1;value-in-result";
168
- readonly timeScale: "tt-from-leap-seconds-and-ut1-from-iers-1972-to-table-end;delta-t-model-otherwise;in-result";
169
- readonly localTime: "tzdb-shards-before-1970;host-intl-from-1970;flags-from-transition-record";
170
- readonly planetPositions: "aberrated-geocentric-ecliptic-of-date;no-deflection";
171
- readonly angles: "gast-and-true-obliquity";
172
- readonly speed: "degrees-per-day;central-difference-plus-minus-0.001-day;nodes-plus-minus-0.25-day";
173
- readonly aspects: "major-aspects;sun-moon-eight-planets;no-nodes;applying-instantaneous-orb-rate";
174
- readonly calendar: "proleptic-gregorian";
175
- readonly zodiac: "tropical";
176
- readonly moonNodes: "instantaneous-geocentric-moon-orbit-plane";
177
- readonly longitudeUnit: "degrees-[0,360)";
178
- }>;
179
- type ConventionSet = typeof CONVENTIONS | typeof CONVENTIONS_RC15 | typeof CONVENTIONS_RC8 | typeof CONVENTIONS_RC7 | typeof CONVENTIONS_RC3;
180
- /** Every conventions set a receipt may carry, the current one first. */
181
- declare const NATAL_RECEIPT_CONVENTION_SETS: readonly [
182
- typeof CONVENTIONS,
183
- typeof CONVENTIONS_RC15,
184
- typeof CONVENTIONS_RC8,
185
- typeof CONVENTIONS_RC7,
186
- typeof CONVENTIONS_RC3
187
- ];
188
- declare const COVERAGE: Readonly<{
189
- readonly assessment: "finite-reference-cases-only";
190
- readonly broadDateRange: "not-certified";
191
- readonly angleExclusions: "exact-geographic-poles-and-ecliptic-horizon-coincidence";
192
- readonly inputSyntax: "not-an-astronomical-accuracy-guarantee";
193
- }>;
194
- interface NatalReceipt {
195
- schema: typeof NATAL_RECEIPT_SCHEMA;
196
- /** On the scale `timeScale` names; UTC before the time-basis set. */
197
- instant: string;
198
- timeScale?: TimeScaleName;
199
- sourceInstant: string | null;
200
- /** Caller declaration, not verification of a human birth time's precision. */
201
- timeKnown: boolean;
202
- reference: NatalReference;
203
- localResolution: NatalLocalResolution | null;
204
- coordinates: {
205
- latitude: number;
206
- longitude: number;
207
- } | null;
208
- houses: {
209
- requested: HouseSystem;
210
- actual: HouseSystem | null;
211
- absenceReason: "unknown-time" | "missing-location" | null;
212
- };
213
- /** Only time-resolution assertions may be supplied to this draft's creator. */
214
- inputFlags: ChartFlag[];
215
- resultFlags: ChartFlag[];
216
- /** From the current conventions set on, the engine also names its ephemeris. */
217
- engine: {
218
- name: "@zodiacs/engine";
219
- version: string;
220
- ephemeris?: {
221
- name: "astronomy-engine";
222
- version: string;
223
- };
224
- };
225
- provenance: (NatalProvenanceClaims & {
226
- status: "claimed";
227
- }) | null;
228
- conventions: ConventionSet;
229
- coverage: typeof COVERAGE;
230
- }
231
- interface NatalEnvelope {
232
- schema: typeof NATAL_ENVELOPE_SCHEMA;
233
- /** This draft implements no optional required features; unknown ones fail closed. */
234
- requiredFeatures: string[];
235
- receipt: NatalReceipt;
236
- /** `deltaT` from the rc.8 set on, `timeScale` from the time-basis set on. */
237
- result: Pick<Chart, "bodies" | "angles" | "houses" | "aspects"> & Partial<Pick<Chart, "deltaT" | "timeScale">>;
238
- extensions?: NatalJsonObject;
239
- }
240
- type NatalEnvelopeParseResult = {
241
- ok: true;
242
- envelope: NatalEnvelope;
243
- } | {
244
- ok: false;
245
- code: NatalEnvelopeErrorCode;
246
- };
247
- interface NatalDiagnostic {
248
- schema: typeof NATAL_DIAGNOSTIC_SCHEMA;
249
- status: "redacted-not-anonymous";
250
- timeKnown: boolean;
251
- houses: NatalReceipt["houses"];
252
- inputFlags: ChartFlag[];
253
- resultFlags: ChartFlag[];
254
- }
255
- /**
256
- * Capture a fresh full Chart, not a legacy summary. Checks declared consistency,
257
- * not ephemeris accuracy, historical timezone truth, origin, or authenticity.
258
- * Optional properties must be omitted rather than set to undefined.
259
- */
260
- declare function createNatalEnvelope(chart: Chart, context?: NatalEnvelopeContext): NatalEnvelope;
261
- /** Bounded JSON entry point. Unknown versions/features never become calculation input. */
262
- declare function parseNatalEnvelope(json: string): NatalEnvelopeParseResult;
263
- declare function serializeNatalEnvelope(envelope: NatalEnvelope): string;
264
- /** Replay the recorded request/instant, never a fallback house system or today's tzdb. */
265
- declare function natalReplayInput(envelope: NatalEnvelope): BirthInput;
266
- /** A fresh fixed allowlist: no claimed identifiers, versions, hashes, or input/result values. */
267
- declare function redactNatalEnvelope(envelope: NatalEnvelope): NatalDiagnostic;
268
-
269
- export { NATAL_DIAGNOSTIC_SCHEMA, NATAL_ENVELOPE_LIMITS, NATAL_ENVELOPE_SCHEMA, NATAL_RECEIPT_CONVENTION_SETS, NATAL_RECEIPT_SCHEMA, type NatalDiagnostic, type NatalEnvelope, type NatalEnvelopeContext, NatalEnvelopeError, type NatalEnvelopeErrorCode, type NatalEnvelopeParseResult, type NatalJsonObject, type NatalJsonValue, type NatalLocalResolution, type NatalProvenanceClaims, type NatalReceipt, type NatalReference, type NatalZoneTransition, createNatalEnvelope, natalReplayInput, parseNatalEnvelope, redactNatalEnvelope, serializeNatalEnvelope };
4
+ export { a as NATAL_DIAGNOSTIC_SCHEMA, b as NATAL_ENVELOPE_LIMITS, c as NATAL_ENVELOPE_SCHEMA, d as NATAL_RECEIPT_CONVENTION_SETS, e as NATAL_RECEIPT_SCHEMA, f as NatalAnglesRecord, g as NatalAspectRecord, h as NatalBodyRecord, i as NatalConventionSet, j as NatalCoverage, k as NatalDeltaTRecord, l as NatalDiagnostic, m as NatalEnvelope, n as NatalEnvelopeContext, o as NatalEnvelopeError, p as NatalEnvelopeErrorCode, q as NatalEnvelopeParseResult, r as NatalHousesRecord, s as NatalJsonObject, t as NatalJsonValue, N as NatalLocalResolution, u as NatalProvenanceClaims, v as NatalReceipt, w as NatalRecordedResult, x as NatalReference, y as NatalTimeScaleRecord, z as NatalZoneTransition, A as createNatalEnvelope, B as natalReplayInput, C as parseNatalEnvelope, D as redactNatalEnvelope, E as serializeNatalEnvelope } from './zone-history-BxmDCcTK.js';