kaabalah 2.1.2 → 3.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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkADJTMVLA_js = require('../chunk-ADJTMVLA.js');
3
+ var chunkJJ76YVMI_js = require('../chunk-JJ76YVMI.js');
4
4
  require('../chunk-7CAIYKIO.js');
5
5
  require('../chunk-2TUXWMP5.js');
6
6
 
@@ -8,7 +8,7 @@ require('../chunk-2TUXWMP5.js');
8
8
 
9
9
  Object.defineProperty(exports, "calculateGematria", {
10
10
  enumerable: true,
11
- get: function () { return chunkADJTMVLA_js.calculateGematria; }
11
+ get: function () { return chunkJJ76YVMI_js.calculateGematria; }
12
12
  });
13
13
  //# sourceMappingURL=index.js.map
14
14
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { calculateGematria } from '../chunk-WG7FXQ3Z.mjs';
1
+ export { calculateGematria } from '../chunk-5ISXTWFX.mjs';
2
2
  import '../chunk-3LUQXNH6.mjs';
3
3
  import '../chunk-PY5SMMJB.mjs';
4
4
  //# sourceMappingURL=index.mjs.map
package/dist/index.d.mts CHANGED
@@ -2,5 +2,5 @@ export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, Planet, closeSwis
2
2
  export { _ as BaseNode, B as Bridge, u as COLORS, v as COLORS_DATA, C as ColorData, F as FOUR_WORLDS, b as FOUR_WORLDS_DATA, m as HEBREW_LETTERS, n as HEBREW_LETTERS_DATA, H as HebrewLetterData, K as KaabalahTypes, k as LATIN_LETTERS, l as LATIN_LETTERS_DATA, j as LURIANIC_PATHS, L as LatinLetterData, E as LetterTypes, A as Loader, i as MELKITZEDEKI_PATHS, s as MUSICAL_NOTES, t as MUSICAL_NOTES_DATA, O as MiscTypes, M as MusicalNoteData, Z as Node, Y as NodeData, R as NodeId, Q as NodeType, N as NumerologyTypes, e as PLANETS, z as PartKey, P as PathData, c as SPHERES, d as SPHERES_DATA, x as SYSTEMS, S as SphereData, w as System, y as SystemKey, p as TAROT_ARKANNUS, r as TAROT_ARKANNUS_DATA, q as TAROT_DECKS, o as TAROT_SUITS, J as TantraTypes, T as TarotArkAnnuData, I as TarotTypes, D as TreeOfLife, U as Unloader, g as WESTERN_ELEMENTS, f as WESTERN_ZODIAC_SIGNS, h as WESTERN_ZODIAC_SIGNS_DATA, G as WesternAstrologyTypes, a as WesternZodiacSignData, W as WorldData, V as id, X as parseId } from './registry-BoqJvsPr.mjs';
3
3
  export { TreeOptions, createTree } from './core/index.mjs';
4
4
  export { calculateGematria } from './gematria/index.mjs';
