rename natus → sky across the codebase — natal chart abstraction is now sky throughout, since chart inputs aren't birthday-gated
Mechanical rename: 5 files (sky-wheel.js, _sky.scss, _sky_overlay.html, SkyWheelSpec.js x2), 24 in-place edits across templates/views/urls/SCSS/JS/tests/CLAUDE.md. URL names epic:natus_save → epic:sky_save (epic namespaced, no clash w. dashboard:sky_save), JS module NatusWheel → SkyWheel, DOM ids id_natus_* → id_sky_*, BEM classes natus-* → sky-*, dashboard sky_natus_data/sky_natus_preview collapsed to sky_data/sky_preview_data. No DB migration needed (User.sky_chart_data + GameEvent.SKY_SAVED already used sky-prefix). 778 ITs + Jasmine green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* natus-wheel.js — Self-contained D3 natal-chart module.
|
||||
* sky-wheel.js — Self-contained D3 natal-chart module.
|
||||
*
|
||||
* Public API:
|
||||
* NatusWheel.draw(svgEl, data) — first render
|
||||
* NatusWheel.redraw(data) — live update (same SVG)
|
||||
* NatusWheel.clear() — empty the SVG
|
||||
* SkyWheel.draw(svgEl, data) — first render
|
||||
* SkyWheel.redraw(data) — live update (same SVG)
|
||||
* SkyWheel.clear() — empty the SVG
|
||||
*
|
||||
* `data` shape — matches the /epic/natus/preview/ proxy response:
|
||||
* `data` shape — matches the /epic/sky/preview/ proxy response:
|
||||
* {
|
||||
* planets: { Sun: { sign, degree, speed, retrograde }, … },
|
||||
* houses: { cusps: [f×12], asc: f, mc: f },
|
||||
@@ -28,7 +28,7 @@
|
||||
* already defined in the page; falls back to neutral colours if absent.
|
||||
*/
|
||||
|
||||
const NatusWheel = (() => {
|
||||
const SkyWheel = (() => {
|
||||
'use strict';
|
||||
|
||||
// ── Constants ──────────────────────────────────────────────────────────────
|
||||
@@ -223,8 +223,8 @@ const NatusWheel = (() => {
|
||||
if (_staticBase) return _staticBase;
|
||||
const scripts = document.querySelectorAll('script[src]');
|
||||
for (const s of scripts) {
|
||||
if (s.src.includes('natus-wheel')) {
|
||||
_staticBase = s.src.replace(/natus-wheel\.js.*$/, '');
|
||||
if (s.src.includes('sky-wheel')) {
|
||||
_staticBase = s.src.replace(/sky-wheel\.js.*$/, '');
|
||||
return _staticBase;
|
||||
}
|
||||
}
|
||||
@@ -957,7 +957,7 @@ const NatusWheel = (() => {
|
||||
* Called on every draw() so a fresh innerHTML replaces any stale state.
|
||||
*/
|
||||
function _injectTooltipControls() {
|
||||
_tooltipEl = document.getElementById('id_natus_tooltip');
|
||||
_tooltipEl = document.getElementById('id_sky_tooltip');
|
||||
if (!_tooltipEl) return;
|
||||
_tooltipEl.innerHTML =
|
||||
`<button type="button" class="btn btn-equip nw-asp-don">DON</button>` +
|
||||
@@ -1384,8 +1384,8 @@ const NatusWheel = (() => {
|
||||
(() => {
|
||||
const scripts = document.querySelectorAll('script[src]');
|
||||
for (const s of scripts) {
|
||||
if (s.src.includes('natus-wheel')) {
|
||||
return s.src.replace(/natus-wheel\.js.*$/, 'icons/zodiac-signs/');
|
||||
if (s.src.includes('sky-wheel')) {
|
||||
return s.src.replace(/sky-wheel\.js.*$/, 'icons/zodiac-signs/');
|
||||
}
|
||||
}
|
||||
return '/static/apps/gameboard/icons/zodiac-signs/';
|
||||
@@ -1394,7 +1394,7 @@ const NatusWheel = (() => {
|
||||
await Promise.all(SIGNS.map(async sign => {
|
||||
const url = base + sign.name.toLowerCase() + '.svg';
|
||||
const resp = await window.fetch(url);
|
||||
if (!resp.ok) { console.warn(`NatusWheel: failed to load ${url}`); return; }
|
||||
if (!resp.ok) { console.warn(`SkyWheel: failed to load ${url}`); return; }
|
||||
const text = await resp.text();
|
||||
const doc = new DOMParser().parseFromString(text, 'image/svg+xml');
|
||||
const path = doc.querySelector('path');
|
||||
Reference in New Issue
Block a user