@roxyapi/ui-react 0.53.2 → 1.1.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 +41 -43
- package/README.md +45 -77
- package/dist/components/almanac-day.d.ts +4 -5
- package/dist/components/almanac-day.js +1 -2
- package/dist/components/angel-number-card.d.ts +4 -5
- package/dist/components/angel-number-card.js +1 -2
- package/dist/components/angel-number-lookup.d.ts +4 -5
- package/dist/components/angel-number-lookup.js +1 -2
- package/dist/components/arudha-padas.d.ts +4 -5
- package/dist/components/arudha-padas.js +1 -2
- package/dist/components/ashtakavarga-grid.d.ts +4 -5
- package/dist/components/ashtakavarga-grid.js +1 -2
- package/dist/components/aspects-table.d.ts +4 -5
- package/dist/components/aspects-table.js +1 -2
- package/dist/components/astrocartography-map.d.ts +4 -5
- package/dist/components/astrocartography-map.js +1 -2
- package/dist/components/bazi-chart.d.ts +4 -5
- package/dist/components/bazi-chart.js +1 -2
- package/dist/components/bhav-chalit-table.d.ts +4 -5
- package/dist/components/bhav-chalit-table.js +1 -2
- package/dist/components/bhava-bala-table.d.ts +4 -5
- package/dist/components/bhava-bala-table.js +1 -2
- package/dist/components/biorhythm-chart.d.ts +4 -5
- package/dist/components/biorhythm-chart.js +1 -2
- package/dist/components/bodygraph.d.ts +4 -5
- package/dist/components/bodygraph.js +1 -2
- package/dist/components/chara-karakas.d.ts +4 -5
- package/dist/components/chara-karakas.js +1 -2
- package/dist/components/choghadiya-grid.d.ts +4 -5
- package/dist/components/choghadiya-grid.js +1 -2
- package/dist/components/compatibility-card.d.ts +4 -5
- package/dist/components/compatibility-card.js +1 -2
- package/dist/components/compound-number.d.ts +4 -5
- package/dist/components/compound-number.js +1 -2
- package/dist/components/crystal-card.d.ts +4 -5
- package/dist/components/crystal-card.js +1 -2
- package/dist/components/crystal-grid.d.ts +4 -5
- package/dist/components/crystal-grid.js +1 -2
- package/dist/components/dasha-timeline.d.ts +4 -5
- package/dist/components/dasha-timeline.js +1 -2
- package/dist/components/data.d.ts +4 -5
- package/dist/components/data.js +1 -2
- package/dist/components/divisional-chart.d.ts +4 -5
- package/dist/components/divisional-chart.js +1 -2
- package/dist/components/dosha-card.d.ts +4 -5
- package/dist/components/dosha-card.js +1 -2
- package/dist/components/dosha-constitution.d.ts +4 -5
- package/dist/components/dosha-constitution.js +1 -2
- package/dist/components/dream-card.d.ts +4 -5
- package/dist/components/dream-card.js +1 -2
- package/dist/components/dream-search.d.ts +4 -5
- package/dist/components/dream-search.js +1 -2
- package/dist/components/endpoint-form.d.ts +0 -1
- package/dist/components/endpoint-form.js +1 -2
- package/dist/components/ephemeris-table.d.ts +4 -5
- package/dist/components/ephemeris-table.js +1 -2
- package/dist/components/fixed-stars.d.ts +4 -5
- package/dist/components/fixed-stars.js +1 -2
- package/dist/components/flying-star-chart.d.ts +4 -5
- package/dist/components/flying-star-chart.js +1 -2
- package/dist/components/forecast-digest.d.ts +4 -5
- package/dist/components/forecast-digest.js +1 -2
- package/dist/components/forecast-timeline.d.ts +4 -5
- package/dist/components/forecast-timeline.js +1 -2
- package/dist/components/gematria.d.ts +4 -5
- package/dist/components/gematria.js +1 -2
- package/dist/components/gochara-table.d.ts +4 -5
- package/dist/components/gochara-table.js +1 -2
- package/dist/components/guna-milan.d.ts +4 -5
- package/dist/components/guna-milan.js +1 -2
- package/dist/components/hd-connection.d.ts +4 -5
- package/dist/components/hd-connection.js +1 -2
- package/dist/components/hd-penta.d.ts +4 -5
- package/dist/components/hd-penta.js +1 -2
- package/dist/components/hd-type-card.d.ts +4 -5
- package/dist/components/hd-type-card.js +1 -2
- package/dist/components/hd-variables.d.ts +4 -5
- package/dist/components/hd-variables.js +1 -2
- package/dist/components/heliacal-table.d.ts +4 -5
- package/dist/components/heliacal-table.js +1 -2
- package/dist/components/hexagram.d.ts +4 -5
- package/dist/components/hexagram.js +1 -2
- package/dist/components/hora-table.d.ts +4 -5
- package/dist/components/hora-table.js +1 -2
- package/dist/components/horoscope-card.d.ts +4 -5
- package/dist/components/horoscope-card.js +1 -2
- package/dist/components/kp-chart.d.ts +4 -5
- package/dist/components/kp-chart.js +1 -2
- package/dist/components/kp-finance-card.d.ts +4 -5
- package/dist/components/kp-finance-card.js +1 -2
- package/dist/components/kp-planets-table.d.ts +4 -5
- package/dist/components/kp-planets-table.js +1 -2
- package/dist/components/kp-ruling-planets.d.ts +4 -5
- package/dist/components/kp-ruling-planets.js +1 -2
- package/dist/components/kua-card.d.ts +4 -5
- package/dist/components/kua-card.js +1 -2
- package/dist/components/local-space-compass.d.ts +4 -5
- package/dist/components/local-space-compass.js +1 -2
- package/dist/components/location-search.d.ts +6 -3
- package/dist/components/location-search.js +1 -2
- package/dist/components/luck-pillars.d.ts +4 -5
- package/dist/components/luck-pillars.js +1 -2
- package/dist/components/mayan-day-sign.d.ts +4 -5
- package/dist/components/mayan-day-sign.js +1 -2
- package/dist/components/moon-phase.d.ts +4 -5
- package/dist/components/moon-phase.js +1 -2
- package/dist/components/nakshatra-card.d.ts +4 -5
- package/dist/components/nakshatra-card.js +1 -2
- package/dist/components/natal-chart.d.ts +4 -5
- package/dist/components/natal-chart.js +1 -2
- package/dist/components/numerology-card.d.ts +4 -5
- package/dist/components/numerology-card.js +1 -2
- package/dist/components/panchang-table.d.ts +4 -5
- package/dist/components/panchang-table.js +1 -2
- package/dist/components/positions-table.d.ts +4 -5
- package/dist/components/positions-table.js +1 -2
- package/dist/components/profection-card.d.ts +4 -5
- package/dist/components/profection-card.js +1 -2
- package/dist/components/reference-card.d.ts +4 -5
- package/dist/components/reference-card.js +1 -2
- package/dist/components/relocation-wheel.d.ts +4 -5
- package/dist/components/relocation-wheel.js +1 -2
- package/dist/components/shadbala-table.d.ts +4 -5
- package/dist/components/shadbala-table.js +1 -2
- package/dist/components/synastry-chart.d.ts +4 -5
- package/dist/components/synastry-chart.js +1 -2
- package/dist/components/tarot-card.d.ts +4 -5
- package/dist/components/tarot-card.js +1 -2
- package/dist/components/tarot-catalog.d.ts +4 -5
- package/dist/components/tarot-catalog.js +1 -2
- package/dist/components/tarot-spread.d.ts +4 -5
- package/dist/components/tarot-spread.js +1 -2
- package/dist/components/transit-wheel.d.ts +4 -5
- package/dist/components/transit-wheel.js +1 -2
- package/dist/components/transits-table.d.ts +4 -5
- package/dist/components/transits-table.js +1 -2
- package/dist/components/upagraha-table.d.ts +4 -5
- package/dist/components/upagraha-table.js +1 -2
- package/dist/components/vastu-mandala.d.ts +4 -5
- package/dist/components/vastu-mandala.js +1 -2
- package/dist/components/vedic-aspects.d.ts +4 -5
- package/dist/components/vedic-aspects.js +1 -2
- package/dist/components/vedic-daily.d.ts +4 -5
- package/dist/components/vedic-daily.js +1 -2
- package/dist/components/vedic-kundli.d.ts +4 -5
- package/dist/components/vedic-kundli.js +1 -2
- package/dist/components/vedic-planets-table.d.ts +4 -5
- package/dist/components/vedic-planets-table.js +1 -2
- package/dist/components/western-planets-table.d.ts +4 -5
- package/dist/components/western-planets-table.js +1 -2
- package/dist/components/yoga-list.d.ts +4 -5
- package/dist/components/yoga-list.js +1 -2
- package/dist/components/zodiac-card.d.ts +4 -5
- package/dist/components/zodiac-card.js +1 -2
- package/dist/generated/tool-components.d.ts +0 -1
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -2
- package/dist/jsx.cjs +0 -1
- package/dist/jsx.d.ts +10 -7
- package/dist/jsx.js +0 -1
- package/dist/load-ui.d.ts +1 -2
- package/dist/load-ui.js +1 -2
- package/dist/tool-component.cjs +0 -1
- package/dist/tool-component.d.ts +0 -1
- package/dist/tool-component.js +0 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/types.gen.d.ts +5 -6
- package/dist/utils/compact.d.ts +0 -1
- package/dist/utils/tool-component.d.ts +0 -1
- package/package.json +1 -1
- package/dist/components/almanac-day.d.ts.map +0 -1
- package/dist/components/almanac-day.js.map +0 -7
- package/dist/components/angel-number-card.d.ts.map +0 -1
- package/dist/components/angel-number-card.js.map +0 -7
- package/dist/components/angel-number-lookup.d.ts.map +0 -1
- package/dist/components/angel-number-lookup.js.map +0 -7
- package/dist/components/arudha-padas.d.ts.map +0 -1
- package/dist/components/arudha-padas.js.map +0 -7
- package/dist/components/ashtakavarga-grid.d.ts.map +0 -1
- package/dist/components/ashtakavarga-grid.js.map +0 -7
- package/dist/components/aspects-table.d.ts.map +0 -1
- package/dist/components/aspects-table.js.map +0 -7
- package/dist/components/astrocartography-map.d.ts.map +0 -1
- package/dist/components/astrocartography-map.js.map +0 -7
- package/dist/components/bazi-chart.d.ts.map +0 -1
- package/dist/components/bazi-chart.js.map +0 -7
- package/dist/components/bhav-chalit-table.d.ts.map +0 -1
- package/dist/components/bhav-chalit-table.js.map +0 -7
- package/dist/components/bhava-bala-table.d.ts.map +0 -1
- package/dist/components/bhava-bala-table.js.map +0 -7
- package/dist/components/biorhythm-chart.d.ts.map +0 -1
- package/dist/components/biorhythm-chart.js.map +0 -7
- package/dist/components/bodygraph.d.ts.map +0 -1
- package/dist/components/bodygraph.js.map +0 -7
- package/dist/components/chara-karakas.d.ts.map +0 -1
- package/dist/components/chara-karakas.js.map +0 -7
- package/dist/components/choghadiya-grid.d.ts.map +0 -1
- package/dist/components/choghadiya-grid.js.map +0 -7
- package/dist/components/compatibility-card.d.ts.map +0 -1
- package/dist/components/compatibility-card.js.map +0 -7
- package/dist/components/compound-number.d.ts.map +0 -1
- package/dist/components/compound-number.js.map +0 -7
- package/dist/components/crystal-card.d.ts.map +0 -1
- package/dist/components/crystal-card.js.map +0 -7
- package/dist/components/crystal-grid.d.ts.map +0 -1
- package/dist/components/crystal-grid.js.map +0 -7
- package/dist/components/dasha-timeline.d.ts.map +0 -1
- package/dist/components/dasha-timeline.js.map +0 -7
- package/dist/components/data.d.ts.map +0 -1
- package/dist/components/data.js.map +0 -7
- package/dist/components/divisional-chart.d.ts.map +0 -1
- package/dist/components/divisional-chart.js.map +0 -7
- package/dist/components/dosha-card.d.ts.map +0 -1
- package/dist/components/dosha-card.js.map +0 -7
- package/dist/components/dosha-constitution.d.ts.map +0 -1
- package/dist/components/dosha-constitution.js.map +0 -7
- package/dist/components/dream-card.d.ts.map +0 -1
- package/dist/components/dream-card.js.map +0 -7
- package/dist/components/dream-search.d.ts.map +0 -1
- package/dist/components/dream-search.js.map +0 -7
- package/dist/components/endpoint-form.d.ts.map +0 -1
- package/dist/components/endpoint-form.js.map +0 -7
- package/dist/components/ephemeris-table.d.ts.map +0 -1
- package/dist/components/ephemeris-table.js.map +0 -7
- package/dist/components/fixed-stars.d.ts.map +0 -1
- package/dist/components/fixed-stars.js.map +0 -7
- package/dist/components/flying-star-chart.d.ts.map +0 -1
- package/dist/components/flying-star-chart.js.map +0 -7
- package/dist/components/forecast-digest.d.ts.map +0 -1
- package/dist/components/forecast-digest.js.map +0 -7
- package/dist/components/forecast-timeline.d.ts.map +0 -1
- package/dist/components/forecast-timeline.js.map +0 -7
- package/dist/components/gematria.d.ts.map +0 -1
- package/dist/components/gematria.js.map +0 -7
- package/dist/components/gochara-table.d.ts.map +0 -1
- package/dist/components/gochara-table.js.map +0 -7
- package/dist/components/guna-milan.d.ts.map +0 -1
- package/dist/components/guna-milan.js.map +0 -7
- package/dist/components/hd-connection.d.ts.map +0 -1
- package/dist/components/hd-connection.js.map +0 -7
- package/dist/components/hd-penta.d.ts.map +0 -1
- package/dist/components/hd-penta.js.map +0 -7
- package/dist/components/hd-type-card.d.ts.map +0 -1
- package/dist/components/hd-type-card.js.map +0 -7
- package/dist/components/hd-variables.d.ts.map +0 -1
- package/dist/components/hd-variables.js.map +0 -7
- package/dist/components/heliacal-table.d.ts.map +0 -1
- package/dist/components/heliacal-table.js.map +0 -7
- package/dist/components/hexagram.d.ts.map +0 -1
- package/dist/components/hexagram.js.map +0 -7
- package/dist/components/hora-table.d.ts.map +0 -1
- package/dist/components/hora-table.js.map +0 -7
- package/dist/components/horoscope-card.d.ts.map +0 -1
- package/dist/components/horoscope-card.js.map +0 -7
- package/dist/components/kp-chart.d.ts.map +0 -1
- package/dist/components/kp-chart.js.map +0 -7
- package/dist/components/kp-finance-card.d.ts.map +0 -1
- package/dist/components/kp-finance-card.js.map +0 -7
- package/dist/components/kp-planets-table.d.ts.map +0 -1
- package/dist/components/kp-planets-table.js.map +0 -7
- package/dist/components/kp-ruling-planets.d.ts.map +0 -1
- package/dist/components/kp-ruling-planets.js.map +0 -7
- package/dist/components/kua-card.d.ts.map +0 -1
- package/dist/components/kua-card.js.map +0 -7
- package/dist/components/local-space-compass.d.ts.map +0 -1
- package/dist/components/local-space-compass.js.map +0 -7
- package/dist/components/location-search.d.ts.map +0 -1
- package/dist/components/location-search.js.map +0 -7
- package/dist/components/luck-pillars.d.ts.map +0 -1
- package/dist/components/luck-pillars.js.map +0 -7
- package/dist/components/mayan-day-sign.d.ts.map +0 -1
- package/dist/components/mayan-day-sign.js.map +0 -7
- package/dist/components/moon-phase.d.ts.map +0 -1
- package/dist/components/moon-phase.js.map +0 -7
- package/dist/components/nakshatra-card.d.ts.map +0 -1
- package/dist/components/nakshatra-card.js.map +0 -7
- package/dist/components/natal-chart.d.ts.map +0 -1
- package/dist/components/natal-chart.js.map +0 -7
- package/dist/components/numerology-card.d.ts.map +0 -1
- package/dist/components/numerology-card.js.map +0 -7
- package/dist/components/panchang-table.d.ts.map +0 -1
- package/dist/components/panchang-table.js.map +0 -7
- package/dist/components/positions-table.d.ts.map +0 -1
- package/dist/components/positions-table.js.map +0 -7
- package/dist/components/profection-card.d.ts.map +0 -1
- package/dist/components/profection-card.js.map +0 -7
- package/dist/components/reference-card.d.ts.map +0 -1
- package/dist/components/reference-card.js.map +0 -7
- package/dist/components/relocation-wheel.d.ts.map +0 -1
- package/dist/components/relocation-wheel.js.map +0 -7
- package/dist/components/shadbala-table.d.ts.map +0 -1
- package/dist/components/shadbala-table.js.map +0 -7
- package/dist/components/synastry-chart.d.ts.map +0 -1
- package/dist/components/synastry-chart.js.map +0 -7
- package/dist/components/tarot-card.d.ts.map +0 -1
- package/dist/components/tarot-card.js.map +0 -7
- package/dist/components/tarot-catalog.d.ts.map +0 -1
- package/dist/components/tarot-catalog.js.map +0 -7
- package/dist/components/tarot-spread.d.ts.map +0 -1
- package/dist/components/tarot-spread.js.map +0 -7
- package/dist/components/transit-wheel.d.ts.map +0 -1
- package/dist/components/transit-wheel.js.map +0 -7
- package/dist/components/transits-table.d.ts.map +0 -1
- package/dist/components/transits-table.js.map +0 -7
- package/dist/components/upagraha-table.d.ts.map +0 -1
- package/dist/components/upagraha-table.js.map +0 -7
- package/dist/components/vastu-mandala.d.ts.map +0 -1
- package/dist/components/vastu-mandala.js.map +0 -7
- package/dist/components/vedic-aspects.d.ts.map +0 -1
- package/dist/components/vedic-aspects.js.map +0 -7
- package/dist/components/vedic-daily.d.ts.map +0 -1
- package/dist/components/vedic-daily.js.map +0 -7
- package/dist/components/vedic-kundli.d.ts.map +0 -1
- package/dist/components/vedic-kundli.js.map +0 -7
- package/dist/components/vedic-planets-table.d.ts.map +0 -1
- package/dist/components/vedic-planets-table.js.map +0 -7
- package/dist/components/western-planets-table.d.ts.map +0 -1
- package/dist/components/western-planets-table.js.map +0 -7
- package/dist/components/yoga-list.d.ts.map +0 -1
- package/dist/components/yoga-list.js.map +0 -7
- package/dist/components/zodiac-card.d.ts.map +0 -1
- package/dist/components/zodiac-card.js.map +0 -7
- package/dist/generated/tool-components.d.ts.map +0 -1
- package/dist/index.cjs.map +0 -7
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -7
- package/dist/jsx.cjs.map +0 -7
- package/dist/jsx.d.ts.map +0 -1
- package/dist/jsx.js.map +0 -7
- package/dist/load-ui.d.ts.map +0 -1
- package/dist/load-ui.js.map +0 -7
- package/dist/tool-component.cjs.map +0 -7
- package/dist/tool-component.d.ts.map +0 -1
- package/dist/tool-component.js.map +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/types.gen.d.ts.map +0 -1
- package/dist/utils/compact.d.ts.map +0 -1
- package/dist/utils/tool-component.d.ts.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -4,11 +4,11 @@ This file teaches AI coding agents (Claude Code, Cursor, Copilot, Codex, Gemini
|
|
|
4
4
|
|
|
5
5
|
This file ships inside `@roxyapi/ui`, `@roxyapi/ui-react`, and `@roxyapi/ui-vue` on npm. After install, read it at `node_modules/@roxyapi/ui/AGENTS.md`.
|
|
6
6
|
|
|
7
|
-
Live preview: <https://roxyapi.
|
|
7
|
+
Live preview: <https://roxyapi.com/ui>. Source of truth for component types: the combined OpenAPI spec at `https://roxyapi.com/api/v2/openapi.json`, regenerated into the response types every package exports. Per-product specs live at `https://roxyapi.com/api/v2/{slug}/openapi.json`.
|
|
8
8
|
|
|
9
9
|
## Identity
|
|
10
10
|
|
|
11
|
-
Roxy UI is the official web component library for the RoxyAPI catalog. Components and helpers cover Western astrology, Vedic astrology, forecast, Human Design, Chinese astrology, feng shui, numerology, tarot, biorhythm, I Ching, crystals, dreams, angel numbers, with the location helper for geocoding. New endpoints regenerate component types automatically.
|
|
11
|
+
Roxy UI is the official web component library for the RoxyAPI catalog. Components and helpers cover Western astrology, Vedic astrology, forecast, Human Design, Chinese astrology, feng shui, Mesoamerican astrology, Vastu, numerology, Kabbalah, tarot, biorhythm, Ayurveda, I Ching, crystals, dreams, angel numbers, with the location helper for geocoding. New endpoints regenerate component types automatically.
|
|
12
12
|
|
|
13
13
|
## Decision tree for picking a component
|
|
14
14
|
|
|
@@ -169,7 +169,7 @@ element.data = data;
|
|
|
169
169
|
|
|
170
170
|
Every chart endpoint (Western, Vedic, KP, synastry, transits, dasha, dosha, panchang) needs `latitude`, `longitude`, and `timezone`. Never ask the user to type coordinates. Call `/location/search` first, then feed the result into the chart endpoint.
|
|
171
171
|
|
|
172
|
-
|
|
172
|
+
Some endpoints take TWO locations, and they name them in two different ways. `POST /astrology/synastry`, `/astrology/composite-chart`, `/vedic-astrology/compatibility` and `/human-design/connection` nest a full location per person (`person1` / `person2`, or `personA` / `personB`). `POST /astrology/relocation-chart` instead takes `birthLatitude`, `birthLongitude`, `relocationLatitude`, `relocationLongitude` at the top level with a single `timezone`, which is the BIRTH timezone: relocating does not move the birth moment. `<roxy-endpoint-form>` renders a separate city search for each location automatically, so self-fetch mode needs no extra work.
|
|
173
173
|
|
|
174
174
|
```ts
|
|
175
175
|
// Right
|
|
@@ -182,7 +182,7 @@ const { data: chart } = await roxy.astrology.generateNatalChart({
|
|
|
182
182
|
|
|
183
183
|
### 3. Timezone format inconsistency
|
|
184
184
|
|
|
185
|
-
Every chart endpoint accepts `timezone` as either a decimal-hour offset (`5.5` for IST, `-5` for EST) or an IANA name (`'Asia/Kolkata'`, `'America/New_York'`).
|
|
185
|
+
Every chart endpoint accepts `timezone` as either a decimal-hour offset (`5.5` for IST, `-5` for EST) or an IANA name (`'Asia/Kolkata'`, `'America/New_York'`). `/location/search` returns both, `timezone` as the IANA name and `utcOffset` as the decimal hours; the IANA form is correct over DST boundaries. Pick one and stay consistent in a single integration. Mixing them does not break the API but makes the bug surface area larger.
|
|
186
186
|
|
|
187
187
|
### 4. Secret key in the browser
|
|
188
188
|
|
|
@@ -195,16 +195,21 @@ const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
|
195
195
|
|
|
196
196
|
For direct client-side calls, use a **publishable key** (`pk_live_*` / `pk_test_*`) instead. Publishable keys are browser-safe: mint one at `roxyapi.com/account`, register the origins you embed on, and the API gateway returns 403 for any other origin. See the client-side pattern below.
|
|
197
197
|
|
|
198
|
-
### 5.
|
|
198
|
+
### 5. Next.js App Router: render from a Server Component
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
Every component in `@roxyapi/ui-react` ships as a client boundary, so a Server Component imports it and passes `data` directly, with no `'use client'` file of its own. The server fetches with the SDK, the markup is server rendered, and the element hydrates in the browser. Add `'use client'` only to a file that holds state or passes an event handler.
|
|
201
201
|
|
|
202
202
|
```tsx
|
|
203
|
-
// app/
|
|
204
|
-
|
|
203
|
+
// app/page.tsx (Server Component)
|
|
204
|
+
import { createRoxy } from '@roxyapi/sdk';
|
|
205
205
|
import { RoxyNatalChart } from '@roxyapi/ui-react';
|
|
206
206
|
|
|
207
|
-
|
|
207
|
+
const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
208
|
+
|
|
209
|
+
export default async function Page() {
|
|
210
|
+
const { data } = await roxy.astrology.generateNatalChart({
|
|
211
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude: 40.71, longitude: -74.01, timezone: -5 },
|
|
212
|
+
});
|
|
208
213
|
return <RoxyNatalChart data={data} />;
|
|
209
214
|
}
|
|
210
215
|
```
|
|
@@ -239,7 +244,7 @@ Several components select a view, mode, or chart layout in addition to `data`. T
|
|
|
239
244
|
<RoxyPanchangTable data={panchang} detail="detailed" />
|
|
240
245
|
```
|
|
241
246
|
|
|
242
|
-
The full set: `
|
|
247
|
+
The full set: `RoxyHoroscopeCard` `period` and `layout`, `RoxyMoonPhase` `mode`, `RoxyZodiacCard` `mode`, `RoxyKuaCard` `mode`, `RoxyMayanDaySign` `mode`, `RoxyVastuMandala` `mode`, `RoxyAlmanacDay` `mode`, `RoxyFlyingStarChart` `mode`, `RoxyCompatibilityCard` `mode`, `RoxyVedicKundli` `chartStyle` and `chartReference`, `RoxyDivisionalChart` `chartStyle`, `RoxyPanchangTable` `detail`, `RoxyDashaTimeline` `period`, `RoxyDoshaCard` `type`, `RoxyNumerologyCard` `type`, `RoxyTarotSpread` `spread`, `RoxyBiorhythmChart` `mode`. `RoxyNatalChart` reads its house system and `RoxyHexagram` its variant from the response itself, so neither takes such a prop. Outside React and Vue, set the same value as a kebab-case attribute or a JS property on the element (for example `chart-style="south"` or `el.chartStyle = 'south'`).
|
|
243
248
|
|
|
244
249
|
### 6c. Vue and Nuxt
|
|
245
250
|
|
|
@@ -256,7 +261,7 @@ import { RoxyVedicKundli, RoxyLocationSearch } from '@roxyapi/ui-vue';
|
|
|
256
261
|
</template>
|
|
257
262
|
```
|
|
258
263
|
|
|
259
|
-
In Nuxt, render
|
|
264
|
+
In Nuxt, render them in any page or component, server rendered or not: the markup renders on the server and the element hydrates in the browser, with no `<ClientOnly>` wrapper.
|
|
260
265
|
|
|
261
266
|
### 7. Local response interface drift
|
|
262
267
|
|
|
@@ -322,21 +327,21 @@ ensureScriptLoaded(ROXY_UI_VERSION, '/assets/roxy-ui'); // your origin
|
|
|
322
327
|
|
|
323
328
|
The loader keeps a single shared promise, so the first call wins and every component reuses it.
|
|
324
329
|
|
|
325
|
-
### 12. Theming: set
|
|
330
|
+
### 12. Theming: set a base, not the shades
|
|
326
331
|
|
|
327
|
-
|
|
332
|
+
**Components take every colour, size, radius, space and font from `--roxy-*` tokens, so restyle through the tokens and never by overriding the internals of a component.** A handful of tokens are bases and the rest derive from them, so one declaration restyles the library.
|
|
328
333
|
|
|
329
334
|
```css
|
|
330
335
|
:root { --roxy-accent: #8b5cf6; }
|
|
331
336
|
```
|
|
332
337
|
|
|
333
|
-
If you theme dark differently, set it in your dark block too, exactly as you would for any design-token system:
|
|
338
|
+
The text-safe accent (`--roxy-accent-ink`) and the focus ring (`--roxy-ring`) derive from `--roxy-accent`. If you theme dark differently, set it in your dark block too, exactly as you would for any design-token system:
|
|
334
339
|
|
|
335
340
|
```css
|
|
336
341
|
[data-theme='dark'] { --roxy-accent: #a78bfa; }
|
|
337
342
|
```
|
|
338
343
|
|
|
339
|
-
If the page is not white or near black,
|
|
344
|
+
If the page is not white or near black, set `--roxy-bg` and `--roxy-fg` to your page colour and ink: the card, the label ink, the muted text and every hairline derive from those two. `--roxy-font-sans` is unset by default, so components inherit your page font until you set it; `--roxy-radius` sets every corner. Do not hardcode `--roxy-accent-ink`: you will pin it to one hue and it will stop tracking your brand. To size a drawn chart, set `--roxy-chart-max-width` on it or on `:root`. Dark mode already works with no wiring, via `prefers-color-scheme`, a `.dark` class, or `[data-theme='dark']` on any ancestor. Every token, the presets and the drawing hooks are in `THEMING.md`.
|
|
340
345
|
|
|
341
346
|
## Integration patterns
|
|
342
347
|
|
|
@@ -396,13 +401,13 @@ export function BirthChartView() {
|
|
|
396
401
|
}
|
|
397
402
|
```
|
|
398
403
|
|
|
399
|
-
For a static chart with no picker, fetch in a Server Component and
|
|
404
|
+
For a static chart with no picker, fetch in a Server Component and render the component there (Pattern 6).
|
|
400
405
|
|
|
401
406
|
### Pattern 3: schema-driven form
|
|
402
407
|
|
|
403
408
|
`<roxy-endpoint-form>` reads the OpenAPI spec and renders the inputs for any endpoint. On `roxy-submit`, POST the validated values to your own route, which calls the SDK with the secret key, then set the returned data on the target component. For an endpoint that needs coordinates, add `publishable-key="pk_live_..."` so the built-in city search can geocode.
|
|
404
409
|
|
|
405
|
-
The city search is the one request the form issues on its own, while a visitor is still typing. When the page routes RoxyAPI traffic through your own server, give it a route for that search and name it with `location-url` (absolute, or relative to the page). Then the form calls your server for cities too, and no key of any kind reaches the browser.
|
|
410
|
+
The city search is the one request the form issues on its own, while a visitor is still typing. When the page routes RoxyAPI traffic through your own server, give it a route for that search and name it with `location-url` (absolute, or relative to the page). Then the form calls your server for cities too, and no key of any kind reaches the browser. A component in self-fetch mode needs none of this: its `submit-url` route answers the city search too, and `location-url` (`data-location-url` on a one-tag widget) only sends the search somewhere else.
|
|
406
411
|
|
|
407
412
|
A rendering component in self-fetch mode (Pattern 4) can also send data of your own with what it submits, which the bare form above does not need because your own code writes that request. Give it `submit-context` with a JSON object and your `submit-url` route receives that object as `context` beside the request, which is where a page attaches its own verification data to a submission. The component passes it through untouched and reads no key of it, so its shape is yours to choose; leave the attribute off and your route receives exactly the request it always did. A one-tag widget takes it as `data-submit-context`.
|
|
408
413
|
|
|
@@ -427,16 +432,19 @@ A rendering component in self-fetch mode (Pattern 4) can also send data of your
|
|
|
427
432
|
|
|
428
433
|
### Pattern 4: fully client-side with a publishable key (no server, no script)
|
|
429
434
|
|
|
430
|
-
When you do not want a backend at all, mint a **publishable key** (`pk_live_*` / `pk_test_*`) at `roxyapi.com/account`, register the origins you embed on, and let the component fetch itself. Every rendering component is self-fetching: give it a `
|
|
435
|
+
When you do not want a backend at all, mint a **publishable key** (`pk_live_*` / `pk_test_*`) at `roxyapi.com/account`, register the origins you embed on, and let the component fetch itself. Every rendering component is self-fetching: give it a `publishable-key` and it renders its own input form, calls RoxyAPI on submit, and displays the result. No script, no separate location wiring, no envelope handling.
|
|
431
436
|
|
|
432
437
|
```html
|
|
433
|
-
<roxy-natal-chart
|
|
434
|
-
|
|
438
|
+
<roxy-natal-chart publishable-key="pk_live_..."></roxy-natal-chart>
|
|
439
|
+
|
|
440
|
+
<!-- Any other endpoint the component renders -->
|
|
441
|
+
<roxy-positions-table
|
|
442
|
+
data-endpoint="astrology/lilith"
|
|
435
443
|
publishable-key="pk_live_..."
|
|
436
|
-
></roxy-
|
|
444
|
+
></roxy-positions-table>
|
|
437
445
|
```
|
|
438
446
|
|
|
439
|
-
That single element renders a schema-driven form (a zodiac/enum tile picker, a boolean toggle, native date and time inputs, a city search for endpoints that need coordinates or a timezone, and one card per record for a request that takes several, such as the members of a penta, with `Add` and `Remove` inside the bounds the API declares), fetches on submit, and shows a loading then error-or-result state. Optional fields collapse under one Advanced disclosure, and a form whose only required field is an enum submits on selection (tap a sign, pick a nakshatra, get a reading, no button). When the API rejects a request it names the fields it rejected, and the form prints each message under that input, marks it, opens the Advanced disclosure if the field sits there, and summarises the rejections by field label above the form; editing a field clears its message. The result keeps a re-query affordance: a single-enum picker stays above the result and refetches when the selection changes, any other form gets a compact Edit query control that restores it with the previous values. `
|
|
447
|
+
That single element renders a schema-driven form (a zodiac/enum tile picker, a boolean toggle, native date and time inputs, a city search for endpoints that need coordinates or a timezone, and one card per record for a request that takes several, such as the members of a penta, with `Add` and `Remove` inside the bounds the API declares), fetches on submit, and shows a loading then error-or-result state. Optional fields collapse under one Advanced disclosure, and a form whose only required field is an enum submits on selection (tap a sign, pick a nakshatra, get a reading, no button). When the API rejects a request it names the fields it rejected, and the form prints each message under that input, marks it, opens the Advanced disclosure if the field sits there, and summarises the rejections by field label above the form; editing a field clears its message. The result keeps a re-query affordance: a single-enum picker stays above the result and refetches when the selection changes, any other form gets a compact Edit query control that restores it with the previous values. `data-endpoint` is optional. Without it the component fetches its default endpoint, and its config attribute (`mode`, `period`, `type`, `spread`, `detail`) picks another of the endpoints it renders, method included. Set `data-endpoint` to the spec path without the leading slash (`dreams/symbols/{id}`, `astrology/horoscope/{sign}/daily`) to choose any endpoint the component renders; beside it, `method` defaults to `POST`, so set `method="GET"` for a GET endpoint.
|
|
440
448
|
|
|
441
449
|
**Key handling is the contract. The component enforces it, not you:**
|
|
442
450
|
|
|
@@ -445,13 +453,13 @@ That single element renders a schema-driven form (a zodiac/enum tile picker, a b
|
|
|
445
453
|
- A component that cannot draw a response it received (a shape it was not written for) falls back to the generic `<roxy-data>` table for that response and emits a `roxy-render-error` event with the exception, so a page never keeps a loading placeholder on screen.
|
|
446
454
|
- For production with a backend, prefer controlled mode (Patterns 1, 6, 7): the server fetches with the `sk_` key and injects the response, so no key of any kind reaches the browser.
|
|
447
455
|
|
|
448
|
-
In React, the same props are typed: `<RoxyNatalChart
|
|
456
|
+
In React, the same props are typed: `<RoxyNatalChart publishableKey={process.env.NEXT_PUBLIC_ROXY_PK} />`.
|
|
449
457
|
|
|
450
458
|
**Three optional attributes on the self-fetch element.** `lang` sets the response language (`en`, `tr`, `de`, `es`, `hi`, `pt`, `fr`, `ru`, `zh-Hans`, `zh-Hant`): put it on the element (`<roxy-horoscope-card lang="de" ...>`) and the form routes it to the `?lang=` query on submit, so visitors never see a language field. `submit-label` overrides the derived button label. `attribution` renders a small "Spiritual data by RoxyAPI" credit under the result: off by default on every path. The one-tag script below forwards `data-submit-label`, `data-attribution`, `data-hide-sections` and `data-hide-readings` to the element and never sends them as request parameters. None of these apply in controlled mode. A list that shows one entry per tile (the dream search, the crystal grid) opens the picked entry in place under its tiles when it holds the key, and every pick also emits `roxy-symbol-select` for a page that pairs its own card. Any element that carries a key exposes `load({ path, method, query })`, which fetches one request into it and renders the result as assigned data.
|
|
451
459
|
|
|
452
|
-
**One tag, no element wiring.** For the simplest embed, load `dist/cdn/widgets.js` and drop a `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`. The script mounts the matching component from a generated slug map: with every path parameter supplied as a `data-*` attribute (`data-sign`, `data-id`) it fetches on mount, otherwise it renders the same input form. A second `data-*` attribute picks a variant (`data-period`, `data-mode`, `data-type`, `data-spread`). To keep every key on your own server instead, drop the publishable key and give the tag `data-submit-url
|
|
460
|
+
**One tag, no element wiring.** For the simplest embed, load `dist/cdn/widgets.js` and drop a `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`. The script mounts the matching component from a generated slug map: with every path parameter supplied as a `data-*` attribute (`data-sign`, `data-id`) it fetches on mount, otherwise it renders the same input form. A second `data-*` attribute picks a variant (`data-period`, `data-mode`, `data-type`, `data-spread`). To keep every key on your own server instead, drop the publishable key and give the tag `data-submit-url`: the widget renders the form and routes every request there, the city search included, and `data-location-url` sends the city search somewhere else. `data-submit-context` rides along with each proxied request.
|
|
453
461
|
|
|
454
|
-
**Theme every widget in one link.** Add `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css">` for a warm
|
|
462
|
+
**Theme every widget in one link.** Add `<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css">` for the Rosewater preset, a warm serif look (or `eucalyptus.css`, `kiln.css`, `moonlit.css`, or `celeste.css` for the roxyapi.com look, from the same folder; `components-catalog.json` lists every preset under `themes`), or set the `--roxy-font-display` token alone to swap result headings to a display face (it defaults to the body font, so nothing changes until you set it). See [THEMING.md](packages/ui/THEMING.md).
|
|
455
463
|
|
|
456
464
|
### Pattern 5: MCP tool-call response
|
|
457
465
|
|
|
@@ -501,12 +509,12 @@ No field renames. No glue code. Use the decision tree above to pick the componen
|
|
|
501
509
|
|
|
502
510
|
### Pattern 6: Next.js RSC streaming
|
|
503
511
|
|
|
504
|
-
Server fetches with the secret key
|
|
512
|
+
Server fetches with the secret key and renders the React component in the same Server Component. The API key never crosses the network.
|
|
505
513
|
|
|
506
514
|
```tsx
|
|
507
515
|
// app/page.tsx (Server Component)
|
|
508
516
|
import { createRoxy } from '@roxyapi/sdk';
|
|
509
|
-
import
|
|
517
|
+
import { RoxyVedicKundli } from '@roxyapi/ui-react';
|
|
510
518
|
|
|
511
519
|
const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
512
520
|
|
|
@@ -514,16 +522,6 @@ export default async function Page() {
|
|
|
514
522
|
const { data } = await roxy.vedicAstrology.generateBirthChart({
|
|
515
523
|
body: { date: '1990-01-15', time: '14:30:00', latitude: 19.07, longitude: 72.88, timezone: 5.5 },
|
|
516
524
|
});
|
|
517
|
-
return <BirthChartView data={data} />;
|
|
518
|
-
}
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
```tsx
|
|
522
|
-
// app/birth-chart-view.tsx (Client Component)
|
|
523
|
-
'use client';
|
|
524
|
-
import { RoxyVedicKundli } from '@roxyapi/ui-react';
|
|
525
|
-
|
|
526
|
-
export default function BirthChartView({ data }: { data: unknown }) {
|
|
527
525
|
return <RoxyVedicKundli data={data} />;
|
|
528
526
|
}
|
|
529
527
|
```
|
|
@@ -606,7 +604,7 @@ Ask for the response language AND load the matching catalogue, and the whole car
|
|
|
606
604
|
|
|
607
605
|
## Theming and dark mode
|
|
608
606
|
|
|
609
|
-
Components react to three signals in priority order. No events to dispatch. No JS bridge to write.
|
|
607
|
+
Components react to three signals in priority order. No events to dispatch. No JS bridge to write. Every component loads the design tokens when it connects, so a single script tag or a single import yields full theming and dark mode with nothing else to add.
|
|
610
608
|
|
|
611
609
|
| Signal | Where | Effect |
|
|
612
610
|
|---|---|---|
|
|
@@ -685,7 +683,7 @@ That table is the shared vocabulary, not the whole list. **`components-catalog.j
|
|
|
685
683
|
## Rules every agent must follow
|
|
686
684
|
|
|
687
685
|
- Always call `/location/search` first before any chart endpoint that takes latitude, longitude, or timezone. Use `<roxy-location-search>` for the input UI.
|
|
688
|
-
- Pass the response object directly. Components are stateless; they
|
|
686
|
+
- Pass the response object directly. Components are stateless; they fetch only in self-fetch mode (a `publishable-key` or a `submit-url`, Pattern 4), plus `<roxy-location-search>`, `<roxy-endpoint-form>`, and the widgets auto-mount script.
|
|
689
687
|
- Use the typed SDK from `@roxyapi/sdk` so prop shapes match the spec automatically.
|
|
690
688
|
- Theming is CSS custom properties on `:root` or per element. Switch light and dark via `data-theme` on any ancestor (see the table above). Do not write Tailwind classes inside the components; the shadow DOM ignores them.
|
|
691
689
|
- Honor reduced motion. The library already respects `prefers-reduced-motion: reduce` and the `--roxy-motion-duration` variable.
|
|
@@ -694,7 +692,7 @@ That table is the shared vocabulary, not the whole list. **`components-catalog.j
|
|
|
694
692
|
|
|
695
693
|
## Domain ordering
|
|
696
694
|
|
|
697
|
-
When listing domains in user-visible copy, use the canonical order: Western astrology, Vedic astrology, forecast, human design, Chinese astrology, feng shui, numerology, tarot, biorhythm, I Ching, crystals, dreams, angel numbers. Sort by this list and skip any domain the catalog does not carry a component for. Location is utility, not a selling domain. The `domain` field in `components-catalog.json` carries
|
|
695
|
+
When listing domains in user-visible copy, use the canonical order: Western astrology, Vedic astrology, forecast, human design, Chinese astrology, feng shui, Mesoamerican astrology, Vastu, numerology, Kabbalah, tarot, biorhythm, Ayurveda, I Ching, crystals, dreams, angel numbers. Sort by this list and skip any domain the catalog does not carry a component for. Location is utility, not a selling domain. The `domain` field in `components-catalog.json` carries short forms of these names (`Western`, `Vedic`, `Feng Shui`), so sort by this list rather than by whatever order you discovered components in.
|
|
698
696
|
|
|
699
697
|
## What not to ship
|
|
700
698
|
|
|
@@ -704,13 +702,13 @@ When listing domains in user-visible copy, use the canonical order: Western astr
|
|
|
704
702
|
- Do not call astrology endpoints with hardcoded coordinates. Always geocode first via `<roxy-location-search>` or `roxy.location.searchCities()`.
|
|
705
703
|
- Do not declare a local `interface XyzData` to describe a RoxyAPI response. Import the type from the component package you already installed: `import type { XyzResponse } from '@roxyapi/ui-react'` (or `@roxyapi/ui-vue`, or `@roxyapi/ui`). Local interfaces drift the moment the spec changes. You do not need `@roxyapi/sdk` for types.
|
|
706
704
|
- Do not write Tailwind utility classes inside a component. The Shadow DOM boundary stops them at the door. Theme through `--roxy-*` CSS custom properties on `:root` or per element instead.
|
|
707
|
-
- Two ways to feed a component, no third. Controlled (default, recommended for production): pass `data` as a prop or hydrate from a child `roxy-data` JSON island; your server holds the secret key. Self-fetch (no backend): set
|
|
705
|
+
- Two ways to feed a component, no third. Controlled (default, recommended for production): pass `data` as a prop or hydrate from a child `roxy-data` JSON island; your server holds the secret key. Self-fetch (no backend): set a `pk_` `publishable-key` (or a `submit-url` route) and the component renders its own form for its default endpoint and fetches in the browser; `data-endpoint` picks any other endpoint it renders (a secret key is refused client-side). Do not wrap a component in your own fetch loop or call a chart/table/card's internals.
|
|
708
706
|
- Do not redefine theme tokens or invent your own naming. Override the existing `--roxy-*` custom properties; the full list is in `THEMING.md`.
|
|
709
707
|
|
|
710
708
|
## Where to look next
|
|
711
709
|
|
|
712
|
-
- **Machine-readable catalog, and the one to reach for first**: <https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/components-catalog.json>. Every component with its `tag`, `pascal` name, `domain`, what it renders, the `endpoints` it consumes, its `parts`, and copy-paste `snippets`. Fetch and query it instead of scraping the tables in this file.
|
|
710
|
+
- **Machine-readable catalog, and the one to reach for first**: <https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/components-catalog.json>. Every component with its `tag`, `pascal` name, `domain`, what it renders, the `endpoints` it consumes, its markup `attributes`, its `parts`, and copy-paste `snippets`, plus the theme presets under `themes`. Fetch and query it instead of scraping the tables in this file.
|
|
713
711
|
- Token reference: `THEMING.md`, beside this file in the package
|
|
714
712
|
- Endpoint reference: <https://roxyapi.com/api-reference>
|
|
715
713
|
- Integration guide: <https://roxyapi.com/docs/ui>
|
|
716
|
-
- Live preview of every component: <https://roxyapi.
|
|
714
|
+
- Live preview of every component: <https://roxyapi.com/ui>
|
package/README.md
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
# @roxyapi/ui-react
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@roxyapi/ui-react)
|
|
10
|
-
[](https://roxyapi.com/ui)
|
|
11
11
|
[](https://roxyapi.com/ui)
|
|
12
12
|
[](https://roxyapi.com/api-reference)
|
|
13
13
|
[](https://roxyapi.com/pricing)
|
|
14
14
|
[](LICENSE)
|
|
15
15
|
|
|
16
|
-
> Live demo: **<https://roxyapi.
|
|
16
|
+
> Live demo: **<https://roxyapi.com/ui>**. Every component rendered against real API responses, light + dark, with the React/shadcn install command per card.
|
|
17
17
|
|
|
18
18
|
UI component library for the RoxyAPI catalog. Drop astrology, tarot, numerology, and every other RoxyAPI domain into any framework with one script tag or one npm install. Stateless components, typed responses, theme-agnostic. Beautiful defaults out of the box; the look is yours after that.
|
|
19
19
|
|
|
20
20
|
## Theme-agnostic, every component
|
|
21
21
|
|
|
22
|
-
Light, dark, your brand.
|
|
22
|
+
Light, dark, your brand. A handful of base tokens style the whole library and everything else derives from them, so one line restyles every component: `--roxy-accent` moves every accent mark, accent text and focus ring, `--roxy-font-sans` every heading and label, `--roxy-radius` every corner. The default look adapts to your page: it inherits your font, keeps the ink neutral and the borders hairline, and spends one restrained accent. No class overrides, no rebuild, no Tailwind required. Customize live at <https://roxyapi.com/ui> with the **Theme** menu and the **Customize colors** dialog (a picker per colour token, a copy-paste snippet).
|
|
23
23
|
|
|
24
24
|
<table>
|
|
25
25
|
<tr>
|
|
@@ -54,44 +54,36 @@ Light, dark, your brand. Set `--roxy-accent` on `:root` and every component foll
|
|
|
54
54
|
|
|
55
55
|
```css
|
|
56
56
|
:root {
|
|
57
|
-
/*
|
|
58
|
-
surface you place the component on; --roxy-bg is the field behind an input. */
|
|
59
|
-
--roxy-surface: #ffffff;
|
|
57
|
+
/* Page and ink. The card, the secondary ink, the muted text and every hairline derive from these two. */
|
|
60
58
|
--roxy-bg: #ffffff;
|
|
61
59
|
--roxy-fg: #0a0a0a;
|
|
62
|
-
--roxy-secondary: #475569;
|
|
63
|
-
--roxy-muted: #71717a;
|
|
64
|
-
--roxy-border: #e4e4e7;
|
|
65
60
|
|
|
66
|
-
/* Brand.
|
|
67
|
-
|
|
68
|
-
--roxy-accent: #f59e0b;
|
|
61
|
+
/* Brand. The text-safe shade (--roxy-accent-ink) and the focus ring (--roxy-ring) derive from it. */
|
|
62
|
+
--roxy-accent: #4a6297;
|
|
69
63
|
|
|
70
|
-
/* Status
|
|
64
|
+
/* Status. Each derives its own -fg ink for text on a tint of it. */
|
|
71
65
|
--roxy-success: #16a34a;
|
|
72
66
|
--roxy-warning: #ea580c;
|
|
73
67
|
--roxy-danger: #dc2626;
|
|
74
68
|
--roxy-info: #0284c7;
|
|
75
69
|
|
|
76
|
-
/*
|
|
77
|
-
--roxy-
|
|
78
|
-
--roxy-
|
|
70
|
+
/* Type, space, shape, motion. Leave the font unset to keep your page font. */
|
|
71
|
+
--roxy-font-sans: 'Inter', system-ui;
|
|
72
|
+
--roxy-text-base: 1rem;
|
|
73
|
+
--roxy-space-unit: 0.25rem;
|
|
74
|
+
--roxy-radius: 6px;
|
|
79
75
|
--roxy-motion-duration: 200ms; /* 0ms when prefers-reduced-motion */
|
|
80
76
|
}
|
|
81
77
|
|
|
82
78
|
[data-theme="dark"] {
|
|
83
|
-
--roxy-surface: #18181b;
|
|
84
79
|
--roxy-bg: #0a0a0a;
|
|
85
80
|
--roxy-fg: #fafafa;
|
|
86
|
-
--roxy-secondary: #94a3b8;
|
|
87
|
-
--roxy-muted: #a1a1aa;
|
|
88
|
-
--roxy-border: #27272a;
|
|
89
81
|
/* Only if you want a different accent in dark. Omit it to keep the default. */
|
|
90
|
-
--roxy-accent: #
|
|
82
|
+
--roxy-accent: #92aade;
|
|
91
83
|
}
|
|
92
84
|
```
|
|
93
85
|
|
|
94
|
-
Pick a tone, set the
|
|
86
|
+
Pick a tone, set the bases, every chart and card follows. Named presets ship as one stylesheet each (Rosewater, Eucalyptus, Kiln, Moonlit, and Celeste, the roxyapi.com look). Full token reference, the presets and the drawing hooks at [THEMING.md](https://github.com/RoxyAPI/ui/blob/main/packages/ui/THEMING.md). See the [FAQ](#faq) for switching between light and dark at runtime.
|
|
95
87
|
|
|
96
88
|
## Gallery
|
|
97
89
|
|
|
@@ -290,7 +282,7 @@ Every chart, table, and card adapts to light and dark automatically. Hover any i
|
|
|
290
282
|
</tr>
|
|
291
283
|
</table>
|
|
292
284
|
|
|
293
|
-
Tables, cards, forms, and helper components in the [live demo](https://roxyapi.
|
|
285
|
+
Tables, cards, forms, and helper components in the [live demo](https://roxyapi.com/ui).
|
|
294
286
|
|
|
295
287
|
## Why developers use Roxy UI
|
|
296
288
|
|
|
@@ -320,7 +312,7 @@ Then expand into natal charts, kundli, dasha, tarot, and every other domain. The
|
|
|
320
312
|
|
|
321
313
|
> **Pass `data`, not the envelope.** The SDK returns `{ data, error, request, response }`. Pass `data`, or the component renders `[object Object]`. This is the most common integration bug.
|
|
322
314
|
|
|
323
|
-
The key stays on your server. Vanilla HTML or a server-rendered page fetches the same way, then [inlines the JSON into the component](#server-rendered-no-javascript-wiring): no build step, no key in the browser. Try every component in the [live demo](https://roxyapi.
|
|
315
|
+
The key stays on your server. Vanilla HTML or a server-rendered page fetches the same way, then [inlines the JSON into the component](#server-rendered-no-javascript-wiring): no build step, no key in the browser. Try every component in the [live demo](https://roxyapi.com/ui), each with Preview, Code, and shadcn tabs and a live color customizer.
|
|
324
316
|
|
|
325
317
|
## Install
|
|
326
318
|
|
|
@@ -331,8 +323,6 @@ npm install @roxyapi/ui-react
|
|
|
331
323
|
One package. No peer install, no stylesheet to link, no Tailwind, no config change. Every response type is exported from the package, so nothing else is needed to be fully typed.
|
|
332
324
|
|
|
333
325
|
```tsx
|
|
334
|
-
'use client';
|
|
335
|
-
|
|
336
326
|
import { RoxyNatalChart, type NatalChartResponse } from '@roxyapi/ui-react';
|
|
337
327
|
|
|
338
328
|
export function Chart({ data }: { data: NatalChartResponse }) {
|
|
@@ -368,7 +358,7 @@ document.querySelector('roxy-vedic-kundli')!.data = kundli;
|
|
|
368
358
|
|
|
369
359
|
Always call `/location/search` first. Every chart endpoint expects latitude, longitude, and timezone.
|
|
370
360
|
|
|
371
|
-
> **Timezone format.** RoxyAPI accepts both forms: a decimal-hour offset (`5.5` for IST, `-5` for EST) or an IANA name (`'Asia/Kolkata'`, `'America/New_York'`). Pick one and stay consistent.
|
|
361
|
+
> **Timezone format.** RoxyAPI accepts both forms: a decimal-hour offset (`5.5` for IST, `-5` for EST) or an IANA name (`'Asia/Kolkata'`, `'America/New_York'`). Pick one and stay consistent. `/location/search` returns both, `timezone` as the IANA name and `utcOffset` as the decimal hours; the decimal form is shorter and the examples on this page use it. The IANA form is correct over DST boundaries when historical accuracy matters.
|
|
372
362
|
|
|
373
363
|
## Render an AI tool result
|
|
374
364
|
|
|
@@ -392,7 +382,7 @@ In React, `pascal` is the export name, so a namespace import renders it directly
|
|
|
392
382
|
|
|
393
383
|
```tsx
|
|
394
384
|
import * as RoxyUI from '@roxyapi/ui-react';
|
|
395
|
-
import { componentForTool } from '@roxyapi/ui-react';
|
|
385
|
+
import { componentForTool } from '@roxyapi/ui-react/tool-component';
|
|
396
386
|
|
|
397
387
|
export function ToolWidget({ toolName, output }: { toolName: string; output: string }) {
|
|
398
388
|
const found = componentForTool(toolName);
|
|
@@ -424,10 +414,10 @@ The two modes degrade differently, and only one of them can be rescued.
|
|
|
424
414
|
|
|
425
415
|
**Controlled mode** (the `<script class="roxy-data">` island above) already holds the reading in the page. Render it server-side as ordinary HTML alongside the island and put that markup *inside* the element. Components render into a shadow root and none of them expose a `<slot>`, so light-DOM children are painted only while the element is un-upgraded, and disappear the moment the bundle registers it. You get the server HTML without JavaScript and the live component with it, from the same markup, with no flash of both.
|
|
426
416
|
|
|
427
|
-
**Form mode** (`
|
|
417
|
+
**Form mode** (a `pk_` key or a `submit-url`, no data) is a self-fetch widget: it cannot work without JavaScript, because there is nothing to render until the visitor submits the form. Give it a light-DOM fallback that says so and links out.
|
|
428
418
|
|
|
429
419
|
```html
|
|
430
|
-
<roxy-natal-chart
|
|
420
|
+
<roxy-natal-chart publishable-key="pk_live_…">
|
|
431
421
|
<!-- Painted only when JavaScript is off. Replaced by the component otherwise. -->
|
|
432
422
|
<p>JavaScript is required to generate this chart.
|
|
433
423
|
<a href="https://roxyapi.com/products/astrology">Open it on roxyapi.com</a>.</p>
|
|
@@ -464,7 +454,7 @@ This is how the WordPress plugin renders: PHP fetches the response server-side,
|
|
|
464
454
|
import '@roxyapi/ui-react/jsx';
|
|
465
455
|
|
|
466
456
|
export default function Page() {
|
|
467
|
-
return <roxy-tarot-spread
|
|
457
|
+
return <roxy-tarot-spread spread="three-card" hide-readings />;
|
|
468
458
|
}
|
|
469
459
|
```
|
|
470
460
|
|
|
@@ -822,11 +812,11 @@ Two key types. **Secret keys** (`sk_*`) grant full account access: use them serv
|
|
|
822
812
|
Two ways to feed a component, and the key rule for each:
|
|
823
813
|
|
|
824
814
|
- **Controlled (recommended for production).** Your server fetches with the secret key and passes the response in via the `data` property or a `roxy-data` JSON island. No key of any kind reaches the browser. This is what the WordPress plugin and the server-rendered patterns do.
|
|
825
|
-
- **Self-fetch (no backend).** Give the component a `
|
|
815
|
+
- **Self-fetch (no backend).** Give the component a `publishable-key` and it renders its own form and fetches in the browser. `data-endpoint` is optional: without it the component fetches its default endpoint, its config attribute (`mode`, `period`, `type`, `spread`, `detail`) picks another of the endpoints it renders, and `data-endpoint` set to a spec path (`astrology/lilith` on `<roxy-positions-table>`) chooses any endpoint it renders. Only publishable keys work here: a secret key, or the `pk_live_YOUR_KEY` sample left in a copied snippet, is refused client-side, so the component shows the reason in place of its form, sends nothing and raises a validation error. A secret key cannot leak through self-fetch.
|
|
826
816
|
|
|
827
817
|
Set `ROXY_API_KEY` to your secret key in your server env for the server-side SDK examples on this page. For self-fetch embedding with no backend, use a publishable key (see the fully client-side pattern in [`AGENTS.md`](AGENTS.md)).
|
|
828
818
|
|
|
829
|
-
The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean toggle, native date and time, a city search wherever the request takes coordinates or a timezone, and one card per record for a request that takes several, with `Add` and `Remove` inside the bounds the API declares), collapses optional fields under one Advanced disclosure, reads a `lang` attribute for localized responses, and prints what the API rejects under the input it rejected, marked and summarised by label. When the page routes RoxyAPI traffic through your own server instead, `submit-url` names the route that answers
|
|
819
|
+
The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean toggle, native date and time, a city search wherever the request takes coordinates or a timezone, and one card per record for a request that takes several, with `Add` and `Remove` inside the bounds the API declares), collapses optional fields under one Advanced disclosure, reads a `lang` attribute for localized responses, and prints what the API rejects under the input it rejected, marked and summarised by label. When the page routes RoxyAPI traffic through your own server instead, `submit-url` alone names the route that answers every request the component makes, the city search included, so no key of any kind reaches the browser; add `location-url` only to send the city search somewhere else. `submit-context` takes a JSON object of your own and hands it to that route as `context` beside the request, which is where a page attaches its own verification data to a submission. For the simplest embed, load `dist/cdn/widgets.js` and drop one `<div data-roxy-widget="{slug}" data-publishable-key="pk_live_...">`: with the required attributes present it fetches on mount, otherwise it renders the form. That tag takes `data-submit-url`, `data-location-url` and `data-submit-context` too, so a one-tag embed can route every request through your server and carry no key at all. A single `<link>` to a theme preset (Rosewater, Eucalyptus, Kiln, Moonlit or Celeste, from the [Distribution](#distribution) table) restyles every widget on the page. A list that shows one entry per tile (the dream search, the crystal grid) opens the picked entry in place under its tiles when it holds the key, and every pick also emits `roxy-symbol-select` for a page that pairs its own card. Any element that carries a key exposes `load({ path, method, query })`, which fetches one request into it and renders the result as assigned data.
|
|
830
820
|
|
|
831
821
|
## Distribution
|
|
832
822
|
|
|
@@ -838,19 +828,18 @@ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean
|
|
|
838
828
|
| jsDelivr CDN (full bundle) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/roxy-ui.js` |
|
|
839
829
|
| jsDelivr CDN (per component) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/components/{name}.js` |
|
|
840
830
|
| Widgets auto-mount (one tag, browser keys) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/widgets.js` |
|
|
841
|
-
|
|
|
831
|
+
| Theme presets (one link each, by key: `practitioner` for Rosewater, `eucalyptus`, `kiln`, `moonlit`, `celeste`) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/{key}.css` |
|
|
842
832
|
| shadcn registry | `npx shadcn@latest add https://cdn.jsdelivr.net/gh/RoxyAPI/ui@latest/registry/{name}.json` |
|
|
843
|
-
| Components catalog (JSON: every component, domain, and
|
|
833
|
+
| Components catalog (JSON: every component, its domain, endpoints, attributes and parts, and the theme presets) | `cdn.jsdelivr.net/npm/@roxyapi/ui@latest/components-catalog.json` |
|
|
844
834
|
|
|
845
835
|
### Serve from your own domain
|
|
846
836
|
|
|
847
|
-
Every file a page loads ships in the package `dist` folder, and each [GitHub release](https://github.com/RoxyAPI/ui/releases) attaches the same package as a tarball (`package/dist`). Copy `dist/cdn` and `dist/schemas` to your server side by side, as they ship, and load `cdn/roxy-ui.js` (or `cdn/widgets.js`, or one file from `cdn/components/`) from there: forms read their schemas from beside the script, and the language files sit in `cdn/locales/`. Add `submit-url` and
|
|
837
|
+
Every file a page loads ships in the package `dist` folder, and each [GitHub release](https://github.com/RoxyAPI/ui/releases) attaches the same package as a tarball (`package/dist`): download `roxyapi-ui-{version}.tgz` from the [latest release](https://github.com/RoxyAPI/ui/releases/latest), or open any single file in the [current `dist/cdn` folder](https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/). Copy `dist/cdn` and `dist/schemas` to your server side by side, as they ship, and load `cdn/roxy-ui.js` (or `cdn/widgets.js`, or one file from `cdn/components/`) from there: forms read their schemas from beside the script, and the language files sit in `cdn/locales/`. Add `submit-url` and the page talks only to your own domain.
|
|
848
838
|
|
|
849
839
|
```html
|
|
850
840
|
<script src="/roxy/cdn/roxy-ui.js" defer></script>
|
|
851
841
|
<script src="/roxy/cdn/locales/es.js" defer></script>
|
|
852
|
-
<roxy-natal-chart
|
|
853
|
-
submit-url="/roxy/proxy" location-url="/roxy/location-search"></roxy-natal-chart>
|
|
842
|
+
<roxy-natal-chart submit-url="/roxy/proxy"></roxy-natal-chart>
|
|
854
843
|
```
|
|
855
844
|
|
|
856
845
|
## Components
|
|
@@ -948,12 +937,12 @@ Every file a page loads ships in the package `dist` folder, and each [GitHub rel
|
|
|
948
937
|
|
|
949
938
|
## Theming
|
|
950
939
|
|
|
951
|
-
Every component
|
|
940
|
+
Every component takes every colour, size, radius, space and font from `--roxy-*` CSS custom properties, and most of them derive from a handful of bases, so restyle through the tokens and never by overriding the internals of a component. Override globally on `:root` or per element. Light + dark defaults, container queries for responsive layouts at 320px and up. Every component loads the default tokens when it connects, from npm and the CDN alike, and your own declarations always win over the defaults: they are declared at zero specificity and inside the `roxy` cascade layer, so one plain line beats them in both modes, with no `!important` and no extra selector weight, and it works from inside a layer of your own. See [THEMING.md](https://github.com/RoxyAPI/ui/blob/main/packages/ui/THEMING.md) for the full token reference and for the one rule a page that scopes its theme to a wrapper has to know.
|
|
952
941
|
|
|
953
942
|
```css
|
|
954
943
|
:root {
|
|
955
944
|
--roxy-accent: #6d28d9;
|
|
956
|
-
--roxy-radius
|
|
945
|
+
--roxy-radius: 12px;
|
|
957
946
|
}
|
|
958
947
|
|
|
959
948
|
roxy-natal-chart {
|
|
@@ -1091,18 +1080,9 @@ Chinese is keyed by script rather than by language, so a page declaring `zh-Hant
|
|
|
1091
1080
|
- Remote MCP servers per domain at `roxyapi.com/mcp/{domain}`. No local setup. JSON tool-call responses feed straight into the matching component.
|
|
1092
1081
|
- Use cases agents handle in one prompt: birth chart from city + DOB, daily tarot embed, Vedic kundli matching, numerology life-path card, biorhythm dashboard, daily horoscope by sign, panchang for the day, I Ching three-coin cast.
|
|
1093
1082
|
|
|
1094
|
-
##
|
|
1083
|
+
## See every component
|
|
1095
1084
|
|
|
1096
|
-
|
|
1097
|
-
git clone https://github.com/RoxyAPI/ui.git
|
|
1098
|
-
cd ui
|
|
1099
|
-
bun install
|
|
1100
|
-
bun run build
|
|
1101
|
-
bun run preview
|
|
1102
|
-
# http://localhost:3001
|
|
1103
|
-
```
|
|
1104
|
-
|
|
1105
|
-
Local preview serves `apps/docs/` on port 3001. Same directory and same paths the live demo at <https://roxyapi.github.io/ui/> serves. See [examples](examples/) for vanilla HTML, React, Vue, and WordPress.
|
|
1085
|
+
Every component renders on sample data, light and dark, in every shipped language, at <https://roxyapi.com/ui>. See [examples](examples/) for vanilla HTML, React, Vue, and WordPress.
|
|
1106
1086
|
|
|
1107
1087
|
## Stack and integrations
|
|
1108
1088
|
|
|
@@ -1142,28 +1122,26 @@ Persist the choice in `localStorage` from your own code; the components do not o
|
|
|
1142
1122
|
<details>
|
|
1143
1123
|
<summary><strong>How big is each component? What is the bundle cost?</strong></summary>
|
|
1144
1124
|
|
|
1145
|
-
Every component bundle is
|
|
1125
|
+
Every component bundle is at most 32.3 KB gzipped and the full bundle (every component, helpers, base styles, and the inlined design tokens) is under 180 KB gzipped. Both ceilings are enforced in CI on every build, measured on the compressed bytes a browser actually downloads, so a release cannot quietly grow past them. A route that renders one chart pays for one component, not the whole catalog. Pin a concrete version in production for byte-stable cache hits.
|
|
1146
1126
|
</details>
|
|
1147
1127
|
|
|
1148
1128
|
<details>
|
|
1149
1129
|
<summary><strong>How tall does each component render on mobile?</strong></summary>
|
|
1150
1130
|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
What can grow vertically is the data card around it. `<roxy-natal-chart>` stacks the wheel above the aspect-grid tab, the dignity table, and the planet-reading accordion; the host article on the demo page measures roughly 2100px tall at 390px width because the accordion is fully expanded server-side. Production embeds usually drop the accordion or wrap the chart in a sized container, and the wheel alone fits the fold. Same applies to the synastry chart and the dasha timeline.
|
|
1131
|
+
A drawn chart (a wheel, a kundli, a bodygraph, a compass) keeps its proportions and caps itself at a width that suits it, so on a phone it takes the width of the card. Set `--roxy-chart-max-width` on one element or on `:root` to size it yourself. A grid or table figure spans the card at every width.
|
|
1154
1132
|
|
|
1155
|
-
|
|
1133
|
+
What grows vertically is the reading around the chart. `<roxy-natal-chart>` stacks the wheel above the aspect grid, the dignity table and the planet readings, and the same holds for the synastry chart and the dasha timeline. Keep the chart and drop the prose with `hide-readings`, or drop any single block with `hide-sections`; see [Chart without the written report](#chart-without-the-written-report).
|
|
1156
1134
|
</details>
|
|
1157
1135
|
|
|
1158
1136
|
<details>
|
|
1159
1137
|
<summary><strong>Does this work with Next.js App Router, Remix, Nuxt, SvelteKit, and Astro?</strong></summary>
|
|
1160
1138
|
|
|
1161
|
-
Yes. The components are standard custom elements; any framework that touches the DOM can mount them.
|
|
1139
|
+
Yes. The components are standard custom elements; any framework that touches the DOM can mount them. Each React component ships as a client boundary, so a Next.js Server Component fetches and renders it in one file:
|
|
1162
1140
|
|
|
1163
1141
|
```tsx
|
|
1164
1142
|
// app/page.tsx (Server Component)
|
|
1165
1143
|
import { createRoxy } from '@roxyapi/sdk';
|
|
1166
|
-
import
|
|
1144
|
+
import { RoxyNatalChart } from '@roxyapi/ui-react';
|
|
1167
1145
|
|
|
1168
1146
|
const roxy = createRoxy(process.env.ROXY_API_KEY!);
|
|
1169
1147
|
|
|
@@ -1171,21 +1149,11 @@ export default async function Page() {
|
|
|
1171
1149
|
const { data } = await roxy.astrology.generateNatalChart({
|
|
1172
1150
|
body: { date: '1990-01-15', time: '14:30:00', latitude: 19.07, longitude: 72.88, timezone: 5.5 },
|
|
1173
1151
|
});
|
|
1174
|
-
return <ChartView data={data} />;
|
|
1175
|
-
}
|
|
1176
|
-
```
|
|
1177
|
-
|
|
1178
|
-
```tsx
|
|
1179
|
-
// app/chart-view.tsx (Client Component)
|
|
1180
|
-
'use client';
|
|
1181
|
-
import { RoxyNatalChart } from '@roxyapi/ui-react';
|
|
1182
|
-
|
|
1183
|
-
export default function ChartView({ data }: { data: unknown }) {
|
|
1184
1152
|
return <RoxyNatalChart data={data} />;
|
|
1185
1153
|
}
|
|
1186
1154
|
```
|
|
1187
1155
|
|
|
1188
|
-
The server
|
|
1156
|
+
The markup is server rendered and hydrates in the browser. The API key never crosses the network. Nuxt pages render `@roxyapi/ui-vue` the same way, server rendered with no `<ClientOnly>`, and the same fetch shape works in Remix loaders, SvelteKit `+page.server.ts`, and Astro server endpoints.
|
|
1189
1157
|
</details>
|
|
1190
1158
|
|
|
1191
1159
|
<details>
|
|
@@ -1265,17 +1233,17 @@ For CSP, allow `script-src https://cdn.jsdelivr.net` if loading the bundle from
|
|
|
1265
1233
|
<details>
|
|
1266
1234
|
<summary><strong>How does versioning work?</strong></summary>
|
|
1267
1235
|
|
|
1268
|
-
Semver.
|
|
1236
|
+
Semver. Patch and minor releases are backwards compatible: tags, attributes, events, `data` shapes and part names keep working. A major release names every breaking change in its release notes. Pin a concrete version in production code:
|
|
1269
1237
|
|
|
1270
1238
|
```bash
|
|
1271
|
-
npm install @roxyapi/ui@
|
|
1239
|
+
npm install @roxyapi/ui@1
|
|
1272
1240
|
```
|
|
1273
1241
|
|
|
1274
1242
|
```html
|
|
1275
|
-
<script src="https://cdn.jsdelivr.net/npm/@roxyapi/ui@
|
|
1243
|
+
<script src="https://cdn.jsdelivr.net/npm/@roxyapi/ui@1.1.1/dist/cdn/roxy-ui.js"></script>
|
|
1276
1244
|
```
|
|
1277
1245
|
|
|
1278
|
-
The `@latest` URL on this page is for paste-friendly
|
|
1246
|
+
The `@latest` URL on this page is for paste-friendly examples; production code should pin.
|
|
1279
1247
|
</details>
|
|
1280
1248
|
|
|
1281
1249
|
<details>
|
|
@@ -1285,9 +1253,9 @@ Mock `@roxyapi/sdk` at the network boundary so unit tests do not hit the live AP
|
|
|
1285
1253
|
</details>
|
|
1286
1254
|
|
|
1287
1255
|
<details>
|
|
1288
|
-
<summary><strong>
|
|
1256
|
+
<summary><strong>Can I own the component file in my repo?</strong></summary>
|
|
1289
1257
|
|
|
1290
|
-
Use the shadcn registry.
|
|
1258
|
+
Use the shadcn registry. It drops a small typed React file per component into your repo, re-exporting the component from `@roxyapi/ui-react` so it stays in step with the package, plus a CSS theme bridge that maps your shadcn tokens onto `--roxy-*`. Rename it, wrap it, add your own props; restyle the drawing through the tokens and `::part()`.
|
|
1291
1259
|
|
|
1292
1260
|
```bash
|
|
1293
1261
|
npx shadcn@latest add https://cdn.jsdelivr.net/gh/RoxyAPI/ui@latest/registry/natal-chart.json
|
|
@@ -1320,9 +1288,9 @@ Tool-call JSON has the same shape as the SDK response. Pass it straight into the
|
|
|
1320
1288
|
</details>
|
|
1321
1289
|
|
|
1322
1290
|
<details>
|
|
1323
|
-
<summary><strong>
|
|
1291
|
+
<summary><strong>What is the license?</strong></summary>
|
|
1324
1292
|
|
|
1325
|
-
MIT
|
|
1293
|
+
MIT licensed and free to use, in commercial products too. Report bugs and ideas as [GitHub issues](https://github.com/RoxyAPI/ui/issues).
|
|
1326
1294
|
</details>
|
|
1327
1295
|
|
|
1328
1296
|
## License
|