western-signs 1.12.2 → 1.13.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.
package/README.md CHANGED
@@ -27,16 +27,16 @@ npm install western-signs
27
27
 
28
28
  ## Usage
29
29
 
30
- To use the `getSignByName` function, import it along with the `SIGNS` constant from the `western-signs` package:
30
+ To use the `getSign` function, import it along with the `SIGNS` constant from the `western-signs` package:
31
31
 
32
32
  ```js
33
- import { getSignByName, SIGNS } from 'western-signs'
33
+ import { getSign, SIGNS } from "western-signs";
34
34
  ```
35
35
 
36
36
  Call the function with the desired astrological sign and optionally specify a language code. If no language code is provided, it defaults to English.
37
37
 
38
38
  ```js
39
- const data = getSignByName(SIGNS.TAURUS)
39
+ const data = getSign(SIGNS.TAURUS);
40
40
  ```
41
41
 
42
42
  It should returns an object with the following properties:
@@ -58,64 +58,97 @@ It should returns an object with the following properties:
58
58
  }
59
59
  ```
60
60
 
61
+ #### Translations
62
+
63
+ By default, only English is included. Other languages must be explicitly imported to be available.
64
+
65
+ To enable a language, import its side-effect module:
66
+
67
+ ```js
68
+ import "western-signs/locale/es";
69
+ ```
70
+
71
+ After importing, the language becomes available immediately:
72
+
73
+ ```js
74
+ const sign = getSign(SIGNS.TAURUS, "es");
75
+ ```
76
+
61
77
  ### Symbols
62
78
 
63
79
  The `getSymbol` function allows you to retrieve SVG representations of astrological symbols, with options to customize their appearance.
64
80
 
81
+ | parameter | type | default | description |
82
+ | ---------------- | ------------------------------- | ---------------- | -------------------------------------------------------------- |
83
+ | name | `string` | — | Symbol identifier. See constants `PLANETS`, `SIGNS`, `ASPECTS` |
84
+ | width | `number` | `24` | Width in pixels of the generated SVG |
85
+ | height | `number` | `24` | Height in pixels |
86
+ | stroke | `string` | `'currentColor'` | Stroke color as hex, rgb, or CSS variable |
87
+ | stroke-width | `number` | `1` | Stroke thickness in logical pixels |
88
+ | stroke-linecap | `'butt' \| 'round' \| 'square'` | `'round'` | Shape of stroke endpoints |
89
+ | stroke-linejoin | `'miter' \| 'round' \| 'bevel'` | `'round'` | Shape of stroke corners and joins |
90
+ | nonScalingStroke | `boolean` | `true` | Prevents stroke from scaling when the SVG is resized |
91
+
65
92
  ```js
66
- import { getSymbol, SIGNS } from 'western-signs'
93
+ import { getSymbol, SIGNS } from "western-signs";
67
94
 
68
95
  const symbol = getSymbol(SIGNS.TAURUS, {
69
- width: 16,
70
- height: 16,
71
- stroke: 'currentColor',
72
- strokeWidth: 1,
73
- })
96
+ width: 24,
97
+ height: 24,
98
+ stroke: "currentColor",
99
+ "stroke-width": 1,
100
+ });
74
101
 
75
- console.log(symbol.toString())
102
+ console.log(symbol.toString());
76
103
  // Outputs: An SVG string with customized attributes
77
104
 
78
- console.log(symbol.toDataURL())
105
+ console.log(symbol.toDataURL());
79
106
  // Outputs: A Data URL representation of the SVG
80
107
  ```
81
108
 
82
- Use method chaining to modify the attributes of the symbol for a more fluent coding style.
109
+ #### Available symbols
83
110
 
84
- ```js
85
- const chainedSymbol = getSymbol('taurus')
86
- .setWidth(16)
87
- .setHeight(16)
88
- .setStroke('currentColor')
89
- .setStrokeWidth(1)
90
-
91
- console.log(chainedSymbol.toString())
92
- // Outputs: The SVG string with updated stroke attributes
93
- ```
111
+ Three groups of exported constants. Use the identifier with getSymbol().
94
112
 
113
+ | group | symbols |
114
+ | ------- | ---------------------------------------------------------------------------------------------------------------- |
115
+ | PLANETS | `SUN` `MOON` `MERCURY` `VENUS` `MARS` `JUPITER` `SATURN` `URANUS` `NEPTUNE` `PLUTO` |
116
+ | SIGNS | `ARIES` `TAURUS` `GEMINI` `CANCER` `LEO` `VIRGO` `LIBRA` `SCORPIO` `SAGITTARIUS` `CAPRICORN` `AQUARIUS` `PISCES` |
117
+ | ASPECTS | `CONJUNCTION` `SEXTILE` `SQUARE` `TRINE` `OPPOSITION` |
95
118
 
96
- ### Translations
119
+ ### Internationalization
97
120
 
98
121
  You can easily translate aspects and other astrology-related terms using the `t` function provided by the library. The `t` function takes template strings and values to be translated based on the current language setting.
99
122
 
100
123
  To translate an aspect into the current language:
101
124
 
102
125
  ```js
103
- import { ASPECTS, i18n } from 'western-signs'
126
+ import { ASPECTS, i18n } from "western-signs";
127
+
128
+ // Importing a locale registers it globally
129
+ import "western-signs/locale/es";
104
130
 
105
- const aspect = i18n.t`${ASPECTS.CONJUNCTION}`
106
- console.log(aspect)
131
+ const aspect = i18n.t`${ASPECTS.CONJUNCTION}`;
132
+ console.log(aspect);
107
133
  // Output: Conjunction
108
134
  ```
109
135
 
110
136
  To change the language, use the `setLanguage` function:
111
137
 
112
138
  ```js
113
- i18n.setLanguage('es')
114
- const aspectInSpanish = i18n.t`${ASPECTS.CONJUNCTION}`
115
- console.log(aspectInSpanish)
139
+ i18n.setLanguage("es");
140
+ const aspectInSpanish = i18n.t`${ASPECTS.CONJUNCTION}`;
141
+ console.log(aspectInSpanish);
116
142
  // Output: Conjunción
