caelus-wheel 0.1.1 → 0.2.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 +6 -1
- package/dist/src/index.d.ts +5 -3
- package/dist/src/index.js +5 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ SSR-safe, zero runtime dependencies (react is a peer), ~3.4 KB gzipped.
|
|
|
7
7
|
import { ChartWheel } from "caelus-wheel";
|
|
8
8
|
|
|
9
9
|
<ChartWheel
|
|
10
|
-
chart={chart} //
|
|
10
|
+
chart={chart} // caelus Chart object or caelus-mcp chart payload, as-is
|
|
11
11
|
size={520} // px, square
|
|
12
12
|
showAspects={true}
|
|
13
13
|
aspectTypes={["conjunction", "sextile", "square", "trine", "opposition"]}
|
|
@@ -15,6 +15,11 @@ import { ChartWheel } from "caelus-wheel";
|
|
|
15
15
|
/>
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
`chart` accepts either the `Chart` object from the caelus engine or a
|
|
19
|
+
`natal_chart` / `current_sky` response from caelus-mcp — the MCP payload's
|
|
20
|
+
`rx` retrograde flag is understood and `signDeg` is derived from `lon`
|
|
21
|
+
when absent. An MCP client can pipe a tool response straight in.
|
|
22
|
+
|
|
18
23
|
## What it draws
|
|
19
24
|
|
|
20
25
|
- **Zodiac ring** — sign glyphs, sign boundaries, 1°/5°/10° tick marks.
|
package/dist/src/index.d.ts
CHANGED
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
import type { ReactElement } from "react";
|
|
13
13
|
export interface WheelPosition {
|
|
14
14
|
lon: number;
|
|
15
|
-
retrograde
|
|
16
|
-
|
|
15
|
+
retrograde?: boolean;
|
|
16
|
+
rx?: boolean;
|
|
17
|
+
signDeg?: number;
|
|
17
18
|
}
|
|
18
19
|
export interface WheelAspect {
|
|
19
20
|
a: string;
|
|
@@ -44,7 +45,8 @@ export interface WheelTheme {
|
|
|
44
45
|
export declare const DARK_THEME: WheelTheme;
|
|
45
46
|
export declare const GLYPHS: Record<string, string>;
|
|
46
47
|
export interface ChartWheelProps {
|
|
47
|
-
/** The Chart object from caelus,
|
|
48
|
+
/** The Chart object from caelus, or a caelus-mcp natal_chart /
|
|
49
|
+
* current_sky tool response, as-is. */
|
|
48
50
|
chart: WheelChart;
|
|
49
51
|
/** Square size in px. */
|
|
50
52
|
size?: number;
|
package/dist/src/index.js
CHANGED
|
@@ -179,9 +179,11 @@ export function ChartWheel({ chart, size = 520, showAspects = true, aspectTypes
|
|
|
179
179
|
el.push(_jsx("line", { x1: fix(x1), y1: fix(y1), x2: fix(x2), y2: fix(y2), stroke: T.labelText, strokeWidth: 0.5, opacity: 0.5 }, `conn-${b}`));
|
|
180
180
|
}
|
|
181
181
|
el.push(text(disp, 0.655, G[b] ?? b.slice(0, 2).toUpperCase(), size * 0.05, T.planetText, `pg-${b}`));
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
|
|
182
|
+
const signDeg = p.signDeg ?? mod(p.lon, 30);
|
|
183
|
+
const retro = p.retrograde ?? p.rx ?? false;
|
|
184
|
+
const deg = Math.floor(signDeg);
|
|
185
|
+
const min = String(Math.floor(mod(signDeg, 1) * 60)).padStart(2, "0");
|
|
186
|
+
el.push(text(disp, 0.585, `${deg}°${min}'${retro ? "℞" : ""}`, size * 0.024, T.labelText, `pl-${b}`));
|
|
185
187
|
});
|
|
186
188
|
return (_jsx("svg", { width: size, height: size, viewBox: `0 0 ${size} ${size}`, role: "img", "aria-label": "astrological chart wheel", style: { background: T.background }, children: el }));
|
|
187
189
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "caelus-wheel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "React SVG chart wheel for caelus: zodiac, houses, planets with collision avoidance, aspect lines. SSR-safe, zero runtime dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -45,4 +45,4 @@
|
|
|
45
45
|
"svg",
|
|
46
46
|
"natal-chart"
|
|
47
47
|
]
|
|
48
|
-
}
|
|
48
|
+
}
|