@roxyapi/ui 1.2.0 → 1.3.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 +19 -1
- package/README.md +39 -0
- package/THEMING.md +2 -0
- package/components-catalog.json +1 -1
- package/dist/cdn/components/almanac-day.js +3 -3
- package/dist/cdn/components/angel-number-card.js +1 -1
- package/dist/cdn/components/angel-number-lookup.js +1 -1
- package/dist/cdn/components/arudha-padas.js +2 -2
- package/dist/cdn/components/ashtakavarga-grid.js +3 -3
- package/dist/cdn/components/aspects-table.js +1 -1
- package/dist/cdn/components/astrocartography-map.js +4 -4
- package/dist/cdn/components/bazi-chart.js +2 -2
- package/dist/cdn/components/bhav-chalit-table.js +2 -2
- package/dist/cdn/components/bhava-bala-table.js +2 -2
- package/dist/cdn/components/biorhythm-chart.js +2 -2
- package/dist/cdn/components/bodygraph.js +3 -3
- package/dist/cdn/components/chara-karakas.js +2 -2
- package/dist/cdn/components/choghadiya-grid.js +1 -1
- package/dist/cdn/components/compatibility-card.js +2 -2
- package/dist/cdn/components/compound-number.js +3 -3
- package/dist/cdn/components/crystal-card.js +1 -1
- package/dist/cdn/components/crystal-grid.js +2 -2
- package/dist/cdn/components/dasha-timeline.js +2 -2
- package/dist/cdn/components/data.js +1 -1
- package/dist/cdn/components/divisional-chart.js +4 -4
- package/dist/cdn/components/dosha-card.js +2 -2
- 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 +2 -2
- package/dist/cdn/components/endpoint-form.js +2 -2
- package/dist/cdn/components/ephemeris-table.js +2 -2
- package/dist/cdn/components/fixed-stars.js +3 -3
- package/dist/cdn/components/flying-star-chart.js +2 -2
- package/dist/cdn/components/forecast-digest.js +3 -3
- package/dist/cdn/components/forecast-timeline.js +3 -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 +2 -2
- 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 +1 -1
- package/dist/cdn/components/heliacal-table.js +3 -3
- package/dist/cdn/components/hexagram.js +1 -1
- package/dist/cdn/components/hora-table.js +3 -3
- package/dist/cdn/components/horoscope-card.js +2 -2
- package/dist/cdn/components/kp-chart.js +3 -3
- package/dist/cdn/components/kp-finance-card.js +2 -2
- package/dist/cdn/components/kp-planets-table.js +2 -2
- package/dist/cdn/components/kp-ruling-planets.js +3 -3
- package/dist/cdn/components/kua-card.js +2 -2
- package/dist/cdn/components/local-space-compass.js +4 -4
- package/dist/cdn/components/location-search.js +1 -1
- 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 +2 -2
- package/dist/cdn/components/nakshatra-card.js +3 -3
- package/dist/cdn/components/natal-chart.js +10 -10
- package/dist/cdn/components/numerology-card.js +2 -2
- package/dist/cdn/components/panchang-table.js +2 -2
- 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 +11 -11
- package/dist/cdn/components/report.js +50 -0
- package/dist/cdn/components/shadbala-table.js +2 -2
- package/dist/cdn/components/synastry-chart.js +6 -6
- package/dist/cdn/components/tarot-card.js +2 -2
- package/dist/cdn/components/tarot-catalog.js +2 -2
- package/dist/cdn/components/tarot-spread.js +2 -2
- package/dist/cdn/components/transit-wheel.js +1 -1
- package/dist/cdn/components/transits-table.js +2 -2
- package/dist/cdn/components/upagraha-table.js +3 -3
- package/dist/cdn/components/vastu-mandala.js +5 -5
- package/dist/cdn/components/vedic-aspects.js +3 -3
- package/dist/cdn/components/vedic-daily.js +2 -2
- package/dist/cdn/components/vedic-kundli.js +45 -45
- package/dist/cdn/components/vedic-planets-table.js +1 -1
- package/dist/cdn/components/western-planets-table.js +2 -2
- package/dist/cdn/components/yoga-list.js +1 -1
- package/dist/cdn/components/zodiac-card.js +3 -3
- 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 +84 -84
- package/dist/cdn/widgets.js +1 -1
- 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.js +2 -2
- 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 +2 -2
- 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 +8 -8
- 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.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 +3 -3
- package/dist/components/hd-penta.js +1 -1
- 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 +3 -3
- 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.js +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/natal-chart.js +1 -1
- 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 +10 -10
- 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 +4 -4
- 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 +1 -1
- 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/i18n/chrome-strings.d.ts +1 -1
- package/dist/index.cjs +83 -83
- package/dist/index.d.ts +1 -0
- package/dist/index.js +85 -85
- 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/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/brand.d.ts +3 -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
|
|
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.
|
|
@@ -957,6 +995,7 @@ Every file a page loads ships in the package `dist` folder, and each [GitHub rel
|
|
|
957
995
|
| `<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
996
|
| `<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
997
|
| `<roxy-angel-number-lookup>` | Angel Numbers | GET /angel-numbers/lookup | Pattern analysis plus known meaning and digit-root fallback |
|
|
998
|
+
| `<roxy-report>` | Reports | POST /reports/... | Form to finished branded report, as a PDF download or inline HTML |
|
|
960
999
|
| `<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
1000
|
| `<roxy-endpoint-form>` | Helper | Any endpoint, from the spec | Schema-driven form, emits roxy-submit |
|
|
962
1001
|
| `<roxy-location-search>` | Helper | GET /location/search | Debounced city search input, emits roxy-location-select |
|
package/THEMING.md
CHANGED
|
@@ -214,6 +214,8 @@ Three optional attributes on every component set the brand without CSS. A value
|
|
|
214
214
|
|
|
215
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.
|
|
216
216
|
|
|
217
|
+
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.
|
|
218
|
+
|
|
217
219
|
### Dark mode
|
|
218
220
|
|
|
219
221
|
Three opt-in mechanisms work out of the box, on the CDN and the npm path alike, because every component loads the tokens when it connects.
|