@roxyapi/ui 0.3.1 → 0.4.1
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/AGENTS.md +34 -7
- package/README.md +145 -26
- package/dist/cdn/components/ashtakavarga-grid.js +74 -19
- package/dist/cdn/components/ashtakavarga-grid.js.map +2 -2
- package/dist/cdn/components/biorhythm-chart.js +18 -4
- package/dist/cdn/components/biorhythm-chart.js.map +2 -2
- package/dist/cdn/components/choghadiya-grid.js +47 -12
- package/dist/cdn/components/choghadiya-grid.js.map +3 -3
- package/dist/cdn/components/compatibility-card.js +21 -7
- package/dist/cdn/components/compatibility-card.js.map +2 -2
- package/dist/cdn/components/dasha-timeline.js +113 -28
- package/dist/cdn/components/dasha-timeline.js.map +3 -3
- package/dist/cdn/components/data.js +27 -13
- package/dist/cdn/components/data.js.map +2 -2
- package/dist/cdn/components/divisional-chart.js +225 -118
- package/dist/cdn/components/divisional-chart.js.map +4 -4
- package/dist/cdn/components/dosha-card.js +18 -4
- package/dist/cdn/components/dosha-card.js.map +2 -2
- package/dist/cdn/components/endpoint-form.js +25 -11
- package/dist/cdn/components/endpoint-form.js.map +2 -2
- package/dist/cdn/components/guna-milan.js +20 -6
- package/dist/cdn/components/guna-milan.js.map +2 -2
- package/dist/cdn/components/hexagram.js +22 -8
- package/dist/cdn/components/hexagram.js.map +2 -2
- package/dist/cdn/components/horoscope-card.js +20 -6
- package/dist/cdn/components/horoscope-card.js.map +2 -2
- package/dist/cdn/components/kp-chart.js +19 -5
- package/dist/cdn/components/kp-chart.js.map +2 -2
- package/dist/cdn/components/kp-planets-table.js +17 -3
- package/dist/cdn/components/kp-planets-table.js.map +2 -2
- package/dist/cdn/components/kp-ruling-planets.js +17 -3
- package/dist/cdn/components/kp-ruling-planets.js.map +2 -2
- package/dist/cdn/components/location-search.js +18 -4
- package/dist/cdn/components/location-search.js.map +2 -2
- package/dist/cdn/components/moon-phase.js +27 -13
- package/dist/cdn/components/moon-phase.js.map +2 -2
- package/dist/cdn/components/nakshatra-card.js +16 -2
- package/dist/cdn/components/nakshatra-card.js.map +2 -2
- package/dist/cdn/components/natal-chart.js +79 -40
- package/dist/cdn/components/natal-chart.js.map +3 -3
- package/dist/cdn/components/numerology-card.js +18 -4
- package/dist/cdn/components/numerology-card.js.map +2 -2
- package/dist/cdn/components/panchang-table.js +53 -25
- package/dist/cdn/components/panchang-table.js.map +3 -3
- package/dist/cdn/components/shadbala-table.js +24 -10
- package/dist/cdn/components/shadbala-table.js.map +2 -2
- package/dist/cdn/components/synastry-chart.js +96 -48
- package/dist/cdn/components/synastry-chart.js.map +3 -3
- package/dist/cdn/components/tarot-card.js +17 -3
- package/dist/cdn/components/tarot-card.js.map +2 -2
- package/dist/cdn/components/tarot-spread.js +39 -25
- package/dist/cdn/components/tarot-spread.js.map +2 -2
- package/dist/cdn/components/transits-table.js +18 -4
- package/dist/cdn/components/transits-table.js.map +2 -2
- package/dist/cdn/components/vedic-kundli.js +215 -105
- package/dist/cdn/components/vedic-kundli.js.map +4 -4
- package/dist/cdn/components/vedic-planets-table.js +22 -8
- package/dist/cdn/components/vedic-planets-table.js.map +2 -2
- package/dist/cdn/components/western-planets-table.js +18 -4
- package/dist/cdn/components/western-planets-table.js.map +2 -2
- package/dist/cdn/components/yoga-list.js +17 -3
- package/dist/cdn/components/yoga-list.js.map +2 -2
- package/dist/cdn/roxy-ui.js +1082 -816
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/ashtakavarga-grid.d.ts +13 -1
- package/dist/components/ashtakavarga-grid.d.ts.map +1 -1
- package/dist/components/ashtakavarga-grid.js +86 -11
- package/dist/components/ashtakavarga-grid.js.map +2 -2
- package/dist/components/biorhythm-chart.js +14 -0
- package/dist/components/biorhythm-chart.js.map +2 -2
- package/dist/components/choghadiya-grid.d.ts +6 -0
- package/dist/components/choghadiya-grid.d.ts.map +1 -1
- package/dist/components/choghadiya-grid.js +50 -2
- package/dist/components/choghadiya-grid.js.map +2 -2
- package/dist/components/compatibility-card.js +14 -0
- package/dist/components/compatibility-card.js.map +2 -2
- package/dist/components/dasha-timeline.d.ts +10 -0
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +135 -4
- package/dist/components/dasha-timeline.js.map +2 -2
- package/dist/components/data.js +14 -0
- package/dist/components/data.js.map +2 -2
- package/dist/components/divisional-chart.d.ts +9 -6
- package/dist/components/divisional-chart.d.ts.map +1 -1
- package/dist/components/divisional-chart.js +546 -251
- package/dist/components/divisional-chart.js.map +4 -4
- package/dist/components/dosha-card.js +14 -0
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.js +14 -0
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/guna-milan.js +14 -0
- package/dist/components/guna-milan.js.map +2 -2
- package/dist/components/hexagram.js +14 -0
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.js +14 -0
- package/dist/components/horoscope-card.js.map +2 -2
- package/dist/components/kp-chart.js +14 -0
- package/dist/components/kp-chart.js.map +2 -2
- package/dist/components/kp-planets-table.js +14 -0
- package/dist/components/kp-planets-table.js.map +2 -2
- package/dist/components/kp-ruling-planets.js +14 -0
- package/dist/components/kp-ruling-planets.js.map +2 -2
- package/dist/components/location-search.js +14 -0
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.js +14 -0
- package/dist/components/moon-phase.js.map +2 -2
- package/dist/components/nakshatra-card.js +14 -0
- package/dist/components/nakshatra-card.js.map +2 -2
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +76 -6
- package/dist/components/natal-chart.js.map +2 -2
- package/dist/components/numerology-card.js +14 -0
- package/dist/components/numerology-card.js.map +2 -2
- package/dist/components/panchang-table.d.ts +1 -0
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +37 -1
- package/dist/components/panchang-table.js.map +2 -2
- package/dist/components/shadbala-table.js +14 -0
- package/dist/components/shadbala-table.js.map +2 -2
- package/dist/components/synastry-chart.d.ts +6 -0
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +106 -7
- package/dist/components/synastry-chart.js.map +2 -2
- package/dist/components/tarot-card.js +14 -0
- package/dist/components/tarot-card.js.map +2 -2
- package/dist/components/tarot-spread.js +14 -0
- package/dist/components/tarot-spread.js.map +2 -2
- package/dist/components/transits-table.js +14 -0
- package/dist/components/transits-table.js.map +2 -2
- package/dist/components/vedic-kundli.d.ts +14 -9
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +537 -245
- package/dist/components/vedic-kundli.js.map +4 -4
- package/dist/components/vedic-planets-table.js +14 -0
- package/dist/components/vedic-planets-table.js.map +2 -2
- package/dist/components/western-planets-table.js +14 -0
- package/dist/components/western-planets-table.js.map +2 -2
- package/dist/components/yoga-list.js +14 -0
- package/dist/components/yoga-list.js.map +2 -2
- package/dist/index.cjs +1397 -797
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +1278 -678
- package/dist/index.js.map +4 -4
- package/dist/manifest.json +23 -23
- package/dist/styles/tokens.css +8 -23
- package/dist/utils/base-styles.d.ts.map +1 -1
- package/dist/utils/kundli-render.d.ts +43 -104
- package/dist/utils/kundli-render.d.ts.map +1 -1
- package/dist/utils/kundli-styles.d.ts +13 -0
- package/dist/utils/kundli-styles.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ashtakavarga-grid.ts +73 -11
- package/src/components/choghadiya-grid.ts +37 -2
- package/src/components/dasha-timeline.ts +135 -4
- package/src/components/divisional-chart.ts +40 -97
- package/src/components/natal-chart.ts +89 -6
- package/src/components/panchang-table.ts +34 -1
- package/src/components/synastry-chart.ts +84 -8
- package/src/components/vedic-kundli.ts +35 -95
- package/src/styles/tokens.css +8 -23
- package/src/utils/base-styles.ts +14 -0
- package/src/utils/kundli-render.ts +609 -270
- package/src/utils/kundli-styles.ts +124 -0
- package/src/version.ts +1 -1
package/dist/manifest.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"components": [
|
|
3
|
-
"shadbala-table",
|
|
4
|
-
"tarot-spread",
|
|
5
|
-
"nakshatra-card",
|
|
6
|
-
"natal-chart",
|
|
7
|
-
"biorhythm-chart",
|
|
8
|
-
"dosha-card",
|
|
9
|
-
"vedic-kundli",
|
|
10
|
-
"horoscope-card",
|
|
11
|
-
"dasha-timeline",
|
|
12
|
-
"hexagram",
|
|
13
|
-
"transits-table",
|
|
14
|
-
"location-search",
|
|
15
|
-
"choghadiya-grid",
|
|
16
|
-
"tarot-card",
|
|
17
|
-
"kp-planets-table",
|
|
18
3
|
"vedic-planets-table",
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
4
|
+
"western-planets-table",
|
|
5
|
+
"shadbala-table",
|
|
6
|
+
"synastry-chart",
|
|
7
|
+
"compatibility-card",
|
|
22
8
|
"ashtakavarga-grid",
|
|
23
|
-
"kp-chart",
|
|
24
|
-
"data",
|
|
25
9
|
"yoga-list",
|
|
10
|
+
"hexagram",
|
|
26
11
|
"panchang-table",
|
|
12
|
+
"kp-chart",
|
|
27
13
|
"guna-milan",
|
|
14
|
+
"choghadiya-grid",
|
|
15
|
+
"biorhythm-chart",
|
|
16
|
+
"nakshatra-card",
|
|
17
|
+
"endpoint-form",
|
|
18
|
+
"vedic-kundli",
|
|
19
|
+
"divisional-chart",
|
|
20
|
+
"natal-chart",
|
|
21
|
+
"kp-planets-table",
|
|
22
|
+
"tarot-card",
|
|
28
23
|
"moon-phase",
|
|
29
|
-
"
|
|
24
|
+
"dasha-timeline",
|
|
25
|
+
"dosha-card",
|
|
26
|
+
"location-search",
|
|
27
|
+
"transits-table",
|
|
30
28
|
"numerology-card",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
29
|
+
"horoscope-card",
|
|
30
|
+
"data",
|
|
31
|
+
"kp-ruling-planets",
|
|
32
|
+
"tarot-spread"
|
|
33
33
|
]
|
|
34
34
|
}
|
package/dist/styles/tokens.css
CHANGED
|
@@ -90,15 +90,12 @@
|
|
|
90
90
|
--roxy-motion-duration: 200ms;
|
|
91
91
|
--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
92
92
|
|
|
93
|
-
/* Heat scale:
|
|
94
|
-
*
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
--roxy-heat
|
|
99
|
-
--roxy-heat-5: #fdba74;
|
|
100
|
-
--roxy-heat-6: #fb923c;
|
|
101
|
-
--roxy-heat-7: #ef4444;
|
|
93
|
+
/* Heat scale: a single base hue. Consumers mix it with `transparent` at
|
|
94
|
+
* increasing percentages to paint cooler-to-hotter tiers. The mix-with-
|
|
95
|
+
* transparent approach lets the page bg show through and keeps text
|
|
96
|
+
* colour stable (always --roxy-fg), so the cells read in both themes
|
|
97
|
+
* without per-tier text colours. */
|
|
98
|
+
--roxy-heat: var(--roxy-danger, #ef4444);
|
|
102
99
|
}
|
|
103
100
|
|
|
104
101
|
/* Dark theme via system preference */
|
|
@@ -134,13 +131,7 @@
|
|
|
134
131
|
0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
|
|
135
132
|
--roxy-shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.7);
|
|
136
133
|
|
|
137
|
-
--roxy-heat
|
|
138
|
-
--roxy-heat-2: #14532d;
|
|
139
|
-
--roxy-heat-3: #166534;
|
|
140
|
-
--roxy-heat-4: #92400e;
|
|
141
|
-
--roxy-heat-5: #b45309;
|
|
142
|
-
--roxy-heat-6: #c2410c;
|
|
143
|
-
--roxy-heat-7: #b91c1c;
|
|
134
|
+
--roxy-heat: var(--roxy-danger, #ef4444);
|
|
144
135
|
}
|
|
145
136
|
}
|
|
146
137
|
|
|
@@ -205,13 +196,7 @@
|
|
|
205
196
|
0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
|
|
206
197
|
--roxy-shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.7);
|
|
207
198
|
|
|
208
|
-
--roxy-heat
|
|
209
|
-
--roxy-heat-2: #14532d;
|
|
210
|
-
--roxy-heat-3: #166534;
|
|
211
|
-
--roxy-heat-4: #92400e;
|
|
212
|
-
--roxy-heat-5: #b45309;
|
|
213
|
-
--roxy-heat-6: #c2410c;
|
|
214
|
-
--roxy-heat-7: #b91c1c;
|
|
199
|
+
--roxy-heat: var(--roxy-danger, #ef4444);
|
|
215
200
|
}
|
|
216
201
|
|
|
217
202
|
/* Reduced motion override */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-styles.d.ts","sourceRoot":"","sources":["../../src/utils/base-styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"base-styles.d.ts","sourceRoot":"","sources":["../../src/utils/base-styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,UAAU,yBAgGtB,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import type { TemplateResult } from 'lit';
|
|
2
|
-
import { nothing } from 'lit';
|
|
3
|
-
export declare const KUNDLI_SIZE = 300;
|
|
4
|
-
export declare const KUNDLI_CENTER = 150;
|
|
5
2
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
export declare const RASHI_TO_SIGN: Record<string, string>;
|
|
11
|
-
/**
|
|
12
|
-
* A planet placed in a kundli house. This is a render-only view model, not an
|
|
13
|
-
* API type: it carries just enough per-graha detail to draw a compact label
|
|
14
|
-
* (abbreviation plus degree-within-sign plus retrograde mark) and a rich SVG
|
|
15
|
-
* `<title>` tooltip (full position, nakshatra, pada, avastha). Both the D1
|
|
16
|
-
* birth chart and the Dx divisional charts feed it from their `meta` map.
|
|
3
|
+
* A graha placed inside a kundli cell. Render-only view model fed from a
|
|
4
|
+
* `meta` map on the API response. Carries enough detail to draw a compact
|
|
5
|
+
* in-cell label (abbreviation, whole degree, retrograde mark) and a rich SVG
|
|
6
|
+
* `<title>` tooltip (exact position, nakshatra, pada, avastha).
|
|
17
7
|
*/
|
|
18
8
|
export interface PlacedGraha {
|
|
19
9
|
graha: string;
|
|
@@ -26,102 +16,35 @@ export interface PlacedGraha {
|
|
|
26
16
|
isRetrograde?: boolean;
|
|
27
17
|
awastha?: string;
|
|
28
18
|
}
|
|
29
|
-
export interface HouseDef {
|
|
30
|
-
/** 1-based cell number. For the sign-fixed styles (south, east) this is the rashi index, Aries = 1. */
|
|
31
|
-
number: number;
|
|
32
|
-
/** Sign name (TitleCase, e.g. "Aries"). */
|
|
33
|
-
sign: string;
|
|
34
|
-
/** Planets occupying this house, with full detail for label + tooltip. */
|
|
35
|
-
planets: PlacedGraha[];
|
|
36
|
-
/** Whether this house is the ascendant (Lagna). */
|
|
37
|
-
isLagna: boolean;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* South Indian fixed-house square grid: house centers for planet text labels.
|
|
41
|
-
* House 1 is fixed top-center; positions are in the 300x300 viewBox.
|
|
42
|
-
*/
|
|
43
|
-
export declare const SOUTH_HOUSE_CENTERS: Record<number, {
|
|
44
|
-
x: number;
|
|
45
|
-
y: number;
|
|
46
|
-
}>;
|
|
47
|
-
/**
|
|
48
|
-
* South Indian sign abbreviation positions (slightly outward from center).
|
|
49
|
-
*/
|
|
50
|
-
export declare const SOUTH_SIGN_POSITIONS: Record<number, {
|
|
51
|
-
x: number;
|
|
52
|
-
y: number;
|
|
53
|
-
}>;
|
|
54
19
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*/
|
|
59
|
-
export declare const NORTH_HOUSE_CENTERS: Record<number, {
|
|
60
|
-
x: number;
|
|
61
|
-
y: number;
|
|
62
|
-
}>;
|
|
63
|
-
/**
|
|
64
|
-
* East Indian style: a fixed-sign square (like South Indian) cut by both
|
|
65
|
-
* diagonals and an inner diamond joining the side midpoints, giving 12 cells.
|
|
66
|
-
* The four inner-diamond quadrilaterals hold the cardinal-position signs
|
|
67
|
-
* (cell 1, 4, 7, 10) and the eight corner half-triangles fill between them,
|
|
68
|
-
* laid out clockwise from the top so cell `n` holds the n-th rashi (Aries = 1).
|
|
69
|
-
* Centers are the visual midpoints of those cells in the 300x300 viewBox,
|
|
70
|
-
* derived from the frame geometry (square 10..290, diagonals, side-midpoint
|
|
71
|
-
* diamond).
|
|
20
|
+
* Unified view model used by every kundli style. Caller passes a graha-keyed
|
|
21
|
+
* `meta` map (from `/vedic-astrology/birth-chart`, `/divisional-chart`, or
|
|
22
|
+
* `/navamsa`) through {@link toKundliViewModel} to produce this shape.
|
|
72
23
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
export declare const EAST_HOUSE_CENTERS: Record<number, {
|
|
78
|
-
x: number;
|
|
79
|
-
y: number;
|
|
80
|
-
}>;
|
|
81
|
-
/**
|
|
82
|
-
* East Indian sign abbreviation positions, nudged toward the outer edge of
|
|
83
|
-
* every cell so the abbreviation and the planet stack do not collide.
|
|
84
|
-
*/
|
|
85
|
-
export declare const EAST_SIGN_POSITIONS: Record<number, {
|
|
86
|
-
x: number;
|
|
87
|
-
y: number;
|
|
88
|
-
}>;
|
|
89
|
-
/**
|
|
90
|
-
* Render a single south-Indian house group: lagna highlight, sign
|
|
91
|
-
* abbreviation, planet labels with degree and tooltip.
|
|
92
|
-
*/
|
|
93
|
-
export declare function renderSouthHouseGroup(h: HouseDef): TemplateResult | typeof nothing;
|
|
94
|
-
/**
|
|
95
|
-
* Render a north-Indian-style kundli wheel frame (grid lines only).
|
|
96
|
-
* Returns the SVG structural lines; call `renderNorthHouseGroup` for content.
|
|
97
|
-
*/
|
|
98
|
-
export declare function renderNorthFrame(): TemplateResult;
|
|
99
|
-
/**
|
|
100
|
-
* Render a north-Indian house group (sign abbr + house number + planets).
|
|
101
|
-
*/
|
|
102
|
-
export declare function renderNorthHouseGroup(h: HouseDef): TemplateResult | typeof nothing;
|
|
103
|
-
/**
|
|
104
|
-
* Render the south-Indian square frame (border diamond + inner square + radial lines).
|
|
105
|
-
*/
|
|
106
|
-
export declare function renderSouthFrame(): TemplateResult;
|
|
107
|
-
/**
|
|
108
|
-
* Render the east-Indian square frame: outer square, both diagonals, and the
|
|
109
|
-
* inner diamond joining the four side midpoints. Twelve triangular cells.
|
|
24
|
+
* `placements` is keyed by lowercase rashi name (`"aries"`, `"taurus"`, ...)
|
|
25
|
+
* so the sign-fixed styles can index directly. The Lagna entry is not
|
|
26
|
+
* counted as a planet; it only flags the ascendant cell.
|
|
110
27
|
*/
|
|
111
|
-
export
|
|
28
|
+
export interface KundliViewModel {
|
|
29
|
+
lagnaSign: string;
|
|
30
|
+
placements: Record<string, PlacedGraha[]>;
|
|
31
|
+
divisionLabel?: string;
|
|
32
|
+
}
|
|
112
33
|
/**
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* centers and a smaller line height to fit the triangular cells.
|
|
34
|
+
* Kundli regional styles. Sign-fixed (south, east) and house-fixed (north).
|
|
35
|
+
* Exposed so consumers can type their own `chart-style` attribute reflection.
|
|
116
36
|
*/
|
|
117
|
-
export
|
|
37
|
+
export type ChartStyle = 'south' | 'north' | 'east';
|
|
118
38
|
/**
|
|
119
|
-
* Bucket a graha-keyed `meta` map (
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
39
|
+
* Bucket a graha-keyed `meta` map (D1 birth chart or D2..D60 divisional
|
|
40
|
+
* chart) into the unified {@link KundliViewModel} the renderer consumes. The
|
|
41
|
+
* Lagna entry is recognised by `graha === 'Lagna'` (or key `"Lagna"`) and
|
|
42
|
+
* sets `lagnaSign`; it is not bucketed as a placed planet.
|
|
43
|
+
*
|
|
44
|
+
* @param meta - Graha-keyed map; missing rashi entries are skipped.
|
|
45
|
+
* @param divisionLabel - Optional title written inside the chart centre.
|
|
123
46
|
*/
|
|
124
|
-
export declare function
|
|
47
|
+
export declare function toKundliViewModel(meta: Record<string, {
|
|
125
48
|
graha?: string;
|
|
126
49
|
rashi?: string;
|
|
127
50
|
longitude?: number;
|
|
@@ -132,5 +55,21 @@ export declare function buildHousesFromMeta(meta: Record<string, {
|
|
|
132
55
|
};
|
|
133
56
|
isRetrograde?: boolean;
|
|
134
57
|
awastha?: string;
|
|
135
|
-
}
|
|
58
|
+
}>, divisionLabel?: string): KundliViewModel;
|
|
59
|
+
/**
|
|
60
|
+
* Render the kundli body for the requested style. Returns the SVG inner
|
|
61
|
+
* content; the caller wraps it in an `<svg>` element with the canonical
|
|
62
|
+
* viewBox `0 0 400 400` and applies its own theming CSS.
|
|
63
|
+
*/
|
|
64
|
+
export declare function renderKundliSvg(vm: KundliViewModel, style: ChartStyle): TemplateResult;
|
|
65
|
+
/**
|
|
66
|
+
* Render a WAI-ARIA-compliant tablist that lets the end user switch between
|
|
67
|
+
* South / North / East kundli styles at runtime. The hosting component owns
|
|
68
|
+
* the `chartStyle` state; this helper renders the buttons and wires the
|
|
69
|
+
* arrow-key navigation plus click handler.
|
|
70
|
+
*
|
|
71
|
+
* @param active - The currently selected style.
|
|
72
|
+
* @param setStyle - Callback the host component uses to update its state.
|
|
73
|
+
*/
|
|
74
|
+
export declare function renderKundliStyleTablist(active: ChartStyle, setStyle: (next: ChartStyle) => void): TemplateResult;
|
|
136
75
|
//# sourceMappingURL=kundli-render.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kundli-render.d.ts","sourceRoot":"","sources":["../../src/utils/kundli-render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"kundli-render.d.ts","sourceRoot":"","sources":["../../src/utils/kundli-render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AA+B1C;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAsGpD;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,MAAM,CACX,MAAM,EACN;IACC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CACD,EACD,aAAa,CAAC,EAAE,MAAM,GACpB,eAAe,CAoBjB;AAmdD;;;;GAIG;AACH,wBAAgB,eAAe,CAC9B,EAAE,EAAE,eAAe,EACnB,KAAK,EAAE,UAAU,GACf,cAAc,CAShB;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,GAClC,cAAc,CAkChB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared CSS for every kundli renderer (`<roxy-vedic-kundli>`,
|
|
3
|
+
* `<roxy-divisional-chart>`, and any future `<roxy-navamsa-chart>`). Centralises
|
|
4
|
+
* the SVG layout (responsive viewBox + aspect ratio), the line/text classes,
|
|
5
|
+
* and the Lagna highlight so the three components stay visually identical.
|
|
6
|
+
*
|
|
7
|
+
* @remarks Font sizes are written in viewBox user units (the chart is 400×400
|
|
8
|
+
* inside a 1:1 aspect-ratio container), so they scale linearly from a 320px
|
|
9
|
+
* phone surface to a wall projector without raster loss. The Lagna palette
|
|
10
|
+
* tracks `--roxy-accent` so host themes flow through unchanged.
|
|
11
|
+
*/
|
|
12
|
+
export declare const kundliStyles: import("lit").CSSResult;
|
|
13
|
+
//# sourceMappingURL=kundli-styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kundli-styles.d.ts","sourceRoot":"","sources":["../../src/utils/kundli-styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,yBA8GxB,CAAC"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROXY_UI_VERSION = "0.
|
|
1
|
+
export declare const ROXY_UI_VERSION = "0.4.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roxyapi/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Web components for the RoxyAPI catalog. Drop-in charts, tables, cards, forms for astrology, tarot, numerology, biorhythm, I Ching, crystals, dreams, angel numbers, and more. One key, beautiful in 30 minutes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -129,27 +129,68 @@ export class RoxyAshtakavargaGrid extends LitElement {
|
|
|
129
129
|
border-bottom: none;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
/* Heat cells
|
|
132
|
+
/* Heat cells. Single base hue (var --roxy-heat) mixed with
|
|
133
|
+
* transparent at increasing percentages produces seven readable
|
|
134
|
+
* tiers in both light and dark themes. Text colour stays
|
|
135
|
+
* var(--roxy-fg) so it inverts with the host theme without
|
|
136
|
+
* per-tier overrides. */
|
|
133
137
|
.heat-cell {
|
|
134
138
|
border-radius: var(--roxy-radius-sm, 4px);
|
|
135
139
|
font-weight: var(--roxy-weight-bold, 600);
|
|
136
140
|
min-width: 2rem;
|
|
137
141
|
font-variant-numeric: tabular-nums;
|
|
142
|
+
color: var(--roxy-fg, currentColor);
|
|
138
143
|
}
|
|
139
144
|
|
|
140
|
-
.heat-1 { background: var(--roxy-heat
|
|
141
|
-
.heat-2 { background: var(--roxy-heat
|
|
142
|
-
.heat-3 { background: var(--roxy-heat
|
|
143
|
-
.heat-4 { background: var(--roxy-heat
|
|
144
|
-
.heat-5 { background: var(--roxy-heat
|
|
145
|
-
.heat-6 { background: var(--roxy-heat
|
|
146
|
-
.heat-7 { background: var(--roxy-heat
|
|
145
|
+
.heat-1 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 6%, transparent); }
|
|
146
|
+
.heat-2 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 14%, transparent); }
|
|
147
|
+
.heat-3 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 26%, transparent); }
|
|
148
|
+
.heat-4 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 40%, transparent); }
|
|
149
|
+
.heat-5 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 55%, transparent); }
|
|
150
|
+
.heat-6 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 72%, transparent); }
|
|
151
|
+
.heat-7 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 90%, transparent); }
|
|
147
152
|
|
|
148
153
|
/* Bhinna grid: planet header column narrower */
|
|
149
154
|
.bhinna-table th:first-child,
|
|
150
155
|
.bhinna-table td:first-child {
|
|
151
156
|
min-width: 5rem;
|
|
152
157
|
}
|
|
158
|
+
|
|
159
|
+
/* Tight cells below 480px so the 14-column bhinna grid stops
|
|
160
|
+
* overflowing the viewport. The wrapper keeps overflow-x:auto as
|
|
161
|
+
* a fallback for very long content. */
|
|
162
|
+
@container (max-width: 480px) {
|
|
163
|
+
.bhinna-table th,
|
|
164
|
+
.bhinna-table td {
|
|
165
|
+
padding: 0.3rem 0.35rem;
|
|
166
|
+
font-size: var(--roxy-text-xs, 0.75rem);
|
|
167
|
+
}
|
|
168
|
+
.bhinna-table th:first-child,
|
|
169
|
+
.bhinna-table td:first-child {
|
|
170
|
+
min-width: 3.5rem;
|
|
171
|
+
}
|
|
172
|
+
.heat-cell {
|
|
173
|
+
min-width: 1.5rem;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/* Visual cue that the bhinna table is scrollable below the breakpoint:
|
|
177
|
+
* a soft gradient at the right edge so users see there is more to scroll. */
|
|
178
|
+
.overflow-scroll {
|
|
179
|
+
mask-image: linear-gradient(
|
|
180
|
+
to right,
|
|
181
|
+
transparent 0,
|
|
182
|
+
black 0.5rem,
|
|
183
|
+
black calc(100% - 1rem),
|
|
184
|
+
transparent 100%
|
|
185
|
+
);
|
|
186
|
+
-webkit-mask-image: linear-gradient(
|
|
187
|
+
to right,
|
|
188
|
+
transparent 0,
|
|
189
|
+
black 0.5rem,
|
|
190
|
+
black calc(100% - 1rem),
|
|
191
|
+
transparent 100%
|
|
192
|
+
);
|
|
193
|
+
}
|
|
153
194
|
`,
|
|
154
195
|
];
|
|
155
196
|
|
|
@@ -237,7 +278,11 @@ export class RoxyAshtakavargaGrid extends LitElement {
|
|
|
237
278
|
});
|
|
238
279
|
}
|
|
239
280
|
|
|
240
|
-
|
|
281
|
+
/**
|
|
282
|
+
* Bhinna bindus per planet per sign run 0..8 (sum of 0/1 contributions
|
|
283
|
+
* from each of the 8 reference points). Bucket directly by raw count.
|
|
284
|
+
*/
|
|
285
|
+
private bhinnaHeat(count: number): string {
|
|
241
286
|
if (count <= 1) return 'heat-1';
|
|
242
287
|
if (count <= 2) return 'heat-2';
|
|
243
288
|
if (count <= 3) return 'heat-3';
|
|
@@ -247,6 +292,23 @@ export class RoxyAshtakavargaGrid extends LitElement {
|
|
|
247
292
|
return 'heat-7';
|
|
248
293
|
}
|
|
249
294
|
|
|
295
|
+
/**
|
|
296
|
+
* Sarva bindus per sign are the column total across all 7 planets, range
|
|
297
|
+
* roughly 0..56 with typical values 20..40. Bucketed per classical
|
|
298
|
+
* interpretation: 25 below par, 25..30 average, 30..40 strong, 40+ very
|
|
299
|
+
* strong. Bucket spans intentionally widen at the extremes so a single
|
|
300
|
+
* outlier sign reads as exceptional.
|
|
301
|
+
*/
|
|
302
|
+
private sarvaHeat(count: number): string {
|
|
303
|
+
if (count <= 18) return 'heat-1';
|
|
304
|
+
if (count <= 23) return 'heat-2';
|
|
305
|
+
if (count <= 28) return 'heat-3';
|
|
306
|
+
if (count <= 32) return 'heat-4';
|
|
307
|
+
if (count <= 37) return 'heat-5';
|
|
308
|
+
if (count <= 42) return 'heat-6';
|
|
309
|
+
return 'heat-7';
|
|
310
|
+
}
|
|
311
|
+
|
|
250
312
|
private renderSarva(signs: AshtakavargaResponse['signs']) {
|
|
251
313
|
const sav = this.data!.sarvashtakavarga;
|
|
252
314
|
if (!sav) return html`<p class="roxy-empty">No sarvashtakavarga data</p>`;
|
|
@@ -262,7 +324,7 @@ export class RoxyAshtakavargaGrid extends LitElement {
|
|
|
262
324
|
<tbody>
|
|
263
325
|
${signs.map((sign, i) => {
|
|
264
326
|
const count = sav.bindus[i] ?? 0;
|
|
265
|
-
const hc = this.
|
|
327
|
+
const hc = this.sarvaHeat(count);
|
|
266
328
|
return html`<tr>
|
|
267
329
|
<td>
|
|
268
330
|
<div class="planet-cell">
|
|
@@ -306,7 +368,7 @@ export class RoxyAshtakavargaGrid extends LitElement {
|
|
|
306
368
|
(row) => html`<tr>
|
|
307
369
|
<td>${row.planet}</td>
|
|
308
370
|
${row.bindus.map((count) => {
|
|
309
|
-
const hc = this.
|
|
371
|
+
const hc = this.bhinnaHeat(count);
|
|
310
372
|
return html`<td class="${`heat-cell ${hc}`}">${count}</td>`;
|
|
311
373
|
})}
|
|
312
374
|
<td>${row.total}</td>
|
|
@@ -92,6 +92,21 @@ export class RoxyChoghadiyaGrid extends LitElement {
|
|
|
92
92
|
background: transparent;
|
|
93
93
|
color: var(--roxy-fg, #0a0a0a);
|
|
94
94
|
}
|
|
95
|
+
.cho-tile.now {
|
|
96
|
+
outline: 2px solid var(--roxy-accent, #f59e0b);
|
|
97
|
+
outline-offset: 1px;
|
|
98
|
+
box-shadow: 0 0 0 4px
|
|
99
|
+
color-mix(in srgb, var(--roxy-accent, #f59e0b) 18%, transparent);
|
|
100
|
+
}
|
|
101
|
+
.now-badge {
|
|
102
|
+
display: inline-block;
|
|
103
|
+
margin-left: 0.4em;
|
|
104
|
+
font-size: var(--roxy-text-xs, 0.75rem);
|
|
105
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
106
|
+
color: var(--roxy-accent-fg, #b45309);
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
letter-spacing: 0.06em;
|
|
109
|
+
}
|
|
95
110
|
.tile-name {
|
|
96
111
|
font-size: var(--roxy-text-base, 1rem);
|
|
97
112
|
font-weight: var(--roxy-weight-bold, 600);
|
|
@@ -120,6 +135,19 @@ export class RoxyChoghadiyaGrid extends LitElement {
|
|
|
120
135
|
@property({ attribute: false })
|
|
121
136
|
data: GetChoghadiyaResponse | null = null;
|
|
122
137
|
|
|
138
|
+
/**
|
|
139
|
+
* True when the current wall-clock time falls inside this period. Both
|
|
140
|
+
* `start` and `end` are ISO 8601 with timezone, so the comparison is
|
|
141
|
+
* timezone-aware via the host's `Date` parsing.
|
|
142
|
+
*/
|
|
143
|
+
private isCurrent(period: ChoghadiyaPeriod): boolean {
|
|
144
|
+
const now = Date.now();
|
|
145
|
+
const start = Date.parse(period.start);
|
|
146
|
+
const end = Date.parse(period.end);
|
|
147
|
+
if (Number.isNaN(start) || Number.isNaN(end)) return false;
|
|
148
|
+
return now >= start && now < end;
|
|
149
|
+
}
|
|
150
|
+
|
|
123
151
|
private renderTile(period: ChoghadiyaPeriod) {
|
|
124
152
|
const effectClass =
|
|
125
153
|
period.effect === 'Good'
|
|
@@ -127,10 +155,17 @@ export class RoxyChoghadiyaGrid extends LitElement {
|
|
|
127
155
|
: period.effect === 'Bad'
|
|
128
156
|
? 'bad'
|
|
129
157
|
: 'neutral';
|
|
158
|
+
const current = this.isCurrent(period);
|
|
130
159
|
const lordGlyph = PLANET_GLYPH[capitalize(period.lord)] ?? '';
|
|
131
160
|
const timeRange = `${fmtTime(period.start)} - ${fmtTime(period.end)}`;
|
|
132
|
-
return html`<div
|
|
133
|
-
|
|
161
|
+
return html`<div
|
|
162
|
+
class="cho-tile ${effectClass}${current ? ' now' : ''}"
|
|
163
|
+
role="listitem"
|
|
164
|
+
aria-current=${current ? 'time' : 'false'}
|
|
165
|
+
>
|
|
166
|
+
<span class="tile-name">
|
|
167
|
+
${period.name}${current ? html`<span class="now-badge">Now</span>` : nothing}
|
|
168
|
+
</span>
|
|
134
169
|
<span class="tile-time" aria-label="Time range">${timeRange}</span>
|
|
135
170
|
<span class="tile-lord">
|
|
136
171
|
${lordGlyph ? html`<span aria-hidden="true">${lordGlyph}</span>` : nothing}
|