@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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  normalizeLongitude
3
- } from "./chunk-OG4OYTJJ.js";
3
+ } from "./chunk-RMBWKZI2.js";
4
4
 
5
5
  // src/houses.ts
6
6
  var DEG = Math.PI / 180;
@@ -23,6 +23,7 @@ var HOUSE_SYSTEMS = /* @__PURE__ */ Object.freeze([
23
23
  var POLAR_UNDEFINED_HOUSE_SYSTEMS = /* @__PURE__ */ Object.freeze(["placidus", "koch"]);
24
24
  var POLAR_FALLBACK = "whole";
25
25
  var PLACIDUS_POLAR_FALLBACK = POLAR_FALLBACK;
26
+ var insidePolarCircle = (input) => Math.abs(input.latitude) >= 90 - input.obliquity;
26
27
  function isPolarUndefinedHouseSystem(system) {
27
28
  return POLAR_UNDEFINED_HOUSE_SYSTEMS.includes(system);
28
29
  }
@@ -87,7 +88,7 @@ function wholeSignCusps(ascendant) {
87
88
  return Array.from({ length: 12 }, (_, index) => normalizeLongitude(first + index * 30));
88
89
  }
89
90
  function placidusCusps(input, angles) {
90
- if (Math.abs(input.latitude) >= 90 - input.obliquity) return null;
91
+ if (insidePolarCircle(input)) return null;
91
92
  const ramc = ramcOf(input);
92
93
  const phi = input.latitude * DEG;
93
94
  function iterate(offset, multiplier) {
@@ -178,7 +179,7 @@ function vehlowCusps(angles) {
178
179
  return Array.from({ length: 12 }, (_, index) => normalizeLongitude(angles.asc - 15 + index * 30));
179
180
  }
180
181
  function kochCusps(input, angles) {
181
- if (Math.abs(input.latitude) >= 90 - input.obliquity) return null;
182
+ if (insidePolarCircle(input)) return null;
182
183
  const ramc = ramcOf(input);
183
184
  const argument = Math.tan(input.latitude * DEG) * Math.tan(declinationOfLongitude(angles.mc, input.obliquity) * DEG);
184
185
  const third = (90 + Math.asin(argument) * RAD) / 3;
@@ -331,6 +332,7 @@ export {
331
332
  POLAR_UNDEFINED_HOUSE_SYSTEMS,
332
333
  POLAR_FALLBACK,
333
334
  PLACIDUS_POLAR_FALLBACK,
335
+ insidePolarCircle,
334
336
  isPolarUndefinedHouseSystem,
335
337
  meanObliquity,
336
338
  ramcOf,
@@ -77,127 +77,8 @@ function findAspects(bodies) {
77
77
  return aspects.sort((a, b) => a.orb - b.orb);
78
78
  }
79
79
 
80
- // src/signs.ts
81
- var ELEMENTS = /* @__PURE__ */ Object.freeze(["fire", "earth", "air", "water"]);
82
- var MODALITIES = /* @__PURE__ */ Object.freeze(["cardinal", "fixed", "mutable"]);
83
- var SIGNS = /* @__PURE__ */ Object.freeze([
84
- /* @__PURE__ */ Object.freeze({
85
- slug: "aries",
86
- name: "Aries",
87
- element: "fire",
88
- modality: "cardinal",
89
- polarity: "day",
90
- naturalHouse: 1
91
- }),
92
- /* @__PURE__ */ Object.freeze({
93
- slug: "taurus",
94
- name: "Taurus",
95
- element: "earth",
96
- modality: "fixed",
97
- polarity: "night",
98
- naturalHouse: 2
99
- }),
100
- /* @__PURE__ */ Object.freeze({
101
- slug: "gemini",
102
- name: "Gemini",
103
- element: "air",
104
- modality: "mutable",
105
- polarity: "day",
106
- naturalHouse: 3
107
- }),
108
- /* @__PURE__ */ Object.freeze({
109
- slug: "cancer",
110
- name: "Cancer",
111
- element: "water",
112
- modality: "cardinal",
113
- polarity: "night",
114
- naturalHouse: 4
115
- }),
116
- /* @__PURE__ */ Object.freeze({
117
- slug: "leo",
118
- name: "Leo",
119
- element: "fire",
120
- modality: "fixed",
121
- polarity: "day",
122
- naturalHouse: 5
123
- }),
124
- /* @__PURE__ */ Object.freeze({
125
- slug: "virgo",
126
- name: "Virgo",
127
- element: "earth",
128
- modality: "mutable",
129
- polarity: "night",
130
- naturalHouse: 6
131
- }),
132
- /* @__PURE__ */ Object.freeze({
133
- slug: "libra",
134
- name: "Libra",
135
- element: "air",
136
- modality: "cardinal",
137
- polarity: "day",
138
- naturalHouse: 7
139
- }),
140
- /* @__PURE__ */ Object.freeze({
141
- slug: "scorpio",
142
- name: "Scorpio",
143
- element: "water",
144
- modality: "fixed",
145
- polarity: "night",
146
- naturalHouse: 8
147
- }),
148
- /* @__PURE__ */ Object.freeze({
149
- slug: "sagittarius",
150
- name: "Sagittarius",
151
- element: "fire",
152
- modality: "mutable",
153
- polarity: "day",
154
- naturalHouse: 9
155
- }),
156
- /* @__PURE__ */ Object.freeze({
157
- slug: "capricorn",
158
- name: "Capricorn",
159
- element: "earth",
160
- modality: "cardinal",
161
- polarity: "night",
162
- naturalHouse: 10
163
- }),
164
- /* @__PURE__ */ Object.freeze({
165
- slug: "aquarius",
166
- name: "Aquarius",
167
- element: "air",
168
- modality: "fixed",
169
- polarity: "day",
170
- naturalHouse: 11
171
- }),
172
- /* @__PURE__ */ Object.freeze({
173
- slug: "pisces",
174
- name: "Pisces",
175
- element: "water",
176
- modality: "mutable",
177
- polarity: "night",
178
- naturalHouse: 12
179
- })
180
- ]);
181
- var SIGN_SLUGS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ SIGNS.map((sign) => sign.slug));
182
- var SIGN_NAMES = SIGN_SLUGS;
183
- function normalizeLongitude(lon) {
184
- if (!Number.isFinite(lon)) throw new RangeError("Longitude must be finite.");
185
- return (lon % 360 + 360) % 360;
186
- }
187
- function signIndexForLongitude(lon) {
188
- return Math.floor(normalizeLongitude(lon) / 30);
189
- }
190
- function signForLongitude(lon) {
191
- const sign = SIGNS[signIndexForLongitude(lon)];
192
- if (!sign) throw new RangeError("Could not resolve zodiac sign.");
193
- return sign;
194
- }
195
- function degreeInSign(lon) {
196
- return normalizeLongitude(lon) % 30;
197
- }
198
-
199
80
  // src/types.ts
200
- var ENGINE_VERSION = "1.0.0";
81
+ var ENGINE_VERSION = "2.0.0-rc.2";
201
82
  var EPHEMERIS = /* @__PURE__ */ Object.freeze({ name: "astronomy-engine", version: "2.1.19" });
202
83
 
203
84
  export {
@@ -210,15 +91,6 @@ export {
210
91
  separation,
211
92
  matchAspect,
212
93
  findAspects,
213
- ELEMENTS,
214
- MODALITIES,
215
- SIGNS,
216
- SIGN_SLUGS,
217
- SIGN_NAMES,
218
- normalizeLongitude,
219
- signIndexForLongitude,
220
- signForLongitude,
221
- degreeInSign,
222
94
  ENGINE_VERSION,
223
95
  EPHEMERIS
224
96
  };