5
- export { CYCLE_MEANINGS, Cycle, CycleInfo, calculateCycles, calculateLifePath } from './numerology/index.mjs';
5
+ export { CYCLE_MEANINGS, Cycle, CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.mjs';
6
6
  export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.mjs';
package/dist/index.d.ts CHANGED
@@ -2,5 +2,5 @@ export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, Planet, closeSwis
2
2
  export { _ as BaseNode, B as Bridge, u as COLORS, v as COLORS_DATA, C as ColorData, F as FOUR_WORLDS, b as FOUR_WORLDS_DATA, m as HEBREW_LETTERS, n as HEBREW_LETTERS_DATA, H as HebrewLetterData, K as KaabalahTypes, k as LATIN_LETTERS, l as LATIN_LETTERS_DATA, j as LURIANIC_PATHS, L as LatinLetterData, E as LetterTypes, A as Loader, i as MELKITZEDEKI_PATHS, s as MUSICAL_NOTES, t as MUSICAL_NOTES_DATA, O as MiscTypes, M as MusicalNoteData, Z as Node, Y as NodeData, R as NodeId, Q as NodeType, N as NumerologyTypes, e as PLANETS, z as PartKey, P as PathData, c as SPHERES, d as SPHERES_DATA, x as SYSTEMS, S as SphereData, w as System, y as SystemKey, p as TAROT_ARKANNUS, r as TAROT_ARKANNUS_DATA, q as TAROT_DECKS, o as TAROT_SUITS, J as TantraTypes, T as TarotArkAnnuData, I as TarotTypes, D as TreeOfLife, U as Unloader, g as WESTERN_ELEMENTS, f as WESTERN_ZODIAC_SIGNS, h as WESTERN_ZODIAC_SIGNS_DATA, G as WesternAstrologyTypes, a as WesternZodiacSignData, W as WorldData, V as id, X as parseId } from './registry-BoqJvsPr.js';
3
3
  export { TreeOptions, createTree } from './core/index.js';
4
4
  export { calculateGematria } from './gematria/index.js';
5
- export { CYCLE_MEANINGS, Cycle, CycleInfo, calculateCycles, calculateLifePath } from './numerology/index.js';
5
+ export { CYCLE_MEANINGS, Cycle, CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.js';
6
6
  export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.js';
package/dist/index.js CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  var chunkSZXDOHKV_js = require('./chunk-SZXDOHKV.js');
4
4
  require('./chunk-AD7T42HJ.js');
5
- var chunkADJTMVLA_js = require('./chunk-ADJTMVLA.js');
5
+ var chunkSHEGSIRU_js = require('./chunk-SHEGSIRU.js');
6
+ var chunkJJ76YVMI_js = require('./chunk-JJ76YVMI.js');
6
7
  var chunk7CAIYKIO_js = require('./chunk-7CAIYKIO.js');
7
- var chunkRGMSQCP5_js = require('./chunk-RGMSQCP5.js');
8
8
  var chunkUXQDJUG6_js = require('./chunk-UXQDJUG6.js');
9
9
  require('./chunk-2TUXWMP5.js');
10
10
 
@@ -42,9 +42,69 @@ Object.defineProperty(exports, "getZodiacPosition", {
42
42
  enumerable: true,
43
43
  get: function () { return chunkSZXDOHKV_js.getZodiacPosition; }
44
44
  });
45
+ Object.defineProperty(exports, "CYCLE_MEANINGS", {
46
+ enumerable: true,
47
+ get: function () { return chunkSHEGSIRU_js.CYCLE_MEANINGS; }
48
+ });
49
+ Object.defineProperty(exports, "MASTER_NUMBERS", {
50
+ enumerable: true,
51
+ get: function () { return chunkSHEGSIRU_js.MASTER_NUMBERS; }
52
+ });
53
+ Object.defineProperty(exports, "calculateChallenges", {
54
+ enumerable: true,
55
+ get: function () { return chunkSHEGSIRU_js.calculateChallenges; }
56
+ });
57
+ Object.defineProperty(exports, "calculateCycles", {
58
+ enumerable: true,
59
+ get: function () { return chunkSHEGSIRU_js.calculateCycles; }
60
+ });
61
+ Object.defineProperty(exports, "calculateFibonacciCycle", {
62
+ enumerable: true,
63
+ get: function () { return chunkSHEGSIRU_js.calculateFibonacciCycle; }
64
+ });
65
+ Object.defineProperty(exports, "calculateKaabalisticLifePath", {
66
+ enumerable: true,
67
+ get: function () { return chunkSHEGSIRU_js.calculateKaabalisticLifePath; }
68
+ });
69
+ Object.defineProperty(exports, "calculatePersonalCycles", {
70
+ enumerable: true,
71
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalCycles; }
72
+ });
73
+ Object.defineProperty(exports, "calculatePersonalMonths", {
74
+ enumerable: true,
75
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalMonths; }
76
+ });
77
+ Object.defineProperty(exports, "calculatePersonalPeriods", {
78
+ enumerable: true,
79
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalPeriods; }
80
+ });
81
+ Object.defineProperty(exports, "calculatePersonalYear", {
82
+ enumerable: true,
83
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalYear; }
84
+ });
85
+ Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
86
+ enumerable: true,
87
+ get: function () { return chunkSHEGSIRU_js.calculateStraightAcrossReductionLifePath; }
88
+ });
89
+ Object.defineProperty(exports, "getDateEnergies", {
90
+ enumerable: true,
91
+ get: function () { return chunkSHEGSIRU_js.getDateEnergies; }
92
+ });
93
+ Object.defineProperty(exports, "isMasterNumber", {
94
+ enumerable: true,
95
+ get: function () { return chunkSHEGSIRU_js.isMasterNumber; }
96
+ });
97
+ Object.defineProperty(exports, "reduceToSingle", {
98
+ enumerable: true,
99
+ get: function () { return chunkSHEGSIRU_js.reduceToSingle; }
100
+ });
101
+ Object.defineProperty(exports, "reduceToSingleWithSteps", {
102
+ enumerable: true,
103
+ get: function () { return chunkSHEGSIRU_js.reduceToSingleWithSteps; }
104
+ });
45
105
  Object.defineProperty(exports, "calculateGematria", {
46
106
  enumerable: true,
47
- get: function () { return chunkADJTMVLA_js.calculateGematria; }
107
+ get: function () { return chunkJJ76YVMI_js.calculateGematria; }
48
108
  });
