UNPKG

western-signs

Version:

Simple interface for western astrological signs.

376 lines (372 loc) 12.4 kB
// Generated by dts-bundle-generator v9.5.1 export declare const SIGNS: { readonly ARIES: "aries"; readonly TAURUS: "taurus"; readonly GEMINI: "gemini"; readonly CANCER: "cancer"; readonly LEO: "leo"; readonly VIRGO: "virgo"; readonly LIBRA: "libra"; readonly SCORPIO: "scorpio"; readonly SAGITTARIUS: "sagittarius"; readonly CAPRICORN: "capricorn"; readonly AQUARIUS: "aquarius"; readonly PISCES: "pisces"; }; export declare const PLANETS: { readonly MARS: "mars"; readonly VENUS: "venus"; readonly MERCURY: "mercury"; readonly MOON: "moon"; readonly SUN: "sun"; readonly PLUTO: "pluto"; readonly JUPITER: "jupiter"; readonly SATURN: "saturn"; readonly URANUS: "uranus"; readonly NEPTUNE: "neptune"; }; export declare const MODALITIES: { readonly CARDINAL: "cardinal"; readonly FIXED: "fixed"; readonly MUTABLE: "mutable"; }; export declare const ELEMENTS: { readonly FIRE: "fire"; readonly EARTH: "earth"; readonly AIR: "air"; readonly WATER: "water"; }; declare const POLARITIES: { readonly POSITIVE: "positive"; readonly NEGATIVE: "negative"; }; declare const BODY_PARTS: { readonly HEAD: "head"; readonly THROAT: "throat"; readonly LUNGS: "lungs"; readonly STOMACH: "stomach"; readonly HEART: "heart"; readonly BOWELS: "bowels"; readonly REINS: "reins"; readonly SECRETS: "secrets"; readonly THIGHS: "thighs"; readonly KNEES: "knees"; readonly ANKLES: "ankles"; readonly FEET: "feet"; }; declare const CHARACTERS: { readonly RAM: "ram"; readonly BULL: "bull"; readonly TWINS: "twins"; readonly CRAB: "crab"; readonly LION: "lion"; readonly VIRGIN: "virgin"; readonly BALANCE: "balance"; readonly SCORPION: "scorpion"; readonly ARCHER: "archer"; readonly GOAT: "goat"; readonly THE_MAN: "the-man"; readonly THE_FISHES: "the-fishes"; }; declare const SEASONS: { readonly SPRING: "spring"; readonly SUMMER: "summer"; readonly AUTUMN: "autumn"; readonly WINTER: "winter"; }; export declare const HEMISPHERES: { readonly LOWER: "lower"; readonly UPPER: "upper"; }; export declare const HOUSE_MODALITIES: { readonly ANGULAR: "angular"; readonly SUCCEDENT: "succedent"; readonly CADENT: "cadent"; }; declare const dictionaries: { en: Dictionary; es: Dictionary; ca: Dictionary; }; export type Language = keyof typeof dictionaries; export type ObjectValues<T> = T[keyof T]; export type Signs = ObjectValues<typeof SIGNS>; export type Element = ObjectValues<typeof ELEMENTS>; export type Modalities = ObjectValues<typeof MODALITIES>; export type Planets = ObjectValues<typeof PLANETS>; export type Polarities = ObjectValues<typeof POLARITIES>; export type BodyParts = ObjectValues<typeof BODY_PARTS>; export type Characters = ObjectValues<typeof CHARACTERS>; export type Seasons = ObjectValues<typeof SEASONS>; export type Hemispheres = ObjectValues<typeof HEMISPHERES>; export type HouseModalities = ObjectValues<typeof HOUSE_MODALITIES>; export interface Sign { /** * The body part associated with the zodiac sign. * Indicates the areas of the body influenced by the sign. * Examples: "Head" for Aries, "Throat" for Taurus. */ bodyPart: string; /** * The character associated with the zodiac sign. * A visual representation or icon associated with the sign. * Examples: "The Ram" for Aries, "The Bull" for Taurus. */ character: string; /** * The element associated with the zodiac sign. * Represents one of the four classical elements: Fire, Earth, Air, Water. * Also known as triplicities in astrology. * Examples: "Fire" for Aries, "Earth" for Taurus. */ element: Element; /** * The end date of the zodiac sign period. * This date marks the end of the zodiac sign's influence for the given year. * Examples: new Date(2020, 3, 20) for Aries (April 20, 2020), new Date(2020, 4, 21) for Taurus (May 21, 2020). */ endDate: Date; /** * The glyph representing the zodiac sign. * A symbolic character or drawing associated with the sign. * Examples: "♈" for Aries, "♉" for Taurus. */ glyph: string; /** * The modality of the sign. * Indicates its mode of operation: Cardinal, Fixed, or Mutable. * Examples: "Cardinal" for Aries, "Fixed" for Taurus. */ modality: string; /** * The name of the zodiac sign. * Examples: "Aries", "Taurus". */ name: string; /** * The number associated with the zodiac sign. * Reflects its order in the zodiac cycle. * Examples: 1 for Aries (the first sign), 2 for Taurus (the second sign). */ number: number; /** * The polarity of the sign. * Indicates its active (Positive) or passive (Negative) nature. * Examples: "Positive" for Aries, "Negative" for Taurus. */ pole: string; /** * The ruling planet of the zodiac sign. * Represents the guiding celestial body influencing the sign. * Examples: "Mars" for Aries, "Venus" for Taurus. */ rulingPlanet: string; /** * The season in which the zodiac sign occurs. * Indicates the time of year the sign predominates. * Examples: "Spring" for Aries, "Spring" for Taurus. */ season: string; /** * The start date of the zodiac sign period. * This date marks the beginning of the zodiac sign's influence for the given year. * Examples: new Date(2020, 2, 20) for Aries (March 20, 2020), new Date(2020, 3, 21) for Taurus (April 21, 2020). */ startDate: Date; } export interface House { /** * Element associated with the house’s natural zodiac sign. * * Represents one of the four classical elements — Fire, Earth, Air, or Water — reflecting the essential nature and mode of expression of the house. * * Example: "Fire" for House 1 (Aries), "Earth" for House 2 (Taurus) */ element: Element; /** * Hemisphere division based on the horizon line. * * - **Lower/Northern Hemisphere (Houses 1–6):** Known as the *Personal Houses*, these focus on individual development, personal identity, and foundational life needs. * - **Upper/Southern Hemisphere (Houses 7–12):** Known as the *Collective Houses*, these reflect relationships with others, society, and broader humanity. */ hemisphere: Hemispheres; /** * Key themes and associated concepts. * * Represents the core ideas or psychological themes governed by the house. * Example: ['Self-image', 'Identity', 'Impressions on others', 'Personality'] */ keywords: string[] | string; /** * Number of the astrological house (1–12). * * Each house corresponds to a specific domain of life experience. * Example: 1 = Self and identity, 7 = Partnerships and relating. */ number: number; /** * Developmental phase grouping. * * - **Phase I (Houses 1–4):** Focus on self-awareness and personal foundation — the “me-in-here”. * - **Phase II (Houses 5–8):** Development of the autonomous self in relationship — the “me” meets the “you”. * - **Phase III (Houses 9–12):** Expansion of self toward collective consciousness and universal understanding. */ phase: 1 | 2 | 3; /** * Quadrant of the chart based on the intersection of horizon and meridian axes. * * - **Quadrant I (Houses 1–3):** Formation of personal identity through the body, possessions, and environment. * - **Quadrant II (Houses 4–6):** Further development of self via family, creativity, and refinement of skills. * - **Quadrant III (Houses 7–9):** Expansion through relationships, transformation, and new vision of self. * - **Quadrant IV (Houses 10–12):** Integration into society and pursuit of collective and spiritual purpose. */ quadrant: 1 | 2 | 3 | 4; /** * Ruling planet of the house. * * Indicates the primary planetary influence over the house’s themes. * Example: "Mars", "Venus" */ rulingPlanet: string; /** * Zodiac sign associated with the house. * * Reflects the natural energy or archetype that aligns with the house. * Example: "Aries", "Taurus" */ sign: string; /** * Title or name of the house. * * A formal or descriptive label that captures the house’s core function or domain. * Example: "The Individual Personality", "Values and Possessions" */ title: string; /** * Modalities of the houses (Angular, Succedent, Cadent). * * Traditional classification describing the house’s dynamic strength and function: * - **Angular (Houses 1, 4, 7, 10):** Active, initiating, most powerful. * - **Succedent (Houses 2, 5, 8, 11):** Stabilizing, sustaining what was initiated. * - **Cadent (Houses 3, 6, 9, 12):** Transitional, preparatory, often more internal or mental. */ modality: HouseModalities; } export type Dictionary = { [key in Signs | Element | Modalities | Planets | Polarities | BodyParts | Characters | Seasons | Hemispheres | HouseModalities]: string; } & { houseTitles: string[]; houseKeywords: string[][]; }; /** * Get all astrological houses with their translations for a specified language. * * @param {Language} [lang='en'] - The language code for which translations are needed. Defaults to 'en'. * @returns {House[]} An array of House objects with translated values based on the specified language. * * @example * import { getHouses } from 'western-houses'; * * // Retrieve information about all houses in English * const data = getHouses(); * console.log(data); * // Output: * // [ * // { * // number: 1, * // title: 'The individual personality', * // sign: 'Aries', * // rulingPlanet: 'Mars', * // keywords: [ * // 'Self-image', * // 'Identity', * // 'Impressions on others', * // 'Personality' * // ] * // }, * // ... * // ] */ export declare function getHouses(lang?: Language): House[]; /** * Retrieve the astrological sign corresponding to a given date, with optional translations for the specified language. * * @param {Date} date - The date for which the corresponding astrological sign is to be retrieved. * @param {Language} [lang='en'] - The language code for which translations are needed. Defaults to 'en'. * @throws {Error} Will throw an error if the provided date is invalid. * @returns {Sign | null} An object representing the astrological sign with translated values or null if the sign is not found. * * @example * import { getSignByDate } from 'western-signs'; * * // Retrieve the sign for May 15 in English * const signData = getSignByDate(new Date(1813, 4, 5)); * console.log(signData); * // Output: * // { * // name: 'Taurus', * // element: 'Earth', * // modality: 'Fixed', * // rulingPlanet: 'Venus', * // symbol: '♉', * // [...] * // } */ export declare function getSignByDate(date: Date, lang?: Language): Sign | null; /** * Get the astrological sign by its name with translations for the specified language. * * @param {Signs} sign - The name of the astrological sign to retrieve. * @param {Language} [lang='en'] - The language code for which translations are needed. Defaults to 'en'. * @returns {Sign | null} An object representing the sign with translated values or null if the sign or dictionary is not found. * * @example * import { getSignByName, SIGNS } from 'western-signs'; * * // Retrieve information about Taurus in English * const taurusData = getSignByName(SIGNS.TAURUS); * console.log(taurusData); * // Output: * // { * // name: 'Taurus', * // element: 'Earth', * // modality: 'Fixed', * // rulingPlanet: 'Venus', * // symbol: '♉' * // [...] * // } */ export declare function getSignByName(sign: Signs, lang?: Language): Sign | null; /** * Get all astrological signs with their translations for a specified language. * * @param {Language} [lang='en'] - The language code for which translations are needed. Defaults to 'en'. * @returns {Sign[]} An array of Sign objects with translated values based on the specified language. * * @example * import { getSigns } from 'western-signs'; * * // Retrieve information about all signs in English * const data = getSigns(); * console.log(data); * // Output: * // [ * // { * // name: 'Aries', * // element: 'Air', * // modality: 'Cardinal', * // rulingPlanet: 'Mars', * // symbol: '♈' * // }, * // { * // name: 'Taurus', * // element: 'Earth', * // modality: 'Fixed', * // rulingPlanet: 'Venus', * // symbol: '♉' * // }, * // ... * // ] */ export declare function getSigns(lang?: Language): Sign[]; export {};