kaabalah 5.1.0 → 5.2.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 (40) hide show
  1. package/README.md +9 -1
  2. package/dist/astrology/index.d.mts +66 -1
  3. package/dist/astrology/index.d.ts +66 -1
  4. package/dist/astrology/index.js +42 -14
  5. package/dist/astrology/index.mjs +1 -1
  6. package/dist/{chunk-JBMCNKO4.mjs → chunk-2J6CVLH2.mjs} +5 -4
  7. package/dist/chunk-2J6CVLH2.mjs.map +1 -0
  8. package/dist/{chunk-FVEVTAM7.js → chunk-2WENLHIP.js} +4 -4
  9. package/dist/{chunk-FVEVTAM7.js.map → chunk-2WENLHIP.js.map} +1 -1
  10. package/dist/{chunk-X2SPWMUA.mjs → chunk-5ID55YUP.mjs} +3 -3
  11. package/dist/{chunk-X2SPWMUA.mjs.map → chunk-5ID55YUP.mjs.map} +1 -1
  12. package/dist/{chunk-A5ME4PFX.mjs → chunk-CYWQV2RL.mjs} +151 -4
  13. package/dist/chunk-CYWQV2RL.mjs.map +1 -0
  14. package/dist/{chunk-7AXRFYPX.js → chunk-IAKSKHGA.js} +157 -3
  15. package/dist/chunk-IAKSKHGA.js.map +1 -0
  16. package/dist/{chunk-KUH2YDQ2.js → chunk-T67M2WBD.js} +5 -4
  17. package/dist/chunk-T67M2WBD.js.map +1 -0
  18. package/dist/{chunk-KSKAKQTM.mjs → chunk-XSAXO3D2.mjs} +3 -3
  19. package/dist/{chunk-KSKAKQTM.mjs.map → chunk-XSAXO3D2.mjs.map} +1 -1
  20. package/dist/{chunk-U77YFJXJ.js → chunk-ZZ3YMT2R.js} +23 -23
  21. package/dist/{chunk-U77YFJXJ.js.map → chunk-ZZ3YMT2R.js.map} +1 -1
  22. package/dist/cli.js +303 -35
  23. package/dist/cli.js.map +1 -1
  24. package/dist/cli.mjs +288 -20
  25. package/dist/cli.mjs.map +1 -1
  26. package/dist/core/index.js +38 -38
  27. package/dist/core/index.mjs +1 -1
  28. package/dist/gematria/index.js +5 -5
  29. package/dist/gematria/index.mjs +2 -2
  30. package/dist/index.d.mts +1 -1
  31. package/dist/index.d.ts +1 -1
  32. package/dist/index.js +100 -72
  33. package/dist/index.mjs +4 -4
  34. package/dist/numerology/index.js +18 -18
  35. package/dist/numerology/index.mjs +3 -3
  36. package/package.json +1 -1
  37. package/dist/chunk-7AXRFYPX.js.map +0 -1
  38. package/dist/chunk-A5ME4PFX.mjs.map +0 -1
  39. package/dist/chunk-JBMCNKO4.mjs.map +0 -1
  40. package/dist/chunk-KUH2YDQ2.js.map +0 -1
package/README.md CHANGED
@@ -93,7 +93,9 @@ npx kaabalah help
93
93
  | `numerology:cycles <date> [name]` | Personal cycles (year, month, periods) |
94
94
  | `numerology:challenges <date>` | Challenges from birth date |
95
95
  | `numerology:fibonacci <date>` | Fibonacci cycle for current age |
96
- | `astrology <date> [time]` | Calculate birth chart using Swiss Ephemeris |
96
+ | `astrology <date> [time]` | Calculate birth chart with aspects using Swiss Ephemeris |
97
+ | `astrology:synastry` | Cross-chart aspects between two birth charts (via `--input-json`) |
98
+ | `astrology:composite` | Midpoint composite chart from two birth charts (via `--input-json`) |
97
99
  | `tarot [count]` | Draw tarot cards (default: 3) |
98
100
  | `tarot:card <number>` | Look up a specific card (1-78) |
99
101
  | `ifa <date>` | Calculate Odu from a date |
@@ -114,6 +116,12 @@ kaabalah ifa 1990-01-15
114
116
  kaabalah astrology 1990-01-15 14:30 --lat=40.7128 --lon=-74.006
115
117
  kaabalah astrology 1990-01-15 14:30 --location="New York, USA"
