@roxyapi/ui 0.19.2 → 0.19.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const ROXY_UI_VERSION = "0.19.2";
1
+ export declare const ROXY_UI_VERSION = "0.19.3";
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.2",
3
+ "version": "0.19.3",
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",
@@ -364,7 +364,7 @@ export class RoxyAspectsTable extends RoxyDataElement<AspectsData> {
364
364
  <span class="pill pill--muted">Neutral: ${s.neutral}</span>
365
365
  ${byType.map(
366
366
  ([type, count]) =>
367
- html`<span class="pill pill--muted">${capitalize(type.replace(/_/g, ' '))}: ${count}</span>`,
367
+ html`<span class="pill pill--muted">${formatAspectName({ type })}: ${count}</span>`,
368
368
  )}
369
369
  </div>`;
370
370
  }
@@ -9,7 +9,7 @@ import type {
9
9
  import { RoxyDataElement } from '../utils/base-element.js';
10
10
  import { baseStyles } from '../utils/base-styles.js';
11
11
  import { disclosureStyles } from '../utils/disclosure.js';
12
- import { formatNumber } from '../utils/format.js';
12
+ import { formatNumber, normalizeAspect } from '../utils/format.js';
13
13
  import {
14
14
  type InterpSection,
15
15
  interpAccordionStyles,
@@ -487,7 +487,7 @@ export class RoxyCompatibilityCard extends RoxyDataElement<CompatibilityData> {
487
487
  if (!cycle) continue;
488
488
  sections.push({
489
489
  label: capitalize(name),
490
- aside: `${formatNumber(cycle.alignment, 0)}% in step · ${cycle.phase?.replace(/_/g, ' ')}`,
490
+ aside: `${formatNumber(cycle.alignment, 0)}% in step · ${humanize(cycle.phase ?? '')}`,
491
491
  body: cycle.description ?? '',
492
492
  });
493
493
  }
@@ -509,7 +509,8 @@ type KeyAspect = CalculateCompatibilityResponse extends {
509
509
  : never;
510
510
 
511
511
  function formatAspect(a: KeyAspect): string {
512
- const aspect = a.type.toLowerCase().replace(/_/g, '-');
512
+ // Lowercase on purpose: this lands mid-sentence as "Sun trine Moon".
513
+ const aspect = normalizeAspect(a);
513
514
  const orb =
514
515
  typeof a.orb === 'number' ? ` (orb ${formatNumber(a.orb, 1)}°)` : '';
515
516
  const head = [a.planet1, aspect, a.planet2].filter(Boolean).join(' ');
@@ -556,7 +556,7 @@ export class RoxySynastryChart extends RoxyDataElement<SynastryWithPlanets> {
556
556
  <span class="pill">Neutral: ${s.neutral}</span>
557
557
  ${byType.map(
558
558
  ([type, count]) =>
559
- html`<span class="pill">${capitalize(type.replace(/_/g, ' '))}: ${count}</span>`,
559
+ html`<span class="pill">${formatAspectName({ type })}: ${count}</span>`,
560
560
  )}
561
561
  </div>`;
562
562
  }
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.2';
2
+ export const ROXY_UI_VERSION = '0.19.3';