@eaprelsky/nocturna-wheel 1.0.1 → 2.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.
package/README.md CHANGED
@@ -4,12 +4,17 @@ A JavaScript library for rendering astrological natal charts.
4
4
 
5
5
  ## Features
6
6
 
7
- - Responsive SVG-based chart rendering
8
- - Zodiac sign display with customizable styling
9
- - House system rendering with multiple system options
10
- - Planet placement with customizable icons and colors
11
- - Aspect calculation and visualization
12
- - Interactive tooltips for celestial objects
7
+ - **Responsive SVG-based chart rendering**
8
+ - **Dual chart support** - independent inner and outer circles for synastry and transit charts
9
+ - **Zodiac sign display** with customizable styling
10
+ - **House system rendering** with multiple system options (Placidus, Koch, Equal, etc.)
11
+ - **Planet placement** with customizable icons and colors on two independent circles
12
+ - **Three types of aspects:**
13
+ - Primary aspects (outer circle to outer circle)
14
+ - Secondary aspects (inner circle to inner circle)
15
+ - Synastry aspects (outer to inner circle with projection dots)
16
+ - **Interactive tooltips** for celestial objects
17
+ - **Full control** over colors, line styles, and orbs for each aspect type
13
18
 
14
19
  ## Installation
15
20
 
@@ -26,7 +31,7 @@ A JavaScript library for rendering astrological natal charts.
26
31
  ### NPM Installation
27
32
 
28
33
  ```bash
29
- npm install nocturna-wheel
34
+ npm install @eaprelsky/nocturna-wheel
30
35
  ```
31
36
 
32
37
  ## Basic Usage
@@ -105,29 +110,47 @@ Main class for creating and managing astrological charts.
105
110
  #### Constructor Options
106
111
 
107
112
  - `container`: String selector or DOM element for the chart container
108
- - `planets`: Object containing planet positions and properties
113
+ - `planets`: Object containing primary planet positions (outer circle)
114
+ - `secondaryPlanets`: Object containing secondary planet positions (inner circle, optional)
109
115
  - `houses`: Array of house cusp positions
110
- - `aspectSettings`: Object with aspect calculation settings
111
- - `config`: Additional configuration options
116
+ - `config`: Additional configuration options including aspect settings
112
117
 
113
118
  ```javascript
114
119
  const chart = new NocturnaWheel.WheelChart({
115
120
  container: "#chart-container",
116
121
  planets: {
117
- sun: { lon: 85.83, color: "#ff0000" },
118
- moon: { lon: 133.21 }
122
+ sun: { lon: 85.83, color: "#000000" },
123
+ moon: { lon: 133.21, color: "#000000" }
119
124
  },
120
- houses: [{ lon: 300.32 }, ...],
121
- aspectSettings: {
122
- enabled: true,
123
- orb: 6,
124
- types: {
125
- conjunction: { angle: 0, orb: 8, color: "#000000", enabled: true }
126
- }
125
+ secondaryPlanets: {
126
+ sun: { lon: 115.20, color: "#FF5500" },
127
+ moon: { lon: 200.45, color: "#0066CC" }
127
128
  },
129
+ houses: [{ lon: 300.32 }, ...],
128
130
  config: {
129
131
  zodiacSettings: { enabled: true },
130
- planetSettings: { enabled: true }
132
+ planetSettings: { enabled: true },
133
+ // Primary aspects (outer circle to outer circle)
134
+ primaryAspectSettings: {
135
+ enabled: true,
136
+ orb: 6,
137
+ types: {
138
+ conjunction: { angle: 0, orb: 8, color: "#000000", enabled: true, lineStyle: 'none', strokeWidth: 1 },
139
+ opposition: { angle: 180, orb: 6, color: "#E41B17", enabled: true, lineStyle: 'solid', strokeWidth: 1 }
140
+ }
141
+ },
142
+ // Secondary aspects (inner circle to inner circle)
143
+ secondaryAspectSettings: {
144
+ enabled: true,
145
+ orb: 6,
146
+ types: { /* ... */ }
147
+ },
148
+ // Synastry aspects (outer to inner circle projections)
149
+ synastryAspectSettings: {
150
+ enabled: true,
151
+ orb: 6,
152
+ types: { /* ... */ }
153
+ }
131
154
  }
132
155
  });
133
156
  ```
