@roxyapi/ui 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +22 -2
- package/README.md +45 -0
- package/THEMING.md +32 -23
- package/components-catalog.json +1 -1
- package/dist/cdn/components/almanac-day.js +5 -3
- package/dist/cdn/components/angel-number-card.js +3 -3
- package/dist/cdn/components/angel-number-lookup.js +3 -3
- package/dist/cdn/components/arudha-padas.js +3 -3
- package/dist/cdn/components/ashtakavarga-grid.js +3 -3
- package/dist/cdn/components/aspects-table.js +3 -3
- package/dist/cdn/components/astrocartography-map.js +9 -9
- package/dist/cdn/components/bazi-chart.js +2 -2
- package/dist/cdn/components/bhav-chalit-table.js +3 -3
- package/dist/cdn/components/bhava-bala-table.js +2 -2
- package/dist/cdn/components/biorhythm-chart.js +3 -3
- package/dist/cdn/components/bodygraph.js +11 -11
- package/dist/cdn/components/chara-karakas.js +3 -3
- package/dist/cdn/components/choghadiya-grid.js +3 -3
- package/dist/cdn/components/compatibility-card.js +3 -3
- package/dist/cdn/components/compound-number.js +3 -3
- package/dist/cdn/components/crystal-card.js +2 -2
- package/dist/cdn/components/crystal-grid.js +2 -2
- package/dist/cdn/components/dasha-timeline.js +2 -2
- package/dist/cdn/components/data.js +2 -2
- package/dist/cdn/components/divisional-chart.js +54 -54
- package/dist/cdn/components/dosha-card.js +3 -3
- package/dist/cdn/components/dosha-constitution.js +2 -2
- package/dist/cdn/components/dream-card.js +3 -3
- package/dist/cdn/components/dream-search.js +3 -3
- package/dist/cdn/components/endpoint-form.js +3 -3
- package/dist/cdn/components/ephemeris-table.js +3 -3
- package/dist/cdn/components/fixed-stars.js +3 -3
- package/dist/cdn/components/flying-star-chart.js +3 -3
- package/dist/cdn/components/forecast-digest.js +3 -3
- package/dist/cdn/components/forecast-timeline.js +5 -3
- package/dist/cdn/components/gematria.js +3 -3
- package/dist/cdn/components/gochara-table.js +3 -3
- package/dist/cdn/components/guna-milan.js +3 -3
- package/dist/cdn/components/hd-connection.js +10 -10
- package/dist/cdn/components/hd-penta.js +16 -16
- package/dist/cdn/components/hd-type-card.js +3 -3
- package/dist/cdn/components/hd-variables.js +2 -2
- package/dist/cdn/components/heliacal-table.js +3 -3
- package/dist/cdn/components/hexagram.js +3 -3
- package/dist/cdn/components/hora-table.js +3 -3
- package/dist/cdn/components/horoscope-card.js +3 -3
- package/dist/cdn/components/kp-chart.js +3 -3
- package/dist/cdn/components/kp-finance-card.js +3 -3
- package/dist/cdn/components/kp-planets-table.js +3 -3
- package/dist/cdn/components/kp-ruling-planets.js +3 -3
- package/dist/cdn/components/kua-card.js +3 -3
- package/dist/cdn/components/local-space-compass.js +8 -8
- package/dist/cdn/components/location-search.js +3 -3
- package/dist/cdn/components/luck-pillars.js +3 -3
- package/dist/cdn/components/mayan-day-sign.js +3 -3
- package/dist/cdn/components/moon-phase.js +5 -3
- package/dist/cdn/components/nakshatra-card.js +3 -3
- package/dist/cdn/components/natal-chart.js +17 -17
- package/dist/cdn/components/numerology-card.js +3 -3
- package/dist/cdn/components/panchang-table.js +5 -3
- package/dist/cdn/components/positions-table.js +3 -3
- package/dist/cdn/components/profection-card.js +3 -3
- package/dist/cdn/components/reference-card.js +3 -3
- package/dist/cdn/components/relocation-wheel.js +18 -18
- package/dist/cdn/components/report.js +50 -0
- package/dist/cdn/components/shadbala-table.js +3 -3
- package/dist/cdn/components/synastry-chart.js +17 -17
- package/dist/cdn/components/tarot-card.js +2 -2
- package/dist/cdn/components/tarot-catalog.js +3 -3
- package/dist/cdn/components/tarot-spread.js +3 -3
- package/dist/cdn/components/transit-wheel.js +10 -10
- package/dist/cdn/components/transits-table.js +3 -3
- package/dist/cdn/components/upagraha-table.js +3 -3
- package/dist/cdn/components/vastu-mandala.js +8 -8
- package/dist/cdn/components/vedic-aspects.js +3 -3
- package/dist/cdn/components/vedic-daily.js +3 -3
- package/dist/cdn/components/vedic-kundli.js +33 -33
- package/dist/cdn/components/vedic-planets-table.js +3 -3
- package/dist/cdn/components/western-planets-table.js +3 -3
- package/dist/cdn/components/yoga-list.js +2 -2
- package/dist/cdn/components/zodiac-card.js +2 -2
- package/dist/cdn/locales/de.js +1 -1
- package/dist/cdn/locales/es.js +1 -1
- package/dist/cdn/locales/fr.js +1 -1
- package/dist/cdn/locales/hi.js +1 -1
- package/dist/cdn/locales/pt.js +1 -1
- package/dist/cdn/locales/ru.js +1 -1
- package/dist/cdn/locales/tr.js +1 -1
- package/dist/cdn/roxy-ui.js +115 -115
- package/dist/cdn/widgets.js +1 -1
- package/dist/charts.cjs +69 -69
- package/dist/charts.d.ts +3 -2
- package/dist/charts.js +69 -69
- package/dist/components/almanac-day.js +1 -1
- package/dist/components/angel-number-card.js +1 -1
- package/dist/components/angel-number-lookup.js +1 -1
- package/dist/components/arudha-padas.js +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -1
- package/dist/components/aspects-table.js +1 -1
- package/dist/components/astrocartography-map.d.ts +2 -1
- package/dist/components/astrocartography-map.js +7 -7
- package/dist/components/bazi-chart.js +1 -1
- package/dist/components/bhav-chalit-table.js +1 -1
- package/dist/components/bhava-bala-table.js +1 -1
- package/dist/components/biorhythm-chart.js +1 -1
- package/dist/components/bodygraph.js +8 -8
- package/dist/components/chara-karakas.js +1 -1
- package/dist/components/choghadiya-grid.js +1 -1
- package/dist/components/compatibility-card.js +1 -1
- package/dist/components/compound-number.js +1 -1
- package/dist/components/crystal-card.js +1 -1
- package/dist/components/crystal-grid.js +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/divisional-chart.js +45 -45
- package/dist/components/dosha-card.js +1 -1
- package/dist/components/dosha-constitution.js +1 -1
- package/dist/components/dream-card.js +1 -1
- package/dist/components/dream-search.js +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/ephemeris-table.js +1 -1
- package/dist/components/fixed-stars.js +1 -1
- package/dist/components/flying-star-chart.js +1 -1
- package/dist/components/forecast-digest.js +1 -1
- package/dist/components/forecast-timeline.d.ts +2 -0
- package/dist/components/forecast-timeline.js +1 -1
- package/dist/components/gematria.js +1 -1
- package/dist/components/gochara-table.js +1 -1
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/hd-connection.js +9 -9
- package/dist/components/hd-penta.js +13 -13
- package/dist/components/hd-type-card.js +1 -1
- package/dist/components/hd-variables.js +1 -1
- package/dist/components/heliacal-table.js +1 -1
- package/dist/components/hexagram.js +1 -1
- package/dist/components/hora-table.js +1 -1
- package/dist/components/horoscope-card.js +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-finance-card.js +1 -1
- package/dist/components/kp-planets-table.js +1 -1
- package/dist/components/kp-ruling-planets.js +1 -1
- package/dist/components/kua-card.js +1 -1
- package/dist/components/local-space-compass.js +5 -5
- package/dist/components/location-search.js +1 -1
- package/dist/components/luck-pillars.js +1 -1
- package/dist/components/mayan-day-sign.js +1 -1
- package/dist/components/moon-phase.d.ts +1 -1
- package/dist/components/moon-phase.js +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/natal-chart.js +16 -16
- package/dist/components/numerology-card.js +1 -1
- package/dist/components/panchang-table.js +1 -1
- package/dist/components/positions-table.js +1 -1
- package/dist/components/profection-card.js +1 -1
- package/dist/components/reference-card.js +1 -1
- package/dist/components/relocation-wheel.js +16 -16
- package/dist/components/report.d.ts +61 -0
- package/dist/components/report.js +1 -0
- package/dist/components/shadbala-table.js +1 -1
- package/dist/components/synastry-chart.js +15 -15
- package/dist/components/tarot-card.js +1 -1
- package/dist/components/tarot-catalog.js +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/transit-wheel.js +7 -7
- package/dist/components/transits-table.js +1 -1
- package/dist/components/upagraha-table.js +1 -1
- package/dist/components/vastu-mandala.js +4 -4
- package/dist/components/vedic-aspects.js +1 -1
- package/dist/components/vedic-daily.js +1 -1
- package/dist/components/vedic-kundli.js +42 -42
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/western-planets-table.js +1 -1
- package/dist/components/yoga-list.js +1 -1
- package/dist/components/zodiac-card.js +1 -1
- package/dist/forms/labels/de.json +1 -1
- package/dist/forms/labels/en.json +1 -1
- package/dist/forms/labels/es.json +1 -1
- package/dist/forms/labels/fr.json +1 -1
- package/dist/forms/labels/hi.json +1 -1
- package/dist/forms/labels/pt.json +1 -1
- package/dist/forms/labels/ru.json +1 -1
- package/dist/forms/labels/tr.json +1 -1
- package/dist/forms.json +1 -1
- package/dist/generated/endpoint-defaults.d.ts +1 -0
- package/dist/generated/symbol-font.d.ts +14 -0
- package/dist/i18n/chrome-strings.d.ts +1 -1
- package/dist/i18n/localized-element.d.ts +3 -1
- package/dist/index.cjs +121 -121
- package/dist/index.d.ts +1 -0
- package/dist/index.js +107 -107
- package/dist/locales/de.js +1 -1
- package/dist/locales/es.js +1 -1
- package/dist/locales/fr.js +1 -1
- package/dist/locales/hi.js +1 -1
- package/dist/locales/pt.js +1 -1
- package/dist/locales/ru.js +1 -1
- package/dist/locales/tr.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/schemas/post--reports-bazi.json +1 -0
- package/dist/schemas/post--reports-human-design.json +1 -0
- package/dist/schemas/post--reports-kundli.json +1 -0
- package/dist/schemas/post--reports-matchmaking.json +1 -0
- package/dist/schemas/post--reports-natal.json +1 -0
- package/dist/schemas/post--reports-numerology.json +1 -0
- package/dist/schemas/post--reports-synastry.json +1 -0
- package/dist/schemas/post--reports-tarot.json +1 -0
- package/dist/schemas/post--reports-yearly-forecast.json +1 -0
- package/dist/styles/charts/moon.css +1 -0
- package/dist/styles/charts/natal-wheel.css +1 -1
- package/dist/styles/charts/synastry-wheel.css +1 -1
- package/dist/styles/fonts/symbols/OFL.txt +94 -0
- package/dist/styles/fonts/symbols/noto-sans-math.woff2 +0 -0
- package/dist/styles/fonts/symbols/noto-sans-symbols-2.woff2 +0 -0
- package/dist/styles/fonts/symbols/noto-sans-symbols.woff2 +0 -0
- package/dist/styles/fonts/symbols/noto-sans.woff2 +0 -0
- package/dist/styles/fonts/symbols.css +1 -0
- package/dist/styles/fonts.d.ts +11 -2
- package/dist/styles/tokens-css.d.ts +1 -1
- package/dist/styles/tokens.css +1 -1
- package/dist/tokens/index.d.ts +10 -7
- package/dist/tool-component.cjs +1 -1
- package/dist/tool-component.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.gen.d.ts +17614 -15166
- package/dist/utils/base-element.d.ts +3 -0
- package/dist/utils/base-styles.d.ts +1 -1
- package/dist/utils/brand.d.ts +6 -1
- package/dist/utils/chart-styles.d.ts +2 -0
- package/dist/utils/glyph.d.ts +5 -0
- package/dist/utils/interp-accordion.d.ts +2 -0
- package/dist/utils/moon-mark.d.ts +7 -0
- package/dist/utils/moon.d.ts +37 -0
- package/dist/utils/object-url.d.ts +17 -0
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -48,6 +48,7 @@ Map the natural-language request to a component first; fall back to the table be
|
|
|
48
48
|
| "angel number {n}", "meaning of 111 / 222 / 1111", "I keep seeing this number" | `<roxy-angel-number-card>` |
|
|
49
49
|
| "what does {any number} mean", "analyze this number", "is 1234 an angel number" | `<roxy-angel-number-lookup>` |
|
|
50
50
|
| "crystals for {chakra}", "healing stones", "birthstone for {month}", "crystals for {sign}" | `<roxy-crystal-grid>` |
|
|
51
|
+
| "branded report", "white-label PDF", "sell a reading", "downloadable report" | `<roxy-report>` with `report` set to the report id (Pattern 8) |
|
|
51
52
|
| "search a city", "geocode", "lat/long for a place" | `<roxy-location-search>` |
|
|
52
53
|
| "build a form for endpoint X" | `<roxy-endpoint-form>` |
|
|
53
54
|
|
|
@@ -132,6 +133,7 @@ Use the table below for the formal endpoint to component mapping.
|
|
|
132
133
|
| `<roxy-dream-search>` | Dreams | GET /dreams/symbols | The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place |
|
|
133
134
|
| `<roxy-angel-number-card>` | Angel Numbers | GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily | Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections |
|
|
134
135
|
| `<roxy-angel-number-lookup>` | Angel Numbers | GET /angel-numbers/lookup | Pattern analysis plus known meaning and digit-root fallback |
|
|
136
|
+
| `<roxy-report>` | Reports | POST /reports/... | Form to finished branded report, as a PDF download or inline HTML |
|
|
135
137
|
| `<roxy-reference-card>` | Reference | GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number} | Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup |
|
|
136
138
|
| `<roxy-endpoint-form>` | Helper | Any endpoint, from the spec | Schema-driven form, emits roxy-submit |
|
|
137
139
|
| `<roxy-location-search>` | Helper | GET /location/search | Debounced city search input, emits roxy-location-select |
|
|
@@ -559,7 +561,23 @@ This is how the WordPress plugin renders: PHP fetches the response server-side,
|
|
|
559
561
|
|
|
560
562
|
- Writing the tag itself in a React or Next.js file? Import `@roxyapi/ui-react/jsx` once anywhere in the project and every `roxy-*` tag is typed, with its attributes and their legal values. It is the raw-tag path, so it carries attributes only; a page that passes a response uses the React or Vue component instead, which sets `data` as a property.
|
|
561
563
|
|
|
562
|
-
### Pattern 8: a
|
|
564
|
+
### Pattern 8: a branded report the visitor downloads
|
|
565
|
+
|
|
566
|
+
`<roxy-report>` renders the form a report asks for and returns the finished document under the site owner's brand. `report` picks it by id (the `report` values on the `roxy-report` endpoints in `components-catalog.json`: `natal`, `synastry`, `kundli`, `matchmaking`, `yearly-forecast`, `human-design`, `bazi`, `numerology`, `tarot`). `format="pdf"` (default) shows a download named after the report; `format="html"` shows the document in place.
|
|
567
|
+
|
|
568
|
+
```html
|
|
569
|
+
<roxy-report report="natal" publishable-key="pk_live_..." brand-name="Luna Rivera Astrology" brand-logo="https://example.com/logo.png" brand-footer="Book a reading at example.com" brand-color="#1e293b" brand-accent="#b45309" font="jost" theme="moonlit"></roxy-report>
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
Rules for this pattern:
|
|
573
|
+
|
|
574
|
+
- Branding comes from the element only (`brand-name`, `brand-logo`, `brand-footer`, `brand-color`, `brand-accent`, `font`, `theme`); the form never asks the visitor for it. Every value is optional.
|
|
575
|
+
- `theme` takes a `key` from `themes[]` in `components-catalog.json` and prints the document in that preset; link the same preset stylesheet so the form matches. `hide-readings` returns the charts and the data without the written reading.
|
|
576
|
+
- `brand-color` and `brand-accent` take `#rgb` or `#rrggbb`; `font` takes a `key` from `fonts[]` in `components-catalog.json`. The same three paint the form, so the page and the document match.
|
|
577
|
+
- A rejected request reads as one sentence in the page language above the API message, and a field the API names is marked under its input. Events: `roxy-validation-error`, `roxy-render-error`.
|
|
578
|
+
- One-tag widget: `<div data-roxy-widget="report" data-report="kundli" data-brand-name="..." data-publishable-key="pk_live_..."></div>`. React and Vue: `report`, `format`, `brandName`, `brandLogo`, `brandFooter`, `brandColor`, `brandAccent`, `font`, `theme`, `hideReadings`.
|
|
579
|
+
|
|
580
|
+
### Pattern 9: a chart as an SVG string on the server
|
|
563
581
|
|
|
564
582
|
`@roxyapi/ui/charts` returns the exact `<svg>` a component draws, as a string, with no DOM: `natalWheelSvg(natalResponse, { lang })`, `synastryWheelSvg(synastryResponse)`, `kundliSvg(toKundliViewModel(birthChart.meta), { style: 'south' })`, `bodygraphSvg(bodygraphResponse)`. Use it for a PDF, an email or a static page.
|
|
565
583
|
|
|
@@ -571,7 +589,9 @@ const { data } = await roxy.astrology.generateNatalChart({ body, throwOnError: t
|
|
|
571
589
|
const svg: string = natalWheelSvg(data, { lang: 'es' });
|
|
572
590
|
```
|
|
573
591
|
|
|
574
|
-
Paint it with `dist/styles/tokens.css` plus the chart sheet, `dist/styles/charts/{natal-wheel,synastry-wheel,kundli,bodygraph}.css` (subpath `@roxyapi/ui/styles/charts/*.css`). Import a locale only for a language other than English. The same subpath exports the font pairs as data: `ROXY_FONTS` (keys as in `fonts[]`) and `fontFaces(key)`.
|
|
592
|
+
Paint it with `dist/styles/tokens.css` plus the chart sheet, `dist/styles/charts/{natal-wheel,synastry-wheel,kundli,bodygraph,moon}.css` (subpath `@roxyapi/ui/styles/charts/*.css`). Import a locale only for a language other than English. The same subpath exports the font pairs as data: `ROXY_FONTS` (keys as in `fonts[]`) and `fontFaces(key)`; the Moon as `moonSvg({ illumination, waxing, hemisphere, eclipse, size, lang })` and `lunarDayMoon(n)` for a tithi or lunar day; and the symbol face every glyph draws in as `SYMBOL_FAMILY` and `symbolFontFaces()`.
|
|
593
|
+
|
|
594
|
+
Every glyph draws in the `Roxy Symbols` face. The CDN script loads it; an npm build imports `@roxyapi/ui/styles/fonts/symbols.css` once, beside `tokens.css`. `components-catalog.json` publishes it as `symbolFont` (`family`, `stylesheet`, `files`). Components that draw the Moon take `hemisphere="south"` (React and Vue `hemisphere`, one-tag widget `data-hemisphere`).
|
|
575
595
|
|
|
576
596
|
## Localized responses
|
|
577
597
|
|
package/README.md
CHANGED
|
@@ -404,6 +404,44 @@ A compact tool result is decoded for you, and a name a host prefixed with its se
|
|
|
404
404
|
import { componentForTool } from '@roxyapi/ui-react/tool-component';
|
|
405
405
|
```
|
|
406
406
|
|
|
407
|
+
## Branded reports
|
|
408
|
+
|
|
409
|
+
`<roxy-report>` turns any report the API publishes into a form on your page and a finished document under your brand. The visitor fills the birth details the report asks for, with the same city search and pickers as every widget, and receives the document as a PDF download or in place on the page.
|
|
410
|
+
|
|
411
|
+
```html
|
|
412
|
+
<script src="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn/roxy-ui.js" defer></script>
|
|
413
|
+
<roxy-report
|
|
414
|
+
report="natal"
|
|
415
|
+
publishable-key="pk_live_YOUR_KEY"
|
|
416
|
+
brand-name="Luna Rivera Astrology"
|
|
417
|
+
brand-footer="Book a reading at example.com"
|
|
418
|
+
brand-color="#1e293b"
|
|
419
|
+
brand-accent="#b45309"
|
|
420
|
+
font="jost"
|
|
421
|
+
theme="moonlit"
|
|
422
|
+
></roxy-report>
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
| Attribute | What it does |
|
|
426
|
+
|---|---|
|
|
427
|
+
| `report` | Which report: `natal`, `synastry`, `kundli`, `matchmaking`, `yearly-forecast`, `human-design`, `bazi`, `numerology`, `tarot`. The published ids are the `report` values on the `roxy-report` endpoints in `components-catalog.json`. Unset, the first one is used |
|
|
428
|
+
| `format` | `pdf` (default) offers the document as a download named after the report; `html` shows it in place, sized to its content |
|
|
429
|
+
| `brand-name` | Your business or practitioner name on the cover and every page |
|
|
430
|
+
| `brand-logo` | An HTTPS URL of your logo, printed on the cover |
|
|
431
|
+
| `brand-footer` | A line at the foot of every page, such as a disclaimer or a booking note |
|
|
432
|
+
| `brand-color`, `brand-accent` | Your two colours, as `#rgb` or `#rrggbb`, on the document and on the form |
|
|
433
|
+
| `font` | A `key` from `fonts[]` in `components-catalog.json`, on the document and on the form |
|
|
434
|
+
| `theme` | A `key` from `themes[]` in `components-catalog.json`: the document prints in that preset. Link the same preset stylesheet (see Theme presets in THEMING.md) and the form matches it |
|
|
435
|
+
| `hide-readings` | The document carries the charts and the data without the written reading |
|
|
436
|
+
| `publishable-key` | Your `pk_` key, or `submit-url` to send the request through your own server |
|
|
437
|
+
| `lang` | The language of the form and the document |
|
|
438
|
+
|
|
439
|
+
React and Vue take the same settings as props (`report`, `format`, `brandName`, `brandLogo`, `brandFooter`, `brandColor`, `brandAccent`, `font`, `theme`, `hideReadings`). Every branding value is optional, and the document carries no mark but yours.
|
|
440
|
+
|
|
441
|
+
A request the API turns down reads as one sentence in the page language above the API message: details to check, a site the key does not allow, too many requests, or a busy moment. A field the API names is marked under its own input. The page hears `roxy-validation-error` when a required field is missing and `roxy-render-error` if a result cannot be drawn.
|
|
442
|
+
|
|
443
|
+
The one-tag widget takes the same settings as `data-` attributes: `<div data-roxy-widget="report" data-report="kundli" data-brand-name="Luna Rivera Astrology" data-publishable-key="pk_live_YOUR_KEY"></div>`.
|
|
444
|
+
|
|
407
445
|
## Server-rendered, no JavaScript wiring
|
|
408
446
|
|
|
409
447
|
Server-rendered and cached pages (WordPress, JSX SSR, static HTML) cannot always run JavaScript to set the `data` property per element. Render the response into a child `<script type="application/json" class="roxy-data">` on the server instead. The component reads it on load. No per-element script, no API key in the browser.
|
|
@@ -498,6 +536,10 @@ The paint is a stylesheet per chart, published beside the tokens: `styles/charts
|
|
|
498
536
|
|
|
499
537
|
The same path carries the published font pairs as data: `ROXY_FONTS` (keyed by the `fonts[]` keys in `components-catalog.json`, each with its `name` and its `sans` and `display` stacks) and `fontFaces(key)`, the files a pair is drawn with, so a server sets the type a page shows.
|
|
500
538
|
|
|
539
|
+
`moonSvg({ illumination, waxing, hemisphere, eclipse, size, lang })` draws the Moon every component shows, from its lit fraction (0 to 100): the lit side, earthshine, the maria and a lunar or solar eclipse, turned for the Southern Hemisphere with `hemisphere: 'south'`. `lunarDayMoon(n)` gives the Moon of a tithi or a lunar day. Paint it with `styles/charts/moon.css`.
|
|
540
|
+
|
|
541
|
+
Every planet, sign, aspect, trigram and hexagram glyph draws in `Roxy Symbols`, a symbol face that ships in this package. From the CDN script it loads by itself. In an npm build, import `@roxyapi/ui/styles/fonts/symbols.css` once, beside `tokens.css`; on a server, `symbolFontFaces()` lists its files and `SYMBOL_FAMILY` names it.
|
|
542
|
+
|
|
501
543
|
## Most-used components per domain
|
|
502
544
|
|
|
503
545
|
The highest-demand components by domain, in the order you are most likely to ship them. Each pairing shows the SDK call that returns the response shape the component renders. Spec change in the API translates to typed change at the component boundary; the pairing below is derived from the live OpenAPI spec, not invented. Full catalog in the [Components](#components) table.
|
|
@@ -957,6 +999,7 @@ Every file a page loads ships in the package `dist` folder, and each [GitHub rel
|
|
|
957
999
|
| `<roxy-dream-search>` | Dreams | GET /dreams/symbols | The dream dictionary as tiles, browsed A to Z or searched; a pick opens the card in place |
|
|
958
1000
|
| `<roxy-angel-number-card>` | Angel Numbers | GET /angel-numbers/numbers/{number}, POST /angel-numbers/daily | Number meaning with spiritual, love, career, money, twin flame, biblical, and shadow sections |
|
|
959
1001
|
| `<roxy-angel-number-lookup>` | Angel Numbers | GET /angel-numbers/lookup | Pattern analysis plus known meaning and digit-root fallback |
|
|
1002
|
+
| `<roxy-report>` | Reports | POST /reports/... | Form to finished branded report, as a PDF download or inline HTML |
|
|
960
1003
|
| `<roxy-reference-card>` | Reference | GET /astrology/{signs,planet-meanings}/{id}, /vedic-astrology/{rashis,avasthas}/{id}, /iching/trigrams/{id}, /human-design/gates/{number}, /human-design/centers/{id}, /numerology/meanings/{number} | Symbol, name, description, keyword chips, and an attribute grid for any glossary lookup |
|
|
961
1004
|
| `<roxy-endpoint-form>` | Helper | Any endpoint, from the spec | Schema-driven form, emits roxy-submit |
|
|
962
1005
|
| `<roxy-location-search>` | Helper | GET /location/search | Debounced city search input, emits roxy-location-select |
|
|
@@ -992,6 +1035,8 @@ roxy-natal-chart {
|
|
|
992
1035
|
|
|
993
1036
|
Every component takes `brand-color`, `brand-accent` and `font` (`brandColor`, `brandAccent`, `font` in React and Vue), so a site sets its brand without CSS. The colours are `#rgb` or `#rrggbb`, and the accent re-derives its ink and focus ring in both modes. `font` is a `key` from `fonts[]` in `components-catalog.json`, which lists each pair with its stylesheet and files, and it overrides the theme preset's default pair. From the CDN script, the pair's stylesheet loads from the same place as the script. In an npm build, import `@roxyapi/ui/styles/fonts/{key}.css` once, the same way as `tokens.css`, or copy `dist/styles/fonts` to your own origin and link it. A value that does not validate is ignored.
|
|
994
1037
|
|
|
1038
|
+
A component that draws the Moon (the moon phase card, the panchang, the almanac, the forecast timeline) takes `hemisphere="south"` to show it as the Southern Hemisphere sees it, turned half a circle; absent reads as north. React and Vue: `hemisphere`; the one-tag widget: `data-hemisphere`.
|
|
1039
|
+
|
|
995
1040
|
```html
|
|
996
1041
|
<roxy-natal-chart brand-color="#3e2a2c" brand-accent="#914955" font="fraunces-jost"></roxy-natal-chart>
|
|
997
1042
|
```
|
package/THEMING.md
CHANGED
|
@@ -61,18 +61,19 @@ Set these and the rest follows. Dark mode reassigns the colour bases only. Set a
|
|
|
61
61
|
|
|
62
62
|
### Type, space, shape and motion bases
|
|
63
63
|
|
|
64
|
-
| Variable | Default
|
|
65
|
-
| ------------------------ |
|
|
66
|
-
| `--roxy-font` | `initial`
|
|
67
|
-
| `--roxy-font-sans` | `initial`
|
|
68
|
-
| `--roxy-font-display` | `var(--roxy-font-sans)`
|
|
69
|
-
| `--roxy-font-mono` | `ui-monospace, ...`
|
|
70
|
-
| `--roxy-
|
|
71
|
-
| `--roxy-text-
|
|
72
|
-
| `--roxy-
|
|
73
|
-
| `--roxy-
|
|
74
|
-
| `--roxy-
|
|
75
|
-
| `--roxy-motion-
|
|
64
|
+
| Variable | Default | Notes |
|
|
65
|
+
| ------------------------ | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `--roxy-font` | `initial` | A font pair `key` from `fonts[]`; each component sets both stacks from it and loads only that pair. A preset sets its default here |
|
|
67
|
+
| `--roxy-font-sans` | `initial` | Body text. Unset, so every component inherits the page font; set a family to choose one |
|
|
68
|
+
| `--roxy-font-display` | `var(--roxy-font-sans)` | Every heading and the form title. Follows the body font until set; one value restyles every heading |
|
|
69
|
+
| `--roxy-font-mono` | `ui-monospace, ...` | Numeric tables, code |
|
|
70
|
+
| `--roxy-font-symbol` | `"Roxy Symbols", ui-sans-serif, system-ui, sans-serif` | Every planet, sign, aspect, trigram and hexagram glyph and chart mark. The symbol face ships in this package and carries every glyph a component draws; set a family of your own to draw them in it |
|
|
71
|
+
| `--roxy-text-base` | `1rem` | Body size, the base of the type scale |
|
|
72
|
+
| `--roxy-text-scale` | `1.15` | The ratio between type steps |
|
|
73
|
+
| `--roxy-space-unit` | `0.25rem` | Every gap, padding and margin is a multiple of it |
|
|
74
|
+
| `--roxy-radius` | `6px` | Every corner derives from it |
|
|
75
|
+
| `--roxy-motion-duration` | `200ms` | Set to `0ms` to disable transitions and entry animations |
|
|
76
|
+
| `--roxy-motion-easing` | `cubic-bezier(0.4, 0, 0.2, 1)` | Standard ease |
|
|
76
77
|
|
|
77
78
|
`prefers-reduced-motion: reduce` always pins the duration to `0ms`.
|
|
78
79
|
|
|
@@ -93,16 +94,22 @@ Each one is computed from the bases above. You may still set any of them directl
|
|
|
93
94
|
|
|
94
95
|
### Colours
|
|
95
96
|
|
|
96
|
-
| Variable
|
|
97
|
-
|
|
|
98
|
-
| `--roxy-surface`
|
|
99
|
-
| `--roxy-primary`
|
|
100
|
-
| `--roxy-secondary`
|
|
101
|
-
| `--roxy-muted`
|
|
102
|
-
| `--roxy-border`
|
|
103
|
-
| `--roxy-accent-ink`
|
|
104
|
-
| `--roxy-ring`
|
|
105
|
-
| `--roxy-heat`
|
|
97
|
+
| Variable | Light default | Dark default | Used by |
|
|
98
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| `--roxy-surface` | `var(--roxy-bg)` | `var(--roxy-bg)` | The card a component paints. Flat by default; set it to lift the card off the page |
|
|
100
|
+
| `--roxy-primary` | `var(--roxy-fg)` | `var(--roxy-fg)` | Strong ink, and the neutral end of the planet colour scale |
|
|
101
|
+
| `--roxy-secondary` | `color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))` | `color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))` | Secondary ink: form labels, the generic renderer, chips, several chart strokes, the Metal element |
|
|
102
|
+
| `--roxy-muted` | `color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg))` | `color-mix(in oklab, var(--roxy-fg) 60%, var(--roxy-bg))` | Captions, small labels, table headings. 6.4 to 1 on the default card in light, 6.1 in dark |
|
|
103
|
+
| `--roxy-border` | `color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg))` | `color-mix(in oklab, var(--roxy-fg) 14%, var(--roxy-bg))` | Every hairline: card edge, table rule, wheel line |
|
|
104
|
+
| `--roxy-accent-ink` | `color-mix(in oklab, var(--roxy-accent) 70%, black)` | `var(--roxy-accent)` | Accent-coloured text and marks on the page. Override only to make accent TEXT a different shade from accent FILLS, and keep it legible on the page |
|
|
105
|
+
| `--roxy-ring` | `color-mix(in srgb, var(--roxy-accent) 40%, transparent)` | `color-mix(in srgb, var(--roxy-accent) 40%, transparent)` | Focus outlines |
|
|
106
|
+
| `--roxy-heat` | `var(--roxy-danger)` | `var(--roxy-danger)` | Intensity ramp for graded cells, mixed to transparency per tier so the text stays `--roxy-fg` |
|
|
107
|
+
| `--roxy-moon-lit` | `color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf)` | `color-mix(in oklab, var(--roxy-accent) 6%, #f6eedf)` | The sunlit side of every Moon, touched by the accent |
|
|
108
|
+
| `--roxy-moon-shade` | `color-mix(in oklab, var(--roxy-fg) 78%, var(--roxy-bg))` | `color-mix(in oklab, var(--roxy-fg) 10%, var(--roxy-bg))` | The unlit side of the Moon and the disc of a solar eclipse |
|
|
109
|
+
| `--roxy-moon-mare` | `color-mix(in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade))` | `color-mix(in oklab, var(--roxy-moon-lit) 62%, var(--roxy-moon-shade))` | The maria and Tycho on the lit side |
|
|
110
|
+
| `--roxy-moon-rim` | `color-mix(in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg))` | `color-mix(in oklab, var(--roxy-moon-shade) 70%, var(--roxy-fg))` | The fine edge of the disc |
|
|
111
|
+
| `--roxy-moon-eclipse` | `color-mix(in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade))` | `color-mix(in oklab, color-mix(in oklab, var(--roxy-danger) 55%, var(--roxy-warning)) 72%, var(--roxy-moon-shade))` | The copper of a lunar eclipse, darkened toward the unlit side |
|
|
112
|
+
| `--roxy-moon-corona` | `color-mix(in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit))` | `color-mix(in oklab, var(--roxy-warning) 60%, var(--roxy-moon-lit))` | The ring around a solar eclipse |
|
|
106
113
|
|
|
107
114
|
Every status colour has a `-fg` partner: the ink for text on a tint of that status colour, derived from its own base, so re-pointing a status colour carries its text with it. Override a `-fg` only to break the ink away from its base.
|
|
108
115
|
|
|
@@ -212,7 +219,9 @@ Three optional attributes on every component set the brand without CSS. A value
|
|
|
212
219
|
<roxy-natal-chart brand-color="#3e2a2c" brand-accent="#914955" font="fraunces-jost"></roxy-natal-chart>
|
|
213
220
|
```
|
|
214
221
|
|
|
215
|
-
In an npm build, import `@roxyapi/ui/styles/fonts/{key}.css` once (or copy `dist/styles/fonts` to your origin), the same way as `tokens.css`; fonts never load from a host the page did not choose.
|
|
222
|
+
In an npm build, import `@roxyapi/ui/styles/fonts/{key}.css` once (or copy `dist/styles/fonts` to your origin), the same way as `tokens.css`; fonts never load from a host the page did not choose. The symbol face every glyph draws in is `@roxyapi/ui/styles/fonts/symbols.css`, imported the same way; from the CDN script it loads by itself.
|
|
223
|
+
|
|
224
|
+
On `<roxy-report>` the same three brand the document as well as the form, and `theme`, a `key` from `themes[]` in `components-catalog.json`, prints the document in that preset; link the same preset stylesheet ([Theme presets](#theme-presets)) and the form matches it.
|
|
216
225
|
|
|
217
226
|
### Dark mode
|
|
218
227
|
|