@roxyapi/ui 0.1.3 → 0.2.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 +6 -0
- package/README.md +9 -3
- package/dist/cdn/components/ashtakavarga-grid.js +349 -0
- package/dist/cdn/components/ashtakavarga-grid.js.map +7 -0
- package/dist/cdn/components/choghadiya-grid.js +239 -0
- package/dist/cdn/components/choghadiya-grid.js.map +7 -0
- package/dist/cdn/components/compatibility-card.js +6 -6
- package/dist/cdn/components/compatibility-card.js.map +1 -1
- package/dist/cdn/components/dasha-timeline.js +4 -4
- package/dist/cdn/components/dasha-timeline.js.map +1 -1
- package/dist/cdn/components/data.js +9 -9
- package/dist/cdn/components/data.js.map +4 -4
- package/dist/cdn/components/divisional-chart.js +279 -0
- package/dist/cdn/components/divisional-chart.js.map +7 -0
- package/dist/cdn/components/dosha-card.js +39 -39
- package/dist/cdn/components/dosha-card.js.map +3 -3
- package/dist/cdn/components/endpoint-form.js +8 -8
- package/dist/cdn/components/endpoint-form.js.map +4 -4
- package/dist/cdn/components/guna-milan.js +64 -22
- package/dist/cdn/components/guna-milan.js.map +3 -3
- package/dist/cdn/components/hexagram.js +9 -9
- package/dist/cdn/components/hexagram.js.map +3 -3
- package/dist/cdn/components/horoscope-card.js +28 -21
- package/dist/cdn/components/horoscope-card.js.map +4 -4
- package/dist/cdn/components/kp-planets-table.js +4 -4
- package/dist/cdn/components/kp-planets-table.js.map +1 -1
- package/dist/cdn/components/location-search.js.map +2 -2
- package/dist/cdn/components/moon-phase.js +13 -13
- package/dist/cdn/components/moon-phase.js.map +3 -3
- package/dist/cdn/components/natal-chart.js +196 -22
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +6 -6
- package/dist/cdn/components/numerology-card.js.map +4 -4
- package/dist/cdn/components/panchang-table.js +9 -9
- package/dist/cdn/components/panchang-table.js.map +1 -1
- package/dist/cdn/components/shadbala-table.js +312 -0
- package/dist/cdn/components/shadbala-table.js.map +7 -0
- package/dist/cdn/components/synastry-chart.js +21 -21
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/transits-table.js +396 -0
- package/dist/cdn/components/transits-table.js.map +7 -0
- package/dist/cdn/components/vedic-kundli.js +51 -29
- package/dist/cdn/components/vedic-kundli.js.map +4 -4
- package/dist/cdn/components/yoga-list.js +334 -0
- package/dist/cdn/components/yoga-list.js.map +7 -0
- package/dist/cdn/roxy-ui.js +1877 -522
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/ashtakavarga-grid.d.ts +26 -0
- package/dist/components/ashtakavarga-grid.d.ts.map +1 -0
- package/dist/components/ashtakavarga-grid.js +457 -0
- package/dist/components/ashtakavarga-grid.js.map +7 -0
- package/dist/components/choghadiya-grid.d.ts +19 -0
- package/dist/components/choghadiya-grid.d.ts.map +1 -0
- package/dist/components/choghadiya-grid.js +304 -0
- package/dist/components/choghadiya-grid.js.map +7 -0
- package/dist/components/compatibility-card.js.map +1 -1
- package/dist/components/dasha-timeline.js.map +1 -1
- package/dist/components/data.d.ts +5 -7
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +7 -5
- package/dist/components/data.js.map +3 -3
- package/dist/components/divisional-chart.d.ts +20 -0
- package/dist/components/divisional-chart.d.ts.map +1 -0
- package/dist/components/divisional-chart.js +471 -0
- package/dist/components/divisional-chart.js.map +7 -0
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +33 -30
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +5 -3
- package/dist/components/endpoint-form.js.map +3 -3
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +61 -12
- package/dist/components/guna-milan.js.map +3 -3
- package/dist/components/hexagram.js +17 -0
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +30 -3
- package/dist/components/horoscope-card.js.map +3 -3
- package/dist/components/kp-planets-table.js.map +1 -1
- package/dist/components/location-search.d.ts +2 -3
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.js +17 -0
- package/dist/components/moon-phase.js.map +2 -2
- package/dist/components/natal-chart.d.ts +2 -0
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +243 -36
- package/dist/components/natal-chart.js.map +3 -3
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +5 -3
- package/dist/components/numerology-card.js.map +3 -3
- package/dist/components/panchang-table.js.map +1 -1
- package/dist/components/shadbala-table.d.ts +18 -0
- package/dist/components/shadbala-table.d.ts.map +1 -0
- package/dist/components/shadbala-table.js +400 -0
- package/dist/components/shadbala-table.js.map +7 -0
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +34 -29
- package/dist/components/synastry-chart.js.map +3 -3
- package/dist/components/transits-table.d.ts +21 -0
- package/dist/components/transits-table.d.ts.map +1 -0
- package/dist/components/transits-table.js +520 -0
- package/dist/components/transits-table.js.map +7 -0
- package/dist/components/vedic-kundli.d.ts +3 -6
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +132 -80
- package/dist/components/vedic-kundli.js.map +3 -3
- package/dist/components/yoga-list.d.ts +29 -0
- package/dist/components/yoga-list.d.ts.map +1 -0
- package/dist/components/yoga-list.js +389 -0
- package/dist/components/yoga-list.js.map +7 -0
- package/dist/index.cjs +2707 -980
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2714 -987
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts +4 -10
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.json +7 -2
- package/dist/styles/tokens.css +26 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/types/types.gen.d.ts +2 -2
- package/dist/utils/format.d.ts +15 -1
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/kundli-render.d.ts +63 -0
- package/dist/utils/kundli-render.d.ts.map +1 -0
- package/dist/utils/string.d.ts +14 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/ashtakavarga-grid.ts +354 -0
- package/src/components/choghadiya-grid.ts +185 -0
- package/src/components/data.ts +8 -15
- package/src/components/divisional-chart.ts +214 -0
- package/src/components/dosha-card.ts +53 -36
- package/src/components/endpoint-form.ts +1 -7
- package/src/components/guna-milan.ts +74 -16
- package/src/components/horoscope-card.ts +8 -4
- package/src/components/location-search.ts +2 -3
- package/src/components/natal-chart.ts +251 -42
- package/src/components/numerology-card.ts +1 -7
- package/src/components/shadbala-table.ts +286 -0
- package/src/components/synastry-chart.ts +13 -39
- package/src/components/transits-table.ts +358 -0
- package/src/components/vedic-kundli.ts +38 -143
- package/src/components/yoga-list.ts +328 -0
- package/src/index.ts +8 -6
- package/src/manifest.ts +74 -100
- package/src/styles/tokens.css +26 -0
- package/src/tokens/index.ts +9 -0
- package/src/types/types.gen.ts +2 -2
- package/src/utils/format.ts +21 -3
- package/src/utils/kundli-render.ts +197 -0
- package/src/utils/string.ts +23 -0
- package/src/version.ts +1 -1
- package/dist/utils/motion.d.ts +0 -13
- package/dist/utils/motion.d.ts.map +0 -1
- package/src/utils/motion.ts +0 -18
package/src/manifest.ts
CHANGED
|
@@ -1,23 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Single source of truth for component metadata. Every consumer that needs
|
|
3
|
-
* the (tag, pascal, slug,
|
|
4
|
-
*
|
|
5
|
-
* scripts/
|
|
6
|
-
*
|
|
3
|
+
* the (tag, pascal, slug, description, heading) tuple reads from here:
|
|
4
|
+
* scripts/build-react.ts, scripts/build-registry.ts, scripts/sync-docs.ts,
|
|
5
|
+
* scripts/build-widgets.ts, and the browser-side apps/docs/manifest.js
|
|
6
|
+
* (mirrored at build time).
|
|
7
7
|
*
|
|
8
8
|
* Hand-maintained. Add a component → add one entry here. The OpenAPI spec
|
|
9
9
|
* does not yet carry component metadata, so this stays manual.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export type RoxyDomain =
|
|
13
|
-
| 'astrology'
|
|
14
|
-
| 'vedic'
|
|
15
|
-
| 'numerology'
|
|
16
|
-
| 'tarot'
|
|
17
|
-
| 'biorhythm'
|
|
18
|
-
| 'iching'
|
|
19
|
-
| 'utility';
|
|
20
|
-
|
|
21
12
|
export interface RoxyComponent {
|
|
22
13
|
/** Pascal-case React export name, e.g. RoxyNatalChart */
|
|
23
14
|
pascal: string;
|
|
@@ -25,12 +16,8 @@ export interface RoxyComponent {
|
|
|
25
16
|
tag: string;
|
|
26
17
|
/** Slug used in registry filenames and shadcn paths, e.g. natal-chart */
|
|
27
18
|
slug: string;
|
|
28
|
-
/** Domain bucket for filtering. */
|
|
29
|
-
domain: RoxyDomain;
|
|
30
19
|
/** Short human-readable heading shown on demo cards. */
|
|
31
20
|
heading: string;
|
|
32
|
-
/** SDK methods this component is designed to render. */
|
|
33
|
-
endpoints: string[];
|
|
34
21
|
/** One-line description for registry / docs / SEO meta. */
|
|
35
22
|
description: string;
|
|
36
23
|
/** Domain column label in the synced README/AGENTS table. */
|
|
@@ -58,9 +45,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
58
45
|
pascal: 'RoxyNatalChart',
|
|
59
46
|
tag: 'roxy-natal-chart',
|
|
60
47
|
slug: 'natal-chart',
|
|
61
|
-
domain: 'astrology',
|
|
62
48
|
heading: 'Natal chart',
|
|
63
|
-
endpoints: ['astrology.generateNatalChart'],
|
|
64
49
|
description:
|
|
65
50
|
'Western natal chart wheel for /astrology/natal-chart responses',
|
|
66
51
|
docsLabel: 'Western',
|
|
@@ -72,13 +57,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
72
57
|
pascal: 'RoxyHoroscopeCard',
|
|
73
58
|
tag: 'roxy-horoscope-card',
|
|
74
59
|
slug: 'horoscope-card',
|
|
75
|
-
domain: 'astrology',
|
|
76
60
|
heading: 'Daily horoscope',
|
|
77
|
-
endpoints: [
|
|
78
|
-
'astrology.getDailyHoroscope',
|
|
79
|
-
'astrology.getWeeklyHoroscope',
|
|
80
|
-
'astrology.getMonthlyHoroscope',
|
|
81
|
-
],
|
|
82
61
|
description:
|
|
83
62
|
'Daily, weekly, or monthly horoscope card for /astrology/horoscope/...',
|
|
84
63
|
docsLabel: 'Western',
|
|
@@ -90,9 +69,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
90
69
|
pascal: 'RoxySynastryChart',
|
|
91
70
|
tag: 'roxy-synastry-chart',
|
|
92
71
|
slug: 'synastry-chart',
|
|
93
|
-
domain: 'astrology',
|
|
94
72
|
heading: 'Synastry',
|
|
95
|
-
endpoints: ['astrology.calculateSynastry'],
|
|
96
73
|
description: 'Dual-wheel synastry chart with inter-aspects table',
|
|
97
74
|
docsLabel: 'Western',
|
|
98
75
|
endpointLabel: 'POST /astrology/synastry',
|
|
@@ -103,13 +80,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
103
80
|
pascal: 'RoxyCompatibilityCard',
|
|
104
81
|
tag: 'roxy-compatibility-card',
|
|
105
82
|
slug: 'compatibility-card',
|
|
106
|
-
domain: 'astrology',
|
|
107
83
|
heading: 'Compatibility score',
|
|
108
|
-
endpoints: [
|
|
109
|
-
'astrology.calculateCompatibility',
|
|
110
|
-
'numerology.calculateNumCompatibility',
|
|
111
|
-
'biorhythm.calculateBioCompatibility',
|
|
112
|
-
],
|
|
113
84
|
description: 'Cross-domain compatibility score card',
|
|
114
85
|
docsLabel: 'Cross',
|
|
115
86
|
endpointLabel:
|
|
@@ -121,13 +92,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
121
92
|
pascal: 'RoxyMoonPhase',
|
|
122
93
|
tag: 'roxy-moon-phase',
|
|
123
94
|
slug: 'moon-phase',
|
|
124
|
-
domain: 'astrology',
|
|
125
95
|
heading: 'Moon phase',
|
|
126
|
-
endpoints: [
|
|
127
|
-
'astrology.getCurrentMoonPhase',
|
|
128
|
-
'astrology.getUpcomingMoonPhases',
|
|
129
|
-
'astrology.getMoonCalendar',
|
|
130
|
-
],
|
|
131
96
|
description: 'Moon phase card and calendar',
|
|
132
97
|
docsLabel: 'Western',
|
|
133
98
|
endpointLabel: 'GET /astrology/moon-phase/{current,upcoming,calendar/...}',
|
|
@@ -138,9 +103,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
138
103
|
pascal: 'RoxyVedicKundli',
|
|
139
104
|
tag: 'roxy-vedic-kundli',
|
|
140
105
|
slug: 'vedic-kundli',
|
|
141
|
-
domain: 'vedic',
|
|
142
106
|
heading: 'Vedic kundli',
|
|
143
|
-
endpoints: ['vedicAstrology.generateBirthChart'],
|
|
144
107
|
description:
|
|
145
108
|
'South or North Indian Vedic kundli for /vedic-astrology/birth-chart',
|
|
146
109
|
docsLabel: 'Vedic',
|
|
@@ -152,12 +115,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
152
115
|
pascal: 'RoxyPanchangTable',
|
|
153
116
|
tag: 'roxy-panchang-table',
|
|
154
117
|
slug: 'panchang-table',
|
|
155
|
-
domain: 'vedic',
|
|
156
118
|
heading: 'Panchang',
|
|
157
|
-
endpoints: [
|
|
158
|
-
'vedicAstrology.getBasicPanchang',
|
|
159
|
-
'vedicAstrology.getDetailedPanchang',
|
|
160
|
-
],
|
|
161
119
|
description:
|
|
162
120
|
'Panchang muhurta table with auspicious and inauspicious periods',
|
|
163
121
|
docsLabel: 'Vedic',
|
|
@@ -169,13 +127,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
169
127
|
pascal: 'RoxyDashaTimeline',
|
|
170
128
|
tag: 'roxy-dasha-timeline',
|
|
171
129
|
slug: 'dasha-timeline',
|
|
172
|
-
domain: 'vedic',
|
|
173
130
|
heading: 'Vimshottari dasha',
|
|
174
|
-
endpoints: [
|
|
175
|
-
'vedicAstrology.getCurrentDasha',
|
|
176
|
-
'vedicAstrology.getMajorDashas',
|
|
177
|
-
'vedicAstrology.getSubDashas',
|
|
178
|
-
],
|
|
179
131
|
description: 'Vimshottari dasha timeline with active mahadasha highlighted',
|
|
180
132
|
docsLabel: 'Vedic',
|
|
181
133
|
endpointLabel: 'POST /vedic-astrology/dasha/{current,major,sub/...}',
|
|
@@ -186,13 +138,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
186
138
|
pascal: 'RoxyDoshaCard',
|
|
187
139
|
tag: 'roxy-dosha-card',
|
|
188
140
|
slug: 'dosha-card',
|
|
189
|
-
domain: 'vedic',
|
|
190
141
|
heading: 'Manglik dosha',
|
|
191
|
-
endpoints: [
|
|
192
|
-
'vedicAstrology.checkManglikDosha',
|
|
193
|
-
'vedicAstrology.checkKalsarpaDosha',
|
|
194
|
-
'vedicAstrology.checkSadhesati',
|
|
195
|
-
],
|
|
196
142
|
description: 'Manglik, Kaal Sarp, or Sade Sati presence card',
|
|
197
143
|
docsLabel: 'Vedic',
|
|
198
144
|
endpointLabel: 'POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}',
|
|
@@ -203,9 +149,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
203
149
|
pascal: 'RoxyGunaMilan',
|
|
204
150
|
tag: 'roxy-guna-milan',
|
|
205
151
|
slug: 'guna-milan',
|
|
206
|
-
domain: 'vedic',
|
|
207
152
|
heading: 'Guna milan',
|
|
208
|
-
endpoints: ['vedicAstrology.calculateGunMilan'],
|
|
209
153
|
description: '36-point Ashtakoota matrimonial compatibility breakdown',
|
|
210
154
|
docsLabel: 'Vedic',
|
|
211
155
|
endpointLabel: 'POST /vedic-astrology/compatibility',
|
|
@@ -216,27 +160,88 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
216
160
|
pascal: 'RoxyKpPlanetsTable',
|
|
217
161
|
tag: 'roxy-kp-planets-table',
|
|
218
162
|
slug: 'kp-planets-table',
|
|
219
|
-
domain: 'vedic',
|
|
220
163
|
heading: 'KP planets',
|
|
221
|
-
endpoints: ['vedicAstrology.getKpPlanets'],
|
|
222
164
|
description: 'KP planets table with sub-lord and sub-sub-lord columns',
|
|
223
165
|
docsLabel: 'Vedic (KP)',
|
|
224
166
|
endpointLabel: 'POST /vedic-astrology/kp/planets',
|
|
225
167
|
docsSummary: 'Sub-lord and sub-sub-lord columns',
|
|
226
168
|
topic: 'Vedic',
|
|
227
169
|
},
|
|
170
|
+
{
|
|
171
|
+
pascal: 'RoxyTransitsTable',
|
|
172
|
+
tag: 'roxy-transits-table',
|
|
173
|
+
slug: 'transits-table',
|
|
174
|
+
heading: 'Transits',
|
|
175
|
+
description: 'Live planet positions plus aspects to a natal chart',
|
|
176
|
+
docsLabel: 'Western',
|
|
177
|
+
endpointLabel: 'POST /astrology/transits',
|
|
178
|
+
docsSummary:
|
|
179
|
+
'Transit planet positions plus optional aspects to a natal chart',
|
|
180
|
+
topic: 'Astrology',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
pascal: 'RoxyDivisionalChart',
|
|
184
|
+
tag: 'roxy-divisional-chart',
|
|
185
|
+
slug: 'divisional-chart',
|
|
186
|
+
heading: 'Divisional chart',
|
|
187
|
+
description: 'D2 to D60 varga chart wheel with Vargottama markers',
|
|
188
|
+
docsLabel: 'Vedic',
|
|
189
|
+
endpointLabel: 'POST /vedic-astrology/divisional-chart',
|
|
190
|
+
docsSummary:
|
|
191
|
+
'Generic divisional varga wheel from D2 Hora to D60 Shashtiamsa',
|
|
192
|
+
topic: 'Vedic',
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
pascal: 'RoxyAshtakavargaGrid',
|
|
196
|
+
tag: 'roxy-ashtakavarga-grid',
|
|
197
|
+
slug: 'ashtakavarga-grid',
|
|
198
|
+
heading: 'Ashtakavarga',
|
|
199
|
+
description: 'Sarva and Bhinna ashtakavarga heatmap with bindu scores',
|
|
200
|
+
docsLabel: 'Vedic',
|
|
201
|
+
endpointLabel: 'POST /vedic-astrology/ashtakavarga',
|
|
202
|
+
docsSummary: 'Sarva, Bhinna, and Shodhya Pinda views in a tabbed heatmap',
|
|
203
|
+
topic: 'Vedic',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
pascal: 'RoxyShadbalaTable',
|
|
207
|
+
tag: 'roxy-shadbala-table',
|
|
208
|
+
slug: 'shadbala-table',
|
|
209
|
+
heading: 'Shadbala',
|
|
210
|
+
description: 'Six-fold planetary strength with adequacy badge per planet',
|
|
211
|
+
docsLabel: 'Vedic',
|
|
212
|
+
endpointLabel: 'POST /vedic-astrology/shadbala',
|
|
213
|
+
docsSummary:
|
|
214
|
+
'Six-fold planetary strength bar plus rupas and adequacy badge',
|
|
215
|
+
topic: 'Vedic',
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
pascal: 'RoxyYogaList',
|
|
219
|
+
tag: 'roxy-yoga-list',
|
|
220
|
+
slug: 'yoga-list',
|
|
221
|
+
heading: 'Yoga catalog',
|
|
222
|
+
description:
|
|
223
|
+
'Yoga reference cards from the catalog with optional detail mode',
|
|
224
|
+
docsLabel: 'Vedic',
|
|
225
|
+
endpointLabel: 'GET /vedic-astrology/yoga, /yoga/{id}',
|
|
226
|
+
docsSummary: 'Filterable yoga cards from the 300 plus yoga catalog',
|
|
227
|
+
topic: 'Vedic',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
pascal: 'RoxyChoghadiyaGrid',
|
|
231
|
+
tag: 'roxy-choghadiya-grid',
|
|
232
|
+
slug: 'choghadiya-grid',
|
|
233
|
+
heading: 'Choghadiya',
|
|
234
|
+
description: 'Day and night Choghadiya muhurta tiles for activity timing',
|
|
235
|
+
docsLabel: 'Vedic',
|
|
236
|
+
endpointLabel: 'POST /vedic-astrology/panchang/choghadiya',
|
|
237
|
+
docsSummary: 'Day and night Choghadiya muhurta tiles colored by effect',
|
|
238
|
+
topic: 'Vedic',
|
|
239
|
+
},
|
|
228
240
|
{
|
|
229
241
|
pascal: 'RoxyNumerologyCard',
|
|
230
242
|
tag: 'roxy-numerology-card',
|
|
231
243
|
slug: 'numerology-card',
|
|
232
|
-
domain: 'numerology',
|
|
233
244
|
heading: 'Life path number',
|
|
234
|
-
endpoints: [
|
|
235
|
-
'numerology.calculateLifePath',
|
|
236
|
-
'numerology.calculateExpression',
|
|
237
|
-
'numerology.calculatePersonalYear',
|
|
238
|
-
'numerology.generateNumerologyChart',
|
|
239
|
-
],
|
|
240
245
|
description:
|
|
241
246
|
'Numerology card for life path, expression, personal year, or full chart',
|
|
242
247
|
docsLabel: 'Numerology',
|
|
@@ -249,9 +254,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
249
254
|
pascal: 'RoxyTarotCard',
|
|
250
255
|
tag: 'roxy-tarot-card',
|
|
251
256
|
slug: 'tarot-card',
|
|
252
|
-
domain: 'tarot',
|
|
253
257
|
heading: 'Daily tarot card',
|
|
254
|
-
endpoints: ['tarot.getCard', 'tarot.getDailyCard'],
|
|
255
258
|
description: 'Single tarot card with upright/reversed flip animation',
|
|
256
259
|
docsLabel: 'Tarot',
|
|
257
260
|
endpointLabel: 'GET /tarot/cards/{id}, POST /tarot/daily',
|
|
@@ -262,15 +265,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
262
265
|
pascal: 'RoxyTarotSpread',
|
|
263
266
|
tag: 'roxy-tarot-spread',
|
|
264
267
|
slug: 'tarot-spread',
|
|
265
|
-
domain: 'tarot',
|
|
266
268
|
heading: 'Three-card spread',
|
|
267
|
-
endpoints: [
|
|
268
|
-
'tarot.castThreeCard',
|
|
269
|
-
'tarot.castCelticCross',
|
|
270
|
-
'tarot.castLoveSpread',
|
|
271
|
-
'tarot.castYesNo',
|
|
272
|
-
'tarot.drawCards',
|
|
273
|
-
],
|
|
274
269
|
description:
|
|
275
270
|
'Tarot spread renderer for three-card, Celtic Cross, love, or yes/no',
|
|
276
271
|
docsLabel: 'Tarot',
|
|
@@ -283,13 +278,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
283
278
|
pascal: 'RoxyBiorhythmChart',
|
|
284
279
|
tag: 'roxy-biorhythm-chart',
|
|
285
280
|
slug: 'biorhythm-chart',
|
|
286
|
-
domain: 'biorhythm',
|
|
287
281
|
heading: 'Daily biorhythm',
|
|
288
|
-
endpoints: [
|
|
289
|
-
'biorhythm.getDailyBiorhythm',
|
|
290
|
-
'biorhythm.getForecast',
|
|
291
|
-
'biorhythm.getCriticalDays',
|
|
292
|
-
],
|
|
293
282
|
description: 'Daily biorhythm bars or multi-day forecast cycle lines',
|
|
294
283
|
docsLabel: 'Biorhythm',
|
|
295
284
|
endpointLabel: 'POST /biorhythm/{daily,forecast,critical-days}',
|
|
@@ -300,15 +289,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
300
289
|
pascal: 'RoxyHexagram',
|
|
301
290
|
tag: 'roxy-hexagram',
|
|
302
291
|
slug: 'hexagram',
|
|
303
|
-
domain: 'iching',
|
|
304
292
|
heading: 'I Ching hexagram',
|
|
305
|
-
endpoints: [
|
|
306
|
-
'iching.getHexagram',
|
|
307
|
-
'iching.castReading',
|
|
308
|
-
'iching.getDailyHexagram',
|
|
309
|
-
'iching.castDailyReading',
|
|
310
|
-
'iching.getRandomHexagram',
|
|
311
|
-
],
|
|
312
293
|
description:
|
|
313
294
|
'I Ching hexagram with trigram glyphs, judgment, image, and changing lines',
|
|
314
295
|
docsLabel: 'I Ching',
|
|
@@ -321,9 +302,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
321
302
|
pascal: 'RoxyEndpointForm',
|
|
322
303
|
tag: 'roxy-endpoint-form',
|
|
323
304
|
slug: 'endpoint-form',
|
|
324
|
-
domain: 'utility',
|
|
325
305
|
heading: 'Schema-driven form',
|
|
326
|
-
endpoints: [],
|
|
327
306
|
description:
|
|
328
307
|
'Schema-driven form that emits roxy-submit with a validated payload',
|
|
329
308
|
docsLabel: 'Helper',
|
|
@@ -336,9 +315,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
336
315
|
pascal: 'RoxyLocationSearch',
|
|
337
316
|
tag: 'roxy-location-search',
|
|
338
317
|
slug: 'location-search',
|
|
339
|
-
domain: 'utility',
|
|
340
318
|
heading: 'City search',
|
|
341
|
-
endpoints: ['location.searchCities'],
|
|
342
319
|
description: 'City search input with debounced /location/search calls',
|
|
343
320
|
docsLabel: 'Helper',
|
|
344
321
|
endpointLabel: 'GET /location/search',
|
|
@@ -350,9 +327,7 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
350
327
|
pascal: 'RoxyData',
|
|
351
328
|
tag: 'roxy-data',
|
|
352
329
|
slug: 'data',
|
|
353
|
-
domain: 'utility',
|
|
354
330
|
heading: 'Generic renderer',
|
|
355
|
-
endpoints: [],
|
|
356
331
|
description: 'Generic fallback renderer for any OpenAPI response shape',
|
|
357
332
|
docsLabel: 'Helper',
|
|
358
333
|
endpointLabel: 'Any response shape',
|
|
@@ -362,5 +337,4 @@ export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
|
362
337
|
},
|
|
363
338
|
];
|
|
364
339
|
|
|
365
|
-
export type RoxyComponentTag = (typeof ROXY_COMPONENTS)[number]['tag'];
|
|
366
340
|
export type RoxyComponentSlug = (typeof ROXY_COMPONENTS)[number]['slug'];
|
package/src/styles/tokens.css
CHANGED
|
@@ -89,6 +89,16 @@
|
|
|
89
89
|
/* Motion */
|
|
90
90
|
--roxy-motion-duration: 200ms;
|
|
91
91
|
--roxy-motion-easing: cubic-bezier(0.4, 0, 0.2, 1);
|
|
92
|
+
|
|
93
|
+
/* Heat scale: 7-step gradient used by ashtakavarga bindu cells.
|
|
94
|
+
* Low bindus (1) are cool green; high bindus (7+) are hot red. */
|
|
95
|
+
--roxy-heat-1: #f0fdf4;
|
|
96
|
+
--roxy-heat-2: #d1fae5;
|
|
97
|
+
--roxy-heat-3: #a7f3d0;
|
|
98
|
+
--roxy-heat-4: #fde68a;
|
|
99
|
+
--roxy-heat-5: #fdba74;
|
|
100
|
+
--roxy-heat-6: #fb923c;
|
|
101
|
+
--roxy-heat-7: #ef4444;
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
/* Dark theme via system preference */
|
|
@@ -123,6 +133,14 @@
|
|
|
123
133
|
--roxy-shadow-md:
|
|
124
134
|
0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
|
|
125
135
|
--roxy-shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.7);
|
|
136
|
+
|
|
137
|
+
--roxy-heat-1: #052e16;
|
|
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;
|
|
126
144
|
}
|
|
127
145
|
}
|
|
128
146
|
|
|
@@ -182,6 +200,14 @@
|
|
|
182
200
|
--roxy-shadow-md:
|
|
183
201
|
0 4px 6px -1px rgba(0, 0, 0, 0.6), 0 2px 4px -2px rgba(0, 0, 0, 0.5);
|
|
184
202
|
--roxy-shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.7);
|
|
203
|
+
|
|
204
|
+
--roxy-heat-1: #052e16;
|
|
205
|
+
--roxy-heat-2: #14532d;
|
|
206
|
+
--roxy-heat-3: #166534;
|
|
207
|
+
--roxy-heat-4: #92400e;
|
|
208
|
+
--roxy-heat-5: #b45309;
|
|
209
|
+
--roxy-heat-6: #c2410c;
|
|
210
|
+
--roxy-heat-7: #b91c1c;
|
|
185
211
|
}
|
|
186
212
|
|
|
187
213
|
/* Reduced motion override */
|
package/src/tokens/index.ts
CHANGED
|
@@ -91,6 +91,15 @@ export const SIGNS_ORDER = [
|
|
|
91
91
|
'Pisces',
|
|
92
92
|
] as const;
|
|
93
93
|
|
|
94
|
+
/**
|
|
95
|
+
* Lowercase rashi keys in canonical zodiac order. Derived from `SIGNS_ORDER`
|
|
96
|
+
* so the two stay in lockstep. The /vedic-astrology/birth-chart response
|
|
97
|
+
* carries planet buckets keyed by these names.
|
|
98
|
+
*/
|
|
99
|
+
export const RASHI_KEYS = SIGNS_ORDER.map((s) =>
|
|
100
|
+
s.toLowerCase(),
|
|
101
|
+
) as readonly Lowercase<(typeof SIGNS_ORDER)[number]>[];
|
|
102
|
+
|
|
94
103
|
/** Aspect symbols. Used by synastry and natal chart aspect tables. */
|
|
95
104
|
export const ASPECT_SYMBOL: Record<string, string> = {
|
|
96
105
|
conjunction: '☌',
|
package/src/types/types.gen.ts
CHANGED
|
@@ -27907,7 +27907,7 @@ export type ListCountriesData = {
|
|
|
27907
27907
|
path?: never;
|
|
27908
27908
|
query?: {
|
|
27909
27909
|
/**
|
|
27910
|
-
* Maximum items to return per page. Range: 1-
|
|
27910
|
+
* Maximum items to return per page. Range: 1-250, default 50.
|
|
27911
27911
|
*/
|
|
27912
27912
|
limit?: number;
|
|
27913
27913
|
/**
|
|
@@ -28075,7 +28075,7 @@ export type GetCitiesByCountryData = {
|
|
|
28075
28075
|
};
|
|
28076
28076
|
query?: {
|
|
28077
28077
|
/**
|
|
28078
|
-
* Maximum items to return per page. Range: 1-
|
|
28078
|
+
* Maximum items to return per page. Range: 1-100, default 20.
|
|
28079
28079
|
*/
|
|
28080
28080
|
limit?: number;
|
|
28081
28081
|
/**
|
package/src/utils/format.ts
CHANGED
|
@@ -51,7 +51,25 @@ export function formatPercent(value: unknown, dp = 1): string {
|
|
|
51
51
|
return n ? `${n}%` : '';
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
/**
|
|
55
|
+
* CSS class name per aspect type. Used by natal and synastry chart aspect
|
|
56
|
+
* lines so the same color encoding (harmonious vs challenging) applies in
|
|
57
|
+
* both wheels. Keys are lowercase canonical names, values are CSS class
|
|
58
|
+
* suffixes the chart components define in their `:host` styles.
|
|
59
|
+
*/
|
|
60
|
+
export const ASPECT_CLASS: Record<string, string> = {
|
|
61
|
+
conjunction: 'aspect-conjunction',
|
|
62
|
+
sextile: 'aspect-sextile',
|
|
63
|
+
square: 'aspect-square',
|
|
64
|
+
trine: 'aspect-trine',
|
|
65
|
+
opposition: 'aspect-opposition',
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Normalize an aspect entry's `type` field to a lowercase, hyphen-separated
|
|
70
|
+
* canonical name (`SEMI_SEXTILE` → `semi-sextile`). Accepts any aspect-shaped
|
|
71
|
+
* object so both natal and synastry inter-aspect entries can share this.
|
|
72
|
+
*/
|
|
73
|
+
export function normalizeAspect(a: { type?: string }): string {
|
|
74
|
+
return (a.type ?? '').toLowerCase().replace(/_/g, '-');
|
|
57
75
|
}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import type { TemplateResult } from 'lit';
|
|
2
|
+
import { nothing, svg } from 'lit';
|
|
3
|
+
import { PLANET_ABBR, SIGN_ABBR, SIGNS_ORDER } from '../tokens/index.js';
|
|
4
|
+
import { capitalize } from './string.js';
|
|
5
|
+
|
|
6
|
+
export const KUNDLI_SIZE = 300;
|
|
7
|
+
export const KUNDLI_CENTER = 150;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Maps a lowercase rashi key (e.g. "aries") back to its canonical sign name
|
|
11
|
+
* (e.g. "Aries"). Used by every kundli consumer to bridge spec lowercase
|
|
12
|
+
* rashi keys to the title-cased SIGNS_ORDER tokens.
|
|
13
|
+
*/
|
|
14
|
+
export const RASHI_TO_SIGN: Record<string, string> = Object.fromEntries(
|
|
15
|
+
SIGNS_ORDER.map((s) => [s.toLowerCase(), s] as const),
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* South Indian fixed-house square grid: house centers for planet text labels.
|
|
20
|
+
* House 1 is fixed top-center; positions are in the 300x300 viewBox.
|
|
21
|
+
*/
|
|
22
|
+
export const SOUTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {
|
|
23
|
+
1: { x: 150, y: 58 },
|
|
24
|
+
2: { x: 205, y: 52 },
|
|
25
|
+
3: { x: 253, y: 112 },
|
|
26
|
+
4: { x: 243, y: 150 },
|
|
27
|
+
5: { x: 253, y: 188 },
|
|
28
|
+
6: { x: 205, y: 248 },
|
|
29
|
+
7: { x: 150, y: 242 },
|
|
30
|
+
8: { x: 95, y: 248 },
|
|
31
|
+
9: { x: 47, y: 188 },
|
|
32
|
+
10: { x: 57, y: 150 },
|
|
33
|
+
11: { x: 47, y: 112 },
|
|
34
|
+
12: { x: 95, y: 52 },
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* South Indian sign abbreviation positions (slightly outward from center).
|
|
39
|
+
*/
|
|
40
|
+
export const SOUTH_SIGN_POSITIONS: Record<number, { x: number; y: number }> = {
|
|
41
|
+
1: { x: 150, y: 35 },
|
|
42
|
+
2: { x: 222, y: 40 },
|
|
43
|
+
3: { x: 265, y: 100 },
|
|
44
|
+
4: { x: 265, y: 150 },
|
|
45
|
+
5: { x: 265, y: 200 },
|
|
46
|
+
6: { x: 222, y: 260 },
|
|
47
|
+
7: { x: 150, y: 265 },
|
|
48
|
+
8: { x: 78, y: 260 },
|
|
49
|
+
9: { x: 35, y: 200 },
|
|
50
|
+
10: { x: 35, y: 150 },
|
|
51
|
+
11: { x: 35, y: 100 },
|
|
52
|
+
12: { x: 78, y: 40 },
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* North Indian style: 12 triangular house positions.
|
|
57
|
+
* Lagna (house 1) is the top diamond, numbered clockwise.
|
|
58
|
+
* Centers represent the visual midpoint of each triangular cell.
|
|
59
|
+
*/
|
|
60
|
+
export const NORTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {
|
|
61
|
+
1: { x: 150, y: 60 },
|
|
62
|
+
2: { x: 225, y: 100 },
|
|
63
|
+
3: { x: 255, y: 150 },
|
|
64
|
+
4: { x: 225, y: 200 },
|
|
65
|
+
5: { x: 150, y: 240 },
|
|
66
|
+
6: { x: 75, y: 200 },
|
|
67
|
+
7: { x: 45, y: 150 },
|
|
68
|
+
8: { x: 75, y: 100 },
|
|
69
|
+
9: { x: 100, y: 80 },
|
|
70
|
+
10: { x: 150, y: 108 },
|
|
71
|
+
11: { x: 200, y: 80 },
|
|
72
|
+
12: { x: 200, y: 220 },
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export interface HouseDef {
|
|
76
|
+
/** 1-based house number. */
|
|
77
|
+
number: number;
|
|
78
|
+
/** Sign name (TitleCase, e.g. "Aries"). */
|
|
79
|
+
sign: string;
|
|
80
|
+
/** Planet abbreviation strings to display. */
|
|
81
|
+
planets: string[];
|
|
82
|
+
/** Whether this house is the ascendant (Lagna). */
|
|
83
|
+
isLagna: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Render a single house group: lagna highlight, sign abbreviation, planet labels.
|
|
88
|
+
* Returns an SVG fragment for use inside an `<svg>` element.
|
|
89
|
+
*/
|
|
90
|
+
export function renderSouthHouseGroup(
|
|
91
|
+
h: HouseDef,
|
|
92
|
+
): TemplateResult | typeof nothing {
|
|
93
|
+
const center = SOUTH_HOUSE_CENTERS[h.number];
|
|
94
|
+
const signPos = SOUTH_SIGN_POSITIONS[h.number];
|
|
95
|
+
if (!center || !signPos) return nothing;
|
|
96
|
+
const signAbbr = SIGN_ABBR[h.sign] ?? '';
|
|
97
|
+
const planets = h.planets;
|
|
98
|
+
return svg`
|
|
99
|
+
<g>
|
|
100
|
+
${
|
|
101
|
+
h.isLagna
|
|
102
|
+
? svg`<rect
|
|
103
|
+
class="lagna-bg"
|
|
104
|
+
x=${center.x - 30} y=${center.y - 28}
|
|
105
|
+
width="60" height="56" rx="6"
|
|
106
|
+
/>`
|
|
107
|
+
: nothing
|
|
108
|
+
}
|
|
109
|
+
${
|
|
110
|
+
signAbbr
|
|
111
|
+
? svg`<text class="sign-text" x=${signPos.x} y=${signPos.y} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>`
|
|
112
|
+
: nothing
|
|
113
|
+
}
|
|
114
|
+
${
|
|
115
|
+
h.isLagna
|
|
116
|
+
? svg`<text class="lagna-marker" x=${center.x} y=${center.y - 18} text-anchor="middle" dominant-baseline="central">LAGNA</text>`
|
|
117
|
+
: nothing
|
|
118
|
+
}
|
|
119
|
+
${planets.map((planet, j) => {
|
|
120
|
+
const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
|
|
121
|
+
const lineHeight = 13;
|
|
122
|
+
const baseY = h.isLagna ? center.y + 8 : center.y;
|
|
123
|
+
const startY = baseY - ((planets.length - 1) * lineHeight) / 2;
|
|
124
|
+
const yPos = startY + j * lineHeight;
|
|
125
|
+
return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
|
|
126
|
+
})}
|
|
127
|
+
</g>
|
|
128
|
+
`;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Render a north-Indian-style kundli wheel frame (grid lines only).
|
|
133
|
+
* Returns the SVG structural lines; call `renderNorthHouseGroup` for content.
|
|
134
|
+
*/
|
|
135
|
+
export function renderNorthFrame(): TemplateResult {
|
|
136
|
+
return svg`
|
|
137
|
+
<polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
|
|
138
|
+
<line class="line" x1="150" y1="10" x2="150" y2="290" stroke-width="1" />
|
|
139
|
+
<line class="line" x1="10" y1="150" x2="290" y2="150" stroke-width="1" />
|
|
140
|
+
<line class="line" x1="150" y1="10" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
141
|
+
<line class="line" x1="150" y1="10" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
142
|
+
<line class="line" x1="150" y1="290" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
143
|
+
<line class="line" x1="150" y1="290" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
144
|
+
`;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Render a north-Indian house group (sign abbr + house number + planets).
|
|
149
|
+
*/
|
|
150
|
+
export function renderNorthHouseGroup(
|
|
151
|
+
h: HouseDef,
|
|
152
|
+
): TemplateResult | typeof nothing {
|
|
153
|
+
const center = NORTH_HOUSE_CENTERS[h.number];
|
|
154
|
+
if (!center) return nothing;
|
|
155
|
+
const signAbbr = SIGN_ABBR[h.sign] ?? '';
|
|
156
|
+
const planets = h.planets;
|
|
157
|
+
return svg`
|
|
158
|
+
<g>
|
|
159
|
+
${
|
|
160
|
+
h.isLagna
|
|
161
|
+
? svg`<circle class="lagna-bg" cx=${center.x} cy=${center.y} r="22" />`
|
|
162
|
+
: nothing
|
|
163
|
+
}
|
|
164
|
+
${
|
|
165
|
+
signAbbr
|
|
166
|
+
? svg`<text class="sign-text" x=${center.x} y=${center.y - 10} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>`
|
|
167
|
+
: nothing
|
|
168
|
+
}
|
|
169
|
+
<text class="house-num" x=${center.x} y=${center.y + 2} text-anchor="middle" dominant-baseline="central">${h.number}</text>
|
|
170
|
+
${planets.map((planet, j) => {
|
|
171
|
+
const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
|
|
172
|
+
const lineHeight = 11;
|
|
173
|
+
const startY = center.y + 14 - ((planets.length - 1) * lineHeight) / 2;
|
|
174
|
+
const yPos = startY + j * lineHeight;
|
|
175
|
+
return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
|
|
176
|
+
})}
|
|
177
|
+
</g>
|
|
178
|
+
`;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Render the south-Indian square frame (border diamond + inner square + radial lines).
|
|
183
|
+
*/
|
|
184
|
+
export function renderSouthFrame(): TemplateResult {
|
|
185
|
+
return svg`
|
|
186
|
+
<polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
|
|
187
|
+
<polygon class="line" points="220,80 220,220 80,220 80,80" stroke-width="1" fill="none" />
|
|
188
|
+
<line class="line" x1="150" y1="10" x2="80" y2="80" stroke-width="1" />
|
|
189
|
+
<line class="line" x1="150" y1="10" x2="220" y2="80" stroke-width="1" />
|
|
190
|
+
<line class="line" x1="290" y1="150" x2="220" y2="80" stroke-width="1" />
|
|
191
|
+
<line class="line" x1="290" y1="150" x2="220" y2="220" stroke-width="1" />
|
|
192
|
+
<line class="line" x1="150" y1="290" x2="220" y2="220" stroke-width="1" />
|
|
193
|
+
<line class="line" x1="150" y1="290" x2="80" y2="220" stroke-width="1" />
|
|
194
|
+
<line class="line" x1="10" y1="150" x2="80" y2="220" stroke-width="1" />
|
|
195
|
+
<line class="line" x1="10" y1="150" x2="80" y2="80" stroke-width="1" />
|
|
196
|
+
`;
|
|
197
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared string helpers used across components. Single source of truth so the
|
|
3
|
+
* same formatting rules apply to every key/label/title that surfaces in the
|
|
4
|
+
* shadow tree.
|
|
5
|
+
*
|
|
6
|
+
* - `capitalize`: title-cases the first character, lowercases the rest. Used
|
|
7
|
+
* when matching API-supplied planet/sign names against the glyph maps in
|
|
8
|
+
* `tokens/index.ts`, which use canonical TitleCase keys.
|
|
9
|
+
* - `humanize`: turns an API key (`birth_date`, `birthDate`, `mahadasha-end`)
|
|
10
|
+
* into a label suitable for display ("Birth date", "Mahadasha end").
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export function capitalize(s: string): string {
|
|
14
|
+
if (!s) return '';
|
|
15
|
+
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function humanize(s: string): string {
|
|
19
|
+
return s
|
|
20
|
+
.replace(/[_-]+/g, ' ')
|
|
21
|
+
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
|
22
|
+
.replace(/^\w/, (c) => c.toUpperCase());
|
|
23
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/sync-version.ts. Do not edit.
|
|
2
|
-
export const ROXY_UI_VERSION = '0.1
|
|
2
|
+
export const ROXY_UI_VERSION = '0.2.1';
|