@roxyapi/ui 0.19.3 → 0.19.4

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/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const ROXY_UI_VERSION = "0.19.3";
1
+ export declare const ROXY_UI_VERSION = "0.19.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roxyapi/ui",
3
- "version": "0.19.3",
3
+ "version": "0.19.4",
4
4
  "description": "Web components for the RoxyAPI catalog. Drop-in charts, tables, cards, forms for astrology, tarot, numerology, biorhythm, I Ching, crystals, dreams, angel numbers, and more. One key, beautiful in 30 minutes.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -1,10 +1,7 @@
1
1
  import { css, html, nothing, svg } from 'lit';
2
2
  import { customElement } from 'lit/decorators.js';
3
3
  import { PLANET_GLYPH, SIGN_GLYPH, SIGNS_ORDER } from '../tokens/index.js';
4
- import type {
5
- CalculateSynastryResponse,
6
- NatalChartResponse,
7
- } from '../types/index.js';
4
+ import type { CalculateSynastryResponse } from '../types/index.js';
8
5
  import { RoxyDataElement } from '../utils/base-element.js';
9
6
  import { baseStyles } from '../utils/base-styles.js';
10
7
  import { longitudeToSignPosition, polarToCartesian } from '../utils/degree.js';
@@ -18,7 +15,13 @@ import {
18
15
  import { interpAccordionStyles } from '../utils/interp-accordion.js';
19
16
  import { capitalize } from '../utils/string.js';
20
17
 
21
- type PlanetEntry = NatalChartResponse['planets'][number];
18
+ /**
19
+ * A planet as the synastry response now returns it.
20
+ *
21
+ * @remarks
22
+ * Was `NatalChartResponse['planets'][number]`, because `/astrology/synastry` did not return positions and a caller had to merge two natal responses in by hand. The endpoint returns them as of 2026-07-26, so the wheel is drawable from ONE call. The synastry shape is the plotting subset (no `interpretation`, `speed` or `latitude`); the wheel only ever read `name`, `longitude` and `isRetrograde`, so nothing is lost.
23
+ */
24
+ type PlanetEntry = CalculateSynastryResponse['person1']['planets'][number];
22
25
  type InterAspect = CalculateSynastryResponse['interAspects'][number];
23
26
  type SynastrySummary = CalculateSynastryResponse['summary'];
24
27
  type SynastryPerson = CalculateSynastryResponse['person1'];
@@ -26,16 +29,6 @@ type SynastryPerson = CalculateSynastryResponse['person1'];
26
29
  /** How many inter-aspects get a full reading before the rest fall back to the catalog table. A synastry can return 90+ contacts; a practitioner works the tightest ones. */
27
30
  const READING_COUNT = 12;
28
31
 
29
- // Drawing the dual wheel requires per-person planet longitudes alongside
30
- // the synastry response. Callers can merge planet arrays from
31
- // /astrology/natal-chart into `person1.planets` and `person2.planets`
32
- // before passing the payload in; without them, the component falls back
33
- // to the inter-aspects table and a status note instead of an empty wheel.
34
- type SynastryWithPlanets = CalculateSynastryResponse & {
35
- person1?: { planets?: PlanetEntry[] };
36
- person2?: { planets?: PlanetEntry[] };
37
- };
38
-
39
32
  const SIZE = 360;
40
33
  const CENTER = SIZE / 2;
41
34
  const OUTER_R = 170;
@@ -48,7 +41,7 @@ const P2_R = 96;
48
41
  * /astrology/synastry.
49
42
  */
50
43
  @customElement('roxy-synastry-chart')
51
- export class RoxySynastryChart extends RoxyDataElement<SynastryWithPlanets> {
44
+ export class RoxySynastryChart extends RoxyDataElement<CalculateSynastryResponse> {
52
45
  static styles = [
53
46
  baseStyles,
54
47
  disclosureStyles,
@@ -378,7 +371,7 @@ export class RoxySynastryChart extends RoxyDataElement<SynastryWithPlanets> {
378
371
  return html`<div class="roxy-empty" role="status">No synastry data</div>`;
379
372
  }
380
373
 
381
- protected renderData(d: SynastryWithPlanets) {
374
+ protected renderData(d: CalculateSynastryResponse) {
382
375
  const { person1, person2, compatibilityScore, analysis } = d;
383
376
  const interAspects = d.interAspects ?? [];
384
377
  const p1Planets = person1?.planets ?? [];
@@ -458,10 +451,10 @@ export class RoxySynastryChart extends RoxyDataElement<SynastryWithPlanets> {
458
451
  <span><span class="swatch" style="background: var(--roxy-danger)"></span>challenging</span>
459
452
  </div>`
460
453
  : html`<div class="missing-planets" role="status">
461
- Synastry response missing planet positions. Pass
462
- <code>data</code> with <code>person1.planets</code> and
463
- <code>person2.planets</code> arrays from the natal-chart endpoint, or
464
- use the <code>&lt;roxy-data&gt;</code> fallback.
454
+ Synastry response missing planet positions. A current
455
+ <code>/astrology/synastry</code> response carries
456
+ <code>person1.planets</code> and <code>person2.planets</code>; the
457
+ inter-aspect readings below still work without them.
465
458
  </div>`
466
459
  }
467
460
  ${this.renderSummaryPills(d.summary)}
@@ -665,7 +658,7 @@ export class RoxySynastryChart extends RoxyDataElement<SynastryWithPlanets> {
665
658
  * rim with the label outside, so the two rising signs are immediately
666
659
  * scannable on the wheel without depending on tooltips.
667
660
  */
668
- private renderAscendants(data: SynastryWithPlanets) {
661
+ private renderAscendants(data: CalculateSynastryResponse) {
669
662
  const items: ReturnType<typeof svg>[] = [];
670
663
  const make = (
671
664
  asc: { sign: string; degree: number } | undefined,
@@ -7303,6 +7303,10 @@ export type GetMoonCalendarResponses = {
7303
7303
  * Calendar month for this lunar calendar.
7304
7304
  */
7305
7305
  month: number;
7306
+ /**
7307
+ * Month name, localized to the requested language. Saves the caller a lookup table when labelling a calendar heading, since the numeric month alone cannot be rendered without one.
7308
+ */
7309
+ monthName: string;
7306
7310
  /**
7307
7311
  * Daily moon phase and illumination for every day of the month.
7308
7312
  */
@@ -7504,7 +7508,7 @@ export type CalculateSynastryResponses = {
7504
7508
  */
7505
7509
  200: {
7506
7510
  /**
7507
- * Person 1 chart highlights: Ascendant, Sun sign, and Moon sign.
7511
+ * Person 1 chart highlights: Ascendant, Sun sign, Moon sign, and plotting positions.
7508
7512
  */
7509
7513
  person1: {
7510
7514
  /**
@@ -7532,9 +7536,38 @@ export type CalculateSynastryResponses = {
7532
7536
  * Moon sign of this person. Emotional nature and inner needs.
7533
7537
  */
7534
7538
  moonSign: string;
7539
+ /**
7540
+ * Planet positions for person 1, enough to render this side of a dual wheel without a second request. Per-planet interpretations are not repeated here; call the natal chart endpoint for an individual reading.
7541
+ */
7542
+ planets: Array<{
7543
+ /**
7544
+ * Planet or point name. Matches the names used in interAspects.
7545
+ */
7546
+ name: string;
7547
+ /**
7548
+ * Ecliptic longitude in degrees (0-360) measured from 0 Aries. This is the value a wheel plots.
7549
+ */
7550
+ longitude: number;
7551
+ /**
7552
+ * Zodiac sign containing the planet.
7553
+ */
7554
+ sign: string;
7555
+ /**
7556
+ * Degree within the sign (0-29.999).
7557
+ */
7558
+ degree: number;
7559
+ /**
7560
+ * House this planet occupies in the person 1 chart (1-12).
7561
+ */
7562
+ house: number;
7563
+ /**
7564
+ * True when the planet is retrograde at this moment.
7565
+ */
7566
+ isRetrograde: boolean;
7567
+ }>;
7535
7568
  };
7536
7569
  /**
7537
- * Person 2 chart highlights: Ascendant, Sun sign, and Moon sign.
7570
+ * Person 2 chart highlights: Ascendant, Sun sign, Moon sign, and plotting positions.
7538
7571
  */
7539
7572
  person2: {
7540
7573
  /**
@@ -7542,7 +7575,7 @@ export type CalculateSynastryResponses = {
7542
7575
  */
7543
7576
  name?: string;
7544
7577
  /**
7545
- * Ascendant position for person 2.
7578
+ * Ascendant position for person 2. Determines first house cusp and outward personality.
7546
7579
  */
7547
7580
  ascendant: {
7548
7581
  /**
@@ -7555,13 +7588,42 @@ export type CalculateSynastryResponses = {
7555
7588
  degree: number;
7556
7589
  };
7557
7590
  /**
7558
- * Sun sign of this person.
7591
+ * Sun sign (zodiac sign) of this person. Core identity and ego expression.
7559
7592
  */
7560
7593
  sunSign: string;
7561
7594
  /**
7562
- * Moon sign of this person.
7595
+ * Moon sign of this person. Emotional nature and inner needs.
7563
7596
  */
7564
7597
  moonSign: string;
7598
+ /**
7599
+ * Planet positions for person 2, enough to render this side of a dual wheel without a second request. Per-planet interpretations are not repeated here; call the natal chart endpoint for an individual reading.
7600
+ */
7601
+ planets: Array<{
7602
+ /**
7603
+ * Planet or point name. Matches the names used in interAspects.
7604
+ */
7605
+ name: string;
7606
+ /**
7607
+ * Ecliptic longitude in degrees (0-360) measured from 0 Aries. This is the value a wheel plots.
7608
+ */
7609
+ longitude: number;
7610
+ /**
7611
+ * Zodiac sign containing the planet.
7612
+ */
7613
+ sign: string;
7614
+ /**
7615
+ * Degree within the sign (0-29.999).
7616
+ */
7617
+ degree: number;
7618
+ /**
7619
+ * House this planet occupies in the person 2 chart (1-12).
7620
+ */
7621
+ house: number;
7622
+ /**
7623
+ * True when the planet is retrograde at this moment.
7624
+ */
7625
+ isRetrograde: boolean;
7626
+ }>;
7565
7627
  };
7566
7628
  /**
7567
7629
  * Overall compatibility score (0-100). Calculated from the balance of harmonious vs challenging inter-chart aspects weighted by planet importance.
@@ -10805,6 +10867,10 @@ export type GetMonthlyHoroscopeResponses = {
10805
10867
  * Monthly financial outlook and guidance.
10806
10868
  */
10807
10869
  finance: string;
10870
+ /**
10871
+ * Actionable guidance for the month as a whole, derived from the Mercury house activation for this sign. Distinct from the per-week advice inside weekByWeek: this is the single takeaway for the month.
10872
+ */
10873
+ advice: string;
10808
10874
  /**
10809
10875
  * Week-by-week breakdown with sign-specific focus areas based on transit house positions.
10810
10876
  */
@@ -15019,7 +15085,7 @@ export type GetDetailedPanchangData = {
15019
15085
  */
15020
15086
  longitude: number;
15021
15087
  /**
15022
- * Timezone offset from UTC in decimal hours. Used for sunrise/sunset/moonrise/moonset search accuracy and output time formatting. Essential for correct results outside IST. Defaults to 5.5 (IST).
15088
+ * Timezone offset from UTC in decimal hours, for example -5 for New York or 9 for Tokyo. Send the offset that matches the coordinates: sunrise, sunset and every muhurta boundary are found by searching forward from local midnight, so the default anchors the search to an Indian day. Omitting it for a location outside IST returns a correctly ordered set of periods for the wrong window, shifted by the difference between 5.5 and the real offset. Defaults to 5.5 (IST).
15023
15089
  */
15024
15090
  timezone?: number | string;
15025
15091
  };
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // Generated by scripts/sync-version.ts. Do not edit.
2
- export const ROXY_UI_VERSION = '0.19.3';
2
+ export const ROXY_UI_VERSION = '0.19.4';