@@ -136,11 +159,14 @@ const chart = new NocturnaWheel.WheelChart({
136
159
 
137
160
  - `render()`: Renders the chart
138
161
  - `update(config)`: Updates chart configuration
139
- - `togglePlanet(name, visible)`: Toggles visibility of a planet
162
+ - `updateData(data)`: Updates planet and house data
163
+ - `togglePlanet(name, visible)`: Toggles visibility of a specific planet
140
164
  - `toggleHouses(visible)`: Toggles visibility of houses
141
- - `toggleAspects(visible)`: Toggles visibility of aspects
142
- - `togglePrimaryPlanets(visible)`: Toggles primary planets
143
- - `toggleSecondaryPlanets(visible)`: Toggles secondary planets
165
+ - `togglePrimaryPlanets(visible)`: Toggles visibility of primary planets (outer circle)
166
+ - `toggleSecondaryPlanets(visible)`: Toggles visibility of secondary planets (inner circle)
167
+ - `togglePrimaryAspects(visible)`: Toggles visibility of primary aspects (outer circle)
168
+ - `toggleSecondaryAspects(visible)`: Toggles visibility of secondary aspects (inner circle)
169
+ - `toggleSynastryAspects(visible)`: Toggles visibility of synastry aspects (cross-circle)
144
170
  - `setHouseRotation(angle)`: Sets house system rotation
145
171
  - `setHouseSystem(name)`: Changes the house system
146
172
  - `destroy()`: Removes the chart and cleans up resources
@@ -159,13 +185,38 @@ const chartConfig = {
159
185
  houseSystem: "Placidus"
160
186
  },
161
187
 
162
- // Aspect settings
163
- aspectSettings: {
188
+ // Primary aspect settings (outer circle to outer circle)
189
+ primaryAspectSettings: {
164
190
  enabled: true,
165
191
  orb: 6,
166
192
  types: {
167
- conjunction: { angle: 0, orb: 8, color: "#ff0000", enabled: true },
168
- opposition: { angle: 180, orb: 8, color: "#0000ff", enabled: true }
193
+ conjunction: { angle: 0, orb: 8, color: "#000000", enabled: true, lineStyle: 'none', strokeWidth: 1 },
194
+ opposition: { angle: 180, orb: 6, color: "#E41B17", enabled: true, lineStyle: 'solid', strokeWidth: 1 },
195
+ trine: { angle: 120, orb: 6, color: "#4CC417", enabled: true, lineStyle: 'solid', strokeWidth: 1 },
196
+ square: { angle: 90, orb: 6, color: "#F62817", enabled: true, lineStyle: 'dashed', strokeWidth: 1 },
197
+ sextile: { angle: 60, orb: 4, color: "#56A5EC", enabled: true, lineStyle: 'dashed', strokeWidth: 1 }
198
+ }
199
+ },
200
+
201
+ // Secondary aspect settings (inner circle to inner circle)
202
+ secondaryAspectSettings: {
203
+ enabled: true,
204
+ orb: 6,
205
+ types: {
206
+ conjunction: { angle: 0, orb: 8, color: "#AA00AA", enabled: true, lineStyle: 'none', strokeWidth: 1 },
207
+ opposition: { angle: 180, orb: 6, color: "#FF6600", enabled: true, lineStyle: 'solid', strokeWidth: 1 }
208
+ // ... other aspects
209
+ }
210
+ },
211
+
212
+ // Synastry aspect settings (outer to inner circle)
213
+ synastryAspectSettings: {
214
+ enabled: true,
215
+ orb: 6,
216
+ types: {
217
+ conjunction: { angle: 0, orb: 8, color: "#666666", enabled: true, lineStyle: 'none', strokeWidth: 1 },
218
+ opposition: { angle: 180, orb: 6, color: "#9933CC", enabled: true, lineStyle: 'solid', strokeWidth: 0.5 }
219
+ // ... other aspects
169
220
  }
170
221
  },
171
222
 
@@ -245,6 +296,39 @@ chart.render();
245
296
 
246
297
  See MODULE_ARCHITECTURE.md for more details on the library's architecture.
247
298
 
299
+ ## Synastry and Dual Charts
300
+
301
+ The library supports dual charts for synastry, transits, and progressions. Each circle operates independently:
302
+
303
+ ```javascript
304
+ const chart = new WheelChart({
305
+ container: '#chart-container',
306
+ // Natal chart (outer circle)
307
+ planets: {
308
+ sun: { lon: 85.83, color: '#000000' },
309
+ moon: { lon: 133.21, color: '#000000' }
310
+ },
311
+ // Transit/Partner chart (inner circle)
312
+ secondaryPlanets: {
313
+ sun: { lon: 115.20, color: '#FF5500' },
314
+ moon: { lon: 200.45, color: '#0066CC' }
315
+ },
316
+ config: {
317
+ // Configure three independent aspect systems
318
+ primaryAspectSettings: { /* natal-to-natal */ },
319
+ secondaryAspectSettings: { /* transit-to-transit */ },
320
+ synastryAspectSettings: { /* natal-to-transit with projection dots */ }
321
+ }
322
+ });
323
+
324
+ // Toggle each aspect type independently
325
+ chart.togglePrimaryAspects(true);
326
+ chart.toggleSecondaryAspects(false);
327
+ chart.toggleSynastryAspects(true);
328
+ ```
329
+
330
+ **Synastry aspects** are rendered with hollow projection dots on the inner circle, showing where outer circle planets project onto the inner radius. This creates a cleaner, more aesthetically pleasing visualization.
331
+
248
332
  ## License
249
333
 
250
- This project is licensed under the MIT License - see the LICENSE file for details.
334
+ This project is licensed under the MIT License - see the LICENSE file for details.