117
143
  ```
118
144
 
145
+ #### Available languages
146
+
147
+ Languages are opt-in and must be imported explicitly:
148
+
149
+ - `western-signs/locale/en` — English (default)
150
+ - `western-signs/locale/es` — Spanish
151
+ - `western-signs/locale/ca` — Catalan
119
152
 
120
153
  ## API Reference
121
154
 
@@ -131,6 +164,7 @@ console.log(aspectInSpanish)
131
164
 
132
165
  ### Interfaces
133
166
 
167
+ - [Aspect](https://marcmarine.github.io/western-signs/interfaces/Aspect)
134
168
  - [House](https://marcmarine.github.io/western-signs/interfaces/House)
135
169
  - [Planet](https://marcmarine.github.io/western-signs/interfaces/Planet)
136
170
  - [Sign](https://marcmarine.github.io/western-signs/interfaces/Sign)
@@ -0,0 +1,2 @@
1
+ import{e,f as a,g as t,h as n,i as r,j as E,k as l,l as I}from"./chunk-g3z9cpkw.js";var o={aries:{bodyPart:E.HEAD,character:l.RAM,element:n.FIRE,endDate:new Date(2020,3,20),glyph:"♈",modality:t.CARDINAL,name:e.ARIES,number:1,pole:r.POSITIVE,rulingPlanet:a.MARS,season:I.SPRING,startDate:new Date(2020,2,20)},taurus:{bodyPart:E.THROAT,character:l.BULL,element:n.EARTH,endDate:new Date(2020,4,21),glyph:"♉",modality:t.FIXED,name:e.TAURUS,number:2,pole:r.NEGATIVE,rulingPlanet:a.VENUS,season:I.SPRING,startDate:new Date(2020,3,21)},gemini:{bodyPart:E.LUNGS,character:l.TWINS,element:n.AIR,endDate:new Date(2020,5,22),glyph:"♊",modality:t.MUTABLE,name:e.GEMINI,number:3,pole:r.POSITIVE,rulingPlanet:a.MERCURY,season:I.SPRING,startDate:new Date(2020,4,22)},cancer:{bodyPart:E.STOMACH,character:l.CRAB,element:n.WATER,endDate:new Date(2020,6,22),glyph:"♋",modality:t.CARDINAL,name:e.CANCER,number:4,pole:r.NEGATIVE,rulingPlanet:a.MOON,season:I.SUMMER,startDate:new Date(2020,5,23)},leo:{bodyPart:E.HEART,character:l.LION,element:n.FIRE,endDate:new Date(2020,7,22),glyph:"♌",modality:t.FIXED,name:e.LEO,number:5,pole:r.POSITIVE,rulingPlanet:a.SUN,season:I.SUMMER,startDate:new Date(2020,6,23)},virgo:{bodyPart:E.BOWELS,character:l.VIRGIN,element:n.EARTH,endDate:new Date(2020,8,22),glyph:"♍",modality:t.MUTABLE,name:e.VIRGO,number:6,pole:r.NEGATIVE,rulingPlanet:a.MERCURY,season:I.SUMMER,startDate:new Date(2020,7,23)},libra:{bodyPart:E.REINS,character:l.BALANCE,element:n.AIR,endDate:new Date(2020,9,22),glyph:"♎",modality:t.CARDINAL,name:e.LIBRA,number:7,pole:r.POSITIVE,rulingPlanet:a.VENUS,season:I.AUTUMN,startDate:new Date(2020,8,23)},scorpio:{bodyPart:E.SECRETS,character:l.SCORPION,element:n.WATER,endDate:new Date(2020,10,22),glyph:"♏",modality:t.FIXED,name:e.SCORPIO,number:8,pole:r.NEGATIVE,rulingPlanet:a.PLUTO,season:I.AUTUMN,startDate:new Date(2020,9,23)},sagittarius:{bodyPart:E.THIGHS,character:l.ARCHER,element:n.FIRE,endDate:new Date(2020,11,22),glyph:"♐",modality:t.MUTABLE,name:e.SAGITTARIUS,number:9,pole:r.POSITIVE,rulingPlanet:a.JUPITER,season:I.AUTUMN,startDate:new Date(2020,10,23)},capricorn:{bodyPart:E.KNEES,character:l.GOAT,element:n.EARTH,endDate:new Date(2021,0,21),glyph:"♑",modality:t.CARDINAL,name:e.CAPRICORN,number:10,pole:r.NEGATIVE,rulingPlanet:a.SATURN,season:I.WINTER,startDate:new Date(2020,11,23)},aquarius:{bodyPart:E.ANKLES,character:l.THE_MAN,element:n.AIR,endDate:new Date(2020,1,20),glyph:"♒",modality:t.FIXED,name:e.AQUARIUS,number:11,pole:r.POSITIVE,rulingPlanet:a.URANUS,season:I.WINTER,startDate:new Date(2020,0,22)},pisces:{bodyPart:E.FEET,character:l.THE_FISHES,element:n.WATER,endDate:new Date(2020,2,19),glyph:"♓",modality:t.MUTABLE,name:e.PISCES,number:12,pole:r.NEGATIVE,rulingPlanet:a.NEPTUNE,season:I.WINTER,startDate:new Date(2020,1,21)}},R=o;
2
+ export{R as a};
@@ -0,0 +1,2 @@
1
+ var s={ARIES:"aries",TAURUS:"taurus",GEMINI:"gemini",CANCER:"cancer",LEO:"leo",VIRGO:"virgo",LIBRA:"libra",SCORPIO:"scorpio",SAGITTARIUS:"sagittarius",CAPRICORN:"capricorn",AQUARIUS:"aquarius",PISCES:"pisces"},o={SUN:"sun",MOON:"moon",MERCURY:"mercury",VENUS:"venus",MARS:"mars",JUPITER:"jupiter",SATURN:"saturn",URANUS:"uranus",NEPTUNE:"neptune",PLUTO:"pluto"},e={CARDINAL:"cardinal",FIXED:"fixed",MUTABLE:"mutable"},t={FIRE:"fire",EARTH:"earth",AIR:"air",WATER:"water"},r={POSITIVE:"positive",NEGATIVE:"negative"},n={HEAD:"head",THROAT:"throat",LUNGS:"lungs",STOMACH:"stomach",HEART:"heart",BOWELS:"bowels",REINS:"reins",SECRETS:"secrets",THIGHS:"thighs",KNEES:"knees",ANKLES:"ankles",FEET:"feet"},E={RAM:"ram",BULL:"bull",TWINS:"twins",CRAB:"crab",LION:"lion",VIRGIN:"virgin",BALANCE:"balance",SCORPION:"scorpion",ARCHER:"archer",GOAT:"goat",THE_MAN:"the-man",THE_FISHES:"the-fishes"},u={SPRING:"spring",SUMMER:"summer",AUTUMN:"autumn",WINTER:"winter"},S=["house1","house2","house3","house4","house5","house6","house7","house8","house9","house10","house11","house12"],T=["houseTitle1","houseTitle2","houseTitle3","houseTitle4","houseTitle5","houseTitle6","houseTitle7","houseTitle8","houseTitle9","houseTitle10","houseTitle11","houseTitle12"],a=["houseKeywords1","houseKeywords2","houseKeywords3","houseKeywords4","houseKeywords5","houseKeywords6","houseKeywords7","houseKeywords8","houseKeywords9","houseKeywords10","houseKeywords11","houseKeywords12"],A={LOWER:"lower",UPPER:"upper"},R={ANGULAR:"angular",SUCCEDENT:"succedent",CADENT:"cadent"},c={LUMINARY:"luminary",PERSONAL:"personal",SOCIAL:"social",TRANSPERSONAL:"transpersonal",OTHER:"other"},i={CONJUNCTION:"conjunction",SEMISEXTILE:"semisextile",SEXTILE:"sextile",QUADRATURE:"quadrature",TRIGONE:"trigone",QUINCUNX:"quincunx",OPPOSITION:"opposition"},I={MAJOR:"major",MINOR:"minor"},h={HARMONIOUS:"harmonious",DISHARMONIOUS:"disharmonious",NEUTRAL:"neutral"};
2
+ export{s as e,o as f,e as g,t as h,r as i,n as j,E as k,u as l,S as m,T as n,a as o,A as p,R as q,c as r,i as s,I as t,h as u};
@@ -0,0 +1,2 @@
1
+ import{f as e,r as p}from"./chunk-g3z9cpkw.js";var t={sun:{name:e.SUN,glyph:"☉",type:p.LUMINARY},moon:{name:e.MOON,glyph:"☽",type:p.LUMINARY},mercury:{name:e.MERCURY,glyph:"☿",type:p.PERSONAL},venus:{name:e.VENUS,glyph:"♀",type:p.PERSONAL},mars:{name:e.MARS,glyph:"♂",type:p.PERSONAL},jupiter:{name:e.JUPITER,glyph:"♃",type:p.SOCIAL},saturn:{name:e.SATURN,glyph:"♄",type:p.SOCIAL},uranus:{name:e.URANUS,glyph:"♅",type:p.TRANSPERSONAL},neptune:{name:e.NEPTUNE,glyph:"♆",type:p.TRANSPERSONAL},pluto:{name:e.PLUTO,glyph:"♇",type:p.TRANSPERSONAL}},N=t;
2
+ export{N as b};
@@ -0,0 +1,2 @@
1
+ var n={aries:"Aries",taurus:"Taurus",gemini:"Gemini",cancer:"Cancer",leo:"Leo",virgo:"Virgo",libra:"Libra",scorpio:"Scorpio",sagittarius:"Sagittarius",capricorn:"Capricorn",aquarius:"Aquarius",pisces:"Pisces",fire:"Fire",earth:"Earth",air:"Air",water:"Water",cardinal:"Cardinal",fixed:"Fixed",mutable:"Mutable",mars:"Mars",venus:"Venus",mercury:"Mercury",moon:"Moon",sun:"Sun",pluto:"Pluto",jupiter:"Jupiter",saturn:"Saturn",uranus:"Uranus",neptune:"Neptune",positive:"Positive",negative:"Negative",head:"Head",throat:"Throat",lungs:"Lungs",stomach:"Stomach",heart:"Heart",bowels:"Bowels",reins:"Reins",secrets:"Secrets",thighs:"Thighs",knees:"Knees",ankles:"Ankles",feet:"Feet",ram:"Ram",bull:"Bull",twins:"Twins",crab:"Crab",lion:"Lion",virgin:"Virgin",balance:"Balance",scorpion:"Scorpion",archer:"Archer",goat:"Goat","the-man":"The Man","the-fishes":"The Fishes",spring:"Spring",summer:"Summer",autumn:"Autumn",winter:"Winter",house1:"First House",house2:"Second House",house3:"Third House",house4:"Fourth House",house5:"Fifth House",house6:"Sixth House",house7:"Seventh House",house8:"Eighth House",house9:"Ninth House",house10:"Tenth House",house11:"Eleventh House",house12:"Twelfth House",houseTitle1:"The individual personality",houseTitle2:"Values and Possessions",houseTitle3:"Communication",houseTitle4:"Roots and Origins",houseTitle5:"Pleasure and Creativity",houseTitle6:"Work and Routine",houseTitle7:"Relating",houseTitle8:"Loss and Common Property",houseTitle9:"Philosophies and Far Countries",houseTitle10:"Occupation and Calling",houseTitle11:"Friends and Acquaintances",houseTitle12:"Beyond the Personal",houseKeywords1:"Self-image,Identity,Impressions on others,Personality",houseKeywords2:"Personal resources,Values,Security,Possessions",houseKeywords3:"Surroundings,Siblings,Communication,Knowledge",houseKeywords4:"Home,Family,The Past,Roots",houseKeywords5:"Children,Creativity,Expression,Pleasure",houseKeywords6:"Routines,Service,Health,Productivity",houseKeywords7:"Partnerships,Relationships,Balance,Collaboration",houseKeywords8:"Transformations,Crises,Beginnings,Rebirth",houseKeywords9:"Philosophy,Travel,Openness,Wisdom",houseKeywords10:"Public,Legacy,Career,Ambition",houseKeywords11:"Friends,Community,Dreams,Aspirations",houseKeywords12:"Unconscious,Fantasies,Connections,Healing",lower:"Lower",upper:"Upper",angular:"Angular",succedent:"Succedent",cadent:"Cadent",luminary:"Luminary",personal:"Personal",social:"Social",transpersonal:"Transpersonal",other:"Other",conjunction:"Conjunction",semisextile:"Semisextile",sextile:"Sextile",quadrature:"Quadrature",trigone:"Trigone",quincunx:"Quincunx",opposition:"Opposition",major:"Major",minor:"Minor",harmonious:"Harmonious",disharmonious:"Disharmonious",neutral:"Neutral",ascendant:"Ascendant"},e=n;var s=new Map;s.set("en",e);function a(o,i){s.set(o,i)}
2
+ export{s as c,a as d};
@@ -0,0 +1,2 @@
1
+ import type { Aspect } from "../definitions";
2
+ export declare const aspects: Aspect[];
@@ -0,0 +1,112 @@
1
+ export declare const SIGNS: {
2
+ readonly ARIES: "aries";
3
+ readonly TAURUS: "taurus";
4
+ readonly GEMINI: "gemini";
5
+ readonly CANCER: "cancer";
6
+ readonly LEO: "leo";
7
+ readonly VIRGO: "virgo";
8
+ readonly LIBRA: "libra";
9
+ readonly SCORPIO: "scorpio";
10
+ readonly SAGITTARIUS: "sagittarius";
11
+ readonly CAPRICORN: "capricorn";
12
+ readonly AQUARIUS: "aquarius";
13
+ readonly PISCES: "pisces";
14
+ };
15
+ export declare const PLANETS: {
16
+ readonly SUN: "sun";
17
+ readonly MOON: "moon";
18
+ readonly MERCURY: "mercury";
19
+ readonly VENUS: "venus";
20
+ readonly MARS: "mars";
21
+ readonly JUPITER: "jupiter";
22
+ readonly SATURN: "saturn";
23
+ readonly URANUS: "uranus";
24
+ readonly NEPTUNE: "neptune";
25
+ readonly PLUTO: "pluto";
26
+ };
27
+ export declare const MODALITIES: {
28
+ readonly CARDINAL: "cardinal";
29
+ readonly FIXED: "fixed";
30
+ readonly MUTABLE: "mutable";
31
+ };
32
+ export declare const ELEMENTS: {
33
+ readonly FIRE: "fire";
34
+ readonly EARTH: "earth";
35
+ readonly AIR: "air";
36
+ readonly WATER: "water";
37
+ };
38
+ export declare const POLARITIES: {
39
+ readonly POSITIVE: "positive";
40
+ readonly NEGATIVE: "negative";
41
+ };
42
+ export declare const BODY_PARTS: {
43
+ readonly HEAD: "head";
44
+ readonly THROAT: "throat";
45
+ readonly LUNGS: "lungs";
46
+ readonly STOMACH: "stomach";
47
+ readonly HEART: "heart";
48
+ readonly BOWELS: "bowels";
49
+ readonly REINS: "reins";
50
+ readonly SECRETS: "secrets";
51
+ readonly THIGHS: "thighs";
52
+ readonly KNEES: "knees";
53
+ readonly ANKLES: "ankles";
54
+ readonly FEET: "feet";
55
+ };
56
+ export declare const CHARACTERS: {
57
+ readonly RAM: "ram";
58
+ readonly BULL: "bull";
59
+ readonly TWINS: "twins";
60
+ readonly CRAB: "crab";
61
+ readonly LION: "lion";
62
+ readonly VIRGIN: "virgin";
63
+ readonly BALANCE: "balance";
64
+ readonly SCORPION: "scorpion";
65
+ readonly ARCHER: "archer";
66
+ readonly GOAT: "goat";
67
+ readonly THE_MAN: "the-man";
68
+ readonly THE_FISHES: "the-fishes";
69
+ };
70
+ export declare const SEASONS: {
71
+ readonly SPRING: "spring";
72
+ readonly SUMMER: "summer";
73
+ readonly AUTUMN: "autumn";
74
+ readonly WINTER: "winter";
75
+ };
76
+ export declare const HOUSES: readonly ["house1", "house2", "house3", "house4", "house5", "house6", "house7", "house8", "house9", "house10", "house11", "house12"];
77
+ export declare const HOUSE_TITLES: readonly ["houseTitle1", "houseTitle2", "houseTitle3", "houseTitle4", "houseTitle5", "houseTitle6", "houseTitle7", "houseTitle8", "houseTitle9", "houseTitle10", "houseTitle11", "houseTitle12"];
78
+ export declare const HOUSE_KEYWORDS: readonly ["houseKeywords1", "houseKeywords2", "houseKeywords3", "houseKeywords4", "houseKeywords5", "houseKeywords6", "houseKeywords7", "houseKeywords8", "houseKeywords9", "houseKeywords10", "houseKeywords11", "houseKeywords12"];
79
+ export declare const HEMISPHERES: {
80
+ readonly LOWER: "lower";
81
+ readonly UPPER: "upper";
82
+ };
83
+ export declare const HOUSE_MODALITIES: {
84
+ readonly ANGULAR: "angular";
85
+ readonly SUCCEDENT: "succedent";
86
+ readonly CADENT: "cadent";
87
+ };
88
+ export declare const PLANET_TYPE: {
89
+ readonly LUMINARY: "luminary";
90
+ readonly PERSONAL: "personal";
91
+ readonly SOCIAL: "social";
92
+ readonly TRANSPERSONAL: "transpersonal";
93
+ readonly OTHER: "other";
94
+ };
95
+ export declare const ASPECTS: {
96
+ readonly CONJUNCTION: "conjunction";
97
+ readonly SEMISEXTILE: "semisextile";
98
+ readonly SEXTILE: "sextile";
99
+ readonly QUADRATURE: "quadrature";
100
+ readonly TRIGONE: "trigone";
101
+ readonly QUINCUNX: "quincunx";
102
+ readonly OPPOSITION: "opposition";
103
+ };
104
+ export declare const ASPECT_TYPE: {
105
+ readonly MAJOR: "major";
106
+ readonly MINOR: "minor";
107
+ };
108
+ export declare const ASPECT_QUALITY: {
109
+ readonly HARMONIOUS: "harmonious";
110
+ readonly DISHARMONIOUS: "disharmonious";
111
+ readonly NEUTRAL: "neutral";
112
+ };
@@ -0,0 +1 @@
1
+ import{e as a,f as b,g as c,h as d,i as e,j as f,k as g,l as h,m as i,n as j,o as k,p as l,q as m,r as n,s as o,t as p,u as q}from"../chunk-g3z9cpkw.js";export{a as SIGNS,h as SEASONS,e as POLARITIES,n as PLANET_TYPE,b as PLANETS,c as MODALITIES,j as HOUSE_TITLES,m as HOUSE_MODALITIES,k as HOUSE_KEYWORDS,i as HOUSES,l as HEMISPHERES,d as ELEMENTS,g as CHARACTERS,f as BODY_PARTS,p as ASPECT_TYPE,q as ASPECT_QUALITY,o as ASPECTS};
@@ -0,0 +1,3 @@
1
+ import type { Dictionary } from '../../definitions';
2
+ declare const ca: Dictionary;
3
+ export default ca;
@@ -0,0 +1,3 @@
1
+ import type { Dictionary } from '../../definitions';
2
+ declare const en: Dictionary;
3
+ export default en;
@@ -0,0 +1,3 @@
1
+ import type { Dictionary } from '../../definitions';
2
+ declare const es: Dictionary;
3
+ export default es;
@@ -0,0 +1,3 @@
1
+ import type { Dictionary } from '../../definitions';
2
+ export declare const dictionaries: Map<string, Dictionary>;
3
+ export declare function registerDictionary(lang: string, dictionary: Dictionary): void;
@@ -0,0 +1,3 @@
1
+ import type { House } from '../definitions';
2
+ declare const houses: House[];
3
+ export default houses;
@@ -0,0 +1,3 @@
1
+ import type { Planets, Planet } from '../definitions';
2
+ declare const planets: Record<Planets, Planet>;
3
+ export default planets;
@@ -0,0 +1,3 @@
1
+ import type { Sign, Signs } from '../definitions';
2
+ declare const signs: Record<Signs, Sign>;
3
+ export default signs;
@@ -0,0 +1,32 @@
1
+ export declare const SYMBOLS: {
2
+ readonly scorpio: "M19.5 16.8v-3.3h3.3,M2.732 8.768A2.5 2.5 0 1 1 7 7m0 0v10M7 7a2.5 2.5 0 1 1 5 0m0 0v10m0-10a2.5 2.5 0 1 1 5 0v10a2.5 2.5 0 1 0 4.268-1.768L20 14";
3
+ readonly gemini: "M7 4.044v15.912M17 4.044v15.912,M22 2A19.99 19.99 0 0 1 2 2M22 22a20 20 0 0 0-20 0";
4
+ readonly opposition: "m7.696 16.304 8.608-8.608m-.976-2.36a3.336 3.336 0 0 0 3.337 3.453A3.34 3.34 0 0 0 22 5.334a3.339 3.339 0 0 0-6.67 0zM2 18.664a3.337 3.337 0 1 0 6.669.281A3.337 3.337 0 0 0 2 18.664Z";
5
+ readonly moon: "M7 2a10 10 0 0 1 0 20 11.55 11.55 0 0 0 5.774-10c0-4.124-2.204-7.938-5.774-10Z";
6
+ readonly taurus: "M11.921 8.321a7.6 7.6 0 0 1 7.599 7.601v-.002a7.6 7.6 0 1 1-7.599-7.599Zm0 0A7.604 7.604 0 0 1 4.32.72m7.601 7.601A7.6 7.6 0 0 0 19.52.72";
7
+ readonly leo: "M9.5 14.5C9.5 12 7 9.5 7 7a5 5 0 0 1 10 0c0 5-2.5 7.5-2.5 12.5a2.5 2.5 0 1 0 5 0m-10-5a2.5 2.5 0 1 0-5 0 2.5 2.5 0 0 0 5 0Z";
8
+ readonly libra: "M.45 12h5.775a5.775 5.775 0 0 1 11.55 0h5.775M.45 17.775h23.1";
9
+ readonly trigone: "M2 21.994 12 4.672l10 17.32z";
10
+ readonly semisextile: "M22 16.33H12m-10 0h10M7 7.67l5 8.66m0 0 5-8.66";
11
+ readonly cancer: "M22 12a3.335 3.335 0 1 0-6.67 0A3.335 3.335 0 0 0 22 12Zm0 0A10 10 0 0 0 4.93 4.93M2 12a3.334 3.334 0 1 0 6.668 0A3.334 3.334 0 0 0 2 12Zm0 0a10 10 0 0 0 17.07 7.07";
12
+ readonly neptune: "M12 22V2M7 14.5h10M4.5 2a7.502 7.502 0 0 0 15 0";
13
+ readonly quadrature: "M22 22H2V1.996h20v20";
14
+ readonly uranus: "M12 17V4.5M7 2v10M17 2v10M7 7h10m-2.5 12.5a2.498 2.498 0 1 0-4.997.004A2.498 2.498 0 0 0 14.5 19.5Z";
15
+ readonly pluto: "M17 20H7V4h5c2.758 0 5 1.24 5 4s-2.242 4-5 4H7";
16
+ readonly pisces: "M18.25 3.34a10 10 0 0 0 0 17.32m-12.5 0a10 10 0 0 0 0-17.32M2 11.996h20.006";
17
+ readonly capricorn: "M1.7 8.666h3.334L8.366 22 11.7 8.666h6.666A3.332 3.332 0 1 0 15.48 7l5.774 10a3.334 3.334 0 1 1-6.22 1.666";
18
+ readonly sextile: "M22 12H2m5-8.66 10 17.32m0-17.32L7 20.66";
19
+ readonly jupiter: "M4.5 2a8.66 8.66 0 0 1 0 15h15m-5-5v10";
20
+ readonly mercury: "M12 6a4 4 0 1 1 0 8m0-8a4 4 0 1 0 0 8m0-8a4 4 0 0 1-4-4m4 4a4 4 0 0 0 4-4m-4 12v8m-4-4h8";
21
+ readonly aries: "M3.464 10.836A5 5 0 1 1 12 7.3m0 0a5 5 0 1 1 8.536 3.536M12 7.3v15";
22
+ readonly venus: "M12 22v-8m0 0a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-4 4h8";
23
+ readonly conjunction: "M7.696 16.304 18.664 5.336M2 18.664a3.337 3.337 0 1 0 6.67.281A3.337 3.337 0 0 0 2 18.664Z";
24
+ readonly mars: "M14.163 9.681 20.344 3.5M16 14c0-3.31-2.69-6-6-6s-6 2.69-6 6 2.69 6 6 6 6-2.69 6-6Z,M16.804 3.5h3.54v3.54";
25
+ readonly aquarius: "M2 15.5a3.54 3.54 0 0 1 5 0 3.536 3.536 0 0 0 5 0 3.54 3.54 0 0 1 5 0 3.537 3.537 0 0 0 5 0m-20-7a3.54 3.54 0 0 1 5 0 3.534 3.534 0 0 0 5 0 3.54 3.54 0 0 1 5 0 3.534 3.534 0 0 0 5 0";
26
+ readonly virgo: "M2.269 8.768a2.5 2.5 0 0 1-.656-1.042 2.4 2.4 0 0 1-.063-1.213 2.45 2.45 0 0 1 .546-1.099 2.6 2.6 0 0 1 1.024-.723 2.74 2.74 0 0 1 2.463.23c.36.229.653.538.857.9.203.363.31.768.31 1.179m0 0v10m0-10c0-.663.277-1.299.769-1.768A2.7 2.7 0 0 1 9.375 4.5c.696 0 1.364.263 1.856.732.492.47.769 1.105.769 1.768m0 0c0-.663.277-1.299.769-1.768a2.7 2.7 0 0 1 1.856-.732c.696 0 1.364.263 1.856.732.492.47.769 1.105.769 1.768v10c0 1.38 1.176 2.5 2.625 2.5M12 7v10m5.25-7.5c0-.663.277-1.299.769-1.768A2.7 2.7 0 0 1 19.875 7c.696 0 1.364.263 1.856.732.492.47.769 1.105.769 1.768 0 1.99-.83 3.897-2.306 5.303C18.717 16.21 16.714 17 14.625 17";
27
+ readonly saturn: "M6 6h8m-4-4v10a3.998 3.998 0 1 1 6.828 2.828C15.016 16.64 14 19.44 14 22";
28
+ readonly ascendant: "M9.55 5.25 12 2.8m0 0 2.45 2.45M12 2.8v19.5";
29
+ readonly quincunx: "M22 7.67H12m-10 0h10m-5 8.66 5-8.66m0 0 5 8.66";
30
+ readonly sun: "M11.983 10.704a1.3 1.3 0 0 1 1.255 1.297 1.298 1.298 0 1 1-1.255-1.297Z,M22 12c0-5.524-4.477-10-10-10S2 6.476 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10Z";
31
+ readonly sagittarius: "m6.912 7.088 10 10m-15 5 20-20,M16.912 2.088h5v5";
32
+ };
@@ -0,0 +1,237 @@
1
+ import type { ASPECT_QUALITY, ASPECT_TYPE, ASPECTS, BODY_PARTS, CHARACTERS, ELEMENTS, HEMISPHERES, HOUSE_KEYWORDS, HOUSE_MODALITIES, HOUSE_TITLES, HOUSES, MODALITIES, PLANET_TYPE, PLANETS, POLARITIES, SEASONS, SIGNS } from './data/constants';
2
+ export type Language = 'en' | 'es' | 'ca';
3
+ type ObjectValues<T> = T[keyof T];
4
+ export type Signs = ObjectValues<typeof SIGNS>;
5
+ export type Elements = ObjectValues<typeof ELEMENTS>;
6
+ export type Modalities = ObjectValues<typeof MODALITIES>;
7
+ export type Planets = ObjectValues<typeof PLANETS>;
8
+ export type Polarities = ObjectValues<typeof POLARITIES>;
9
+ export type BodyParts = ObjectValues<typeof BODY_PARTS>;
10
+ export type Characters = ObjectValues<typeof CHARACTERS>;
11
+ export type Seasons = ObjectValues<typeof SEASONS>;
12
+ export type Hemispheres = ObjectValues<typeof HEMISPHERES>;
13
+ export type HouseModalities = ObjectValues<typeof HOUSE_MODALITIES>;
14
+ export type PlanetType = ObjectValues<typeof PLANET_TYPE>;
15
+ export type Aspects = ObjectValues<typeof ASPECTS>;
16
+ export type HouseTitles = (typeof HOUSE_TITLES)[number];
17
+ export type HouseKeywords = (typeof HOUSE_KEYWORDS)[number];
18
+ export type Houses = (typeof HOUSES)[number];
19
+ export type Symbols = Signs | Planets | Aspects | 'ascendant';
20
+ export type AspectType = ObjectValues<typeof ASPECT_TYPE>;
21
+ export type AspectQuality = ObjectValues<typeof ASPECT_QUALITY>;
22
+ export interface Sign {
23
+ /**
24
+ * The body part associated with the zodiac sign.
25
+ * Indicates the areas of the body influenced by the sign.
26
+ * Examples: "Head" for Aries, "Throat" for Taurus.
27
+ */
28
+ bodyPart: string;
29
+ /**
30
+ * The character associated with the zodiac sign.
31
+ * A visual representation or icon associated with the sign.
32
+ * Examples: "The Ram" for Aries, "The Bull" for Taurus.
33
+ */
34
+ character: string;
35
+ /**
36
+ * The element associated with the zodiac sign.
37
+ * Represents one of the four classical elements: Fire, Earth, Air, Water.
38
+ * Also known as triplicities in astrology.
39
+ * Examples: "Fire" for Aries, "Earth" for Taurus.
40
+ */
41
+ element: Elements;
42
+ /**
43
+ * The end date of the zodiac sign period.
44
+ * This date marks the end of the zodiac sign's influence for the given year.
45
+ * Examples: new Date(2020, 3, 20) for Aries (April 20, 2020), new Date(2020, 4, 21) for Taurus (May 21, 2020).
46
+ */
47
+ endDate: Date;
48
+ /**
49
+ * The glyph representing the zodiac sign.
50
+ * A symbolic character or drawing associated with the sign.
51
+ * Examples: "♈" for Aries, "♉" for Taurus.
52
+ */
53
+ glyph: string;
54
+ /**
55
+ * The modality of the sign.
56
+ * Indicates its mode of operation: Cardinal, Fixed, or Mutable.
57
+ * Examples: "Cardinal" for Aries, "Fixed" for Taurus.
58
+ */
59
+ modality: string;
60
+ /**
61
+ * The name of the zodiac sign.
62
+ * Examples: "Aries", "Taurus".
63
+ */
64
+ name: string;
65
+ /**
66
+ * The number associated with the zodiac sign.
67
+ * Reflects its order in the zodiac cycle.
68
+ * Examples: 1 for Aries (the first sign), 2 for Taurus (the second sign).
69
+ */
70
+ number: number;
71
+ /**
72
+ * The polarity of the sign.
73
+ * Indicates its active (Positive) or passive (Negative) nature.
74
+ * Examples: "Positive" for Aries, "Negative" for Taurus.
75
+ */
76
+ pole: string;
77
+ /**
78
+ * The ruling planet of the zodiac sign.
79
+ * Represents the guiding celestial body influencing the sign.
80
+ * Examples: "Mars" for Aries, "Venus" for Taurus.
81
+ */
82
+ rulingPlanet: string;
83
+ /**
84
+ * The season in which the zodiac sign occurs.
85
+ * Indicates the time of year the sign predominates.
86
+ * Examples: "Spring" for Aries, "Spring" for Taurus.
87
+ */
88
+ season: string;
89
+ /**
90
+ * The start date of the zodiac sign period.
91
+ * This date marks the beginning of the zodiac sign's influence for the given year.
92
+ * Examples: new Date(2020, 2, 20) for Aries (March 20, 2020), new Date(2020, 3, 21) for Taurus (April 21, 2020).
93
+ */
94
+ startDate: Date;
95
+ }
96
+ export interface House {
97
+ /**
98
+ * Element associated with the house’s natural zodiac sign.
99
+ *
100
+ * Represents one of the four classical elements — Fire, Earth, Air, or Water — reflecting the essential nature and mode of expression of the house.
101
+ *
102
+ * Example: "Fire" for House 1 (Aries), "Earth" for House 2 (Taurus)
103
+ */
104
+ element: Elements;
105
+ /**
106
+ * Hemisphere division based on the horizon line.
107
+ *
108
+ * - **Lower/Northern Hemisphere (Houses 1–6):** Known as the *Personal Houses*, these focus on individual development, personal identity, and foundational life needs.
109
+ * - **Upper/Southern Hemisphere (Houses 7–12):** Known as the *Collective Houses*, these reflect relationships with others, society, and broader humanity.
110
+ */
111
+ hemisphere: Hemispheres;
112
+ /**
113
+ * Key themes and associated concepts.
114
+ *
115
+ * Represents the core ideas or psychological themes governed by the house.
116
+ * Example: ['Self-image', 'Identity', 'Impressions on others', 'Personality']
117
+ */
118
+ keywords: string[] | string;
119
+ /**
120
+ * Number of the astrological house (1–12).
121
+ *
122
+ * Each house corresponds to a specific domain of life experience.
123
+ * Example: 1 = Self and identity, 7 = Partnerships and relating.
124
+ */
125
+ number: number;
126
+ /**
127
+ * Developmental phase grouping.
128
+ *
129
+ * - **Phase I (Houses 1–4):** Focus on self-awareness and personal foundation — the “me-in-here”.
130
+ * - **Phase II (Houses 5–8):** Development of the autonomous self in relationship — the “me” meets the “you”.
131
+ * - **Phase III (Houses 9–12):** Expansion of self toward collective consciousness and universal understanding.
132
+ */
133
+ phase: 1 | 2 | 3;
134
+ /**
135
+ * Quadrant of the chart based on the intersection of horizon and meridian axes.
136
+ *
137
+ * - **Quadrant I (Houses 1–3):** Formation of personal identity through the body, possessions, and environment.
138
+ * - **Quadrant II (Houses 4–6):** Further development of self via family, creativity, and refinement of skills.
139
+ * - **Quadrant III (Houses 7–9):** Expansion through relationships, transformation, and new vision of self.
140
+ * - **Quadrant IV (Houses 10–12):** Integration into society and pursuit of collective and spiritual purpose.
141
+ */
142
+ quadrant: 1 | 2 | 3 | 4;
143
+ /**
144
+ * Ruling planet of the house.
145
+ *
146
+ * Indicates the primary planetary influence over the house’s themes.
147
+ * Example: "Mars", "Venus"
148
+ */
149
+ rulingPlanet: string;
150
+ /**
151
+ * Zodiac sign associated with the house.
152
+ *
153
+ * Reflects the natural energy or archetype that aligns with the house.
154
+ * Example: "Aries", "Taurus"
155
+ */
156
+ sign: string;
157
+ /**
158
+ * Title or name of the house.
159
+ *
160
+ * A formal or descriptive label that captures the house’s core function or domain.
161
+ * Example: "The Individual Personality", "Values and Possessions"
162
+ */
163
+ title: string;
164
+ /**
165
+ * Modalities of the houses (Angular, Succedent, Cadent).
166
+ *
167
+ * Traditional classification describing the house’s dynamic strength and function:
168
+ * - **Angular (Houses 1, 4, 7, 10):** Active, initiating, most powerful.
169
+ * - **Succedent (Houses 2, 5, 8, 11):** Stabilizing, sustaining what was initiated.
170
+ * - **Cadent (Houses 3, 6, 9, 12):** Transitional, preparatory, often more internal or mental.
171
+ */
172
+ modality: HouseModalities;
173
+ /**
174
+ * The name of the astrological house.
175
+ * Refers to its designated number in the zodiac cycle, such as "First House", "Second House", etc.
176
+ * Examples: "First House", "Second House", "Third House", ... "Twelfth House".
177
+ */
178
+ name: Houses;
179
+ }
180
+ export interface Planet {
181
+ /**
182
+ * The name of the celestial body.
183
+ * Examples: "Sun", "Moon".
184
+ */
185
+ name: string;
186
+ /**
187
+ * The glyph or symbol associated with the celestial body.
188
+ * Examples: "☉" for the Sun, "☽" for the Moon, "♂" for Mars.
189
+ */
190
+ glyph: string;
191
+ /**
192
+ * The type or category of the celestial body.
193
+ * Examples: "Personal", "Luminary".
194
+ */
195
+ type: PlanetType;
196
+ }
197
+ export type Translations = Record<Language, Sign>;
198
+ export type Dictionary = {
199
+ [key in Signs | Elements | Modalities | Planets | Polarities | BodyParts | Characters | Seasons | Hemispheres | HouseModalities | PlanetType | Houses | HouseTitles | HouseKeywords | Aspects | AspectType | AspectQuality]: string;
200
+ };
201
+ export type Dictionaries = Record<Language, Dictionary>;
202
+ export type SymbolOptions = {
203
+ width?: number | string;
204
+ height?: number | string;
205
+ fill?: string;
206
+ stroke?: string;
207
+ 'stroke-width'?: number | string;
208
+ class?: string;
209
+ style?: string;
210
+ nonScalingStroke?: boolean;
211
+ };
212
+ export interface Aspect {
213
+ /**
214
+ * The name of the aspect.
215
+ * Examples: "Conjunction", "Opposition", "Square", "Trine", "Sextile".
216
+ */
217
+ name: string;
218
+ /**
219
+ * The type of the aspect.
220
+ * Indicates the nature of the aspect's influence.
221
+ * Examples: "Major", "Minor".
222
+ */
223
+ type: AspectType;
224
+ /**
225
+ * The quality of the aspect.
226
+ * Reflects the emotional or psychological impact of the aspect.
227
+ * Examples: "Harmonious", "Disharmonious", "Neutral".
228
+ */
229
+ quality: AspectQuality;
230
+ /**
231
+ * The angle of the aspect in degrees.
232
+ * Represents the geometric relationship between the two celestial bodies.
233
+ * Examples: 0 for Conjunction, 180 for Opposition, 90 for Square, 120 for Trine, 60 for Sextile...
234
+ */
235
+ angle: number;
236
+ }
237
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { House, Language } from './definitions';
2
+ /**
3
+ * Get all astrological houses with their translations for a specified language.
4
+ *
5
+ * @param {Language} [language='en'] - The language code for which translations are needed. Defaults to 'en'.
6
+ * @returns {House[]} An array of House objects with translated values based on the specified language.
7
+ *
8
+ * @example
9
+ * import { getHouses } from 'western-houses';
10
+ *
11
+ * // Retrieve information about all houses in English
12
+ * const data = getHouses();
13
+ * console.log(data);
14
+ * // Output:
15
+ * // [
16
+ * // {
17
+ * // number: 1,
18
+ * // title: 'The individual personality',
19
+ * // sign: 'Aries',
20
+ * // rulingPlanet: 'Mars',
21
+ * // keywords: [
22
+ * // 'Self-image',
23
+ * // 'Identity',
24
+ * // 'Impressions on others',
25
+ * // 'Personality'
26
+ * // ]
27
+ * // },
28
+ * // ...
29
+ * // ]
30
+ */
31
+ export declare function getHouses(language?: Language): House[];
@@ -0,0 +1 @@
1
+ import{c as i}from"./chunk-seazbc67.js";import{e,f as E,h as m,m as n,n as R,o as t,p as r,q as U}from"./chunk-g3z9cpkw.js";var T=[{element:m.FIRE,hemisphere:r.LOWER,keywords:t[0],modality:U.ANGULAR,number:1,phase:1,quadrant:1,rulingPlanet:E.MARS,sign:e.ARIES,title:R[0],name:n[0]},{element:m.EARTH,hemisphere:r.LOWER,keywords:t[1],modality:U.SUCCEDENT,number:2,phase:1,quadrant:1,rulingPlanet:E.VENUS,sign:e.TAURUS,title:R[1],name:n[1]},{element:m.AIR,hemisphere:r.LOWER,keywords:t[2],modality:U.CADENT,number:3,phase:1,quadrant:1,rulingPlanet:E.MERCURY,sign:e.GEMINI,title:R[2],name:n[2]},{element:m.WATER,hemisphere:r.LOWER,keywords:t[3],modality:U.ANGULAR,number:4,phase:1,quadrant:2,rulingPlanet:E.MOON,sign:e.CANCER,title:R[3],name:n[3]},{element:m.FIRE,hemisphere:r.LOWER,keywords:t[4],modality:U.SUCCEDENT,number:5,phase:2,quadrant:2,rulingPlanet:E.SUN,sign:e.LEO,title:R[4],name:n[4]},{element:m.EARTH,hemisphere:r.LOWER,keywords:t[5],modality:U.CADENT,number:6,phase:2,quadrant:2,rulingPlanet:E.MERCURY,sign:e.VIRGO,title:R[5],name:n[5]},{element:m.AIR,hemisphere:r.UPPER,keywords:t[6],modality:U.ANGULAR,number:7,phase:2,quadrant:3,rulingPlanet:E.VENUS,sign:e.LIBRA,title:R[6],name:n[6]},{element:m.WATER,hemisphere:r.UPPER,keywords:t[7],modality:U.SUCCEDENT,number:8,phase:2,quadrant:3,rulingPlanet:E.PLUTO,sign:e.SCORPIO,title:R[7],name:n[7]},{element:m.FIRE,hemisphere:r.UPPER,keywords:t[8],modality:U.CADENT,number:9,phase:3,quadrant:3,rulingPlanet:E.JUPITER,sign:e.SAGITTARIUS,title:R[8],name:n[8]},{element:m.EARTH,hemisphere:r.UPPER,keywords:t[9],modality:U.ANGULAR,number:10,phase:3,quadrant:4,rulingPlanet:E.SATURN,sign:e.CAPRICORN,title:R[9],name:n[9]},{element:m.AIR,hemisphere:r.UPPER,keywords:t[10],modality:U.SUCCEDENT,number:11,phase:3,quadrant:4,rulingPlanet:E.URANUS,sign:e.AQUARIUS,title:R[10],name:n[10]},{element:m.WATER,hemisphere:r.UPPER,keywords:t[11],modality:U.CADENT,number:12,phase:3,quadrant:4,rulingPlanet:E.NEPTUNE,sign:e.PISCES,title:R[11],name:n[11]}],S=T;function y(P="en"){return S.map((l)=>{return Object.fromEntries(Object.entries(l).map(([N,A])=>[N,i.get(P)?.[A]||A]))})}export{y as getHouses};