@roxyapi/ui 0.4.1 → 0.6.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 +21 -0
- package/README.md +17 -1
- package/dist/cdn/components/ashtakavarga-grid.js +3 -362
- package/dist/cdn/components/ashtakavarga-grid.js.map +4 -4
- package/dist/cdn/components/biorhythm-chart.js +3 -226
- package/dist/cdn/components/biorhythm-chart.js.map +4 -4
- package/dist/cdn/components/choghadiya-grid.js +3 -232
- package/dist/cdn/components/choghadiya-grid.js.map +4 -4
- package/dist/cdn/components/compatibility-card.js +3 -231
- package/dist/cdn/components/compatibility-card.js.map +4 -4
- package/dist/cdn/components/dasha-timeline.js +3 -283
- package/dist/cdn/components/dasha-timeline.js.map +4 -4
- package/dist/cdn/components/data.js +3 -230
- package/dist/cdn/components/data.js.map +4 -4
- package/dist/cdn/components/divisional-chart.js +3 -356
- package/dist/cdn/components/divisional-chart.js.map +4 -4
- package/dist/cdn/components/dosha-card.js +3 -226
- package/dist/cdn/components/dosha-card.js.map +4 -4
- package/dist/cdn/components/endpoint-form.js +2 -243
- package/dist/cdn/components/endpoint-form.js.map +2 -2
- package/dist/cdn/components/guna-milan.js +3 -270
- package/dist/cdn/components/guna-milan.js.map +4 -4
- package/dist/cdn/components/hexagram.js +3 -247
- package/dist/cdn/components/hexagram.js.map +4 -4
- package/dist/cdn/components/horoscope-card.js +3 -281
- package/dist/cdn/components/horoscope-card.js.map +4 -4
- package/dist/cdn/components/kp-chart.js +3 -278
- package/dist/cdn/components/kp-chart.js.map +4 -4
- package/dist/cdn/components/kp-planets-table.js +3 -196
- package/dist/cdn/components/kp-planets-table.js.map +4 -4
- package/dist/cdn/components/kp-ruling-planets.js +3 -241
- package/dist/cdn/components/kp-ruling-planets.js.map +4 -4
- package/dist/cdn/components/location-search.js +2 -240
- package/dist/cdn/components/location-search.js.map +2 -2
- package/dist/cdn/components/moon-phase.js +3 -223
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/nakshatra-card.js +3 -201
- package/dist/cdn/components/nakshatra-card.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +3 -563
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +3 -233
- package/dist/cdn/components/numerology-card.js.map +4 -4
- package/dist/cdn/components/panchang-table.js +3 -220
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/shadbala-table.js +3 -284
- package/dist/cdn/components/shadbala-table.js.map +4 -4
- package/dist/cdn/components/synastry-chart.js +3 -399
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/tarot-card.js +3 -261
- package/dist/cdn/components/tarot-card.js.map +4 -4
- package/dist/cdn/components/tarot-spread.js +3 -249
- package/dist/cdn/components/tarot-spread.js.map +4 -4
- package/dist/cdn/components/transits-table.js +3 -382
- package/dist/cdn/components/transits-table.js.map +4 -4
- package/dist/cdn/components/vedic-kundli.js +3 -305
- package/dist/cdn/components/vedic-kundli.js.map +4 -4
- package/dist/cdn/components/vedic-planets-table.js +3 -203
- package/dist/cdn/components/vedic-planets-table.js.map +4 -4
- package/dist/cdn/components/western-planets-table.js +3 -192
- package/dist/cdn/components/western-planets-table.js.map +4 -4
- package/dist/cdn/components/yoga-list.js +3 -306
- package/dist/cdn/components/yoga-list.js.map +4 -4
- package/dist/cdn/roxy-ui.js +3 -5102
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/cdn/widgets.js +1 -114
- package/dist/components/ashtakavarga-grid.d.ts +1 -0
- package/dist/components/ashtakavarga-grid.d.ts.map +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -531
- package/dist/components/ashtakavarga-grid.js.map +4 -4
- package/dist/components/biorhythm-chart.d.ts +1 -0
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +1 -332
- package/dist/components/biorhythm-chart.js.map +4 -4
- package/dist/components/choghadiya-grid.d.ts +1 -0
- package/dist/components/choghadiya-grid.d.ts.map +1 -1
- package/dist/components/choghadiya-grid.js +1 -351
- package/dist/components/choghadiya-grid.js.map +4 -4
- package/dist/components/compatibility-card.d.ts +1 -0
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +1 -313
- package/dist/components/compatibility-card.js.map +4 -4
- package/dist/components/dasha-timeline.d.ts +1 -0
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +1 -401
- package/dist/components/dasha-timeline.js.map +4 -4
- package/dist/components/data.d.ts +1 -0
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +1 -362
- package/dist/components/data.js.map +4 -4
- package/dist/components/divisional-chart.d.ts +1 -0
- package/dist/components/divisional-chart.d.ts.map +1 -1
- package/dist/components/divisional-chart.js +1 -886
- package/dist/components/divisional-chart.js.map +4 -4
- package/dist/components/dosha-card.d.ts +1 -0
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +1 -293
- package/dist/components/dosha-card.js.map +4 -4
- package/dist/components/endpoint-form.js +1 -505
- package/dist/components/endpoint-form.js.map +3 -3
- package/dist/components/guna-milan.d.ts +1 -0
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +1 -374
- package/dist/components/guna-milan.js.map +4 -4
- package/dist/components/hexagram.d.ts +1 -0
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +1 -380
- package/dist/components/hexagram.js.map +4 -4
- package/dist/components/horoscope-card.d.ts +1 -0
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +1 -381
- package/dist/components/horoscope-card.js.map +4 -4
- package/dist/components/kp-chart.d.ts +1 -0
- package/dist/components/kp-chart.d.ts.map +1 -1
- package/dist/components/kp-chart.js +1 -395
- package/dist/components/kp-chart.js.map +4 -4
- package/dist/components/kp-planets-table.d.ts +1 -0
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +1 -246
- package/dist/components/kp-planets-table.js.map +4 -4
- package/dist/components/kp-ruling-planets.d.ts +1 -0
- package/dist/components/kp-ruling-planets.d.ts.map +1 -1
- package/dist/components/kp-ruling-planets.js +1 -288
- package/dist/components/kp-ruling-planets.js.map +4 -4
- package/dist/components/location-search.js +1 -461
- package/dist/components/location-search.js.map +3 -3
- package/dist/components/moon-phase.d.ts +1 -0
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +1 -327
- package/dist/components/moon-phase.js.map +4 -4
- package/dist/components/nakshatra-card.d.ts +1 -0
- package/dist/components/nakshatra-card.d.ts.map +1 -1
- package/dist/components/nakshatra-card.js +1 -244
- package/dist/components/nakshatra-card.js.map +4 -4
- package/dist/components/natal-chart.d.ts +1 -1
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +1 -1040
- package/dist/components/natal-chart.js.map +4 -4
- package/dist/components/numerology-card.d.ts +1 -0
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +1 -315
- package/dist/components/numerology-card.js.map +4 -4
- package/dist/components/panchang-table.d.ts +1 -0
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +1 -350
- package/dist/components/panchang-table.js.map +4 -4
- package/dist/components/shadbala-table.d.ts +1 -0
- package/dist/components/shadbala-table.d.ts.map +1 -1
- package/dist/components/shadbala-table.js +1 -413
- package/dist/components/shadbala-table.js.map +4 -4
- package/dist/components/synastry-chart.d.ts +1 -0
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +1 -658
- package/dist/components/synastry-chart.js.map +4 -4
- package/dist/components/tarot-card.d.ts +1 -0
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +1 -333
- package/dist/components/tarot-card.js.map +4 -4
- package/dist/components/tarot-spread.d.ts +1 -0
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +1 -310
- package/dist/components/tarot-spread.js.map +4 -4
- package/dist/components/transits-table.d.ts +3 -0
- package/dist/components/transits-table.d.ts.map +1 -1
- package/dist/components/transits-table.js +1 -548
- package/dist/components/transits-table.js.map +4 -4
- package/dist/components/vedic-kundli.d.ts +1 -0
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +1 -802
- package/dist/components/vedic-kundli.js.map +4 -4
- package/dist/components/vedic-planets-table.d.ts +1 -0
- package/dist/components/vedic-planets-table.d.ts.map +1 -1
- package/dist/components/vedic-planets-table.js +1 -368
- package/dist/components/vedic-planets-table.js.map +4 -4
- package/dist/components/western-planets-table.d.ts +1 -0
- package/dist/components/western-planets-table.d.ts.map +1 -1
- package/dist/components/western-planets-table.js +1 -363
- package/dist/components/western-planets-table.js.map +4 -4
- package/dist/components/yoga-list.d.ts +1 -0
- package/dist/components/yoga-list.d.ts.map +1 -1
- package/dist/components/yoga-list.js +1 -383
- package/dist/components/yoga-list.js.map +4 -4
- package/dist/index.cjs +1 -8653
- package/dist/index.cjs.map +4 -4
- package/dist/index.js +1 -8633
- package/dist/index.js.map +4 -4
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.gen.d.ts +590 -202
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/utils/disclosure.d.ts +16 -0
- package/dist/utils/disclosure.d.ts.map +1 -0
- package/dist/utils/kundli-render.d.ts.map +1 -1
- package/dist/utils/kundli-styles.d.ts.map +1 -1
- package/dist/utils/markup-data.d.ts +57 -0
- package/dist/utils/markup-data.d.ts.map +1 -0
- package/dist/utils/tablist.d.ts +44 -0
- package/dist/utils/tablist.d.ts.map +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +3 -1
- package/src/components/ashtakavarga-grid.ts +9 -0
- package/src/components/biorhythm-chart.ts +9 -0
- package/src/components/choghadiya-grid.ts +9 -0
- package/src/components/compatibility-card.ts +9 -0
- package/src/components/dasha-timeline.ts +19 -1
- package/src/components/data.ts +9 -0
- package/src/components/divisional-chart.ts +11 -0
- package/src/components/dosha-card.ts +9 -0
- package/src/components/guna-milan.ts +9 -0
- package/src/components/hexagram.ts +9 -0
- package/src/components/horoscope-card.ts +9 -0
- package/src/components/kp-chart.ts +9 -0
- package/src/components/kp-planets-table.ts +9 -0
- package/src/components/kp-ruling-planets.ts +9 -0
- package/src/components/moon-phase.ts +9 -0
- package/src/components/nakshatra-card.ts +9 -0
- package/src/components/natal-chart.ts +46 -62
- package/src/components/numerology-card.ts +9 -0
- package/src/components/panchang-table.ts +9 -0
- package/src/components/shadbala-table.ts +9 -0
- package/src/components/synastry-chart.ts +9 -0
- package/src/components/tarot-card.ts +9 -0
- package/src/components/tarot-spread.ts +9 -0
- package/src/components/transits-table.ts +54 -18
- package/src/components/vedic-kundli.ts +11 -1
- package/src/components/vedic-planets-table.ts +9 -0
- package/src/components/western-planets-table.ts +9 -0
- package/src/components/yoga-list.ts +9 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.gen.ts +602 -200
- package/src/utils/disclosure.ts +62 -0
- package/src/utils/kundli-render.ts +21 -35
- package/src/utils/kundli-styles.ts +0 -31
- package/src/utils/markup-data.ts +115 -0
- package/src/utils/tablist.ts +124 -0
- package/src/version.ts +1 -1
package/AGENTS.md
CHANGED
|
@@ -320,6 +320,27 @@ export default function BirthChartView({ data }: { data: unknown }) {
|
|
|
320
320
|
}
|
|
321
321
|
```
|
|
322
322
|
|
|
323
|
+
### Pattern 7: server-rendered markup (WordPress, JSX SSR, static HTML)
|
|
324
|
+
|
|
325
|
+
When the page is rendered on the server or served from cache, there may be no JavaScript to set the `data` property per element. Render the response into a child `<script type="application/json" class="roxy-data">` instead. The component reads the embedded JSON on load. No per-element script, no API key in the browser.
|
|
326
|
+
|
|
327
|
+
```html
|
|
328
|
+
<roxy-natal-chart>
|
|
329
|
+
<script type="application/json" class="roxy-data">
|
|
330
|
+
{ "planets": [ ], "houses": [ ], "aspects": [ ] }
|
|
331
|
+
</script>
|
|
332
|
+
</roxy-natal-chart>
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Rules for this pattern:
|
|
336
|
+
|
|
337
|
+
- The JSON must be the unwrapped RoxyAPI response, the same shape you would assign to `element.data`. Do not embed the SDK envelope (`{ data, error, request, response }`); embed `data`.
|
|
338
|
+
- The script must be a direct child of the component and carry both `type="application/json"` and `class="roxy-data"`.
|
|
339
|
+
- The JavaScript property always wins. If you assign `element.data` in script, the markup is ignored. One component covers both server-rendered and dynamic pages with no branching.
|
|
340
|
+
- You can nest a server-rendered HTML fallback inside the same element for no-JavaScript and crawler views. The component reads only the marked script and leaves the fallback in place.
|
|
341
|
+
|
|
342
|
+
This is how the WordPress plugin renders: PHP fetches the response server-side, caches it, and writes the script into the page. The same shape works in any framework that emits HTML.
|
|
343
|
+
|
|
323
344
|
## Theming and dark mode
|
|
324
345
|
|
|
325
346
|
Components react to three signals in priority order. No events to dispatch. No JS bridge to write.
|
package/README.md
CHANGED
|
@@ -281,6 +281,22 @@ Always call `/location/search` first. Every chart endpoint expects latitude, lon
|
|
|
281
281
|
|
|
282
282
|
> **Timezone format.** RoxyAPI accepts both forms: a decimal-hour offset (`5.5` for IST, `-5` for EST) or an IANA name (`'Asia/Kolkata'`, `'America/New_York'`). Pick one and stay consistent. The decimal form is shorter and what `/location/search` returns; examples on this page use it. The IANA form is correct over DST boundaries when historical accuracy matters.
|
|
283
283
|
|
|
284
|
+
## Server-rendered, no JavaScript wiring
|
|
285
|
+
|
|
286
|
+
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.
|
|
287
|
+
|
|
288
|
+
```html
|
|
289
|
+
<roxy-natal-chart>
|
|
290
|
+
<script type="application/json" class="roxy-data">
|
|
291
|
+
{ "planets": [ ... ], "houses": [ ... ], "aspects": [ ... ] }
|
|
292
|
+
</script>
|
|
293
|
+
</roxy-natal-chart>
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
The component picks up the embedded JSON when no `data` property has been set. The JavaScript property always wins: assign `element.data` and the markup is ignored, so dynamic pages and server-rendered pages share one component with no branching. You can nest a server-rendered HTML fallback inside the same element for no-JavaScript and crawler views; the component leaves it untouched and reads only the marked script.
|
|
297
|
+
|
|
298
|
+
This is how the WordPress plugin renders: PHP fetches the response server-side, caches it, and embeds it in the page. The same shape works in any framework that emits HTML.
|
|
299
|
+
|
|
284
300
|
## Most-used components per domain
|
|
285
301
|
|
|
286
302
|
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.
|
|
@@ -612,7 +628,7 @@ Persist the choice in `localStorage` from your own code; the components do not o
|
|
|
612
628
|
<details>
|
|
613
629
|
<summary><strong>How big is each component? What is the bundle cost?</strong></summary>
|
|
614
630
|
|
|
615
|
-
Per-component bundles run
|
|
631
|
+
Per-component bundles run 6-10 KB gzipped, capped at 30 KB by CI. The full bundle (every component, helpers, base styles) stays well under the 150 KB CI cap, around 45 KB gzipped today. The React package loads the runtime on mount, so a route that renders one chart pays for one component, not the whole catalog. Pin a concrete version in production for byte-stable cache hits.
|
|
616
632
|
</details>
|
|
617
633
|
|
|
618
634
|
<details>
|
|
@@ -1,365 +1,6 @@
|
|
|
1
|
-
"use strict";var RoxyUI_ashtakavarga_grid=(()=>{var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),ft=/'/g,gt=/"/g,$t=/^(?:script|style|textarea|title)$/i,rt=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),u=rt(1),te=rt(2),ee=rt(3),A=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),yt=new WeakMap,x=_.createTreeWalker(_,129);function xt(i,t){if(!et(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return pt!==void 0?pt.createHTML(t):t}var zt=(i,t)=>{let e=i.length-1,r=[],s,o=t===2?"<svg>":t===3?"<math>":"",a=R;for(let h=0;h<e;h++){let n=i[h],d,p,l=-1,m=0;for(;m<n.length&&(a.lastIndex=m,p=a.exec(n),p!==null);)m=a.lastIndex,a===R?p[1]==="!--"?a=ut:p[1]!==void 0?a=mt:p[2]!==void 0?($t.test(p[2])&&(s=RegExp("</"+p[2],"g")),a=$):p[3]!==void 0&&(a=$):a===$?p[0]===">"?(a=s??R,l=-1):p[1]===void 0?l=-2:(l=a.lastIndex-p[2].length,d=p[1],a=p[3]===void 0?$:p[3]==='"'?gt:ft):a===gt||a===ft?a=$:a===ut||a===mt?a=R:(a=$,s=void 0);let g=a===$&&i[h+1].startsWith("/>")?" ":"";o+=a===R?n+qt:l>=0?(r.push(d),n.slice(0,l)+bt+n.slice(l)+y+g):n+y+(l===-2?h:g)}return[xt(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},O=class i{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let o=0,a=0,h=t.length-1,n=this.parts,[d,p]=zt(t,e);if(this.el=i.createElement(d,r),x.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(s=x.nextNode())!==null&&n.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(let l of s.getAttributeNames())if(l.endsWith(bt)){let m=p[a++],g=s.getAttribute(l).split(y),H=/([.?@])?(.*)/.exec(m);n.push({type:1,index:o,name:H[2],strings:g,ctor:H[1]==="."?J:H[1]==="?"?Z:H[1]==="@"?Q:E}),s.removeAttribute(l)}else l.startsWith(y)&&(n.push({type:6,index:o}),s.removeAttribute(l));if($t.test(s.tagName)){let l=s.textContent.split(y),m=l.length-1;if(m>0){s.textContent=I?I.emptyScript:"";for(let g=0;g<m;g++)s.append(l[g],M()),x.nextNode(),n.push({type:2,index:++o});s.append(l[m],M())}}}else if(s.nodeType===8)if(s.data===vt)n.push({type:2,index:o});else{let l=-1;for(;(l=s.data.indexOf(y,l+1))!==-1;)n.push({type:7,index:o}),l+=y.length-1}o++}}static createElement(t,e){let r=_.createElement("template");return r.innerHTML=t,r}};function w(i,t,e=i,r){if(t===A)return t;let s=r!==void 0?e._$Co?.[r]:e._$Cl,o=N(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),o===void 0?s=void 0:(s=new o(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=s:e._$Cl=s),s!==void 0&&(t=w(i,s._$AS(i,t.values),s,r)),t}var Y=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??_).importNode(e,!0);x.currentNode=s;let o=x.nextNode(),a=0,h=0,n=r[0];for(;n!==void 0;){if(a===n.index){let d;n.type===2?d=new U(o,o.nextSibling,this,t):n.type===1?d=new n.ctor(o,n.name,n.strings,this,t):n.type===6&&(d=new X(o,this,t)),this._$AV.push(d),n=r[++h]}a!==n?.index&&(o=x.nextNode(),a++)}return x.currentNode=_,s}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},U=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=w(this,t,e),N(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&N(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=O.createElement(xt(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let o=new Y(s,this),a=o.u(this.options);o.p(e),this.T(a),this._$AH=o}}_$AC(t){let e=yt.get(t.strings);return e===void 0&&yt.set(t.strings,e=new O(t)),e}k(t){et(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let o of t)s===e.length?e.push(r=new i(this.O(M()),this.O(M()),this,this.options)):r=e[s],r._$AI(o),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=dt(t).nextSibling;dt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},E=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,s){let o=this.strings,a=!1;if(o===void 0)t=w(this,t,e,0),a=!N(t)||t!==this._$AH&&t!==A,a&&(this._$AH=t);else{let h=t,n,d;for(t=o[0],n=0;n<o.length-1;n++)d=w(this,h[r+n],e,n),d===A&&(d=this._$AH[n]),a||=!N(d)||d!==this._$AH[n],d===c?t=c:t!==c&&(t+=(d??"")+o[n+1]),this._$AH[n]=d}a&&!s&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},J=class extends E{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Z=class extends E{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},Q=class extends E{constructor(t,e,r,s,o){super(t,e,r,s,o),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??c)===A)return;let r=this._$AH,s=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==c&&(r===c||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},X=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}};var Dt=tt.litHtmlPolyfillSupport;Dt?.(O,U),(tt.litHtmlVersions??=[]).push("3.3.2");var _t=(i,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let o=e?.renderBefore??null;r._$litPart$=s=new U(t.insertBefore(M(),o),o,void 0,e??{})}return s._$AI(i),s};var st=globalThis,b=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=_t(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};b._$litElement$=!0,b.finalized=!0,st.litElementHydrateSupport?.({LitElement:b});var It=st.litElementPolyfillSupport;It?.({LitElement:b});(st.litElementVersions??=[]).push("4.2.2");var At=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var Vt={attribute:!0,type:String,converter:k,reflect:!1,hasChanged:D},Kt=(i=Vt,t,e)=>{let{kind:r,metadata:s}=e,o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:a}=e;return{set(h){let n=t.get.call(this);t.set.call(this,h),this.requestUpdate(a,n,i,!0,h)},init(h){return h!==void 0&&this.C(a,void 0,i,h),h}}}if(r==="setter"){let{name:a}=e;return function(h){let n=this[a];t.call(this,h),this.requestUpdate(a,n,i,!0,h)}}throw Error("Unsupported decorator location: "+r)};function V(i){return(t,e)=>typeof e=="object"?Kt(i,t,e):((r,s,o)=>{let a=s.hasOwnProperty(o);return s.constructor.createProperty(o,r),a?Object.getOwnPropertyDescriptor(s,o):void 0})(i,t,e)}function St(i){return V({...i,state:!0,attribute:!1})}var it={Aries:"\u2648",Taurus:"\u2649",Gemini:"\u264A",Cancer:"\u264B",Leo:"\u264C",Virgo:"\u264D",Libra:"\u264E",Scorpio:"\u264F",Sagittarius:"\u2650",Capricorn:"\u2651",Aquarius:"\u2652",Pisces:"\u2653"};var Gt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],ze=Gt.map(i=>i.toLowerCase());var wt=C`
|
|
4
|
-
:host {
|
|
5
|
-
display: block;
|
|
6
|
-
container-type: inline-size;
|
|
7
|
-
font-family: var(
|
|
8
|
-
--roxy-font-sans,
|
|
9
|
-
system-ui,
|
|
10
|
-
-apple-system,
|
|
11
|
-
BlinkMacSystemFont,
|
|
12
|
-
'Segoe UI',
|
|
13
|
-
Roboto,
|
|
14
|
-
sans-serif
|
|
15
|
-
);
|
|
16
|
-
color: var(--roxy-fg, #0a0a0a);
|
|
17
|
-
background: transparent;
|
|
18
|
-
font-size: var(--roxy-text-base, 1rem);
|
|
19
|
-
line-height: var(--roxy-leading-normal, 1.5);
|
|
20
|
-
animation: roxy-fade-in var(--roxy-motion-duration, 200ms)
|
|
21
|
-
var(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
*,
|
|
25
|
-
*::before,
|
|
26
|
-
*::after {
|
|
27
|
-
box-sizing: border-box;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@keyframes roxy-fade-in {
|
|
31
|
-
from {
|
|
32
|
-
opacity: 0;
|
|
33
|
-
transform: translateY(2px);
|
|
34
|
-
}
|
|
35
|
-
to {
|
|
36
|
-
opacity: 1;
|
|
37
|
-
transform: translateY(0);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@media (prefers-reduced-motion: reduce) {
|
|
42
|
-
:host {
|
|
43
|
-
animation: none;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.roxy-skeleton {
|
|
48
|
-
background: linear-gradient(
|
|
49
|
-
90deg,
|
|
50
|
-
var(--roxy-border, #e4e4e7) 0%,
|
|
51
|
-
color-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%,
|
|
52
|
-
var(--roxy-border, #e4e4e7) 100%
|
|
53
|
-
);
|
|
54
|
-
background-size: 200% 100%;
|
|
55
|
-
animation: roxy-shimmer 1.4s ease-in-out infinite;
|
|
56
|
-
border-radius: var(--roxy-radius-md, 8px);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
@keyframes roxy-shimmer {
|
|
60
|
-
0% {
|
|
61
|
-
background-position: 200% 0;
|
|
62
|
-
}
|
|
63
|
-
100% {
|
|
64
|
-
background-position: -200% 0;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
@media (prefers-reduced-motion: reduce) {
|
|
69
|
-
.roxy-skeleton {
|
|
70
|
-
animation: none;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.roxy-empty {
|
|
75
|
-
padding: var(--roxy-space-lg, 1.5rem);
|
|
76
|
-
color: var(--roxy-muted, #71717a);
|
|
77
|
-
text-align: center;
|
|
78
|
-
font-size: var(--roxy-text-sm, 0.875rem);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
:host(:focus-within) .roxy-card {
|
|
82
|
-
outline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));
|
|
83
|
-
outline-offset: 2px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* Force the text-style variant on every Unicode glyph in the component.
|
|
87
|
-
* macOS and iOS substitute coloured emoji glyphs for the planetary and
|
|
88
|
-
* gender Unicode code points (Mars, Venus, Mercury, etc.) when the
|
|
89
|
-
* system colour-emoji font wins font selection. The text-style variant
|
|
90
|
-
* keeps glyphs monochrome so they inherit the surrounding fill colour
|
|
91
|
-
* and match the brand palette consistently across platforms.
|
|
92
|
-
*
|
|
93
|
-
* font-variant-emoji is part of CSS Fonts 4 (Safari 17+, Chrome 134+,
|
|
94
|
-
* Firefox 139+). On older browsers the rule is silently ignored.
|
|
95
|
-
*/
|
|
96
|
-
:host {
|
|
97
|
-
font-variant-emoji: text;
|
|
98
|
-
}
|
|
99
|
-
`;var Wt={sarva:"Sarvashtakavarga",bhinna:"Bhinnashtakavarga",pinda:"Shodhya Pinda"},S=["sarva","bhinna","pinda"],v=class extends b{constructor(){super(...arguments);this.data=null;this.activeTab="sarva"}render(){if(!this.data)return u`<div class="roxy-empty" role="status">No ashtakavarga data</div>`;let e=this.data.signs??[];return u`<div class="wrap" aria-label="Ashtakavarga grid">
|
|
100
|
-
<div class="head">
|
|
101
|
-
<h2 class="title">Ashtakavarga</h2>
|
|
102
|
-
${e.length?u`<p class="subtitle">${e.length} signs</p>`:c}
|
|
103
|
-
</div>
|
|
104
|
-
|
|
105
|
-
<div
|
|
106
|
-
class="tablist"
|
|
107
|
-
role="tablist"
|
|
108
|
-
aria-label="Ashtakavarga views"
|
|
109
|
-
@keydown=${this.onTabKeyDown}
|
|
110
|
-
>
|
|
111
|
-
${S.map(r=>u`<button
|
|
112
|
-
class="tab"
|
|
113
|
-
role="tab"
|
|
114
|
-
id="tab-${r}"
|
|
115
|
-
aria-selected=${this.activeTab===r?"true":"false"}
|
|
116
|
-
aria-controls="panel-${r}"
|
|
117
|
-
tabindex=${this.activeTab===r?"0":"-1"}
|
|
118
|
-
@click=${()=>{this.activeTab=r}}
|
|
119
|
-
>
|
|
120
|
-
${Wt[r]}
|
|
121
|
-
</button>`)}
|
|
122
|
-
</div>
|
|
123
|
-
|
|
124
|
-
<div
|
|
125
|
-
id="panel-${this.activeTab}"
|
|
126
|
-
role="tabpanel"
|
|
127
|
-
aria-labelledby="tab-${this.activeTab}"
|
|
128
|
-
>
|
|
129
|
-
${this.activeTab==="sarva"?this.renderSarva(e):this.activeTab==="bhinna"?this.renderBhinna(e):this.renderPinda()}
|
|
130
|
-
</div>
|
|
131
|
-
</div>`}onTabKeyDown(e){let r=S.indexOf(this.activeTab);e.key==="ArrowRight"?(e.preventDefault(),this.activeTab=S[(r+1)%S.length],this.focusActiveTab()):e.key==="ArrowLeft"&&(e.preventDefault(),this.activeTab=S[(r-1+S.length)%S.length],this.focusActiveTab())}focusActiveTab(){requestAnimationFrame(()=>{this.shadowRoot?.querySelector(`#tab-${this.activeTab}`)?.focus()})}bhinnaHeat(e){return e<=1?"heat-1":e<=2?"heat-2":e<=3?"heat-3":e<=4?"heat-4":e<=5?"heat-5":e<=6?"heat-6":"heat-7"}sarvaHeat(e){return e<=18?"heat-1":e<=23?"heat-2":e<=28?"heat-3":e<=32?"heat-4":e<=37?"heat-5":e<=42?"heat-6":"heat-7"}renderSarva(e){let r=this.data.sarvashtakavarga;return r?u`<div class="overflow-scroll">
|
|
132
|
-
<table aria-label="Sarvashtakavarga bindu counts per sign">
|
|
133
|
-
<thead>
|
|
134
|
-
<tr>
|
|
135
|
-
<th scope="col">Sign</th>
|
|
136
|
-
<th scope="col">Bindus</th>
|
|
137
|
-
</tr>
|
|
138
|
-
</thead>
|
|
139
|
-
<tbody>
|
|
140
|
-
${e.map((s,o)=>{let a=r.bindus[o]??0,h=this.sarvaHeat(a);return u`<tr>
|
|
141
|
-
<td>
|
|
142
|
-
<div class="planet-cell">
|
|
143
|
-
<span class="glyph" aria-hidden="true">${it[s]??""}</span>
|
|
144
|
-
${s}
|
|
145
|
-
</div>
|
|
146
|
-
</td>
|
|
147
|
-
<td class="${`heat-cell ${h}`}">${a}</td>
|
|
148
|
-
</tr>`})}
|
|
149
|
-
</tbody>
|
|
150
|
-
<tfoot>
|
|
151
|
-
<tr class="total-row">
|
|
152
|
-
<td>Total</td>
|
|
153
|
-
<td>${r.total}</td>
|
|
154
|
-
</tr>
|
|
155
|
-
</tfoot>
|
|
156
|
-
</table>
|
|
157
|
-
</div>`:u`<p class="roxy-empty">No sarvashtakavarga data</p>`}renderBhinna(e){let r=this.data.bhinnashtakavarga;return r?.length?u`<div class="overflow-scroll">
|
|
158
|
-
<table class="bhinna-table" aria-label="Bhinnashtakavarga planet-by-sign grid">
|
|
159
|
-
<thead>
|
|
160
|
-
<tr>
|
|
161
|
-
<th scope="col">Planet</th>
|
|
162
|
-
${e.map(s=>u`<th scope="col" title=${s}>${it[s]??s.slice(0,2)}</th>`)}
|
|
163
|
-
<th scope="col">Total</th>
|
|
164
|
-
</tr>
|
|
165
|
-
</thead>
|
|
166
|
-
<tbody>
|
|
167
|
-
${r.map(s=>u`<tr>
|
|
168
|
-
<td>${s.planet}</td>
|
|
169
|
-
${s.bindus.map(o=>{let a=this.bhinnaHeat(o);return u`<td class="${`heat-cell ${a}`}">${o}</td>`})}
|
|
170
|
-
<td>${s.total}</td>
|
|
171
|
-
</tr>`)}
|
|
172
|
-
</tbody>
|
|
173
|
-
</table>
|
|
174
|
-
</div>`:u`<p class="roxy-empty">No bhinnashtakavarga data</p>`}renderPinda(){let e=this.data.shodhyaPinda;return e?.length?u`<div class="overflow-scroll">
|
|
175
|
-
<table aria-label="Shodhya Pinda planet strength scores">
|
|
176
|
-
<thead>
|
|
177
|
-
<tr>
|
|
178
|
-
<th scope="col">Planet</th>
|
|
179
|
-
<th scope="col">Rashi Pinda</th>
|
|
180
|
-
<th scope="col">Graha Pinda</th>
|
|
181
|
-
<th scope="col">Shodhya Pinda</th>
|
|
182
|
-
</tr>
|
|
183
|
-
</thead>
|
|
184
|
-
<tbody>
|
|
185
|
-
${e.map(r=>u`<tr>
|
|
186
|
-
<td>${r.planet}</td>
|
|
187
|
-
<td>${r.rashiPinda}</td>
|
|
188
|
-
<td>${r.grahaPinda}</td>
|
|
189
|
-
<td>${r.shodhyaPinda}</td>
|
|
190
|
-
</tr>`)}
|
|
191
|
-
</tbody>
|
|
192
|
-
</table>
|
|
193
|
-
</div>`:u`<p class="roxy-empty">No shodhya pinda data</p>`}};v.styles=[wt,C`
|
|
194
|
-
.wrap {
|
|
195
|
-
display: grid;
|
|
196
|
-
gap: var(--roxy-space-md, 1rem);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.head {
|
|
200
|
-
display: flex;
|
|
201
|
-
justify-content: space-between;
|
|
202
|
-
align-items: baseline;
|
|
203
|
-
gap: var(--roxy-space-md, 1rem);
|
|
204
|
-
flex-wrap: wrap;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.title {
|
|
208
|
-
font-size: var(--roxy-text-lg, 1.125rem);
|
|
209
|
-
font-weight: var(--roxy-weight-bold, 600);
|
|
210
|
-
margin: 0;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.subtitle {
|
|
214
|
-
color: var(--roxy-muted, #71717a);
|
|
215
|
-
font-size: var(--roxy-text-sm, 0.875rem);
|
|
216
|
-
margin: 0;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Tabs */
|
|
220
|
-
.tablist {
|
|
221
|
-
display: flex;
|
|
222
|
-
gap: 2px;
|
|
223
|
-
border-bottom: 2px solid var(--roxy-border, #e4e4e7);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.tab {
|
|
227
|
-
padding: var(--roxy-space-xs, 0.25rem) var(--roxy-space-md, 1rem);
|
|
228
|
-
font-size: var(--roxy-text-sm, 0.875rem);
|
|
229
|
-
background: none;
|
|
230
|
-
border: none;
|
|
231
|
-
border-bottom: 2px solid transparent;
|
|
232
|
-
margin-bottom: -2px;
|
|
233
|
-
cursor: pointer;
|
|
234
|
-
color: var(--roxy-muted, #71717a);
|
|
235
|
-
font-family: inherit;
|
|
236
|
-
transition: color var(--roxy-motion-duration, 200ms) var(--roxy-motion-easing, ease);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
.tab[aria-selected='true'] {
|
|
240
|
-
color: var(--roxy-accent-fg, #b45309);
|
|
241
|
-
border-bottom-color: var(--roxy-accent, #f59e0b);
|
|
242
|
-
font-weight: var(--roxy-weight-bold, 600);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.tab:hover:not([aria-selected='true']) {
|
|
246
|
-
color: var(--roxy-fg, #0a0a0a);
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
/* Tables */
|
|
250
|
-
.overflow-scroll {
|
|
251
|
-
overflow-x: auto;
|
|
252
|
-
-webkit-overflow-scrolling: touch;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
table {
|
|
256
|
-
width: 100%;
|
|
257
|
-
border-collapse: collapse;
|
|
258
|
-
font-size: var(--roxy-text-sm, 0.875rem);
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
th,
|
|
262
|
-
td {
|
|
263
|
-
padding: var(--roxy-space-sm, 0.5rem);
|
|
264
|
-
border-bottom: 1px solid var(--roxy-border, #e4e4e7);
|
|
265
|
-
text-align: center;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
th {
|
|
269
|
-
color: var(--roxy-muted, #71717a);
|
|
270
|
-
font-weight: var(--roxy-weight-bold, 600);
|
|
271
|
-
text-transform: uppercase;
|
|
272
|
-
font-size: var(--roxy-text-xs, 0.75rem);
|
|
273
|
-
letter-spacing: 0.06em;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
td:first-child,
|
|
277
|
-
th:first-child {
|
|
278
|
-
text-align: left;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.glyph {
|
|
282
|
-
font-size: 1.1em;
|
|
283
|
-
margin-right: 3px;
|
|
284
|
-
line-height: 1;
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
.planet-cell {
|
|
288
|
-
display: flex;
|
|
289
|
-
align-items: center;
|
|
290
|
-
gap: 4px;
|
|
291
|
-
white-space: nowrap;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.total-row td {
|
|
295
|
-
font-weight: var(--roxy-weight-bold, 600);
|
|
296
|
-
border-top: 2px solid var(--roxy-border, #e4e4e7);
|
|
297
|
-
border-bottom: none;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
/* Heat cells. Single base hue (var --roxy-heat) mixed with
|
|
301
|
-
* transparent at increasing percentages produces seven readable
|
|
302
|
-
* tiers in both light and dark themes. Text colour stays
|
|
303
|
-
* var(--roxy-fg) so it inverts with the host theme without
|
|
304
|
-
* per-tier overrides. */
|
|
305
|
-
.heat-cell {
|
|
306
|
-
border-radius: var(--roxy-radius-sm, 4px);
|
|
307
|
-
font-weight: var(--roxy-weight-bold, 600);
|
|
308
|
-
min-width: 2rem;
|
|
309
|
-
font-variant-numeric: tabular-nums;
|
|
310
|
-
color: var(--roxy-fg, currentColor);
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.heat-1 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 6%, transparent); }
|
|
314
|
-
.heat-2 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 14%, transparent); }
|
|
315
|
-
.heat-3 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 26%, transparent); }
|
|
316
|
-
.heat-4 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 40%, transparent); }
|
|
317
|
-
.heat-5 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 55%, transparent); }
|
|
318
|
-
.heat-6 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 72%, transparent); }
|
|
319
|
-
.heat-7 { background: color-mix(in srgb, var(--roxy-heat, #ef4444) 90%, transparent); }
|
|
320
|
-
|
|
321
|
-
/* Bhinna grid: planet header column narrower */
|
|
322
|
-
.bhinna-table th:first-child,
|
|
323
|
-
.bhinna-table td:first-child {
|
|
324
|
-
min-width: 5rem;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
/* Tight cells below 480px so the 14-column bhinna grid stops
|
|
328
|
-
* overflowing the viewport. The wrapper keeps overflow-x:auto as
|
|
329
|
-
* a fallback for very long content. */
|
|
330
|
-
@container (max-width: 480px) {
|
|
331
|
-
.bhinna-table th,
|
|
332
|
-
.bhinna-table td {
|
|
333
|
-
padding: 0.3rem 0.35rem;
|
|
334
|
-
font-size: var(--roxy-text-xs, 0.75rem);
|
|
335
|
-
}
|
|
336
|
-
.bhinna-table th:first-child,
|
|
337
|
-
.bhinna-table td:first-child {
|
|
338
|
-
min-width: 3.5rem;
|
|
339
|
-
}
|
|
340
|
-
.heat-cell {
|
|
341
|
-
min-width: 1.5rem;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
/* Visual cue that the bhinna table is scrollable below the breakpoint:
|
|
345
|
-
* a soft gradient at the right edge so users see there is more to scroll. */
|
|
346
|
-
.overflow-scroll {
|
|
347
|
-
mask-image: linear-gradient(
|
|
348
|
-
to right,
|
|
349
|
-
transparent 0,
|
|
350
|
-
black 0.5rem,
|
|
351
|
-
black calc(100% - 1rem),
|
|
352
|
-
transparent 100%
|
|
353
|
-
);
|
|
354
|
-
-webkit-mask-image: linear-gradient(
|
|
355
|
-
to right,
|
|
356
|
-
transparent 0,
|
|
357
|
-
black 0.5rem,
|
|
358
|
-
black calc(100% - 1rem),
|
|
359
|
-
transparent 100%
|
|
360
|
-
);
|
|
361
|
-
}
|
|
362
|
-
`],B([V({attribute:!1})],v.prototype,"data",2),B([St()],v.prototype,"activeTab",2),v=B([At("roxy-ashtakavarga-grid")],v);return kt(Ft);})();
|
|
1
|
+
"use strict";var RoxyUI_ashtakavarga_grid=(()=>{var U=Object.defineProperty;var nt=Object.getOwnPropertyDescriptor;var Ct=Object.getOwnPropertyNames;var Pt=Object.prototype.hasOwnProperty;var Tt=(i,t)=>{for(var e in t)U(i,e,{get:t[e],enumerable:!0})},Rt=(i,t,e,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ct(t))!Pt.call(i,s)&&s!==e&&U(i,s,{get:()=>t[s],enumerable:!(r=nt(t,s))||r.enumerable});return i};var kt=i=>Rt(U({},"__esModule",{value:!0}),i),q=(i,t,e,r)=>{for(var s=r>1?void 0:r?nt(t,e):t,o=i.length-1,n;o>=0;o--)(n=i[o])&&(s=(r?n(t,e,s):n(s))||s);return r&&s&&U(t,e,s),s};var Xt={};Tt(Xt,{RoxyAshtakavargaGrid:()=>v});var B=globalThis,D=B.ShadowRoot&&(B.ShadyCSS===void 0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,W=Symbol(),at=new WeakMap,C=class{constructor(t,e,r){if(this._$cssResult$=!0,r!==W)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(D&&t===void 0){let r=e!==void 0&&e.length===1;r&&(t=at.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),r&&at.set(e,t))}return t}toString(){return this.cssText}},ht=i=>new C(typeof i=="string"?i:i+"",void 0,W),P=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((r,s,o)=>r+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[o+1],i[0]);return new C(e,i,W)},lt=(i,t)=>{if(D)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let r=document.createElement("style"),s=B.litNonce;s!==void 0&&r.setAttribute("nonce",s),r.textContent=e.cssText,i.appendChild(r)}},Y=D?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let r of t.cssRules)e+=r.cssText;return ht(e)})(i):i;var{is:Nt,defineProperty:Mt,getOwnPropertyDescriptor:Ht,getOwnPropertyNames:Ot,getOwnPropertySymbols:Lt,getPrototypeOf:Ut}=Object,j=globalThis,ct=j.trustedTypes,qt=ct?ct.emptyScript:"",Bt=j.reactiveElementPolyfillSupport,T=(i,t)=>i,R={toAttribute(i,t){switch(t){case Boolean:i=i?qt:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},z=(i,t)=>!Nt(i,t),dt={attribute:!0,type:String,converter:R,reflect:!1,useDefault:!1,hasChanged:z};Symbol.metadata??=Symbol("metadata"),j.litPropertyMetadata??=new WeakMap;var f=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=dt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let r=Symbol(),s=this.getPropertyDescriptor(t,r,e);s!==void 0&&Mt(this.prototype,t,s)}}static getPropertyDescriptor(t,e,r){let{get:s,set:o}=Ht(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:s,set(n){let h=s?.call(this);o?.call(this,n),this.requestUpdate(t,h,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dt}static _$Ei(){if(this.hasOwnProperty(T("elementProperties")))return;let t=Ut(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(T("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(T("properties"))){let e=this.properties,r=[...Ot(e),...Lt(e)];for(let s of r)this.createProperty(s,e[s])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[r,s]of e)this.elementProperties.set(r,s)}this._$Eh=new Map;for(let[e,r]of this.elementProperties){let s=this._$Eu(e,r);s!==void 0&&this._$Eh.set(s,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let r=new Set(t.flat(1/0).reverse());for(let s of r)e.unshift(Y(s))}else t!==void 0&&e.push(Y(t));return e}static _$Eu(t,e){let r=e.attribute;return r===!1?void 0:typeof r=="string"?r:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let r of e.keys())this.hasOwnProperty(r)&&(t.set(r,this[r]),delete this[r]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return lt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$ET(t,e){let r=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,r);if(s!==void 0&&r.reflect===!0){let o=(r.converter?.toAttribute!==void 0?r.converter:R).toAttribute(e,r.type);this._$Em=t,o==null?this.removeAttribute(s):this.setAttribute(s,o),this._$Em=null}}_$AK(t,e){let r=this.constructor,s=r._$Eh.get(t);if(s!==void 0&&this._$Em!==s){let o=r.getPropertyOptions(s),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:R;this._$Em=s;let h=n.fromAttribute(e,o.type);this[s]=h??this._$Ej?.get(s)??h,this._$Em=null}}requestUpdate(t,e,r,s=!1,o){if(t!==void 0){let n=this.constructor;if(s===!1&&(o=this[t]),r??=n.getPropertyOptions(t),!((r.hasChanged??z)(o,e)||r.useDefault&&r.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,r))))return;this.C(t,e,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:r,reflect:s,wrapped:o},n){r&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||r||(e=void 0),this._$AL.set(t,e)),s===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[s,o]of r){let{wrapped:n}=o,h=this[s];n!==!0||this._$AL.has(s)||h===void 0||this.C(s,void 0,o,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(r=>r.hostUpdate?.()),this.update(e)):this._$EM()}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};f.elementStyles=[],f.shadowRootOptions={mode:"open"},f[T("elementProperties")]=new Map,f[T("finalized")]=new Map,Bt?.({ReactiveElement:f}),(j.reactiveElementVersions??=[]).push("2.1.2");var et=globalThis,pt=i=>i,I=et.trustedTypes,ut=I?I.createPolicy("lit-html",{createHTML:i=>i}):void 0,vt="$lit$",y=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+y,Dt=`<${$t}>`,_=document,N=()=>_.createComment(""),M=i=>i===null||typeof i!="object"&&typeof i!="function",rt=Array.isArray,jt=i=>rt(i)||typeof i?.[Symbol.iterator]=="function",J=`[
|
|
2
|
+
\f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mt=/-->/g,ft=/>/g,$=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,yt=/"/g,xt=/^(?:script|style|textarea|title)$/i,st=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),u=st(1),se=st(2),ie=st(3),A=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),bt=new WeakMap,x=_.createTreeWalker(_,129);function _t(i,t){if(!rt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}var zt=(i,t)=>{let e=i.length-1,r=[],s,o=t===2?"<svg>":t===3?"<math>":"",n=k;for(let h=0;h<e;h++){let a=i[h],d,p,l=-1,m=0;for(;m<a.length&&(n.lastIndex=m,p=n.exec(a),p!==null);)m=n.lastIndex,n===k?p[1]==="!--"?n=mt:p[1]!==void 0?n=ft:p[2]!==void 0?(xt.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=$):p[3]!==void 0&&(n=$):n===$?p[0]===">"?(n=s??k,l=-1):p[1]===void 0?l=-2:(l=n.lastIndex-p[2].length,d=p[1],n=p[3]===void 0?$:p[3]==='"'?yt:gt):n===yt||n===gt?n=$:n===mt||n===ft?n=k:(n=$,s=void 0);let g=n===$&&i[h+1].startsWith("/>")?" ":"";o+=n===k?a+Dt:l>=0?(r.push(d),a.slice(0,l)+vt+a.slice(l)+y+g):a+y+(l===-2?h:g)}return[_t(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),r]},H=class i{constructor({strings:t,_$litType$:e},r){let s;this.parts=[];let o=0,n=0,h=t.length-1,a=this.parts,[d,p]=zt(t,e);if(this.el=i.createElement(d,r),x.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(s=x.nextNode())!==null&&a.length<h;){if(s.nodeType===1){if(s.hasAttributes())for(let l of s.getAttributeNames())if(l.endsWith(vt)){let m=p[n++],g=s.getAttribute(l).split(y),L=/([.?@])?(.*)/.exec(m);a.push({type:1,index:o,name:L[2],strings:g,ctor:L[1]==="."?X:L[1]==="?"?Z:L[1]==="@"?Q:w}),s.removeAttribute(l)}else l.startsWith(y)&&(a.push({type:6,index:o}),s.removeAttribute(l));if(xt.test(s.tagName)){let l=s.textContent.split(y),m=l.length-1;if(m>0){s.textContent=I?I.emptyScript:"";for(let g=0;g<m;g++)s.append(l[g],N()),x.nextNode(),a.push({type:2,index:++o});s.append(l[m],N())}}}else if(s.nodeType===8)if(s.data===$t)a.push({type:2,index:o});else{let l=-1;for(;(l=s.data.indexOf(y,l+1))!==-1;)a.push({type:7,index:o}),l+=y.length-1}o++}}static createElement(t,e){let r=_.createElement("template");return r.innerHTML=t,r}};function E(i,t,e=i,r){if(t===A)return t;let s=r!==void 0?e._$Co?.[r]:e._$Cl,o=M(t)?void 0:t._$litDirective$;return s?.constructor!==o&&(s?._$AO?.(!1),o===void 0?s=void 0:(s=new o(i),s._$AT(i,e,r)),r!==void 0?(e._$Co??=[])[r]=s:e._$Cl=s),s!==void 0&&(t=E(i,s._$AS(i,t.values),s,r)),t}var F=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:r}=this._$AD,s=(t?.creationScope??_).importNode(e,!0);x.currentNode=s;let o=x.nextNode(),n=0,h=0,a=r[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new O(o,o.nextSibling,this,t):a.type===1?d=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(d=new tt(o,this,t)),this._$AV.push(d),a=r[++h]}n!==a?.index&&(o=x.nextNode(),n++)}return x.currentNode=_,s}p(t){let e=0;for(let r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}},O=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,r,s){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),M(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&M(this._$AH)?this._$AA.nextSibling.data=t:this.T(_.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:r}=t,s=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=H.createElement(_t(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===s)this._$AH.p(e);else{let o=new F(s,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=bt.get(t.strings);return e===void 0&&bt.set(t.strings,e=new H(t)),e}k(t){rt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,r,s=0;for(let o of t)s===e.length?e.push(r=new i(this.O(N()),this.O(N()),this,this.options)):r=e[s],r._$AI(o),s++;s<e.length&&(this._$AR(r&&r._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let r=pt(t).nextSibling;pt(t).remove(),t=r}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},w=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,r,s,o){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=c}_$AI(t,e=this,r,s){let o=this.strings,n=!1;if(o===void 0)t=E(this,t,e,0),n=!M(t)||t!==this._$AH&&t!==A,n&&(this._$AH=t);else{let h=t,a,d;for(t=o[0],a=0;a<o.length-1;a++)d=E(this,h[r+a],e,a),d===A&&(d=this._$AH[a]),n||=!M(d)||d!==this._$AH[a],d===c?t=c:t!==c&&(t+=(d??"")+o[a+1]),this._$AH[a]=d}n&&!s&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},X=class extends w{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},Z=class extends w{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},Q=class extends w{constructor(t,e,r,s,o){super(t,e,r,s,o),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??c)===A)return;let r=this._$AH,s=t===c&&r!==c||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==c&&(r===c||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},tt=class{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}};var It=et.litHtmlPolyfillSupport;It?.(H,O),(et.litHtmlVersions??=[]).push("3.3.2");var At=(i,t,e)=>{let r=e?.renderBefore??t,s=r._$litPart$;if(s===void 0){let o=e?.renderBefore??null;r._$litPart$=s=new O(t.insertBefore(N(),o),o,void 0,e??{})}return s._$AI(i),s};var it=globalThis,b=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=At(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};b._$litElement$=!0,b.finalized=!0,it.litElementHydrateSupport?.({LitElement:b});var Vt=it.litElementPolyfillSupport;Vt?.({LitElement:b});(it.litElementVersions??=[]).push("4.2.2");var St=i=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(i,t)}):customElements.define(i,t)};var Kt={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:z},Gt=(i=Kt,t,e)=>{let{kind:r,metadata:s}=e,o=globalThis.litPropertyMetadata.get(s);if(o===void 0&&globalThis.litPropertyMetadata.set(s,o=new Map),r==="setter"&&((i=Object.create(i)).wrapped=!0),o.set(e.name,i),r==="accessor"){let{name:n}=e;return{set(h){let a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,i,!0,h)},init(h){return h!==void 0&&this.C(n,void 0,i,h),h}}}if(r==="setter"){let{name:n}=e;return function(h){let a=this[n];t.call(this,h),this.requestUpdate(n,a,i,!0,h)}}throw Error("Unsupported decorator location: "+r)};function V(i){return(t,e)=>typeof e=="object"?Gt(i,t,e):((r,s,o)=>{let n=s.hasOwnProperty(o);return s.constructor.createProperty(o,r),n?Object.getOwnPropertyDescriptor(s,o):void 0})(i,t,e)}function Et(i){return V({...i,state:!0,attribute:!1})}var ot={Aries:"\u2648",Taurus:"\u2649",Gemini:"\u264A",Cancer:"\u264B",Leo:"\u264C",Virgo:"\u264D",Libra:"\u264E",Scorpio:"\u264F",Sagittarius:"\u2650",Capricorn:"\u2651",Aquarius:"\u2652",Pisces:"\u2653"};var Wt=["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"],Ve=Wt.map(i=>i.toLowerCase());var wt=P`:host{font-family:var(--roxy-font-sans,system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);color:var(--roxy-fg,#0a0a0a);font-size:var(--roxy-text-base,1rem);line-height:var(--roxy-leading-normal,1.5);animation:roxy-fade-in var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,cubic-bezier(.4, 0, .2, 1)) both;background:0 0;display:block;container-type:inline-size}*,:before,:after{box-sizing:border-box}@keyframes roxy-fade-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:translateY(0)}}@media (prefers-reduced-motion:reduce){:host{animation:none}}.roxy-skeleton{background:linear-gradient(90deg, var(--roxy-border,#e4e4e7) 0%, color-mix(in srgb, var(--roxy-border,#e4e4e7) 60%, transparent) 50%, var(--roxy-border,#e4e4e7) 100%);border-radius:var(--roxy-radius-md,8px);background-size:200% 100%;animation:1.4s ease-in-out infinite roxy-shimmer}@keyframes roxy-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){.roxy-skeleton{animation:none}}.roxy-empty{padding:var(--roxy-space-lg,1.5rem);color:var(--roxy-muted,#71717a);text-align:center;font-size:var(--roxy-text-sm,.875rem)}:host(:focus-within) .roxy-card{outline:2px solid var(--roxy-ring,#f59e0b66);outline-offset:2px}:host{font-variant-emoji:text}`;var Yt="roxy-data";function Jt(i){return i.nodeName==="SCRIPT"&&i.getAttribute("type")==="application/json"}var G=class{constructor(t){this.host=t,t.addController(this)}hostConnected(){if(this.host.data!=null)return;let t=this.read();t!==void 0&&(this.host.data=t,this.host.requestUpdate())}read(){let t=this.findInlineScript();return t?this.parse(t.textContent):void 0}findInlineScript(){for(let t of Array.from(this.host.children))if(Jt(t)&&t.classList.contains(Yt))return t;return null}parse(t){if(t?.trim())try{return JSON.parse(t)}catch{return}}};var Ft={sarva:"Sarvashtakavarga",bhinna:"Bhinnashtakavarga",pinda:"Shodhya Pinda"},S=["sarva","bhinna","pinda"],v=class extends b{constructor(){super();this.data=null;this.activeTab="sarva";new G(this)}render(){if(!this.data)return u`<div class="roxy-empty" role="status">No ashtakavarga data</div>`;let e=this.data.signs??[];return u`<div class="wrap" aria-label="Ashtakavarga grid"><div class="head"><h2 class="title">Ashtakavarga</h2>${e.length?u`<p class="subtitle">${e.length} signs</p>`:c}</div><div class="tablist" role="tablist" aria-label="Ashtakavarga views" @keydown="${this.onTabKeyDown}">${S.map(r=>u`<button class="tab" role="tab" id="tab-${r}" aria-selected="${this.activeTab===r?"true":"false"}" aria-controls="panel-${r}" tabindex="${this.activeTab===r?"0":"-1"}" @click="${()=>{this.activeTab=r}}">${Ft[r]}</button>`)}</div><div id="panel-${this.activeTab}" role="tabpanel" aria-labelledby="tab-${this.activeTab}">${this.activeTab==="sarva"?this.renderSarva(e):this.activeTab==="bhinna"?this.renderBhinna(e):this.renderPinda()}</div></div>`}onTabKeyDown(e){let r=S.indexOf(this.activeTab);e.key==="ArrowRight"?(e.preventDefault(),this.activeTab=S[(r+1)%S.length],this.focusActiveTab()):e.key==="ArrowLeft"&&(e.preventDefault(),this.activeTab=S[(r-1+S.length)%S.length],this.focusActiveTab())}focusActiveTab(){requestAnimationFrame(()=>{this.shadowRoot?.querySelector(`#tab-${this.activeTab}`)?.focus()})}bhinnaHeat(e){return e<=1?"heat-1":e<=2?"heat-2":e<=3?"heat-3":e<=4?"heat-4":e<=5?"heat-5":e<=6?"heat-6":"heat-7"}sarvaHeat(e){return e<=18?"heat-1":e<=23?"heat-2":e<=28?"heat-3":e<=32?"heat-4":e<=37?"heat-5":e<=42?"heat-6":"heat-7"}renderSarva(e){let r=this.data.sarvashtakavarga;return r?u`<div class="overflow-scroll"><table aria-label="Sarvashtakavarga bindu counts per sign"><thead><tr><th scope="col">Sign</th><th scope="col">Bindus</th></tr></thead><tbody>${e.map((s,o)=>{let n=r.bindus[o]??0,h=this.sarvaHeat(n);return u`<tr><td><div class="planet-cell"><span class="glyph" aria-hidden="true">${ot[s]??""}</span> ${s}</div></td><td class="${`heat-cell ${h}`}">${n}</td></tr>`})}</tbody><tfoot><tr class="total-row"><td>Total</td><td>${r.total}</td></tr></tfoot></table></div>`:u`<p class="roxy-empty">No sarvashtakavarga data</p>`}renderBhinna(e){let r=this.data.bhinnashtakavarga;return r?.length?u`<div class="overflow-scroll"><table class="bhinna-table" aria-label="Bhinnashtakavarga planet-by-sign grid"><thead><tr><th scope="col">Planet</th>${e.map(s=>u`<th scope="col" title="${s}">${ot[s]??s.slice(0,2)}</th>`)}<th scope="col">Total</th></tr></thead><tbody>${r.map(s=>u`<tr><td>${s.planet}</td>${s.bindus.map(o=>{let n=this.bhinnaHeat(o);return u`<td class="${`heat-cell ${n}`}">${o}</td>`})}<td>${s.total}</td></tr>`)}</tbody></table></div>`:u`<p class="roxy-empty">No bhinnashtakavarga data</p>`}renderPinda(){let e=this.data.shodhyaPinda;return e?.length?u`<div class="overflow-scroll"><table aria-label="Shodhya Pinda planet strength scores"><thead><tr><th scope="col">Planet</th><th scope="col">Rashi Pinda</th><th scope="col">Graha Pinda</th><th scope="col">Shodhya Pinda</th></tr></thead><tbody>${e.map(r=>u`<tr><td>${r.planet}</td><td>${r.rashiPinda}</td><td>${r.grahaPinda}</td><td>${r.shodhyaPinda}</td></tr>`)}</tbody></table></div>`:u`<p class="roxy-empty">No shodhya pinda data</p>`}};v.styles=[wt,P`.wrap{gap:var(--roxy-space-md,1rem);display:grid}.head{justify-content:space-between;align-items:baseline;gap:var(--roxy-space-md,1rem);flex-wrap:wrap;display:flex}.title{font-size:var(--roxy-text-lg,1.125rem);font-weight:var(--roxy-weight-bold,600);margin:0}.subtitle{color:var(--roxy-muted,#71717a);font-size:var(--roxy-text-sm,.875rem);margin:0}.tablist{border-bottom:2px solid var(--roxy-border,#e4e4e7);gap:2px;display:flex}.tab{padding:var(--roxy-space-xs,.25rem) var(--roxy-space-md,1rem);font-size:var(--roxy-text-sm,.875rem);cursor:pointer;color:var(--roxy-muted,#71717a);transition:color var(--roxy-motion-duration,.2s) var(--roxy-motion-easing,ease);background:0 0;border:none;border-bottom:2px solid #0000;margin-bottom:-2px;font-family:inherit}.tab[aria-selected=true]{color:var(--roxy-accent-fg,#b45309);border-bottom-color:var(--roxy-accent,#f59e0b);font-weight:var(--roxy-weight-bold,600)}.tab:hover:not([aria-selected=true]){color:var(--roxy-fg,#0a0a0a)}.overflow-scroll{-webkit-overflow-scrolling:touch;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:var(--roxy-text-sm,.875rem)}th,td{padding:var(--roxy-space-sm,.5rem);border-bottom:1px solid var(--roxy-border,#e4e4e7);text-align:center}th{color:var(--roxy-muted,#71717a);font-weight:var(--roxy-weight-bold,600);text-transform:uppercase;font-size:var(--roxy-text-xs,.75rem);letter-spacing:.06em}td:first-child,th:first-child{text-align:left}.glyph{margin-right:3px;font-size:1.1em;line-height:1}.planet-cell{white-space:nowrap;align-items:center;gap:4px;display:flex}.total-row td{font-weight:var(--roxy-weight-bold,600);border-top:2px solid var(--roxy-border,#e4e4e7);border-bottom:none}.heat-cell{border-radius:var(--roxy-radius-sm,4px);font-weight:var(--roxy-weight-bold,600);font-variant-numeric:tabular-nums;min-width:2rem;color:var(--roxy-fg,currentColor)}.heat-1{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 6%, transparent)}.heat-2{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 14%, transparent)}.heat-3{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 26%, transparent)}.heat-4{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 40%, transparent)}.heat-5{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 55%, transparent)}.heat-6{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 72%, transparent)}.heat-7{background:color-mix(in srgb, var(--roxy-heat,#ef4444) 90%, transparent)}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:5rem}@container (width<=480px){.bhinna-table th,.bhinna-table td{font-size:var(--roxy-text-xs,.75rem);padding:.3rem .35rem}.bhinna-table th:first-child,.bhinna-table td:first-child{min-width:3.5rem}.heat-cell{min-width:1.5rem}}.overflow-scroll{-webkit-mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%);mask-image:linear-gradient(90deg,#0000 0,#000 .5rem calc(100% - 1rem),#0000 100%)}`],q([V({attribute:!1})],v.prototype,"data",2),q([Et()],v.prototype,"activeTab",2),v=q([St("roxy-ashtakavarga-grid")],v);return kt(Xt);})();
|
|
363
4
|
/*! Bundled license information:
|
|
364
5
|
|
|
365
6
|
@lit/reactive-element/css-tag.js:
|