49
109
  Object.defineProperty(exports, "BaseNode", {
50
110
  enumerable: true,
@@ -186,18 +246,6 @@ Object.defineProperty(exports, "parseId", {
186
246
  enumerable: true,
187
247
  get: function () { return chunk7CAIYKIO_js.parseId; }
188
248
  });
189
- Object.defineProperty(exports, "CYCLE_MEANINGS", {
190
- enumerable: true,
191
- get: function () { return chunkRGMSQCP5_js.CYCLE_MEANINGS; }
192
- });
193
- Object.defineProperty(exports, "calculateCycles", {
194
- enumerable: true,
195
- get: function () { return chunkRGMSQCP5_js.calculateCycles; }
196
- });
197
- Object.defineProperty(exports, "calculateLifePath", {
198
- enumerable: true,
199
- get: function () { return chunkRGMSQCP5_js.calculateLifePath; }
200
- });
201
249
  Object.defineProperty(exports, "ARKANNUS", {
202
250
  enumerable: true,
203
251
  get: function () { return chunkUXQDJUG6_js.ARKANNUS; }
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  export { CalcFlag, HouseSystem, Planet, closeSwissEph, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition } from './chunk-AV7WBVPS.mjs';
2
2
  import './chunk-RFSO3JRG.mjs';
3
- export { calculateGematria } from './chunk-WG7FXQ3Z.mjs';
3
+ export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './chunk-VV2YT6RZ.mjs';
4
+ export { calculateGematria } from './chunk-5ISXTWFX.mjs';
4
5
  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, MUSICAL_NOTES, MUSICAL_NOTES_DATA, MiscTypes, NumerologyTypes, PLANETS, SPHERES, SPHERES_DATA, SYSTEMS, TAROT_ARKANNUS, TAROT_ARKANNUS_DATA, TAROT_DECKS, TAROT_SUITS, TantraTypes, TarotTypes, TreeOfLife, WESTERN_ELEMENTS, WESTERN_ZODIAC_SIGNS, WESTERN_ZODIAC_SIGNS_DATA, WesternAstrologyTypes, createTree, id, parseId } from './chunk-3LUQXNH6.mjs';
5
- export { CYCLE_MEANINGS, calculateCycles, calculateLifePath } from './chunk-W7GBKP5K.mjs';
6
6
  export { ARKANNUS, majorArcana, shuffleTarotDeck } from './chunk-Q4N3V34Y.mjs';
7
7
  import './chunk-PY5SMMJB.mjs';
8
8
  //# sourceMappingURL=index.mjs.map
@@ -1,12 +1,72 @@
1
1
  /**
2
2
  * Numerology calculations
3
3
  */
4
+ type ReducedValueWithSteps = {
5
+ reducedValue: number;
6
+ reductionSteps: number[];
7
+ };
8
+ declare const MASTER_NUMBERS: number[];
9
+ declare function isMasterNumber(n: number): boolean;
10
+ declare function reduceToSingle(n: number, options?: {
11
+ preserveMasters?: boolean;
12
+ }): number;
13
+ declare function reduceToSingleWithSteps(n: number, options?: {
14
+ preserveMasters?: boolean;
15
+ }): ReducedValueWithSteps;
16
+ type KaabalisticLifePathResult = {
17
+ parts: {
18
+ day: string;
19
+ month: string;
20
+ year1: string;
21
+ year2: string;
22
+ };
23
+ reducedParts: {
24
+ reducedDay: number;
25
+ reducedMonth: number;
26
+ reducedYear1: number;
27
+ reducedYear2: number;
28
+ };
29
+ syntheses: {
30
+ dayMonthSynthesis: number;
31
+ yearSynthesis: number;
32
+ reducedDayMonthSynthesis: number;
33
+ reducedYearSynthesis: number;
34
+ finalSynthesis: number;
35
+ };
36
+ lifePath: number;
37
+ /**
38
+ * Last three syntheses
39
+ */
40
+ personalMythologyNumbers: number[];
41
+ };
42
+ /**
43
+ * Calculate the Kaabalistic life path number based on a birth date.
44
+ * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)
45
+ */
46
+ declare function calculateKaabalisticLifePath(birthDate: Date): KaabalisticLifePathResult;
47
+ type StraightAcrossReductionLifePathResult = {
48
+ lifePath: number;
49
+ reductionSteps: number[];
50
+ };
4
51
  /**
5
- * Calculate the life path number based on a birth date
6
- * @param birthDate - Birth date as a Date object
7
- * @returns Life path number (1-9, 11, 22, or 33)
52
+ * Calculate the traditional straight across reduction life path number based on a birth date.
8
53
  */
9
- declare function calculateLifePath(birthDate: Date): number;
54
+ declare function calculateStraightAcrossReductionLifePath(birthDate: Date): StraightAcrossReductionLifePathResult;
55
+ type DateEnergies = {
56
+ dayEnergy: ReducedValueWithSteps;
57
+ monthEnergy: ReducedValueWithSteps;
58
+ yearEnergy: ReducedValueWithSteps;
59
+ };
60
+ declare function getDateEnergies(birthDate: Date): DateEnergies;
61
+ type Challenges = {
62
+ day: number;
63
+ month: number;
64
+ year: number;
65
+ mainChallenge: number;
66
+ subChallenge1: number;
67
+ subChallenge2: number;
68
+ };
69
+ declare function calculateChallenges(birthDate: Date): Challenges;
10
70
  declare const CYCLE_MEANINGS: {
11
71
  title: string;
12
72
  shortDescription: string;
@@ -36,6 +96,57 @@ interface CycleInfo {
36
96
  daysInMonthlyCycle: number;
37
97
  totalDays: number;
38
98
  }
39
- declare const calculateCycles: (startDate: Date, today: Date) => CycleInfo;
99
+ declare function calculateCycles(startDate: Date, today: Date): CycleInfo;
100
+ type FibonacciCycle = {
101
+ currentAge: number;
102
+ cycle1: ReducedValueWithSteps;
103
+ cycle2: ReducedValueWithSteps;
104
+ cycle3: ReducedValueWithSteps;
105
+ cycle4: ReducedValueWithSteps;
106
+ cycle5: ReducedValueWithSteps;
107
+ cycle6: ReducedValueWithSteps;
108
+ cycle7: ReducedValueWithSteps;
109
+ };
110
+ declare function calculateFibonacciCycle(birthDate: Date, today: Date): FibonacciCycle;
111
+ type PersonalPeriod = {
112
+ startMonth: number;
113
+ endMonth: number;
114
+ value: ReducedValueWithSteps;
115
+ };
116
+ type PersonalMonth = {
117
+ month: number;
118
+ value: ReducedValueWithSteps;
119
+ };
120
+ type PersonalCycles = {
121
+ personalYear: ReducedValueWithSteps;
122
+ personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];
123
+ personalMonths: [
124
+ PersonalMonth,
125
+ PersonalMonth,
126
+ PersonalMonth,
127
+ PersonalMonth,
128
+ PersonalMonth,
129
+ PersonalMonth,
130
+ PersonalMonth,
131
+ PersonalMonth,
132
+ PersonalMonth,
133
+ PersonalMonth,
134
+ PersonalMonth,
135
+ PersonalMonth,
136
+ PersonalMonth
137
+ ];
138
+ currentPersonalPeriod: number;
139
+ currentPersonalMonth: number;
140
+ currentAge: number;
141
+ lifePath: number;
142
+ soulNumber?: number;
143
+ };
144
+ declare function calculatePersonalYear(birthDate: Date, today?: Date): ReducedValueWithSteps;
145
+ declare function calculatePersonalPeriods(birthDate: Date, yearToUse: number, lifePath: number, soulNumber: number, currentAge: number): [PersonalPeriod, PersonalPeriod, PersonalPeriod];
146
+ declare function calculatePersonalMonths(birthDate: Date, personalYear: ReducedValueWithSteps, today: Date): {
147
+ personalMonths: PersonalCycles["personalMonths"];
148
+ currentPersonalMonthIndex: number;
149
+ };
150
+ declare function calculatePersonalCycles(birthDate: Date, today: Date | undefined, firstName: string): PersonalCycles;
40
151
 
41
- export { CYCLE_MEANINGS, type Cycle, type CycleInfo, calculateCycles, calculateLifePath };
152
+ export { CYCLE_MEANINGS, type Cycle, type CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
@@ -1,12 +1,72 @@
1
1
  /**
2
2
  * Numerology calculations
3
3
  */
4
+ type ReducedValueWithSteps = {
5
+ reducedValue: number;
6
+ reductionSteps: number[];
7
+ };
8
+ declare const MASTER_NUMBERS: number[];
9
+ declare function isMasterNumber(n: number): boolean;
10
+ declare function reduceToSingle(n: number, options?: {
11
+ preserveMasters?: boolean;
12
+ }): number;
13
+ declare function reduceToSingleWithSteps(n: number, options?: {
14
+ preserveMasters?: boolean;
15
+ }): ReducedValueWithSteps;
16
+ type KaabalisticLifePathResult = {
17
+ parts: {
18
+ day: string;
19
+ month: string;
20
+ year1: string;
21
+ year2: string;
22
+ };
23
+ reducedParts: {
24
+ reducedDay: number;
25
+ reducedMonth: number;
26
+ reducedYear1: number;
27
+ reducedYear2: number;
28
+ };
29
+ syntheses: {
30
+ dayMonthSynthesis: number;
31
+ yearSynthesis: number;
32
+ reducedDayMonthSynthesis: number;
33
+ reducedYearSynthesis: number;
34
+ finalSynthesis: number;
35
+ };
36
+ lifePath: number;
37
+ /**
38
+ * Last three syntheses
39
+ */
40
+ personalMythologyNumbers: number[];
41
+ };
42
+ /**
43
+ * Calculate the Kaabalistic life path number based on a birth date.
44
+ * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)
45
+ */
46
+ declare function calculateKaabalisticLifePath(birthDate: Date): KaabalisticLifePathResult;
47
+ type StraightAcrossReductionLifePathResult = {
48
+ lifePath: number;
49
+ reductionSteps: number[];
50
+ };
4
51
  /**
5
- * Calculate the life path number based on a birth date
6
- * @param birthDate - Birth date as a Date object
7
- * @returns Life path number (1-9, 11, 22, or 33)
52
+ * Calculate the traditional straight across reduction life path number based on a birth date.
8
53
  */
9
- declare function calculateLifePath(birthDate: Date): number;
54
+ declare function calculateStraightAcrossReductionLifePath(birthDate: Date): StraightAcrossReductionLifePathResult;
55
+ type DateEnergies = {
56
+ dayEnergy: ReducedValueWithSteps;
57
+ monthEnergy: ReducedValueWithSteps;
58
+ yearEnergy: ReducedValueWithSteps;
59
+ };
60
+ declare function getDateEnergies(birthDate: Date): DateEnergies;
61
+ type Challenges = {
62
+ day: number;
63
+ month: number;
64
+ year: number;
65
+ mainChallenge: number;
66
+ subChallenge1: number;
67
+ subChallenge2: number;
68
+ };
69
+ declare function calculateChallenges(birthDate: Date): Challenges;
10
70
  declare const CYCLE_MEANINGS: {
11
71
  title: string;
12
72
  shortDescription: string;
@@ -36,6 +96,57 @@ interface CycleInfo {
36
96
  daysInMonthlyCycle: number;
37
97
  totalDays: number;
38
98
  }
39
- declare const calculateCycles: (startDate: Date, today: Date) => CycleInfo;
99
+ declare function calculateCycles(startDate: Date, today: Date): CycleInfo;
100
+ type FibonacciCycle = {
101
+ currentAge: number;
102
+ cycle1: ReducedValueWithSteps;
103
+ cycle2: ReducedValueWithSteps;
104
+ cycle3: ReducedValueWithSteps;
105
+ cycle4: ReducedValueWithSteps;
106
+ cycle5: ReducedValueWithSteps;
107
+ cycle6: ReducedValueWithSteps;
108
+ cycle7: ReducedValueWithSteps;
109
+ };
110
+ declare function calculateFibonacciCycle(birthDate: Date, today: Date): FibonacciCycle;
111
+ type PersonalPeriod = {
112
+ startMonth: number;
113
+ endMonth: number;
114
+ value: ReducedValueWithSteps;
115
+ };
116
+ type PersonalMonth = {
117
+ month: number;
118
+ value: ReducedValueWithSteps;
119
+ };
120
+ type PersonalCycles = {
121
+ personalYear: ReducedValueWithSteps;
122
+ personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];
123
+ personalMonths: [
124
+ PersonalMonth,
125
+ PersonalMonth,
126
+ PersonalMonth,
127
+ PersonalMonth,
128
+ PersonalMonth,
129
+ PersonalMonth,
130
+ PersonalMonth,
131
+ PersonalMonth,
132
+ PersonalMonth,
133
+ PersonalMonth,
134
+ PersonalMonth,
135
+ PersonalMonth,
136
+ PersonalMonth
137
+ ];
138
+ currentPersonalPeriod: number;
139
+ currentPersonalMonth: number;
140
+ currentAge: number;
141
+ lifePath: number;
142
+ soulNumber?: number;
143
+ };
144
+ declare function calculatePersonalYear(birthDate: Date, today?: Date): ReducedValueWithSteps;
145
+ declare function calculatePersonalPeriods(birthDate: Date, yearToUse: number, lifePath: number, soulNumber: number, currentAge: number): [PersonalPeriod, PersonalPeriod, PersonalPeriod];
146
+ declare function calculatePersonalMonths(birthDate: Date, personalYear: ReducedValueWithSteps, today: Date): {
147
+ personalMonths: PersonalCycles["personalMonths"];
148
+ currentPersonalMonthIndex: number;
149
+ };
150
+ declare function calculatePersonalCycles(birthDate: Date, today: Date | undefined, firstName: string): PersonalCycles;
40
151
 
41
- export { CYCLE_MEANINGS, type Cycle, type CycleInfo, calculateCycles, calculateLifePath };
152
+ export { CYCLE_MEANINGS, type Cycle, type CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
@@ -1,21 +1,71 @@
1
1
  'use strict';
2
2
 
3
- var chunkRGMSQCP5_js = require('../chunk-RGMSQCP5.js');
3
+ var chunkSHEGSIRU_js = require('../chunk-SHEGSIRU.js');
4
+ require('../chunk-JJ76YVMI.js');
5
+ require('../chunk-7CAIYKIO.js');
4
6
  require('../chunk-2TUXWMP5.js');
5
7
 
6
8
 
7
9
 
8
10
  Object.defineProperty(exports, "CYCLE_MEANINGS", {
9
11
  enumerable: true,
10
- get: function () { return chunkRGMSQCP5_js.CYCLE_MEANINGS; }
12
+ get: function () { return chunkSHEGSIRU_js.CYCLE_MEANINGS; }
13
+ });
14
+ Object.defineProperty(exports, "MASTER_NUMBERS", {
15
+ enumerable: true,
16
+ get: function () { return chunkSHEGSIRU_js.MASTER_NUMBERS; }
17
+ });
18
+ Object.defineProperty(exports, "calculateChallenges", {
19
+ enumerable: true,
20
+ get: function () { return chunkSHEGSIRU_js.calculateChallenges; }
11
21
  });
12
22
  Object.defineProperty(exports, "calculateCycles", {
13
23
  enumerable: true,
14
- get: function () { return chunkRGMSQCP5_js.calculateCycles; }
24
+ get: function () { return chunkSHEGSIRU_js.calculateCycles; }
25
+ });
26
+ Object.defineProperty(exports, "calculateFibonacciCycle", {
27
+ enumerable: true,
28
+ get: function () { return chunkSHEGSIRU_js.calculateFibonacciCycle; }
29
+ });
30
+ Object.defineProperty(exports, "calculateKaabalisticLifePath", {
31
+ enumerable: true,
32
+ get: function () { return chunkSHEGSIRU_js.calculateKaabalisticLifePath; }
33
+ });
34
+ Object.defineProperty(exports, "calculatePersonalCycles", {
35
+ enumerable: true,
36
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalCycles; }
37
+ });
38
+ Object.defineProperty(exports, "calculatePersonalMonths", {
39
+ enumerable: true,
40
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalMonths; }
41
+ });
42
+ Object.defineProperty(exports, "calculatePersonalPeriods", {
43
+ enumerable: true,
44
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalPeriods; }
45
+ });
46
+ Object.defineProperty(exports, "calculatePersonalYear", {
47
+ enumerable: true,
48
+ get: function () { return chunkSHEGSIRU_js.calculatePersonalYear; }
49
+ });
50
+ Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
51
+ enumerable: true,
52
+ get: function () { return chunkSHEGSIRU_js.calculateStraightAcrossReductionLifePath; }
53
+ });
54
+ Object.defineProperty(exports, "getDateEnergies", {
55
+ enumerable: true,
56
+ get: function () { return chunkSHEGSIRU_js.getDateEnergies; }
57
+ });
58
+ Object.defineProperty(exports, "isMasterNumber", {
59
+ enumerable: true,
60
+ get: function () { return chunkSHEGSIRU_js.isMasterNumber; }
61
+ });
62
+ Object.defineProperty(exports, "reduceToSingle", {
63
+ enumerable: true,
64
+ get: function () { return chunkSHEGSIRU_js.reduceToSingle; }
15
65
  });
