@roxyapi/ui 0.1.1 → 0.1.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/AGENTS.md +2 -2
- package/LICENSE +21 -0
- package/README.md +505 -0
- package/THEMING.md +24 -7
- package/dist/cdn/components/biorhythm-chart.js +15 -22
- package/dist/cdn/components/biorhythm-chart.js.map +3 -3
- package/dist/cdn/components/compatibility-card.js +36 -34
- package/dist/cdn/components/compatibility-card.js.map +4 -4
- package/dist/cdn/components/dasha-timeline.js +35 -39
- package/dist/cdn/components/dasha-timeline.js.map +4 -4
- package/dist/cdn/components/data.js +6 -6
- package/dist/cdn/components/data.js.map +3 -3
- package/dist/cdn/components/dosha-card.js +13 -13
- package/dist/cdn/components/dosha-card.js.map +2 -2
- package/dist/cdn/components/endpoint-form.js +47 -28
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/components/guna-milan.js +18 -18
- package/dist/cdn/components/guna-milan.js.map +4 -4
- package/dist/cdn/components/hexagram.js +26 -26
- package/dist/cdn/components/hexagram.js.map +3 -3
- package/dist/cdn/components/horoscope-card.js +38 -38
- package/dist/cdn/components/horoscope-card.js.map +3 -3
- package/dist/cdn/components/kp-planets-table.js +10 -10
- package/dist/cdn/components/kp-planets-table.js.map +4 -4
- package/dist/cdn/components/location-search.js +6 -6
- package/dist/cdn/components/location-search.js.map +3 -3
- package/dist/cdn/components/moon-phase.js +21 -21
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +61 -19
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +40 -31
- package/dist/cdn/components/numerology-card.js.map +3 -3
- package/dist/cdn/components/panchang-table.js +25 -25
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/synastry-chart.js +129 -39
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/tarot-card.js +49 -20
- package/dist/cdn/components/tarot-card.js.map +3 -3
- package/dist/cdn/components/tarot-spread.js +43 -27
- package/dist/cdn/components/tarot-spread.js.map +3 -3
- package/dist/cdn/components/vedic-kundli.js +23 -9
- package/dist/cdn/components/vedic-kundli.js.map +3 -3
- package/dist/cdn/roxy-ui.js +560 -350
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/biorhythm-chart.d.ts +2 -46
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +24 -23
- package/dist/components/biorhythm-chart.js.map +2 -2
- package/dist/components/compatibility-card.d.ts +2 -27
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +50 -29
- package/dist/components/compatibility-card.js.map +3 -3
- package/dist/components/dasha-timeline.d.ts +2 -31
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +32 -30
- package/dist/components/dasha-timeline.js.map +3 -3
- package/dist/components/data.d.ts +6 -0
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +9 -1
- package/dist/components/data.js.map +2 -2
- package/dist/components/dosha-card.d.ts +2 -16
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +12 -13
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.d.ts +2 -0
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +66 -8
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/guna-milan.d.ts +2 -20
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +22 -12
- package/dist/components/guna-milan.js.map +3 -3
- package/dist/components/hexagram.d.ts +3 -27
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +31 -15
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.d.ts +2 -20
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +24 -15
- package/dist/components/horoscope-card.js.map +2 -2
- package/dist/components/kp-planets-table.d.ts +2 -21
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +10 -4
- package/dist/components/kp-planets-table.js.map +3 -3
- package/dist/components/location-search.d.ts +3 -11
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js +45 -5
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.d.ts +4 -21
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +17 -4
- package/dist/components/moon-phase.js.map +3 -3
- package/dist/components/natal-chart.d.ts +7 -43
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +130 -70
- package/dist/components/natal-chart.js.map +3 -3
- package/dist/components/numerology-card.d.ts +5 -37
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +54 -28
- package/dist/components/numerology-card.js.map +2 -2
- package/dist/components/panchang-table.d.ts +3 -62
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +62 -32
- package/dist/components/panchang-table.js.map +3 -3
- package/dist/components/synastry-chart.d.ts +9 -28
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +178 -38
- package/dist/components/synastry-chart.js.map +3 -3
- package/dist/components/tarot-card.d.ts +5 -29
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +59 -20
- package/dist/components/tarot-card.js.map +2 -2
- package/dist/components/tarot-spread.d.ts +2 -24
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +39 -13
- package/dist/components/tarot-spread.js.map +2 -2
- package/dist/components/vedic-kundli.d.ts +3 -23
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +25 -13
- package/dist/components/vedic-kundli.js.map +2 -2
- package/dist/index.cjs +1149 -358
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1149 -358
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts +49 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/styles/tokens.css +47 -1
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.gen.d.ts +27811 -0
- package/dist/types/types.gen.d.ts.map +1 -0
- package/dist/utils/debounce.d.ts +9 -1
- package/dist/utils/debounce.d.ts.map +1 -1
- package/dist/utils/format.d.ts +15 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +9 -1
- package/src/components/biorhythm-chart.ts +39 -84
- package/src/components/compatibility-card.ts +85 -52
- package/src/components/dasha-timeline.ts +55 -73
- package/src/components/data.ts +20 -1
- package/src/components/dosha-card.ts +18 -31
- package/src/components/endpoint-form.ts +79 -11
- package/src/components/guna-milan.ts +16 -34
- package/src/components/hexagram.ts +53 -43
- package/src/components/horoscope-card.ts +51 -39
- package/src/components/kp-planets-table.ts +8 -27
- package/src/components/location-search.ts +45 -20
- package/src/components/moon-phase.ts +28 -25
- package/src/components/natal-chart.ts +129 -84
- package/src/components/numerology-card.ts +87 -79
- package/src/components/panchang-table.ts +40 -78
- package/src/components/synastry-chart.ts +220 -78
- package/src/components/tarot-card.ts +76 -62
- package/src/components/tarot-spread.ts +72 -45
- package/src/components/vedic-kundli.ts +42 -51
- package/src/index.ts +14 -24
- package/src/manifest.ts +366 -0
- package/src/styles/tokens.css +47 -1
- package/src/tokens/index.ts +5 -0
- package/src/types/types.gen.ts +1 -1
- package/src/utils/debounce.ts +23 -4
- package/src/utils/format.ts +57 -0
- package/src/version.ts +2 -0
package/src/manifest.ts
ADDED
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for component metadata. Every consumer that needs
|
|
3
|
+
* the (tag, pascal, slug, domain, description, heading, endpoints) tuple
|
|
4
|
+
* reads from here: scripts/build-react.ts, scripts/build-registry.ts,
|
|
5
|
+
* scripts/sync-docs.ts, scripts/build-widgets.ts, and the browser-side
|
|
6
|
+
* apps/docs/manifest.js (mirrored at build time).
|
|
7
|
+
*
|
|
8
|
+
* Hand-maintained. Add a component → add one entry here. The OpenAPI spec
|
|
9
|
+
* does not yet carry component metadata, so this stays manual.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type RoxyDomain =
|
|
13
|
+
| 'astrology'
|
|
14
|
+
| 'vedic'
|
|
15
|
+
| 'numerology'
|
|
16
|
+
| 'tarot'
|
|
17
|
+
| 'biorhythm'
|
|
18
|
+
| 'iching'
|
|
19
|
+
| 'utility';
|
|
20
|
+
|
|
21
|
+
export interface RoxyComponent {
|
|
22
|
+
/** Pascal-case React export name, e.g. RoxyNatalChart */
|
|
23
|
+
pascal: string;
|
|
24
|
+
/** Custom-element tag, e.g. roxy-natal-chart */
|
|
25
|
+
tag: string;
|
|
26
|
+
/** Slug used in registry filenames and shadcn paths, e.g. natal-chart */
|
|
27
|
+
slug: string;
|
|
28
|
+
/** Domain bucket for filtering. */
|
|
29
|
+
domain: RoxyDomain;
|
|
30
|
+
/** Short human-readable heading shown on demo cards. */
|
|
31
|
+
heading: string;
|
|
32
|
+
/** SDK methods this component is designed to render. */
|
|
33
|
+
endpoints: string[];
|
|
34
|
+
/** One-line description for registry / docs / SEO meta. */
|
|
35
|
+
description: string;
|
|
36
|
+
/** Domain column label in the synced README/AGENTS table. */
|
|
37
|
+
docsLabel: string;
|
|
38
|
+
/** Endpoint(s) column body in the synced README/AGENTS table. */
|
|
39
|
+
endpointLabel: string;
|
|
40
|
+
/** What-it-renders column body in the synced README/AGENTS table. */
|
|
41
|
+
docsSummary: string;
|
|
42
|
+
/** Filter category in the browser demo grid. */
|
|
43
|
+
topic: string;
|
|
44
|
+
/**
|
|
45
|
+
* True when the component does not consume a typed RoxyAPI response from a
|
|
46
|
+
* customer server route. Three cases today:
|
|
47
|
+
* - <roxy-data>: pure renderer, accepts any shape, no fetch.
|
|
48
|
+
* - <roxy-location-search>: calls /location/search itself via publishable key.
|
|
49
|
+
* - <roxy-endpoint-form>: introspects the OpenAPI spec, emits roxy-submit.
|
|
50
|
+
* The shadcn registry codegen emits a different doc body for these so we
|
|
51
|
+
* never document a server route example with an undefined `data` reference.
|
|
52
|
+
*/
|
|
53
|
+
selfFetching?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const ROXY_COMPONENTS: readonly RoxyComponent[] = [
|
|
57
|
+
{
|
|
58
|
+
pascal: 'RoxyNatalChart',
|
|
59
|
+
tag: 'roxy-natal-chart',
|
|
60
|
+
slug: 'natal-chart',
|
|
61
|
+
domain: 'astrology',
|
|
62
|
+
heading: 'Natal chart',
|
|
63
|
+
endpoints: ['astrology.generateNatalChart'],
|
|
64
|
+
description:
|
|
65
|
+
'Western natal chart wheel for /astrology/natal-chart responses',
|
|
66
|
+
docsLabel: 'Western',
|
|
67
|
+
endpointLabel: 'POST /astrology/natal-chart',
|
|
68
|
+
docsSummary: 'Natal chart wheel with planet glyphs and aspect lines',
|
|
69
|
+
topic: 'Astrology',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
pascal: 'RoxyHoroscopeCard',
|
|
73
|
+
tag: 'roxy-horoscope-card',
|
|
74
|
+
slug: 'horoscope-card',
|
|
75
|
+
domain: 'astrology',
|
|
76
|
+
heading: 'Daily horoscope',
|
|
77
|
+
endpoints: [
|
|
78
|
+
'astrology.getDailyHoroscope',
|
|
79
|
+
'astrology.getWeeklyHoroscope',
|
|
80
|
+
'astrology.getMonthlyHoroscope',
|
|
81
|
+
],
|
|
82
|
+
description:
|
|
83
|
+
'Daily, weekly, or monthly horoscope card for /astrology/horoscope/...',
|
|
84
|
+
docsLabel: 'Western',
|
|
85
|
+
endpointLabel: 'GET /astrology/horoscope/{sign}/{daily,weekly,monthly}',
|
|
86
|
+
docsSummary: 'Daily, weekly, or monthly horoscope card',
|
|
87
|
+
topic: 'Astrology',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
pascal: 'RoxySynastryChart',
|
|
91
|
+
tag: 'roxy-synastry-chart',
|
|
92
|
+
slug: 'synastry-chart',
|
|
93
|
+
domain: 'astrology',
|
|
94
|
+
heading: 'Synastry',
|
|
95
|
+
endpoints: ['astrology.calculateSynastry'],
|
|
96
|
+
description: 'Dual-wheel synastry chart with inter-aspects table',
|
|
97
|
+
docsLabel: 'Western',
|
|
98
|
+
endpointLabel: 'POST /astrology/synastry',
|
|
99
|
+
docsSummary: 'Dual-wheel synastry with inter-aspects table',
|
|
100
|
+
topic: 'Astrology',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
pascal: 'RoxyCompatibilityCard',
|
|
104
|
+
tag: 'roxy-compatibility-card',
|
|
105
|
+
slug: 'compatibility-card',
|
|
106
|
+
domain: 'astrology',
|
|
107
|
+
heading: 'Compatibility score',
|
|
108
|
+
endpoints: [
|
|
109
|
+
'astrology.calculateCompatibility',
|
|
110
|
+
'numerology.calculateNumCompatibility',
|
|
111
|
+
'biorhythm.calculateBioCompatibility',
|
|
112
|
+
],
|
|
113
|
+
description: 'Cross-domain compatibility score card',
|
|
114
|
+
docsLabel: 'Cross',
|
|
115
|
+
endpointLabel:
|
|
116
|
+
'POST /astrology/compatibility-score, /numerology/compatibility, /biorhythm/compatibility',
|
|
117
|
+
docsSummary: 'Score card with category breakdown',
|
|
118
|
+
topic: 'Astrology',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
pascal: 'RoxyMoonPhase',
|
|
122
|
+
tag: 'roxy-moon-phase',
|
|
123
|
+
slug: 'moon-phase',
|
|
124
|
+
domain: 'astrology',
|
|
125
|
+
heading: 'Moon phase',
|
|
126
|
+
endpoints: [
|
|
127
|
+
'astrology.getCurrentMoonPhase',
|
|
128
|
+
'astrology.getUpcomingMoonPhases',
|
|
129
|
+
'astrology.getMoonCalendar',
|
|
130
|
+
],
|
|
131
|
+
description: 'Moon phase card and calendar',
|
|
132
|
+
docsLabel: 'Western',
|
|
133
|
+
endpointLabel: 'GET /astrology/moon-phase/{current,upcoming,calendar/...}',
|
|
134
|
+
docsSummary: 'Moon phase card and calendar',
|
|
135
|
+
topic: 'Astrology',
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
pascal: 'RoxyVedicKundli',
|
|
139
|
+
tag: 'roxy-vedic-kundli',
|
|
140
|
+
slug: 'vedic-kundli',
|
|
141
|
+
domain: 'vedic',
|
|
142
|
+
heading: 'Vedic kundli',
|
|
143
|
+
endpoints: ['vedicAstrology.generateBirthChart'],
|
|
144
|
+
description:
|
|
145
|
+
'South or North Indian Vedic kundli for /vedic-astrology/birth-chart',
|
|
146
|
+
docsLabel: 'Vedic',
|
|
147
|
+
endpointLabel: 'POST /vedic-astrology/birth-chart',
|
|
148
|
+
docsSummary: 'South or North Indian kundli',
|
|
149
|
+
topic: 'Vedic',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
pascal: 'RoxyPanchangTable',
|
|
153
|
+
tag: 'roxy-panchang-table',
|
|
154
|
+
slug: 'panchang-table',
|
|
155
|
+
domain: 'vedic',
|
|
156
|
+
heading: 'Panchang',
|
|
157
|
+
endpoints: [
|
|
158
|
+
'vedicAstrology.getBasicPanchang',
|
|
159
|
+
'vedicAstrology.getDetailedPanchang',
|
|
160
|
+
],
|
|
161
|
+
description:
|
|
162
|
+
'Panchang muhurta table with auspicious and inauspicious periods',
|
|
163
|
+
docsLabel: 'Vedic',
|
|
164
|
+
endpointLabel: 'POST /vedic-astrology/panchang/{basic,detailed}',
|
|
165
|
+
docsSummary: '15+ muhurtas in detailed mode',
|
|
166
|
+
topic: 'Vedic',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
pascal: 'RoxyDashaTimeline',
|
|
170
|
+
tag: 'roxy-dasha-timeline',
|
|
171
|
+
slug: 'dasha-timeline',
|
|
172
|
+
domain: 'vedic',
|
|
173
|
+
heading: 'Vimshottari dasha',
|
|
174
|
+
endpoints: [
|
|
175
|
+
'vedicAstrology.getCurrentDasha',
|
|
176
|
+
'vedicAstrology.getMajorDashas',
|
|
177
|
+
'vedicAstrology.getSubDashas',
|
|
178
|
+
],
|
|
179
|
+
description: 'Vimshottari dasha timeline with active mahadasha highlighted',
|
|
180
|
+
docsLabel: 'Vedic',
|
|
181
|
+
endpointLabel: 'POST /vedic-astrology/dasha/{current,major,sub/...}',
|
|
182
|
+
docsSummary: 'Vimshottari mahadasha + antardasha + pratyantardasha',
|
|
183
|
+
topic: 'Vedic',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
pascal: 'RoxyDoshaCard',
|
|
187
|
+
tag: 'roxy-dosha-card',
|
|
188
|
+
slug: 'dosha-card',
|
|
189
|
+
domain: 'vedic',
|
|
190
|
+
heading: 'Manglik dosha',
|
|
191
|
+
endpoints: [
|
|
192
|
+
'vedicAstrology.checkManglikDosha',
|
|
193
|
+
'vedicAstrology.checkKalsarpaDosha',
|
|
194
|
+
'vedicAstrology.checkSadhesati',
|
|
195
|
+
],
|
|
196
|
+
description: 'Manglik, Kaal Sarp, or Sade Sati presence card',
|
|
197
|
+
docsLabel: 'Vedic',
|
|
198
|
+
endpointLabel: 'POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati}',
|
|
199
|
+
docsSummary: 'Presence, severity, remedies, scoped effects',
|
|
200
|
+
topic: 'Vedic',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
pascal: 'RoxyGunaMilan',
|
|
204
|
+
tag: 'roxy-guna-milan',
|
|
205
|
+
slug: 'guna-milan',
|
|
206
|
+
domain: 'vedic',
|
|
207
|
+
heading: 'Guna milan',
|
|
208
|
+
endpoints: ['vedicAstrology.calculateGunMilan'],
|
|
209
|
+
description: '36-point Ashtakoota matrimonial compatibility breakdown',
|
|
210
|
+
docsLabel: 'Vedic',
|
|
211
|
+
endpointLabel: 'POST /vedic-astrology/compatibility',
|
|
212
|
+
docsSummary: '36-point Ashtakoota with eight sub-scores',
|
|
213
|
+
topic: 'Vedic',
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
pascal: 'RoxyKpPlanetsTable',
|
|
217
|
+
tag: 'roxy-kp-planets-table',
|
|
218
|
+
slug: 'kp-planets-table',
|
|
219
|
+
domain: 'vedic',
|
|
220
|
+
heading: 'KP planets',
|
|
221
|
+
endpoints: ['vedicAstrology.getKpPlanets'],
|
|
222
|
+
description: 'KP planets table with sub-lord and sub-sub-lord columns',
|
|
223
|
+
docsLabel: 'Vedic (KP)',
|
|
224
|
+
endpointLabel: 'POST /vedic-astrology/kp/planets',
|
|
225
|
+
docsSummary: 'Sub-lord and sub-sub-lord columns',
|
|
226
|
+
topic: 'Vedic',
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
pascal: 'RoxyNumerologyCard',
|
|
230
|
+
tag: 'roxy-numerology-card',
|
|
231
|
+
slug: 'numerology-card',
|
|
232
|
+
domain: 'numerology',
|
|
233
|
+
heading: 'Life path number',
|
|
234
|
+
endpoints: [
|
|
235
|
+
'numerology.calculateLifePath',
|
|
236
|
+
'numerology.calculateExpression',
|
|
237
|
+
'numerology.calculatePersonalYear',
|
|
238
|
+
'numerology.generateNumerologyChart',
|
|
239
|
+
],
|
|
240
|
+
description:
|
|
241
|
+
'Numerology card for life path, expression, personal year, or full chart',
|
|
242
|
+
docsLabel: 'Numerology',
|
|
243
|
+
endpointLabel:
|
|
244
|
+
'POST /numerology/{life-path,expression,personal-year,chart}',
|
|
245
|
+
docsSummary: 'Life path, expression, personal year, full chart',
|
|
246
|
+
topic: 'Numerology',
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
pascal: 'RoxyTarotCard',
|
|
250
|
+
tag: 'roxy-tarot-card',
|
|
251
|
+
slug: 'tarot-card',
|
|
252
|
+
domain: 'tarot',
|
|
253
|
+
heading: 'Daily tarot card',
|
|
254
|
+
endpoints: ['tarot.getCard', 'tarot.getDailyCard'],
|
|
255
|
+
description: 'Single tarot card with upright/reversed flip animation',
|
|
256
|
+
docsLabel: 'Tarot',
|
|
257
|
+
endpointLabel: 'GET /tarot/cards/{id}, POST /tarot/daily',
|
|
258
|
+
docsSummary: 'Single card with upright and reversed flip',
|
|
259
|
+
topic: 'Tarot',
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
pascal: 'RoxyTarotSpread',
|
|
263
|
+
tag: 'roxy-tarot-spread',
|
|
264
|
+
slug: 'tarot-spread',
|
|
265
|
+
domain: 'tarot',
|
|
266
|
+
heading: 'Three-card spread',
|
|
267
|
+
endpoints: [
|
|
268
|
+
'tarot.castThreeCard',
|
|
269
|
+
'tarot.castCelticCross',
|
|
270
|
+
'tarot.castLoveSpread',
|
|
271
|
+
'tarot.castYesNo',
|
|
272
|
+
'tarot.drawCards',
|
|
273
|
+
],
|
|
274
|
+
description:
|
|
275
|
+
'Tarot spread renderer for three-card, Celtic Cross, love, or yes/no',
|
|
276
|
+
docsLabel: 'Tarot',
|
|
277
|
+
endpointLabel:
|
|
278
|
+
'POST /tarot/spreads/{three-card,celtic-cross,love}, /tarot/yes-no, /tarot/draw',
|
|
279
|
+
docsSummary: 'Spreads with positions and reading',
|
|
280
|
+
topic: 'Tarot',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
pascal: 'RoxyBiorhythmChart',
|
|
284
|
+
tag: 'roxy-biorhythm-chart',
|
|
285
|
+
slug: 'biorhythm-chart',
|
|
286
|
+
domain: 'biorhythm',
|
|
287
|
+
heading: 'Daily biorhythm',
|
|
288
|
+
endpoints: [
|
|
289
|
+
'biorhythm.getDailyBiorhythm',
|
|
290
|
+
'biorhythm.getForecast',
|
|
291
|
+
'biorhythm.getCriticalDays',
|
|
292
|
+
],
|
|
293
|
+
description: 'Daily biorhythm bars or multi-day forecast cycle lines',
|
|
294
|
+
docsLabel: 'Biorhythm',
|
|
295
|
+
endpointLabel: 'POST /biorhythm/{daily,forecast,critical-days}',
|
|
296
|
+
docsSummary: 'Daily bars, forecast cycle lines, critical days',
|
|
297
|
+
topic: 'Biorhythm',
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
pascal: 'RoxyHexagram',
|
|
301
|
+
tag: 'roxy-hexagram',
|
|
302
|
+
slug: 'hexagram',
|
|
303
|
+
domain: 'iching',
|
|
304
|
+
heading: 'I Ching hexagram',
|
|
305
|
+
endpoints: [
|
|
306
|
+
'iching.getHexagram',
|
|
307
|
+
'iching.castReading',
|
|
308
|
+
'iching.getDailyHexagram',
|
|
309
|
+
'iching.castDailyReading',
|
|
310
|
+
'iching.getRandomHexagram',
|
|
311
|
+
],
|
|
312
|
+
description:
|
|
313
|
+
'I Ching hexagram with trigram glyphs, judgment, image, and changing lines',
|
|
314
|
+
docsLabel: 'I Ching',
|
|
315
|
+
endpointLabel:
|
|
316
|
+
'GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast',
|
|
317
|
+
docsSummary: 'Hexagram with trigrams, judgment, image, changing lines',
|
|
318
|
+
topic: 'I Ching',
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
pascal: 'RoxyEndpointForm',
|
|
322
|
+
tag: 'roxy-endpoint-form',
|
|
323
|
+
slug: 'endpoint-form',
|
|
324
|
+
domain: 'utility',
|
|
325
|
+
heading: 'Schema-driven form',
|
|
326
|
+
endpoints: [],
|
|
327
|
+
description:
|
|
328
|
+
'Schema-driven form that emits roxy-submit with a validated payload',
|
|
329
|
+
docsLabel: 'Helper',
|
|
330
|
+
endpointLabel: 'Any endpoint via x-roxy-ui hints',
|
|
331
|
+
docsSummary: 'Schema-driven form, emits roxy-submit',
|
|
332
|
+
topic: 'Helpers',
|
|
333
|
+
selfFetching: true,
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
pascal: 'RoxyLocationSearch',
|
|
337
|
+
tag: 'roxy-location-search',
|
|
338
|
+
slug: 'location-search',
|
|
339
|
+
domain: 'utility',
|
|
340
|
+
heading: 'City search',
|
|
341
|
+
endpoints: ['location.searchCities'],
|
|
342
|
+
description: 'City search input with debounced /location/search calls',
|
|
343
|
+
docsLabel: 'Helper',
|
|
344
|
+
endpointLabel: 'GET /location/search',
|
|
345
|
+
docsSummary: 'Debounced city search input, emits roxy-location-select',
|
|
346
|
+
topic: 'Helpers',
|
|
347
|
+
selfFetching: true,
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
pascal: 'RoxyData',
|
|
351
|
+
tag: 'roxy-data',
|
|
352
|
+
slug: 'data',
|
|
353
|
+
domain: 'utility',
|
|
354
|
+
heading: 'Generic renderer',
|
|
355
|
+
endpoints: [],
|
|
356
|
+
description: 'Generic fallback renderer for any OpenAPI response shape',
|
|
357
|
+
docsLabel: 'Helper',
|
|
358
|
+
endpointLabel: 'Any response shape',
|
|
359
|
+
docsSummary: 'Generic fallback renderer for unknown shapes',
|
|
360
|
+
topic: 'Helpers',
|
|
361
|
+
selfFetching: true,
|
|
362
|
+
},
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
export type RoxyComponentTag = (typeof ROXY_COMPONENTS)[number]['tag'];
|
|
366
|
+
export type RoxyComponentSlug = (typeof ROXY_COMPONENTS)[number]['slug'];
|
package/src/styles/tokens.css
CHANGED
|
@@ -25,11 +25,17 @@
|
|
|
25
25
|
* with non-text use) keep --roxy-accent. */
|
|
26
26
|
--roxy-accent-fg: #b45309;
|
|
27
27
|
|
|
28
|
-
/* Color: status
|
|
28
|
+
/* Color: status. The base value (success, warning, danger, info) is for
|
|
29
|
+
* fills and tints. The -fg variant is darker so text on a light tint passes
|
|
30
|
+
* WCAG AA (>= 4.5:1 on white). Use -fg whenever status color hits text. */
|
|
29
31
|
--roxy-success: #16a34a;
|
|
32
|
+
--roxy-success-fg: #166534;
|
|
30
33
|
--roxy-warning: #ea580c;
|
|
34
|
+
--roxy-warning-fg: #9a3412;
|
|
31
35
|
--roxy-danger: #dc2626;
|
|
36
|
+
--roxy-danger-fg: #991b1b;
|
|
32
37
|
--roxy-info: #0284c7;
|
|
38
|
+
--roxy-info-fg: #075985;
|
|
33
39
|
|
|
34
40
|
/* Color: surface */
|
|
35
41
|
--roxy-bg: #ffffff;
|
|
@@ -94,10 +100,18 @@
|
|
|
94
100
|
--roxy-accent: #fbbf24;
|
|
95
101
|
--roxy-accent-fg: #fbbf24;
|
|
96
102
|
|
|
103
|
+
/* Status -fg overrides must mirror the explicit [data-theme="dark"] block
|
|
104
|
+
* below. Without these, a user on system dark with no data-theme attribute
|
|
105
|
+
* inherits the light-mode -fg values (e.g. #166534 success) which renders
|
|
106
|
+
* as near-invisible dark green on a near-black surface and fails WCAG AA. */
|
|
97
107
|
--roxy-success: #22c55e;
|
|
108
|
+
--roxy-success-fg: #86efac;
|
|
98
109
|
--roxy-warning: #fb923c;
|
|
110
|
+
--roxy-warning-fg: #fdba74;
|
|
99
111
|
--roxy-danger: #ef4444;
|
|
112
|
+
--roxy-danger-fg: #fca5a5;
|
|
100
113
|
--roxy-info: #38bdf8;
|
|
114
|
+
--roxy-info-fg: #7dd3fc;
|
|
101
115
|
|
|
102
116
|
--roxy-bg: #0a0a0a;
|
|
103
117
|
--roxy-fg: #fafafa;
|
|
@@ -112,6 +126,34 @@
|
|
|
112
126
|
}
|
|
113
127
|
}
|
|
114
128
|
|
|
129
|
+
/* Light theme override. Beats the @media (prefers-color-scheme: dark) block
|
|
130
|
+
* when the host explicitly opts back into light. Without this, a dark-mode OS
|
|
131
|
+
* pins the tokens to dark even after data-theme="light" is set. */
|
|
132
|
+
:root[data-theme="light"],
|
|
133
|
+
:host([data-theme="light"]),
|
|
134
|
+
.light :host {
|
|
135
|
+
--roxy-primary: #0f172a;
|
|
136
|
+
--roxy-secondary: #475569;
|
|
137
|
+
--roxy-accent: #f59e0b;
|
|
138
|
+
--roxy-accent-fg: #b45309;
|
|
139
|
+
|
|
140
|
+
--roxy-success: #16a34a;
|
|
141
|
+
--roxy-warning: #ea580c;
|
|
142
|
+
--roxy-danger: #dc2626;
|
|
143
|
+
--roxy-info: #0284c7;
|
|
144
|
+
|
|
145
|
+
--roxy-bg: #ffffff;
|
|
146
|
+
--roxy-fg: #0a0a0a;
|
|
147
|
+
--roxy-muted: #71717a;
|
|
148
|
+
--roxy-border: #e4e4e7;
|
|
149
|
+
--roxy-ring: rgba(245, 158, 11, 0.4);
|
|
150
|
+
|
|
151
|
+
--roxy-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
|
|
152
|
+
--roxy-shadow-md:
|
|
153
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
|
|
154
|
+
--roxy-shadow-lg: 0 12px 24px -8px rgba(0, 0, 0, 0.14);
|
|
155
|
+
}
|
|
156
|
+
|
|
115
157
|
/* Dark theme via host opt-in */
|
|
116
158
|
:root[data-theme="dark"],
|
|
117
159
|
:host([data-theme="dark"]),
|
|
@@ -122,9 +164,13 @@
|
|
|
122
164
|
--roxy-accent-fg: #fbbf24;
|
|
123
165
|
|
|
124
166
|
--roxy-success: #22c55e;
|
|
167
|
+
--roxy-success-fg: #86efac;
|
|
125
168
|
--roxy-warning: #fb923c;
|
|
169
|
+
--roxy-warning-fg: #fdba74;
|
|
126
170
|
--roxy-danger: #ef4444;
|
|
171
|
+
--roxy-danger-fg: #fca5a5;
|
|
127
172
|
--roxy-info: #38bdf8;
|
|
173
|
+
--roxy-info-fg: #7dd3fc;
|
|
128
174
|
|
|
129
175
|
--roxy-bg: #0a0a0a;
|
|
130
176
|
--roxy-fg: #fafafa;
|
package/src/tokens/index.ts
CHANGED
|
@@ -22,6 +22,11 @@ export const PLANET_GLYPH: Record<string, string> = {
|
|
|
22
22
|
Lagna: 'La',
|
|
23
23
|
NorthNode: '☊',
|
|
24
24
|
SouthNode: '☋',
|
|
25
|
+
'North node': '☊',
|
|
26
|
+
'South node': '☋',
|
|
27
|
+
Chiron: '⚷',
|
|
28
|
+
Lilith: '⚸',
|
|
29
|
+
'Black moon lilith': '⚸',
|
|
25
30
|
};
|
|
26
31
|
|
|
27
32
|
export const PLANET_ABBR: Record<string, string> = {
|
package/src/types/types.gen.ts
CHANGED
|
@@ -28024,7 +28024,7 @@ export type ListCountriesError = ListCountriesErrors[keyof ListCountriesErrors];
|
|
|
28024
28024
|
|
|
28025
28025
|
export type ListCountriesResponses = {
|
|
28026
28026
|
/**
|
|
28027
|
-
* Alphabetically sorted list of all
|
|
28027
|
+
* Alphabetically sorted list of all countries with ISO codes and city counts
|
|
28028
28028
|
*/
|
|
28029
28029
|
200: {
|
|
28030
28030
|
/**
|
package/src/utils/debounce.ts
CHANGED
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Lightweight debounce for input handlers. Used by location search.
|
|
3
|
+
*
|
|
4
|
+
* The returned function exposes a `.cancel()` method so callers can clear a
|
|
5
|
+
* pending invocation when the host element disconnects, preventing the timer
|
|
6
|
+
* from firing on a detached node and mutating reactive state after teardown.
|
|
3
7
|
*/
|
|
8
|
+
export interface Debounced<F extends (...args: never[]) => unknown> {
|
|
9
|
+
(...args: Parameters<F>): void;
|
|
10
|
+
cancel: () => void;
|
|
11
|
+
}
|
|
12
|
+
|
|
4
13
|
export function debounce<F extends (...args: never[]) => unknown>(
|
|
5
14
|
fn: F,
|
|
6
15
|
wait: number,
|
|
7
|
-
): F {
|
|
16
|
+
): Debounced<F> {
|
|
8
17
|
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
9
|
-
|
|
18
|
+
const debounced = ((...args: Parameters<F>) => {
|
|
10
19
|
if (timer) clearTimeout(timer);
|
|
11
|
-
timer = setTimeout(() =>
|
|
12
|
-
|
|
20
|
+
timer = setTimeout(() => {
|
|
21
|
+
timer = undefined;
|
|
22
|
+
fn(...args);
|
|
23
|
+
}, wait);
|
|
24
|
+
}) as Debounced<F>;
|
|
25
|
+
debounced.cancel = () => {
|
|
26
|
+
if (timer) {
|
|
27
|
+
clearTimeout(timer);
|
|
28
|
+
timer = undefined;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
return debounced;
|
|
13
32
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Display formatters for ISO timestamps and floats coming back from the API.
|
|
3
|
+
* Every helper returns "" for nullish or unparseable input so it falls out of
|
|
4
|
+
* template literals cleanly.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export function formatTime(input: unknown): string {
|
|
8
|
+
if (typeof input !== 'string' || input.length === 0) return '';
|
|
9
|
+
if (/^\d{4}-\d{2}-\d{2}$/.test(input)) return '';
|
|
10
|
+
const bareTime = /^\d{2}:\d{2}(:\d{2})?$/.test(input);
|
|
11
|
+
const iso = bareTime ? `1970-01-01T${input}` : input;
|
|
12
|
+
const d = new Date(iso);
|
|
13
|
+
if (Number.isNaN(d.getTime())) return input;
|
|
14
|
+
return d.toLocaleTimeString(undefined, {
|
|
15
|
+
hour: 'numeric',
|
|
16
|
+
minute: '2-digit',
|
|
17
|
+
hour12: true,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function formatDate(input: unknown): string {
|
|
22
|
+
if (typeof input !== 'string' || input.length === 0) return '';
|
|
23
|
+
const d = new Date(
|
|
24
|
+
/^\d{4}-\d{2}-\d{2}$/.test(input) ? `${input}T00:00:00` : input,
|
|
25
|
+
);
|
|
26
|
+
if (Number.isNaN(d.getTime())) return input;
|
|
27
|
+
return d.toLocaleDateString(undefined, {
|
|
28
|
+
month: 'short',
|
|
29
|
+
day: 'numeric',
|
|
30
|
+
year: 'numeric',
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function formatTimeRange(
|
|
35
|
+
t: { start?: string; end?: string } | undefined,
|
|
36
|
+
): string {
|
|
37
|
+
if (!t) return '';
|
|
38
|
+
const start = formatTime(t.start);
|
|
39
|
+
const end = formatTime(t.end);
|
|
40
|
+
if (start && end) return `${start} - ${end}`;
|
|
41
|
+
return start || end || '';
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function formatNumber(value: unknown, dp = 1): string {
|
|
45
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) return '';
|
|
46
|
+
return value.toFixed(dp).replace(/\.?0+$/, '');
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function formatPercent(value: unknown, dp = 1): string {
|
|
50
|
+
const n = formatNumber(value, dp);
|
|
51
|
+
return n ? `${n}%` : '';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function formatLongitude(value: unknown): string {
|
|
55
|
+
if (typeof value !== 'number' || !Number.isFinite(value)) return '';
|
|
56
|
+
return `${formatNumber(value, 2)}°`;
|
|
57
|
+
}
|
package/src/version.ts
ADDED