116
118
 
119
+ # Synastry (cross-chart aspects)
120
+ kaabalah astrology:synastry --input-json='{"chartA":{"date":"2001-10-02","time":"19:45","lat":-22.74,"lon":-47.33,"timezone":"America/Sao_Paulo"},"chartB":{"date":"1999-02-01","time":"14:30","lat":-23.96,"lon":-46.33,"timezone":"America/Sao_Paulo"}}' --json
121
+
122
+ # Composite (midpoint chart)
123
+ kaabalah astrology:composite --input-json='{"chartA":{"date":"2001-10-02","time":"19:45","lat":-22.74,"lon":-47.33},"chartB":{"date":"1999-02-01","time":"14:30","lat":-23.96,"lon":-46.33}}' --json
124
+
117
125
  # Tree of Life correspondences
118
126
  kaabalah tree:node path:1 --json
119
127
  kaabalah tree:node "tarotArkAnnu:The Magician" --depth=2 --json
@@ -118,6 +118,42 @@ type TimeZoneOptions = {
118
118
  treatAsUTC?: boolean;
119
119
  };
120
120
 
121
+ type AspectName = "conjunction" | "duodecile" | "octile" | "sextile" | "square" | "trine" | "trioctile" | "quincunx" | "opposition";
122
+ interface AspectSpec {
123
+ name: AspectName;
124
+ angle: number;
125
+ orb: number;
126
+ }
127
+ declare const DEFAULT_ASPECT_SPECS: AspectSpec[];
128
+ interface AspectEdge {
129
+ planetA: string;
130
+ planetB: string;
131
+ longitudeA: number;
132
+ longitudeB: number;
133
+ aspect: AspectName;
134
+ aspectAngle: number;
135
+ delta: number;
136
+ orb: number;
137
+ }
138
+ declare function getAspectMatch(lonA: number, lonB: number, specs?: AspectSpec[]): {
139
+ spec: AspectSpec;
140
+ orb: number;
141
+ delta: number;
142
+ } | null;
143
+ declare function computeAspects(planets: Record<string, {
144
+ longitude: number;
145
+ }>, specs?: AspectSpec[]): AspectEdge[];
146
+ declare function computeSynastryAspects(planetsA: Record<string, {
147
+ longitude: number;
148
+ }>, planetsB: Record<string, {
149
+ longitude: number;
150
+ }>, specs?: AspectSpec[]): AspectEdge[];
151
+ declare function computeMidpoints(planetsA: Record<string, {
152
+ longitude: number;
153
+ }>, planetsB: Record<string, {
154
+ longitude: number;
155
+ }>): Record<string, number>;
156
+
121
157
  /**
122
158
  * Astrological calculations using Swiss Ephemeris
123
159
  */
@@ -165,6 +201,7 @@ interface BirthChart {
165
201
  polasc?: ZodiacPosition;
166
202
  };
167
203
  };
204
+ aspects: AspectEdge[];
168
205
  }
169
206
  /**
170
207
  * Calculate a birth chart using Swiss Ephemeris
@@ -189,5 +226,33 @@ declare function formatDegreeMinutes(decimalDegrees: number): string;
189
226
  */
190
227
  declare function getZodiacPosition(longitude: number, houseCusps: number[]): ZodiacPosition;
191
228
  declare function findHouseOf(longitude: number, housePositions: number[]): number;
229
+ interface SynastryChartOptions {
230
+ chartA: BirthChartOptions;
231
+ chartB: BirthChartOptions;
232
+ aspectSpecs?: AspectSpec[];
233
+ }
234
+ interface SynastryChart {
235
+ chartA: BirthChart;
236
+ chartB: BirthChart;
237
+ aspects: AspectEdge[];
238
+ }
239
+ declare function getSynastryChart(options: SynastryChartOptions): Promise<SynastryChart>;
240
+ interface CompositeChartOptions {
241
+ chartA: BirthChartOptions;
242
+ chartB: BirthChartOptions;
243
+ aspectSpecs?: AspectSpec[];
244
+ }
245
+ interface CompositeChart {
246
+ chartA: BirthChart;
247
+ chartB: BirthChart;
248
+ compositePlanets: Record<string, {
249
+ name: string;
250
+ longitude: number;
251
+ zodiacPosition: ZodiacPosition;
252
+ }>;
253
+ compositeHouses: ZodiacPosition[];
254
+ aspects: AspectEdge[];
255
+ }
256
+ declare function getCompositeChart(options: CompositeChartOptions): Promise<CompositeChart>;
192
257
 