16
- Object.defineProperty(exports, "calculateLifePath", {
66
+ Object.defineProperty(exports, "reduceToSingleWithSteps", {
17
67
  enumerable: true,
18
- get: function () { return chunkRGMSQCP5_js.calculateLifePath; }
68
+ get: function () { return chunkSHEGSIRU_js.reduceToSingleWithSteps; }
19
69
  });
20
70
  //# sourceMappingURL=index.js.map
21
71
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,6 @@
1
- export { CYCLE_MEANINGS, calculateCycles, calculateLifePath } from '../chunk-W7GBKP5K.mjs';
1
+ export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from '../chunk-VV2YT6RZ.mjs';
2
+ import '../chunk-5ISXTWFX.mjs';
3
+ import '../chunk-3LUQXNH6.mjs';
2
4
  import '../chunk-PY5SMMJB.mjs';
3
5
  //# sourceMappingURL=index.mjs.map
4
6
  //# sourceMappingURL=index.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaabalah",
3
- "version": "2.1.2",
3
+ "version": "3.0.0",
4
4
  "description": "The de-facto library for any esoteric calculations and tooling",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -54,10 +54,10 @@
54
54
  "scripts": {
55
55
  "build": "tsup",
56
56
  "dev": "tsup --watch",
57
- "test": "vitest run",
58
- "test:watch": "vitest watch",
59
- "test:coverage": "vitest run --coverage",
60
- "test:ui": "vitest --ui",
57
+ "test": "vitest run --silent",
58
+ "test:watch": "vitest watch --silent",
59
+ "test:coverage": "vitest run --coverage --silent",
60
+ "test:ui": "vitest --ui --silent",
61
61
  "prepare-browser-test": "cp wasm/build/swisseph.wasm examples/ && cp -r ephe examples/",
62
62
  "prepublishOnly": "npm run build && mkdir -p dist/wasm/build/ && cp dist/swisseph* dist/wasm/build/"
63
63
  },
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/gematria/index.ts"],"names":["LATIN_LETTERS","parseId","id","HEBREW_LETTERS","isEnding","latinLetterId","mapping","useWhenEndingValue","createTree","SYSTEM"],"mappings":";;;;;AAMA,IAAM,QAAA,uBAAe,GAAY,CAAA;AAAA,EAC/BA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA;AAChB,CAAC,CAAA;AAED,IAAM,4BAAA,GAA+B,CAAC,GAAgB,KAAA;AACpD,EAAM,MAAA,KAAA,GAAQ,CAAC,GAAG,CAAA;AAClB,EAAA,IAAI,UAAa,GAAA,GAAA;AAEjB,EAAA,OAAO,aAAa,CAAG,EAAA;AACrB,IAAA,UAAA,GAAa,MAAO,CAAA,UAAU,CAC3B,CAAA,KAAA,CAAM,EAAE,CACR,CAAA,MAAA,CAAO,CAAC,GAAA,EAAK,KAAU,KAAA,GAAA,GAAM,QAAS,CAAA,KAAK,GAAG,CAAC,CAAA;AAClD,IAAA,KAAA,CAAM,KAAK,UAAU,CAAA;AAAA;AAGvB,EAAO,OAAA;AAAA,IACL,KAAA;AAAA,IACA,UAAY,EAA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AA,CAAW,SAAS,CAAA;AACzE,EAAA,MAAM,mBAAsB,GAAA,4BAAA;AAAA,IAC1B,UAAW,CAAA;AAAA,GACb;AACA,EAAA,MAAM,kBAAqB,GAAA,4BAAA;AAAA,IACzB,UAAA,CAAW,YAAY,UAAW,CAAA;AAAA,GACpC;AAEA,EAAA,MAAM,wBAAwB,OAAS,EAAA,OAAA,GACnC,yBAAyB,IAAM,EAAA,UAAA,CAAW,sBAAsB,CAChE,GAAA,MAAA;AAEJ,EAAO,OAAA;AAAA,IACL,MAAQ,EAAA;AAAA,MACN,aAAa,UAAW,CAAA,SAAA;AAAA,MACxB,gBAAgB,eAAgB,CAAA,KAAA;AAAA,MAChC,YAAY,eAAgB,CAAA;AAAA,KAC9B;AAAA,IACA,UAAY,EAAA;AAAA,MACV,aAAa,UAAW,CAAA,aAAA;AAAA,MACxB,gBAAgB,mBAAoB,CAAA,KAAA;AAAA,MACpC,YAAY,mBAAoB,CAAA;AAAA,KAClC;AAAA,IACA,SAAW,EAAA;AAAA,MACT,WAAA,EAAa,UAAW,CAAA,SAAA,GAAY,UAAW,CAAA,aAAA;AAAA,MAC/C,gBAAgB,kBAAmB,CAAA,KAAA;AAAA,MACnC,YAAY,kBAAmB,CAAA;AAAA,KACjC;AAAA,IACA,iBAAiB,UAAW,CAAA,eAAA;AAAA,IAC5B,qBAAA;AAAA,IACA,iBAAA,EAAmB,OAAS,EAAA,WAAA,GAAc,iBAAoB,GAAA;AAAA,GAChE;AACF","file":"chunk-ADJTMVLA.js","sourcesContent":["import { HEBREW_LETTERS, LATIN_LETTERS } from \"../core/constants\";\nimport { createTree } from \"../core/factory\";\nimport { SYSTEM as KAABALAH_SYSTEM } from \"../core/systems/kaabalah\";\nimport { TreeOfLife } from \"../core/tree-of-life\";\nimport { id, LetterTypes, Node, NodeId, parseId } from \"../core/types\";\n\nconst DIGRAPHS = new Set<string>([\n LATIN_LETTERS.PH,\n LATIN_LETTERS.TS,\n LATIN_LETTERS.TZ,\n LATIN_LETTERS.SH,\n LATIN_LETTERS.CH,\n LATIN_LETTERS.TH,\n LATIN_LETTERS.KH,\n]);\n\nconst reduceToSingleDigitWithSteps = (num: number) => {\n const steps = [num];\n let currentNum = num;\n\n while (currentNum > 9) {\n currentNum = String(currentNum)\n .split(\"\")\n .reduce((acc, digit) => acc + parseInt(digit), 0);\n steps.push(currentNum);\n }\n\n return {\n steps,\n finalValue: currentNum,\n };\n};\n\ninterface LetterResult {\n latinLetterId: NodeId<LetterTypes.LATIN_LETTER>;\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n hebrewCharacter: string;\n isVowel: boolean;\n}\n\ninterface WordResult {\n letters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\ninterface GematriaState {\n includedLetters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\ninterface LetterPercentages {\n percentageOfVowels: number;\n percentageOfConsonants: number;\n letters: Record<string, number>;\n}\n\nfunction normalizeLetter(letter: string): string {\n if (letter.toUpperCase() === \"Ã\") return \"Ã\";\n if (letter.toUpperCase() === \"Ç\") return \"Ç\";\n\n return letter.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\nfunction getLetterMapping({\n tree,\n letterId,\n isStarting,\n}: {\n tree: TreeOfLife;\n letterId: NodeId<LetterTypes.LATIN_LETTER>;\n isStarting: boolean;\n}): Node<LetterTypes.HEBREW_LETTER> | undefined {\n if (isStarting && parseId(letterId) === \"O\") {\n return tree.getNode(id(LetterTypes.HEBREW_LETTER, HEBREW_LETTERS.AYIN));\n }\n\n return tree.walk(letterId, 2, LetterTypes.HEBREW_LETTER).at(0);\n}\n\nfunction processLetter(\n tree: TreeOfLife,\n letters: string[],\n i: number\n): { result?: LetterResult; skipNext: boolean } {\n const letter = normalizeLetter(letters[i]).toLocaleUpperCase();\n const nextLetter = letters[i + 1]\n ? normalizeLetter(letters[i + 1]).toLocaleLowerCase()\n : \"\";\n const combinedLetter = letter + nextLetter;\n\n if (DIGRAPHS.has(combinedLetter)) {\n const isEnding = i > 0 && i === letters.length - 2;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, combinedLetter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting: false,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: false,\n },\n skipNext: true,\n };\n }\n\n const isStarting = i === 0;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, letter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const isEnding = i > 0 && i === letters.length - 1;\n const latinLetter = tree.getNode(latinLetterId);\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: latinLetter?.data?.isVowel ?? false,\n },\n skipNext: false,\n };\n}\n\nfunction processWord(word: string, tree: TreeOfLife): WordResult {\n const letters = word.split(\"\");\n let i = 0;\n\n let wordState: WordResult = {\n letters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n while (i < letters.length) {\n const { result, skipNext } = processLetter(tree, letters, i);\n\n if (result) {\n wordState = {\n letters: [...wordState.letters, result],\n vowelsSum: wordState.vowelsSum + (result.isVowel ? result.value : 0),\n consonantsSum:\n wordState.consonantsSum + (result.isVowel ? 0 : result.value),\n includedGematriaValues: new Set([\n ...wordState.includedGematriaValues,\n result.value,\n ]),\n };\n }\n\n i += skipNext ? 2 : 1;\n }\n\n return wordState;\n}\n\nfunction calculateLetterPercentages(\n word: string,\n tree: TreeOfLife,\n prev: LetterPercentages\n): LetterPercentages {\n const letters = word.split(\"\");\n const letterCount = letters.length;\n\n let vowelsCount = 0;\n let consonantsCount = 0;\n\n const newLetters = { ...prev.letters };\n\n for (const letter of new Set(letters)) {\n const occurrences = letters.filter((l) => l === letter).length;\n const latinLetter = tree.getNode(id(LetterTypes.LATIN_LETTER, letter));\n newLetters[letter] = (occurrences / letterCount) * 100;\n\n if (latinLetter?.data?.isVowel) {\n vowelsCount += occurrences;\n } else {\n consonantsCount += occurrences;\n }\n }\n return {\n percentageOfVowels: (vowelsCount / letterCount) * 100,\n percentageOfConsonants: (consonantsCount / letterCount) * 100,\n letters: newLetters,\n };\n}\n\nfunction getMissingGematriaValues(\n tree: TreeOfLife,\n includedGematriaValues: Set<number>\n) {\n const missingGematriaValues: {\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n whenEnding: boolean;\n }[] = [];\n\n for (const hebrewLetter of Object.values(HEBREW_LETTERS)) {\n const hebrewLetterId = id(LetterTypes.HEBREW_LETTER, hebrewLetter);\n const hebrewLetterNode = tree.getNode(hebrewLetterId);\n\n if (!hebrewLetterNode?.data) continue;\n\n if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValue,\n hebrewLetterId,\n whenEnding: false,\n });\n }\n\n if (\n hebrewLetterNode.data.gematriaValueWhenEnding &&\n !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)\n ) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValueWhenEnding,\n hebrewLetterId,\n whenEnding: true,\n });\n }\n }\n\n missingGematriaValues.sort((a, b) => a.value - b.value);\n\n return missingGematriaValues;\n}\n\nexport const calculateGematria = (\n phrase: string,\n options: {\n missing?: boolean;\n percentages?: boolean;\n } = {\n missing: false,\n percentages: false,\n },\n tree?: TreeOfLife\n) => {\n if (!tree) {\n // todo: study the possibility of pre-calculating the mappings\n tree = createTree({ system: KAABALAH_SYSTEM, parts: [] });\n }\n const words = phrase.toUpperCase().trim().split(\" \");\n\n const initialState: GematriaState = {\n includedLetters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n const finalState = words.reduce<GematriaState>((state, word) => {\n const wordResult = processWord(word, tree);\n\n return {\n includedLetters: [...state.includedLetters, ...wordResult.letters],\n vowelsSum: state.vowelsSum + wordResult.vowelsSum,\n consonantsSum: state.consonantsSum + wordResult.consonantsSum,\n includedGematriaValues: new Set([\n ...Array.from(state.includedGematriaValues),\n ...Array.from(wordResult.includedGematriaValues),\n ]),\n };\n }, initialState);\n\n let letterPercentages: LetterPercentages = {\n percentageOfVowels: 0,\n percentageOfConsonants: 0,\n letters: {},\n };\n\n if (options?.percentages) {\n letterPercentages = words.reduce<LetterPercentages>((acc, word) => {\n return calculateLetterPercentages(word, tree, acc);\n }, letterPercentages);\n }\n\n const vowelsReduction = reduceToSingleDigitWithSteps(finalState.vowelsSum);\n const consonantsReduction = reduceToSingleDigitWithSteps(\n finalState.consonantsSum\n );\n const synthesisReduction = reduceToSingleDigitWithSteps(\n finalState.vowelsSum + finalState.consonantsSum\n );\n\n const missingGematriaValues = options?.missing\n ? getMissingGematriaValues(tree, finalState.includedGematriaValues)\n : undefined;\n\n return {\n vowels: {\n originalSum: finalState.vowelsSum,\n reductionSteps: vowelsReduction.steps,\n finalValue: vowelsReduction.finalValue,\n },\n consonants: {\n originalSum: finalState.consonantsSum,\n reductionSteps: consonantsReduction.steps,\n finalValue: consonantsReduction.finalValue,\n },\n synthesis: {\n originalSum: finalState.vowelsSum + finalState.consonantsSum,\n reductionSteps: synthesisReduction.steps,\n finalValue: synthesisReduction.finalValue,\n },\n includedLetters: finalState.includedLetters,\n missingGematriaValues,\n letterPercentages: options?.percentages ? letterPercentages : undefined,\n };\n};\n"]}