@roxyapi/ui 0.2.1 → 0.2.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/index.js CHANGED
@@ -3961,11 +3961,11 @@ var RoxyNatalChart = class extends LitElement16 {
3961
3961
  if (planets.length === 0) return nothing17;
3962
3962
  return html16`<section class="interpretations">
3963
3963
  <h3>Planet readings</h3>
3964
- ${planets.map((p) => {
3964
+ ${planets.map((p, idx) => {
3965
3965
  const interp = p.interpretation;
3966
3966
  const glyph = PLANET_GLYPH[capitalize(p.name)] ?? "";
3967
3967
  const deg = formatNumber(p.degree ?? 0, 1);
3968
- return html16`<details class="interp-card">
3968
+ return html16`<details class="interp-card" name="natal-planet-readings" ?open=${idx === 0}>
3969
3969
  <summary>${glyph} ${p.name} <small>${p.sign ?? ""} ${deg}</small></summary>
3970
3970
  <div class="interp-body">
3971
3971
  ${interp.summary ? html16`<p class="interp-summary">${interp.summary}</p>` : nothing17}
@@ -5687,7 +5687,7 @@ var RoxyTransitsTable = class extends LitElement23 {
5687
5687
  ${transitAspects?.length ? html23`<div>
5688
5688
  <p class="section-label">Transit aspects</p>
5689
5689
  <div class="overflow-scroll">
5690
- ${this.renderAspectsTable(transitAspects)}
5690
+ ${this.renderAspectsList(transitAspects)}
5691
5691
  </div>
5692
5692
  </div>` : nothing24}
5693
5693
  </div>`;
@@ -5747,49 +5747,38 @@ var RoxyTransitsTable = class extends LitElement23 {
5747
5747
  </tbody>
5748
5748
  </table>`;
5749
5749
  }
5750
- renderAspectsTable(aspects) {
5751
- return html23`<table class="aspects-table">
5752
- <thead>
5753
- <tr>
5754
- <th scope="col">Transit Planet</th>
5755
- <th scope="col">Natal Planet</th>
5756
- <th scope="col">Type</th>
5757
- <th scope="col">Orb</th>
5758
- <th scope="col">Status</th>
5759
- <th scope="col">Strength</th>
5760
- </tr>
5761
- </thead>
5762
- <tbody>
5763
- ${aspects.map((a) => {
5750
+ renderAspectsList(aspects) {
5751
+ return html23`<div role="list" aria-label="Transit aspects">
5752
+ ${aspects.map((a, idx) => {
5764
5753
  const tGlyph = PLANET_GLYPH[capitalize(a.transitPlanet)] ?? "";
5765
5754
  const nGlyph = PLANET_GLYPH[capitalize(a.natalPlanet)] ?? "";
5766
- const natureClass = `nature-${(a.nature ?? "").toLowerCase()}`;
5767
- const summary = a.interpretation?.summary ?? "";
5768
- const rowClass = summary ? "aspect-row" : "aspect-row no-interp";
5769
- return html23`<tr class=${rowClass}>
5770
- <td>
5771
- <div class="arrow-cell">
5772
- <span class="glyph" aria-hidden="true">${tGlyph}</span>
5773
- ${a.transitPlanet}
5774
- </div>
5775
- </td>
5776
- <td>
5777
- <div class="arrow-cell">
5778
- <span class="glyph" aria-hidden="true">${nGlyph}</span>
5779
- ${a.natalPlanet}
5780
- </div>
5781
- </td>
5782
- <td class=${natureClass}>${(a.type ?? "").toLowerCase()}</td>
5783
- <td class="num">${formatNumber(a.orb, 2)}</td>
5784
- <td>${a.isApplying ? "Applying" : "Separating"}</td>
5785
- <td class="num">${formatNumber(a.strength, 1)}</td>
5786
- </tr>
5787
- ${summary ? html23`<tr class="interp-row">
5788
- <td colspan="6">${summary}</td>
5789
- </tr>` : nothing24}`;
5755
+ const nature = (a.nature ?? "neutral").toLowerCase();
5756
+ const interp = a.interpretation;
5757
+ const type = (a.type ?? "").toLowerCase();
5758
+ const status = a.isApplying ? "Applying" : "Separating";
5759
+ return html23`<details class="aspect-card" role="listitem" name="transit-aspects" ?open=${idx === 0}>
5760
+ <summary>
5761
+ <span aria-hidden="true">${tGlyph}</span>
5762
+ ${a.transitPlanet}
5763
+ <span class="nature-badge ${nature}">${type}</span>
5764
+ <span aria-hidden="true">${nGlyph}</span>
5765
+ ${a.natalPlanet}
5766
+ <span class="meta">
5767
+ ${status} · orb ${formatNumber(a.orb, 2)}° · strength ${formatNumber(a.strength, 1)}
5768
+ </span>
5769
+ </summary>
5770
+ <div class="interp-body">
5771
+ ${interp?.summary ? html23`<p>${interp.summary}</p>` : nothing24}
5772
+ ${interp?.impact ? html23`<p><strong>Impact:</strong> ${interp.impact}</p>` : nothing24}
5773
+ ${interp?.timing ? html23`<p><strong>Timing:</strong> ${interp.timing}</p>` : nothing24}
5774
+ ${interp?.guidance ? html23`<p><strong>Guidance:</strong> ${interp.guidance}</p>` : nothing24}
5775
+ ${interp?.keywords?.length ? html23`<div class="interp-keywords">
5776
+ ${interp.keywords.map((k) => html23`<span class="kw">${k}</span>`)}
5777
+ </div>` : nothing24}
5778
+ </div>
5779
+ </details>`;
5790
5780
  })}
5791
- </tbody>
5792
- </table>`;
5781
+ </div>`;
5793
5782
  }
5794
5783
  };
5795
5784
  RoxyTransitsTable.styles = [
@@ -5922,47 +5911,73 @@ RoxyTransitsTable.styles = [
5922
5911
  color: var(--roxy-muted, #71717a);
5923
5912
  }
5924
5913
 
5925
- .nature-harmonious {
5926
- color: var(--roxy-success-fg, #166534);
5927
- }
5928
-
5929
- .nature-challenging {
5930
- color: var(--roxy-danger-fg, #991b1b);
5914
+ .overflow-scroll {
5915
+ overflow-x: auto;
5916
+ -webkit-overflow-scrolling: touch;
5931
5917
  }
5932
5918
 
5933
- .nature-neutral {
5934
- color: var(--roxy-muted, #71717a);
5919
+ .aspect-card {
5920
+ border: 1px solid var(--roxy-border, #e4e4e7);
5921
+ border-radius: var(--roxy-radius-md, 8px);
5922
+ padding: var(--roxy-space-sm, 0.5rem) var(--roxy-space-md, 1rem);
5923
+ margin-bottom: var(--roxy-space-xs, 0.25rem);
5935
5924
  }
5936
-
5937
- .arrow-cell {
5938
- display: inline-flex;
5925
+ .aspect-card summary {
5926
+ cursor: pointer;
5927
+ font-weight: 500;
5928
+ color: var(--roxy-fg, #0a0a0a);
5929
+ display: flex;
5930
+ flex-wrap: wrap;
5939
5931
  align-items: center;
5940
- gap: 4px;
5941
- white-space: nowrap;
5932
+ gap: 0.5em;
5942
5933
  }
5943
-
5944
- .interp-row td {
5945
- padding-top: 0;
5946
- padding-bottom: var(--roxy-space-sm, 0.5rem);
5947
- border-bottom: 1px solid var(--roxy-border, #e4e4e7);
5948
- color: var(--roxy-secondary, #475569);
5934
+ .aspect-card summary .meta {
5935
+ color: var(--roxy-muted, #71717a);
5936
+ font-weight: 400;
5949
5937
  font-size: var(--roxy-text-xs, 0.75rem);
5938
+ margin-left: auto;
5939
+ font-variant-numeric: tabular-nums;
5940
+ }
5941
+ .aspect-card .interp-body {
5942
+ margin-top: var(--roxy-space-xs, 0.25rem);
5943
+ color: var(--roxy-fg, #0a0a0a);
5944
+ font-size: var(--roxy-text-sm, 0.875rem);
5950
5945
  line-height: 1.45;
5951
5946
  }
5952
-
5953
- .aspect-row td {
5954
- border-bottom: none;
5955
- padding-bottom: 4px;
5947
+ .aspect-card .interp-body p {
5948
+ margin: 0 0 var(--roxy-space-xs, 0.25rem);
5956
5949
  }
5957
-
5958
- .aspect-row.no-interp td {
5959
- border-bottom: 1px solid var(--roxy-border, #e4e4e7);
5960
- padding-bottom: var(--roxy-space-sm, 0.5rem);
5950
+ .interp-keywords {
5951
+ display: flex;
5952
+ flex-wrap: wrap;
5953
+ gap: 0.25rem;
5954
+ margin-top: 0.5rem;
5961
5955
  }
5962
-
5963
- .overflow-scroll {
5964
- overflow-x: auto;
5965
- -webkit-overflow-scrolling: touch;
5956
+ .interp-keywords .kw {
5957
+ padding: 1px 8px;
5958
+ border-radius: 9999px;
5959
+ background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 14%, transparent);
5960
+ color: var(--roxy-accent-fg, #b45309);
5961
+ font-size: var(--roxy-text-xs, 0.75rem);
5962
+ }
5963
+ .nature-badge {
5964
+ display: inline-block;
5965
+ padding: 1px 8px;
5966
+ border-radius: 9999px;
5967
+ font-size: var(--roxy-text-xs, 0.75rem);
5968
+ font-weight: 600;
5969
+ }
5970
+ .nature-badge.harmonious {
5971
+ background: color-mix(in srgb, var(--roxy-success, #16a34a) 12%, transparent);
5972
+ color: var(--roxy-success-fg, #166534);
5973
+ }
5974
+ .nature-badge.challenging {
5975
+ background: color-mix(in srgb, var(--roxy-danger, #dc2626) 12%, transparent);
5976
+ color: var(--roxy-danger-fg, #991b1b);
5977
+ }
5978
+ .nature-badge.neutral {
5979
+ background: color-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent);
5980
+ color: var(--roxy-fg, #0a0a0a);
5966
5981
  }
5967
5982
  `
5968
5983
  ];
@@ -6092,9 +6107,9 @@ var RoxyYogaList = class extends LitElement25 {
6092
6107
  super(...arguments);
6093
6108
  this.data = null;
6094
6109
  this.filter = "";
6095
- this.handleInput = debounce((e) => {
6110
+ this.handleInput = (e) => {
6096
6111
  this.filter = e.target.value;
6097
- }, 200);
6112
+ };
6098
6113
  }
6099
6114
  renderQualityChip(quality) {
6100
6115
  const cls = `quality-chip quality-${quality}`;
@@ -6635,7 +6650,7 @@ var ROXY_COMPONENTS = [
6635
6650
  ];
6636
6651
 
6637
6652
  // packages/ui/src/version.ts
6638
- var ROXY_UI_VERSION = "0.2.1";
6653
+ var ROXY_UI_VERSION = "0.2.3";
6639
6654
 
6640
6655
  // packages/ui/src/index.ts
6641
6656
  var ROXY_UI_COMPONENTS = ROXY_COMPONENTS.map((c) => c.slug);