193
- export { type BirthChart, type BirthChartOptions, CalcFlag, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, type ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
258
+ export { type AspectEdge, type AspectName, type AspectSpec, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, type SynastryChart, type SynastryChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle };
@@ -118,6 +118,42 @@ type TimeZoneOptions = {
118
118
  treatAsUTC?: boolean;
119
119
  };
120
120
 
121
+ type AspectName = "conjunction" | "duodecile" | "octile" | "sextile" | "square" | "trine" | "trioctile" | "quincunx" | "opposition";
122
+ interface AspectSpec {
123
+ name: AspectName;
124
+ angle: number;
125
+ orb: number;
126
+ }
127
+ declare const DEFAULT_ASPECT_SPECS: AspectSpec[];
128
+ interface AspectEdge {
129
+ planetA: string;
130
+ planetB: string;
131
+ longitudeA: number;
132
+ longitudeB: number;
133
+ aspect: AspectName;
134
+ aspectAngle: number;
135
+ delta: number;
136
+ orb: number;
137
+ }
138
+ declare function getAspectMatch(lonA: number, lonB: number, specs?: AspectSpec[]): {
139
+ spec: AspectSpec;
140
+ orb: number;
141
+ delta: number;
142
+ } | null;
143
+ declare function computeAspects(planets: Record<string, {
144
+ longitude: number;
145
+ }>, specs?: AspectSpec[]): AspectEdge[];
146
+ declare function computeSynastryAspects(planetsA: Record<string, {
147
+ longitude: number;
148
+ }>, planetsB: Record<string, {
149
+ longitude: number;
150
+ }>, specs?: AspectSpec[]): AspectEdge[];
151
+ declare function computeMidpoints(planetsA: Record<string, {
152
+ longitude: number;
153
+ }>, planetsB: Record<string, {
154
+ longitude: number;
155
+ }>): Record<string, number>;
156
+
121
157
  /**
122
158
  * Astrological calculations using Swiss Ephemeris
123
159
  */
@@ -165,6 +201,7 @@ interface BirthChart {
165
201
  polasc?: ZodiacPosition;
166
202
  };
167
203
  };
204
+ aspects: AspectEdge[];
168
205
  }
169
206
  /**
170
207
  * Calculate a birth chart using Swiss Ephemeris
@@ -189,5 +226,33 @@ declare function formatDegreeMinutes(decimalDegrees: number): string;
189
226
  */
190
227
  declare function getZodiacPosition(longitude: number, houseCusps: number[]): ZodiacPosition;
191
228
  declare function findHouseOf(longitude: number, housePositions: number[]): number;
229
+ interface SynastryChartOptions {
230
+ chartA: BirthChartOptions;
231
+ chartB: BirthChartOptions;
232
+ aspectSpecs?: AspectSpec[];
233
+ }
234
+ interface SynastryChart {
235
+ chartA: BirthChart;
236
+ chartB: BirthChart;
237
+ aspects: AspectEdge[];
238
+ }
239
+ declare function getSynastryChart(options: SynastryChartOptions): Promise<SynastryChart>;
240
+ interface CompositeChartOptions {
241
+ chartA: BirthChartOptions;
242
+ chartB: BirthChartOptions;
243
+ aspectSpecs?: AspectSpec[];
244
+ }
245
+ interface CompositeChart {
246
+ chartA: BirthChart;
247
+ chartB: BirthChart;
248
+ compositePlanets: Record<string, {
249
+ name: string;
250
+ longitude: number;
251
+ zodiacPosition: ZodiacPosition;
252
+ }>;
253
+ compositeHouses: ZodiacPosition[];
254
+ aspects: AspectEdge[];
255
+ }
256
+ declare function getCompositeChart(options: CompositeChartOptions): Promise<CompositeChart>;
192
257
 
