@eaprelsky/nocturna-wheel 3.0.2 → 3.0.3
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
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
/**
|
|
294
294
|
* IconData.js
|
|
295
295
|
* Auto-generated module containing inline SVG icons as data URLs
|
|
296
|
-
* Generated at: 2025-11-
|
|
296
|
+
* Generated at: 2025-11-16T11:33:49.422Z
|
|
297
297
|
*
|
|
298
298
|
* This file is automatically generated by the build process.
|
|
299
299
|
* Do not edit manually - changes will be overwritten.
|
|
@@ -2500,6 +2500,8 @@
|
|
|
2500
2500
|
isPrimary: planetType === 'primary',
|
|
2501
2501
|
type: planetType,
|
|
2502
2502
|
color: p.color || '#000000',
|
|
2503
|
+
// Retrograde flag - whether the planet is retrograde
|
|
2504
|
+
retrograde: p.retrograde === true,
|
|
2503
2505
|
// Track which radius this planet is being rendered at
|
|
2504
2506
|
dotRadius: dotRadius,
|
|
2505
2507
|
iconRadius: iconRadius
|
|
@@ -2608,6 +2610,50 @@
|
|
|
2608
2610
|
return icon;
|
|
2609
2611
|
}
|
|
2610
2612
|
|
|
2613
|
+
/**
|
|
2614
|
+
* Renders a retrograde indicator (small "R" symbol) in the bottom-right corner of the planet icon
|
|
2615
|
+
* @param {Element} parentGroup - The parent SVG group
|
|
2616
|
+
* @param {Object} planet - Planet object with calculated positions
|
|
2617
|
+
* @param {number} iconSize - Size of the icon in pixels
|
|
2618
|
+
* @returns {Element} - The created retrograde indicator element
|
|
2619
|
+
*/
|
|
2620
|
+
renderRetrogradeIndicator(parentGroup, planet, iconSize = 24) {
|
|
2621
|
+
// Calculate position for "R" symbol in bottom-right corner of icon
|
|
2622
|
+
// Offset from icon center to bottom-right corner
|
|
2623
|
+
const offsetX = iconSize / 2 - 2; // Small offset from edge (2px from right edge)
|
|
2624
|
+
const offsetY = iconSize / 2 - 2; // Small offset from bottom edge
|
|
2625
|
+
|
|
2626
|
+
// Position relative to adjusted icon center
|
|
2627
|
+
const rX = planet.adjustedIconX + offsetX;
|
|
2628
|
+
const rY = planet.adjustedIconY + offsetY;
|
|
2629
|
+
|
|
2630
|
+
// Get planet type for CSS classes
|
|
2631
|
+
const typeClass = planet.isPrimary ? 'primary' : 'secondary';
|
|
2632
|
+
|
|
2633
|
+
// Use planet color, but ensure visibility with darker shade if color is too light
|
|
2634
|
+
const planetColor = planet.color || '#000000';
|
|
2635
|
+
|
|
2636
|
+
// Create small "R" text element
|
|
2637
|
+
const retrogradeText = this.svgUtils.createSVGElement("text", {
|
|
2638
|
+
x: rX,
|
|
2639
|
+
y: rY,
|
|
2640
|
+
'text-anchor': 'end',
|
|
2641
|
+
'dominant-baseline': 'alphabetic',
|
|
2642
|
+
'font-size': `${Math.max(7, iconSize * 0.3)}px`, // Scale with icon size, minimum 7px
|
|
2643
|
+
'font-weight': 'bold',
|
|
2644
|
+
'font-family': 'Arial, sans-serif',
|
|
2645
|
+
class: `planet-retrograde planet-${planet.name}-retrograde planet-${typeClass}-retrograde`,
|
|
2646
|
+
fill: planetColor,
|
|
2647
|
+
'stroke': '#ffffff', // White stroke for better visibility
|
|
2648
|
+
'stroke-width': '0.5',
|
|
2649
|
+
'paint-order': 'stroke fill'
|
|
2650
|
+
});
|
|
2651
|
+
|
|
2652
|
+
retrogradeText.textContent = 'R';
|
|
2653
|
+
|
|
2654
|
+
return retrogradeText;
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2611
2657
|
/**
|
|
2612
2658
|
* Renders a dot to mark the exact planet position
|
|
2613
2659
|
* @param {Element} parentGroup - The parent SVG group
|
|
@@ -3167,6 +3213,12 @@
|
|
|
3167
3213
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3168
3214
|
planetGroup.appendChild(icon);
|
|
3169
3215
|
|
|
3216
|
+
// Add retrograde indicator if planet is retrograde
|
|
3217
|
+
if (planet.retrograde) {
|
|
3218
|
+
const retrogradeIndicator = this.symbolRenderer.renderRetrogradeIndicator(planetGroup, planet, iconSize);
|
|
3219
|
+
planetGroup.appendChild(retrogradeIndicator);
|
|
3220
|
+
}
|
|
3221
|
+
|
|
3170
3222
|
// Add tooltip
|
|
3171
3223
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3172
3224
|
|
|
@@ -3342,6 +3394,12 @@
|
|
|
3342
3394
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3343
3395
|
planetGroup.appendChild(icon);
|
|
3344
3396
|
|
|
3397
|
+
// Add retrograde indicator if planet is retrograde
|
|
3398
|
+
if (planet.retrograde) {
|
|
3399
|
+
const retrogradeIndicator = this.symbolRenderer.renderRetrogradeIndicator(planetGroup, planet, iconSize);
|
|
3400
|
+
planetGroup.appendChild(retrogradeIndicator);
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3345
3403
|
// Add tooltip
|
|
3346
3404
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3347
3405
|
|
|
@@ -4990,7 +5048,8 @@
|
|
|
4990
5048
|
.map(([name, data]) => ({
|
|
4991
5049
|
name: name,
|
|
4992
5050
|
position: data.lon,
|
|
4993
|
-
color: data.color || '#000000'
|
|
5051
|
+
color: data.color || '#000000',
|
|
5052
|
+
retrograde: !!data.retrograde
|
|
4994
5053
|
}));
|
|
4995
5054
|
primaryPlanetsWithCoords = this.renderers.planet.primaryRenderer.render(primaryGroup, primaryArray, 0, {
|
|
4996
5055
|
config: this.config
|
|
@@ -5005,14 +5064,14 @@
|
|
|
5005
5064
|
.map(([name, data]) => ({
|
|
5006
5065
|
name: name,
|
|
5007
5066
|
position: data.lon,
|
|
5008
|
-
color: data.color || '#000000'
|
|
5067
|
+
color: data.color || '#000000',
|
|
5068
|
+
retrograde: !!data.retrograde
|
|
5009
5069
|
}));
|
|
5010
5070
|
secondaryPlanetsWithCoords = this.renderers.planet.secondaryRenderer.render(secondaryGroup, secondaryArray, 0, {
|
|
5011
5071
|
config: this.config
|
|
5012
5072
|
});
|
|
5013
5073
|
}
|
|
5014
5074
|
|
|
5015
|
-
console.log(`NocturnaWheel: Rendered ${primaryPlanetsWithCoords.length} primary planets and ${secondaryPlanetsWithCoords.length} secondary planets`);
|
|
5016
5075
|
}
|
|
5017
5076
|
|
|
5018
5077
|
// Render three independent aspect types
|
|
@@ -5021,14 +5080,12 @@
|
|
|
5021
5080
|
if (this.config.primaryAspectSettings.enabled && primaryPlanetsWithCoords.length >= 2) {
|
|
5022
5081
|
const primaryAspectsGroup = this.svgManager.getGroup('primaryAspects');
|
|
5023
5082
|
this.renderers.aspect.render(primaryAspectsGroup, primaryPlanetsWithCoords, this.config.primaryAspectSettings);
|
|
5024
|
-
console.log("NocturnaWheel: Rendered primary aspects");
|
|
5025
5083
|
}
|
|
5026
5084
|
|
|
5027
5085
|
// 2. Secondary aspects (inner circle to inner circle)
|
|
5028
5086
|
if (this.config.secondaryAspectSettings.enabled && secondaryPlanetsWithCoords.length >= 2) {
|
|
5029
5087
|
const secondaryAspectsGroup = this.svgManager.getGroup('secondaryAspects');
|
|
5030
5088
|
this.renderers.aspect.render(secondaryAspectsGroup, secondaryPlanetsWithCoords, this.config.secondaryAspectSettings);
|
|
5031
|
-
console.log("NocturnaWheel: Rendered secondary aspects");
|
|
5032
5089
|
}
|
|
5033
5090
|
|
|
5034
5091
|
// 3. Synastry aspects (outer circle to inner circle)
|
|
@@ -5042,10 +5099,8 @@
|
|
|
5042
5099
|
secondaryPlanetsWithCoords,
|
|
5043
5100
|
this.config.synastryAspectSettings
|
|
5044
5101
|
);
|
|
5045
|
-
console.log("NocturnaWheel: Rendered synastry aspects");
|
|
5046
5102
|
}
|
|
5047
5103
|
|
|
5048
|
-
console.log("NocturnaWheel: Chart rendered");
|
|
5049
5104
|
return this;
|
|
5050
5105
|
}
|
|
5051
5106
|
|
|
@@ -5182,8 +5237,18 @@
|
|
|
5182
5237
|
// Update internal planets data
|
|
5183
5238
|
// Ensure it matches the format expected internally (object)
|
|
5184
5239
|
if (typeof data.planets === 'object' && !Array.isArray(data.planets)) {
|
|
5185
|
-
|
|
5186
|
-
|
|
5240
|
+
// Perform a deep merge for each planet
|
|
5241
|
+
for (const planetName in data.planets) {
|
|
5242
|
+
if (this.planets[planetName]) {
|
|
5243
|
+
this.planets[planetName] = { ...this.planets[planetName], ...data.planets[planetName] };
|
|
5244
|
+
} else {
|
|
5245
|
+
this.planets[planetName] = data.planets[planetName];
|
|
5246
|
+
}
|
|
5247
|
+
}
|
|
5248
|
+
// Log retrograde flags specifically
|
|
5249
|
+
Object.keys(this.planets).forEach(key => {
|
|
5250
|
+
// console.log(` ${key}: retrograde = ${this.planets[key].retrograde}`);
|
|
5251
|
+
});
|
|
5187
5252
|
} else {
|
|
5188
5253
|
console.warn("NocturnaWheel.updateData: Invalid planets data format. Expected object.");
|
|
5189
5254
|
}
|
|
@@ -5191,8 +5256,15 @@
|
|
|
5191
5256
|
if (data.secondaryPlanets) {
|
|
5192
5257
|
// Update internal secondary planets data
|
|
5193
5258
|
if (typeof data.secondaryPlanets === 'object' && !Array.isArray(data.secondaryPlanets)) {
|
|
5194
|
-
|
|
5195
|
-
|
|
5259
|
+
// Perform a deep merge for each secondary planet
|
|
5260
|
+
for (const planetName in data.secondaryPlanets) {
|
|
5261
|
+
if (this.secondaryPlanets[planetName]) {
|
|
5262
|
+
this.secondaryPlanets[planetName] = { ...this.secondaryPlanets[planetName], ...data.secondaryPlanets[planetName] };
|
|
5263
|
+
} else {
|
|
5264
|
+
this.secondaryPlanets[planetName] = data.secondaryPlanets[planetName];
|
|
5265
|
+
}
|
|
5266
|
+
}
|
|
5267
|
+
// console.log("NocturnaWheel: Updated secondary planets data (deep merged).");
|
|
5196
5268
|
} else {
|
|
5197
5269
|
console.warn("NocturnaWheel.updateData: Invalid secondaryPlanets data format. Expected object.");
|
|
5198
5270
|
}
|
|
@@ -5205,7 +5277,7 @@
|
|
|
5205
5277
|
if (this.renderers.house) {
|
|
5206
5278
|
this.renderers.house.houseData = this.houses;
|
|
5207
5279
|
}
|
|
5208
|
-
console.log("NocturnaWheel: Updated houses data.");
|
|
5280
|
+
// console.log("NocturnaWheel: Updated houses data.");
|
|
5209
5281
|
} else {
|
|
5210
5282
|
console.warn("NocturnaWheel.updateData: Invalid houses data format. Expected array.");
|
|
5211
5283
|
}
|
|
@@ -5228,7 +5300,7 @@
|
|
|
5228
5300
|
this.config.updateAspectSettings(configUpdate.aspectSettings);
|
|
5229
5301
|
}
|
|
5230
5302
|
|
|
5231
|
-
console.log("NocturnaWheel: Updated configuration.");
|
|
5303
|
+
// console.log("NocturnaWheel: Updated configuration.");
|
|
5232
5304
|
// Re-render the chart with updated configuration
|
|
5233
5305
|
this.render();
|
|
5234
5306
|
return this;
|
|
@@ -5276,7 +5348,7 @@
|
|
|
5276
5348
|
primaryGroup.style.display = visible ? 'block' : 'none';
|
|
5277
5349
|
}
|
|
5278
5350
|
|
|
5279
|
-
console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5351
|
+
// console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5280
5352
|
return this;
|
|
5281
5353
|
}
|
|
5282
5354
|
|
|
@@ -5301,7 +5373,7 @@
|
|
|
5301
5373
|
innermostCircle.style.display = visible ? 'block' : 'none';
|
|
5302
5374
|
}
|
|
5303
5375
|
|
|
5304
|
-
console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5376
|
+
// console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5305
5377
|
return this;
|
|
5306
5378
|
}
|
|
5307
5379
|
}
|