@eaprelsky/nocturna-wheel 3.0.2 → 3.1.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/dist/nocturna-wheel.bundle.js +88 -16
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +88 -16
- package/dist/nocturna-wheel.es.js.map +1 -1
- package/dist/nocturna-wheel.min.js +1 -1
- package/dist/nocturna-wheel.min.js.map +1 -1
- package/dist/nocturna-wheel.umd.js +88 -16
- package/dist/nocturna-wheel.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -287,7 +287,7 @@ class IconProvider {
|
|
|
287
287
|
/**
|
|
288
288
|
* IconData.js
|
|
289
289
|
* Auto-generated module containing inline SVG icons as data URLs
|
|
290
|
-
* Generated at: 2025-11-
|
|
290
|
+
* Generated at: 2025-11-16T11:36:02.284Z
|
|
291
291
|
*
|
|
292
292
|
* This file is automatically generated by the build process.
|
|
293
293
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -2494,6 +2494,8 @@ class BasePlanetRenderer extends BaseRenderer {
|
|
|
2494
2494
|
isPrimary: planetType === 'primary',
|
|
2495
2495
|
type: planetType,
|
|
2496
2496
|
color: p.color || '#000000',
|
|
2497
|
+
// Retrograde flag - whether the planet is retrograde
|
|
2498
|
+
retrograde: p.retrograde === true,
|
|
2497
2499
|
// Track which radius this planet is being rendered at
|
|
2498
2500
|
dotRadius: dotRadius,
|
|
2499
2501
|
iconRadius: iconRadius
|
|
@@ -2602,6 +2604,50 @@ class PlanetSymbolRenderer extends BasePlanetRenderer {
|
|
|
2602
2604
|
return icon;
|
|
2603
2605
|
}
|
|
2604
2606
|
|
|
2607
|
+
/**
|
|
2608
|
+
* Renders a retrograde indicator (small "R" symbol) in the bottom-right corner of the planet icon
|
|
2609
|
+
* @param {Element} parentGroup - The parent SVG group
|
|
2610
|
+
* @param {Object} planet - Planet object with calculated positions
|
|
2611
|
+
* @param {number} iconSize - Size of the icon in pixels
|
|
2612
|
+
* @returns {Element} - The created retrograde indicator element
|
|
2613
|
+
*/
|
|
2614
|
+
renderRetrogradeIndicator(parentGroup, planet, iconSize = 24) {
|
|
2615
|
+
// Calculate position for "R" symbol in bottom-right corner of icon
|
|
2616
|
+
// Offset from icon center to bottom-right corner
|
|
2617
|
+
const offsetX = iconSize / 2 - 2; // Small offset from edge (2px from right edge)
|
|
2618
|
+
const offsetY = iconSize / 2 - 2; // Small offset from bottom edge
|
|
2619
|
+
|
|
2620
|
+
// Position relative to adjusted icon center
|
|
2621
|
+
const rX = planet.adjustedIconX + offsetX;
|
|
2622
|
+
const rY = planet.adjustedIconY + offsetY;
|
|
2623
|
+
|
|
2624
|
+
// Get planet type for CSS classes
|
|
2625
|
+
const typeClass = planet.isPrimary ? 'primary' : 'secondary';
|
|
2626
|
+
|
|
2627
|
+
// Use planet color, but ensure visibility with darker shade if color is too light
|
|
2628
|
+
const planetColor = planet.color || '#000000';
|
|
2629
|
+
|
|
2630
|
+
// Create small "R" text element
|
|
2631
|
+
const retrogradeText = this.svgUtils.createSVGElement("text", {
|
|
2632
|
+
x: rX,
|
|
2633
|
+
y: rY,
|
|
2634
|
+
'text-anchor': 'end',
|
|
2635
|
+
'dominant-baseline': 'alphabetic',
|
|
2636
|
+
'font-size': `${Math.max(7, iconSize * 0.3)}px`, // Scale with icon size, minimum 7px
|
|
2637
|
+
'font-weight': 'bold',
|
|
2638
|
+
'font-family': 'Arial, sans-serif',
|
|
2639
|
+
class: `planet-retrograde planet-${planet.name}-retrograde planet-${typeClass}-retrograde`,
|
|
2640
|
+
fill: planetColor,
|
|
2641
|
+
'stroke': '#ffffff', // White stroke for better visibility
|
|
2642
|
+
'stroke-width': '0.5',
|
|
2643
|
+
'paint-order': 'stroke fill'
|
|
2644
|
+
});
|
|
2645
|
+
|
|
2646
|
+
retrogradeText.textContent = 'R';
|
|
2647
|
+
|
|
2648
|
+
return retrogradeText;
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2605
2651
|
/**
|
|
2606
2652
|
* Renders a dot to mark the exact planet position
|
|
2607
2653
|
* @param {Element} parentGroup - The parent SVG group
|
|
@@ -3161,6 +3207,12 @@ class PrimaryPlanetRenderer extends BasePlanetRenderer {
|
|
|
3161
3207
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3162
3208
|
planetGroup.appendChild(icon);
|
|
3163
3209
|
|
|
3210
|
+
// Add retrograde indicator if planet is retrograde
|
|
3211
|
+
if (planet.retrograde) {
|
|
3212
|
+
const retrogradeIndicator = this.symbolRenderer.renderRetrogradeIndicator(planetGroup, planet, iconSize);
|
|
3213
|
+
planetGroup.appendChild(retrogradeIndicator);
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3164
3216
|
// Add tooltip
|
|
3165
3217
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3166
3218
|
|
|
@@ -3336,6 +3388,12 @@ class SecondaryPlanetRenderer extends BasePlanetRenderer {
|
|
|
3336
3388
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3337
3389
|
planetGroup.appendChild(icon);
|
|
3338
3390
|
|
|
3391
|
+
// Add retrograde indicator if planet is retrograde
|
|
3392
|
+
if (planet.retrograde) {
|
|
3393
|
+
const retrogradeIndicator = this.symbolRenderer.renderRetrogradeIndicator(planetGroup, planet, iconSize);
|
|
3394
|
+
planetGroup.appendChild(retrogradeIndicator);
|
|
3395
|
+
}
|
|
3396
|
+
|
|
3339
3397
|
// Add tooltip
|
|
3340
3398
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3341
3399
|
|
|
@@ -4984,7 +5042,8 @@ class NocturnaWheel {
|
|
|
4984
5042
|
.map(([name, data]) => ({
|
|
4985
5043
|
name: name,
|
|
4986
5044
|
position: data.lon,
|
|
4987
|
-
color: data.color || '#000000'
|
|
5045
|
+
color: data.color || '#000000',
|
|
5046
|
+
retrograde: !!data.retrograde
|
|
4988
5047
|
}));
|
|
4989
5048
|
primaryPlanetsWithCoords = this.renderers.planet.primaryRenderer.render(primaryGroup, primaryArray, 0, {
|
|
4990
5049
|
config: this.config
|
|
@@ -4999,14 +5058,14 @@ class NocturnaWheel {
|
|
|
4999
5058
|
.map(([name, data]) => ({
|
|
5000
5059
|
name: name,
|
|
5001
5060
|
position: data.lon,
|
|
5002
|
-
color: data.color || '#000000'
|
|
5061
|
+
color: data.color || '#000000',
|
|
5062
|
+
retrograde: !!data.retrograde
|
|
5003
5063
|
}));
|
|
5004
5064
|
secondaryPlanetsWithCoords = this.renderers.planet.secondaryRenderer.render(secondaryGroup, secondaryArray, 0, {
|
|
5005
5065
|
config: this.config
|
|
5006
5066
|
});
|
|
5007
5067
|
}
|
|
5008
5068
|
|
|
5009
|
-
console.log(`NocturnaWheel: Rendered ${primaryPlanetsWithCoords.length} primary planets and ${secondaryPlanetsWithCoords.length} secondary planets`);
|
|
5010
5069
|
}
|
|
5011
5070
|
|
|
5012
5071
|
// Render three independent aspect types
|
|
@@ -5015,14 +5074,12 @@ class NocturnaWheel {
|
|
|
5015
5074
|
if (this.config.primaryAspectSettings.enabled && primaryPlanetsWithCoords.length >= 2) {
|
|
5016
5075
|
const primaryAspectsGroup = this.svgManager.getGroup('primaryAspects');
|
|
5017
5076
|
this.renderers.aspect.render(primaryAspectsGroup, primaryPlanetsWithCoords, this.config.primaryAspectSettings);
|
|
5018
|
-
console.log("NocturnaWheel: Rendered primary aspects");
|
|
5019
5077
|
}
|
|
5020
5078
|
|
|
5021
5079
|
// 2. Secondary aspects (inner circle to inner circle)
|
|
5022
5080
|
if (this.config.secondaryAspectSettings.enabled && secondaryPlanetsWithCoords.length >= 2) {
|
|
5023
5081
|
const secondaryAspectsGroup = this.svgManager.getGroup('secondaryAspects');
|
|
5024
5082
|
this.renderers.aspect.render(secondaryAspectsGroup, secondaryPlanetsWithCoords, this.config.secondaryAspectSettings);
|
|
5025
|
-
console.log("NocturnaWheel: Rendered secondary aspects");
|
|
5026
5083
|
}
|
|
5027
5084
|
|
|
5028
5085
|
// 3. Synastry aspects (outer circle to inner circle)
|
|
@@ -5036,10 +5093,8 @@ class NocturnaWheel {
|
|
|
5036
5093
|
secondaryPlanetsWithCoords,
|
|
5037
5094
|
this.config.synastryAspectSettings
|
|
5038
5095
|
);
|
|
5039
|
-
console.log("NocturnaWheel: Rendered synastry aspects");
|
|
5040
5096
|
}
|
|
5041
5097
|
|
|
5042
|
-
console.log("NocturnaWheel: Chart rendered");
|
|
5043
5098
|
return this;
|
|
5044
5099
|
}
|
|
5045
5100
|
|
|
@@ -5176,8 +5231,18 @@ class NocturnaWheel {
|
|
|
5176
5231
|
// Update internal planets data
|
|
5177
5232
|
// Ensure it matches the format expected internally (object)
|
|
5178
5233
|
if (typeof data.planets === 'object' && !Array.isArray(data.planets)) {
|
|
5179
|
-
|
|
5180
|
-
|
|
5234
|
+
// Perform a deep merge for each planet
|
|
5235
|
+
for (const planetName in data.planets) {
|
|
5236
|
+
if (this.planets[planetName]) {
|
|
5237
|
+
this.planets[planetName] = { ...this.planets[planetName], ...data.planets[planetName] };
|
|
5238
|
+
} else {
|
|
5239
|
+
this.planets[planetName] = data.planets[planetName];
|
|
5240
|
+
}
|
|
5241
|
+
}
|
|
5242
|
+
// Log retrograde flags specifically
|
|
5243
|
+
Object.keys(this.planets).forEach(key => {
|
|
5244
|
+
// console.log(` ${key}: retrograde = ${this.planets[key].retrograde}`);
|
|
5245
|
+
});
|
|
5181
5246
|
} else {
|
|
5182
5247
|
console.warn("NocturnaWheel.updateData: Invalid planets data format. Expected object.");
|
|
5183
5248
|
}
|
|
@@ -5185,8 +5250,15 @@ class NocturnaWheel {
|
|
|
5185
5250
|
if (data.secondaryPlanets) {
|
|
5186
5251
|
// Update internal secondary planets data
|
|
5187
5252
|
if (typeof data.secondaryPlanets === 'object' && !Array.isArray(data.secondaryPlanets)) {
|
|
5188
|
-
|
|
5189
|
-
|
|
5253
|
+
// Perform a deep merge for each secondary planet
|
|
5254
|
+
for (const planetName in data.secondaryPlanets) {
|
|
5255
|
+
if (this.secondaryPlanets[planetName]) {
|
|
5256
|
+
this.secondaryPlanets[planetName] = { ...this.secondaryPlanets[planetName], ...data.secondaryPlanets[planetName] };
|
|
5257
|
+
} else {
|
|
5258
|
+
this.secondaryPlanets[planetName] = data.secondaryPlanets[planetName];
|
|
5259
|
+
}
|
|
5260
|
+
}
|
|
5261
|
+
// console.log("NocturnaWheel: Updated secondary planets data (deep merged).");
|
|
5190
5262
|
} else {
|
|
5191
5263
|
console.warn("NocturnaWheel.updateData: Invalid secondaryPlanets data format. Expected object.");
|
|
5192
5264
|
}
|
|
@@ -5199,7 +5271,7 @@ class NocturnaWheel {
|
|
|
5199
5271
|
if (this.renderers.house) {
|
|
5200
5272
|
this.renderers.house.houseData = this.houses;
|
|
5201
5273
|
}
|
|
5202
|
-
console.log("NocturnaWheel: Updated houses data.");
|
|
5274
|
+
// console.log("NocturnaWheel: Updated houses data.");
|
|
5203
5275
|
} else {
|
|
5204
5276
|
console.warn("NocturnaWheel.updateData: Invalid houses data format. Expected array.");
|
|
5205
5277
|
}
|
|
@@ -5222,7 +5294,7 @@ class NocturnaWheel {
|
|
|
5222
5294
|
this.config.updateAspectSettings(configUpdate.aspectSettings);
|
|
5223
5295
|
}
|
|
5224
5296
|
|
|
5225
|
-
console.log("NocturnaWheel: Updated configuration.");
|
|
5297
|
+
// console.log("NocturnaWheel: Updated configuration.");
|
|
5226
5298
|
// Re-render the chart with updated configuration
|
|
5227
5299
|
this.render();
|
|
5228
5300
|
return this;
|
|
@@ -5270,7 +5342,7 @@ class NocturnaWheel {
|
|
|
5270
5342
|
primaryGroup.style.display = visible ? 'block' : 'none';
|
|
5271
5343
|
}
|
|
5272
5344
|
|
|
5273
|
-
console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5345
|
+
// console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5274
5346
|
return this;
|
|
5275
5347
|
}
|
|
5276
5348
|
|
|
@@ -5295,7 +5367,7 @@ class NocturnaWheel {
|
|
|
5295
5367
|
innermostCircle.style.display = visible ? 'block' : 'none';
|
|
5296
5368
|
}
|
|
5297
5369
|
|
|
5298
|
-
console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5370
|
+
// console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5299
5371
|
return this;
|
|
5300
5372
|
}
|
|
5301
5373
|
}
|