193
- export { type BirthChart, type BirthChartOptions, CalcFlag, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, type ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
258
+ export { type AspectEdge, type AspectName, type AspectSpec, type BirthChart, type BirthChartOptions, CalcFlag, type CompositeChart, type CompositeChartOptions, DEFAULT_ASPECT_SPECS, HouseSystem, type HydratedNode, type HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, type SynastryChart, type SynastryChartOptions, VirtualNodes, type ZodiacPosition, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle };
@@ -1,61 +1,89 @@
1
1
  'use strict';
2
2
 
3
- var chunk7AXRFYPX_js = require('../chunk-7AXRFYPX.js');
3
+ var chunkIAKSKHGA_js = require('../chunk-IAKSKHGA.js');
4
4
  require('../chunk-FM7WUVZV.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "CalcFlag", {
9
9
  enumerable: true,
10
- get: function () { return chunk7AXRFYPX_js.CalcFlag; }
10
+ get: function () { return chunkIAKSKHGA_js.CalcFlag; }
11
+ });
12
+ Object.defineProperty(exports, "DEFAULT_ASPECT_SPECS", {
13
+ enumerable: true,
14
+ get: function () { return chunkIAKSKHGA_js.DEFAULT_ASPECT_SPECS; }
11
15
  });
12
16
  Object.defineProperty(exports, "HouseSystem", {
13
17
  enumerable: true,
14
- get: function () { return chunk7AXRFYPX_js.HouseSystem; }
18
+ get: function () { return chunkIAKSKHGA_js.HouseSystem; }
15
19
  });
16
20
  Object.defineProperty(exports, "PLANET_AND_NODE_NAMES", {
17
21
  enumerable: true,
18
- get: function () { return chunk7AXRFYPX_js.PLANET_AND_NODE_NAMES; }
22
+ get: function () { return chunkIAKSKHGA_js.PLANET_AND_NODE_NAMES; }
19
23
  });
20
24
  Object.defineProperty(exports, "Planet", {
21
25
  enumerable: true,
22
- get: function () { return chunk7AXRFYPX_js.Planet; }
26
+ get: function () { return chunkIAKSKHGA_js.Planet; }
23
27
  });
24
28
  Object.defineProperty(exports, "SIGNS", {
25
29
  enumerable: true,
26
- get: function () { return chunk7AXRFYPX_js.SIGNS; }
30
+ get: function () { return chunkIAKSKHGA_js.SIGNS; }
27
31
  });
28
32
  Object.defineProperty(exports, "VirtualNodes", {
29
33
  enumerable: true,
30
- get: function () { return chunk7AXRFYPX_js.VirtualNodes; }
34
+ get: function () { return chunkIAKSKHGA_js.VirtualNodes; }
31
35
  });
32
36
  Object.defineProperty(exports, "closeSwissEph", {
33
37
  enumerable: true,
34
- get: function () { return chunk7AXRFYPX_js.closeSwissEph; }
38
+ get: function () { return chunkIAKSKHGA_js.closeSwissEph; }
39
+ });
40
+ Object.defineProperty(exports, "computeAspects", {
41
+ enumerable: true,
42
+ get: function () { return chunkIAKSKHGA_js.computeAspects; }
43
+ });
44
+ Object.defineProperty(exports, "computeMidpoints", {
45
+ enumerable: true,
46
+ get: function () { return chunkIAKSKHGA_js.computeMidpoints; }
47
+ });
48
+ Object.defineProperty(exports, "computeSynastryAspects", {
49
+ enumerable: true,
50
+ get: function () { return chunkIAKSKHGA_js.computeSynastryAspects; }
35
51
  });
36
52
  Object.defineProperty(exports, "findHouseOf", {
37
53
  enumerable: true,
38
- get: function () { return chunk7AXRFYPX_js.findHouseOf; }
54
+ get: function () { return chunkIAKSKHGA_js.findHouseOf; }
39
55
  });
40
56
  Object.defineProperty(exports, "formatDegreeMinutes", {
41
57
  enumerable: true,
42
- get: function () { return chunk7AXRFYPX_js.formatDegreeMinutes; }
58
+ get: function () { return chunkIAKSKHGA_js.formatDegreeMinutes; }
59
+ });
60
+ Object.defineProperty(exports, "getAspectMatch", {
61
+ enumerable: true,
62
+ get: function () { return chunkIAKSKHGA_js.getAspectMatch; }
43
63
  });
44
64
  Object.defineProperty(exports, "getBirthChart", {
45
65
  enumerable: true,
46
- get: function () { return chunk7AXRFYPX_js.getBirthChart; }
66
+ get: function () { return chunkIAKSKHGA_js.getBirthChart; }
67
+ });
68
+ Object.defineProperty(exports, "getCompositeChart", {
69
+ enumerable: true,
70
+ get: function () { return chunkIAKSKHGA_js.getCompositeChart; }
47
71
  });
