@eaprelsky/nocturna-wheel 3.0.1 → 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 +149 -21
- package/dist/nocturna-wheel.bundle.js.map +1 -1
- package/dist/nocturna-wheel.es.js +149 -21
- 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 +149 -21
- 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.
|
|
@@ -1992,10 +1992,21 @@
|
|
|
1992
1992
|
];
|
|
1993
1993
|
|
|
1994
1994
|
circles.forEach(circleData => {
|
|
1995
|
+
// Determine stroke color and width based on circle type
|
|
1996
|
+
let strokeColor = "#999";
|
|
1997
|
+
let strokeWidth = "0.5";
|
|
1998
|
+
if (circleData.class === "chart-outer-circle") {
|
|
1999
|
+
strokeColor = "#666";
|
|
2000
|
+
strokeWidth = "1";
|
|
2001
|
+
}
|
|
2002
|
+
|
|
1995
2003
|
const circle = this.svgUtils.createSVGElement("circle", {
|
|
1996
2004
|
cx: this.centerX,
|
|
1997
2005
|
cy: this.centerY,
|
|
1998
2006
|
r: circleData.r,
|
|
2007
|
+
fill: "transparent", // Explicitly set transparent fill to avoid default black
|
|
2008
|
+
stroke: strokeColor, // Explicitly set stroke to ensure visibility
|
|
2009
|
+
"stroke-width": strokeWidth, // Explicitly set stroke width
|
|
1999
2010
|
class: `zodiac-element ${circleData.class}` // Add base class
|
|
2000
2011
|
});
|
|
2001
2012
|
parentGroup.appendChild(circle);
|
|
@@ -2030,6 +2041,8 @@
|
|
|
2030
2041
|
y1: point1.y,
|
|
2031
2042
|
x2: point2.x,
|
|
2032
2043
|
y2: point2.y,
|
|
2044
|
+
stroke: "#999", // Explicitly set stroke to ensure visibility
|
|
2045
|
+
"stroke-width": "0.75", // Explicitly set stroke width
|
|
2033
2046
|
class: `zodiac-element zodiac-division-line ${specialClass}`
|
|
2034
2047
|
});
|
|
2035
2048
|
|
|
@@ -2221,12 +2234,34 @@
|
|
|
2221
2234
|
const innerPoint = this.svgUtils.pointOnCircle(this.centerX, this.centerY, this.innerRadius, angle);
|
|
2222
2235
|
const middlePoint = this.svgUtils.pointOnCircle(this.centerX, this.centerY, this.middleRadius, angle);
|
|
2223
2236
|
|
|
2237
|
+
// Determine stroke color and width based on line type
|
|
2238
|
+
let innerStrokeColor = "#999";
|
|
2239
|
+
let innerStrokeWidth = "0.75";
|
|
2240
|
+
|
|
2241
|
+
let outerStrokeColor = "#999";
|
|
2242
|
+
let outerStrokeWidth = "0.75";
|
|
2243
|
+
let outerStrokeDasharray = null;
|
|
2244
|
+
|
|
2245
|
+
if (axisClass.includes('axis')) {
|
|
2246
|
+
// Cardinal points (ASC, DSC, IC, MC) - solid, darker
|
|
2247
|
+
innerStrokeColor = "#555";
|
|
2248
|
+
innerStrokeWidth = "1";
|
|
2249
|
+
outerStrokeColor = "#555";
|
|
2250
|
+
outerStrokeWidth = "1";
|
|
2251
|
+
// Axes are always solid
|
|
2252
|
+
} else {
|
|
2253
|
+
// Regular lines - outer lines are dashed
|
|
2254
|
+
outerStrokeDasharray = "2,2";
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2224
2257
|
// Create line from inner to middle circle
|
|
2225
2258
|
const innerLine = this.svgUtils.createSVGElement("line", {
|
|
2226
2259
|
x1: innerPoint.x,
|
|
2227
2260
|
y1: innerPoint.y,
|
|
2228
2261
|
x2: middlePoint.x,
|
|
2229
2262
|
y2: middlePoint.y,
|
|
2263
|
+
stroke: innerStrokeColor, // Explicitly set stroke to ensure visibility
|
|
2264
|
+
"stroke-width": innerStrokeWidth, // Explicitly set stroke width
|
|
2230
2265
|
class: `house-element house-division-line ${axisClass}`
|
|
2231
2266
|
});
|
|
2232
2267
|
|
|
@@ -2248,13 +2283,21 @@
|
|
|
2248
2283
|
const extendedPoint = this.svgUtils.pointOnCircle(this.centerX, this.centerY, this.extendedRadius, angle);
|
|
2249
2284
|
|
|
2250
2285
|
// Create line from outer circle to extended point
|
|
2251
|
-
const
|
|
2286
|
+
const outerLineAttrs = {
|
|
2252
2287
|
x1: outerPoint.x,
|
|
2253
2288
|
y1: outerPoint.y,
|
|
2254
2289
|
x2: extendedPoint.x,
|
|
2255
2290
|
y2: extendedPoint.y,
|
|
2291
|
+
stroke: outerStrokeColor, // Explicitly set stroke to ensure visibility
|
|
2292
|
+
"stroke-width": outerStrokeWidth, // Explicitly set stroke width
|
|
2256
2293
|
class: `house-element house-division-line outer ${axisClass}`
|
|
2257
|
-
}
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
if (outerStrokeDasharray) {
|
|
2297
|
+
outerLineAttrs["stroke-dasharray"] = outerStrokeDasharray;
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2300
|
+
const outerLine = this.svgUtils.createSVGElement("line", outerLineAttrs);
|
|
2258
2301
|
|
|
2259
2302
|
// Ensure cardinal points render above zodiac lines
|
|
2260
2303
|
if (axisClass.includes('axis')) {
|
|
@@ -2457,6 +2500,8 @@
|
|
|
2457
2500
|
isPrimary: planetType === 'primary',
|
|
2458
2501
|
type: planetType,
|
|
2459
2502
|
color: p.color || '#000000',
|
|
2503
|
+
// Retrograde flag - whether the planet is retrograde
|
|
2504
|
+
retrograde: p.retrograde === true,
|
|
2460
2505
|
// Track which radius this planet is being rendered at
|
|
2461
2506
|
dotRadius: dotRadius,
|
|
2462
2507
|
iconRadius: iconRadius
|
|
@@ -2565,6 +2610,50 @@
|
|
|
2565
2610
|
return icon;
|
|
2566
2611
|
}
|
|
2567
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
|
+
|
|
2568
2657
|
/**
|
|
2569
2658
|
* Renders a dot to mark the exact planet position
|
|
2570
2659
|
* @param {Element} parentGroup - The parent SVG group
|
|
@@ -3124,6 +3213,12 @@
|
|
|
3124
3213
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3125
3214
|
planetGroup.appendChild(icon);
|
|
3126
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
|
+
|
|
3127
3222
|
// Add tooltip
|
|
3128
3223
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3129
3224
|
|
|
@@ -3299,6 +3394,12 @@
|
|
|
3299
3394
|
const icon = this.symbolRenderer.renderPlanetSymbol(planetGroup, planet, iconSize);
|
|
3300
3395
|
planetGroup.appendChild(icon);
|
|
3301
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
|
+
|
|
3302
3403
|
// Add tooltip
|
|
3303
3404
|
this.symbolRenderer.addPlanetTooltip(planetGroup, planet);
|
|
3304
3405
|
|
|
@@ -4947,7 +5048,8 @@
|
|
|
4947
5048
|
.map(([name, data]) => ({
|
|
4948
5049
|
name: name,
|
|
4949
5050
|
position: data.lon,
|
|
4950
|
-
color: data.color || '#000000'
|
|
5051
|
+
color: data.color || '#000000',
|
|
5052
|
+
retrograde: !!data.retrograde
|
|
4951
5053
|
}));
|
|
4952
5054
|
primaryPlanetsWithCoords = this.renderers.planet.primaryRenderer.render(primaryGroup, primaryArray, 0, {
|
|
4953
5055
|
config: this.config
|
|
@@ -4962,14 +5064,14 @@
|
|
|
4962
5064
|
.map(([name, data]) => ({
|
|
4963
5065
|
name: name,
|
|
4964
5066
|
position: data.lon,
|
|
4965
|
-
color: data.color || '#000000'
|
|
5067
|
+
color: data.color || '#000000',
|
|
5068
|
+
retrograde: !!data.retrograde
|
|
4966
5069
|
}));
|
|
4967
5070
|
secondaryPlanetsWithCoords = this.renderers.planet.secondaryRenderer.render(secondaryGroup, secondaryArray, 0, {
|
|
4968
5071
|
config: this.config
|
|
4969
5072
|
});
|
|
4970
5073
|
}
|
|
4971
5074
|
|
|
4972
|
-
console.log(`NocturnaWheel: Rendered ${primaryPlanetsWithCoords.length} primary planets and ${secondaryPlanetsWithCoords.length} secondary planets`);
|
|
4973
5075
|
}
|
|
4974
5076
|
|
|
4975
5077
|
// Render three independent aspect types
|
|
@@ -4978,14 +5080,12 @@
|
|
|
4978
5080
|
if (this.config.primaryAspectSettings.enabled && primaryPlanetsWithCoords.length >= 2) {
|
|
4979
5081
|
const primaryAspectsGroup = this.svgManager.getGroup('primaryAspects');
|
|
4980
5082
|
this.renderers.aspect.render(primaryAspectsGroup, primaryPlanetsWithCoords, this.config.primaryAspectSettings);
|
|
4981
|
-
console.log("NocturnaWheel: Rendered primary aspects");
|
|
4982
5083
|
}
|
|
4983
5084
|
|
|
4984
5085
|
// 2. Secondary aspects (inner circle to inner circle)
|
|
4985
5086
|
if (this.config.secondaryAspectSettings.enabled && secondaryPlanetsWithCoords.length >= 2) {
|
|
4986
5087
|
const secondaryAspectsGroup = this.svgManager.getGroup('secondaryAspects');
|
|
4987
5088
|
this.renderers.aspect.render(secondaryAspectsGroup, secondaryPlanetsWithCoords, this.config.secondaryAspectSettings);
|
|
4988
|
-
console.log("NocturnaWheel: Rendered secondary aspects");
|
|
4989
5089
|
}
|
|
4990
5090
|
|
|
4991
5091
|
// 3. Synastry aspects (outer circle to inner circle)
|
|
@@ -4999,10 +5099,8 @@
|
|
|
4999
5099
|
secondaryPlanetsWithCoords,
|
|
5000
5100
|
this.config.synastryAspectSettings
|
|
5001
5101
|
);
|
|
5002
|
-
console.log("NocturnaWheel: Rendered synastry aspects");
|
|
5003
5102
|
}
|
|
5004
5103
|
|
|
5005
|
-
console.log("NocturnaWheel: Chart rendered");
|
|
5006
5104
|
return this;
|
|
5007
5105
|
}
|
|
5008
5106
|
|
|
@@ -5139,8 +5237,18 @@
|
|
|
5139
5237
|
// Update internal planets data
|
|
5140
5238
|
// Ensure it matches the format expected internally (object)
|
|
5141
5239
|
if (typeof data.planets === 'object' && !Array.isArray(data.planets)) {
|
|
5142
|
-
|
|
5143
|
-
|
|
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
|
+
});
|
|
5144
5252
|
} else {
|
|
5145
5253
|
console.warn("NocturnaWheel.updateData: Invalid planets data format. Expected object.");
|
|
5146
5254
|
}
|
|
@@ -5148,8 +5256,15 @@
|
|
|
5148
5256
|
if (data.secondaryPlanets) {
|
|
5149
5257
|
// Update internal secondary planets data
|
|
5150
5258
|
if (typeof data.secondaryPlanets === 'object' && !Array.isArray(data.secondaryPlanets)) {
|
|
5151
|
-
|
|
5152
|
-
|
|
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).");
|
|
5153
5268
|
} else {
|
|
5154
5269
|
console.warn("NocturnaWheel.updateData: Invalid secondaryPlanets data format. Expected object.");
|
|
5155
5270
|
}
|
|
@@ -5162,7 +5277,7 @@
|
|
|
5162
5277
|
if (this.renderers.house) {
|
|
5163
5278
|
this.renderers.house.houseData = this.houses;
|
|
5164
5279
|
}
|
|
5165
|
-
console.log("NocturnaWheel: Updated houses data.");
|
|
5280
|
+
// console.log("NocturnaWheel: Updated houses data.");
|
|
5166
5281
|
} else {
|
|
5167
5282
|
console.warn("NocturnaWheel.updateData: Invalid houses data format. Expected array.");
|
|
5168
5283
|
}
|
|
@@ -5185,7 +5300,7 @@
|
|
|
5185
5300
|
this.config.updateAspectSettings(configUpdate.aspectSettings);
|
|
5186
5301
|
}
|
|
5187
5302
|
|
|
5188
|
-
console.log("NocturnaWheel: Updated configuration.");
|
|
5303
|
+
// console.log("NocturnaWheel: Updated configuration.");
|
|
5189
5304
|
// Re-render the chart with updated configuration
|
|
5190
5305
|
this.render();
|
|
5191
5306
|
return this;
|
|
@@ -5233,7 +5348,7 @@
|
|
|
5233
5348
|
primaryGroup.style.display = visible ? 'block' : 'none';
|
|
5234
5349
|
}
|
|
5235
5350
|
|
|
5236
|
-
console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5351
|
+
// console.log(`NocturnaWheel: Primary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5237
5352
|
return this;
|
|
5238
5353
|
}
|
|
5239
5354
|
|
|
@@ -5258,7 +5373,7 @@
|
|
|
5258
5373
|
innermostCircle.style.display = visible ? 'block' : 'none';
|
|
5259
5374
|
}
|
|
5260
5375
|
|
|
5261
|
-
console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5376
|
+
// console.log(`NocturnaWheel: Secondary planets ${visible ? 'enabled' : 'disabled'}`);
|
|
5262
5377
|
return this;
|
|
5263
5378
|
}
|
|
5264
5379
|
}
|
|
@@ -5344,6 +5459,9 @@
|
|
|
5344
5459
|
cx: centerX,
|
|
5345
5460
|
cy: centerY,
|
|
5346
5461
|
r: radius,
|
|
5462
|
+
fill: "transparent", // Explicitly set transparent fill to avoid default black
|
|
5463
|
+
stroke: "#999", // Explicitly set stroke to ensure visibility
|
|
5464
|
+
"stroke-width": "0.5", // Explicitly set stroke width
|
|
5347
5465
|
class: 'zodiac-element chart-innermost-circle'
|
|
5348
5466
|
});
|
|
5349
5467
|
zodiacGroup.appendChild(innermostCircle);
|
|
@@ -5748,11 +5866,21 @@
|
|
|
5748
5866
|
}
|
|
5749
5867
|
}
|
|
5750
5868
|
|
|
5751
|
-
//
|
|
5752
|
-
|
|
5869
|
+
// Auto-initialization is DISABLED in production builds to prevent conflicts.
|
|
5870
|
+
// This demo code should only run in development mode with Vite dev server.
|
|
5871
|
+
// In production, users explicitly create their own chart instances.
|
|
5753
5872
|
|
|
5754
|
-
// Handle hot module replacement for Vite
|
|
5873
|
+
// Handle hot module replacement for Vite (development only)
|
|
5755
5874
|
if (undefined) {
|
|
5875
|
+
// Initialize the chart when the DOM is ready (ONLY in development)
|
|
5876
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
5877
|
+
const container = document.getElementById('chart-container');
|
|
5878
|
+
if (container && container.children.length === 0) {
|
|
5879
|
+
console.log('DEV MODE: Auto-initializing demo chart');
|
|
5880
|
+
initChart();
|
|
5881
|
+
}
|
|
5882
|
+
});
|
|
5883
|
+
|
|
5756
5884
|
undefined.accept((newModule) => {
|
|
5757
5885
|
console.log('HMR update for main.js');
|
|
5758
5886
|
cleanup();
|