48
72
  Object.defineProperty(exports, "getSwissEph", {
49
73
  enumerable: true,
50
- get: function () { return chunk7AXRFYPX_js.getSwissEph; }
74
+ get: function () { return chunkIAKSKHGA_js.getSwissEph; }
75
+ });
76
+ Object.defineProperty(exports, "getSynastryChart", {
77
+ enumerable: true,
78
+ get: function () { return chunkIAKSKHGA_js.getSynastryChart; }
51
79
  });
52
80
  Object.defineProperty(exports, "getZodiacPosition", {
53
81
  enumerable: true,
54
- get: function () { return chunk7AXRFYPX_js.getZodiacPosition; }
82
+ get: function () { return chunkIAKSKHGA_js.getZodiacPosition; }
55
83
  });
56
84
  Object.defineProperty(exports, "normalizeAngle", {
57
85
  enumerable: true,
58
- get: function () { return chunk7AXRFYPX_js.normalizeAngle; }
86
+ get: function () { return chunkIAKSKHGA_js.normalizeAngle; }
59
87
  });
60
88
  //# sourceMappingURL=index.js.map
61
89
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { CalcFlag, HouseSystem, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from '../chunk-A5ME4PFX.mjs';
1
+ export { CalcFlag, DEFAULT_ASPECT_SPECS, HouseSystem, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, closeSwissEph, computeAspects, computeMidpoints, computeSynastryAspects, findHouseOf, formatDegreeMinutes, getAspectMatch, getBirthChart, getCompositeChart, getSwissEph, getSynastryChart, getZodiacPosition, normalizeAngle } from '../chunk-CYWQV2RL.mjs';
2
2
  import '../chunk-WY6NIR2V.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map
@@ -6622,7 +6622,7 @@ var TreeOfLife = class {
6622
6622
  }
6623
6623
  return [
6624
6624
  ...new Set(
6625
- [...this.adjacent.get(id2).values()].map(
6625
+ [...(this.adjacent.get(id2) ?? /* @__PURE__ */ new Set()).values()].map(
6626
6626
  (nodeId) => this.nodes.get(nodeId).type
6627
6627
  )
6628
6628
  )
@@ -6817,9 +6817,10 @@ var TreeOfLife = class {
6817
6817
  this.link(node, tarotArkAnnuId);
6818
6818
  this.addNumber({ number: relatedNumber, nodeId: tarotArkAnnuId });
6819
6819
  if (suit) {
6820
+ const suitValue = suit.includes(":") ? suit.split(":").pop() : suit;
6820
6821
  const suitId = this.upsertNode(
6821
6822
  new BaseNode({
6822
- id: suit,
6823
+ id: suitValue,
6823
6824
  type: "tarotSuit" /* TAROT_SUIT */
6824
6825
  })
6825
6826
  );
@@ -6843,5 +6844,5 @@ function createTree(opts = {
6843
6844
  }
6844
6845
 
6845
6846
  export { BaseNode, COLORS, COLORS_DATA, FOUR_WORLDS, FOUR_WORLDS_DATA, HEBREW_LETTERS, HEBREW_LETTERS_DATA, KaabalahTypes, LATIN_LETTERS, LATIN_LETTERS_DATA, LURIANIC_PATHS, LetterTypes, MELKITZEDEKI_PATHS, MODALITIES, MUSICAL_NOTES, MUSICAL_NOTES_DATA, MiscTypes, NumerologyTypes, PLANETS, SPHERES, SPHERES_DATA, SYSTEM, SYSTEMS, TAROT_ARKANNUS, TAROT_ARKANNUS_DATA, TAROT_DECKS, TAROT_SUITS, TantraTypes, TarotTypes, TreeOfLife, WESTERN_ASPECTS, WESTERN_ELEMENTS, WESTERN_HOUSES, WESTERN_ZODIAC_SIGNS, WesternAstrologyTypes, createTree, id, parseId };
6846
- //# sourceMappingURL=chunk-JBMCNKO4.mjs.map
6847
- //# sourceMappingURL=chunk-JBMCNKO4.mjs.map
6847
+ //# sourceMappingURL=chunk-2J6CVLH2.mjs.map
6848
+ //# sourceMappingURL=chunk-2J6CVLH2.mjs.map