@roxyapi/ui 0.1.1 → 0.1.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/AGENTS.md +2 -2
- package/LICENSE +21 -0
- package/README.md +505 -0
- package/THEMING.md +24 -7
- package/dist/cdn/components/biorhythm-chart.js +15 -22
- package/dist/cdn/components/biorhythm-chart.js.map +3 -3
- package/dist/cdn/components/compatibility-card.js +36 -34
- package/dist/cdn/components/compatibility-card.js.map +4 -4
- package/dist/cdn/components/dasha-timeline.js +35 -39
- package/dist/cdn/components/dasha-timeline.js.map +4 -4
- package/dist/cdn/components/data.js +6 -6
- package/dist/cdn/components/data.js.map +3 -3
- package/dist/cdn/components/dosha-card.js +13 -13
- package/dist/cdn/components/dosha-card.js.map +2 -2
- package/dist/cdn/components/endpoint-form.js +47 -28
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/components/guna-milan.js +18 -18
- package/dist/cdn/components/guna-milan.js.map +4 -4
- package/dist/cdn/components/hexagram.js +26 -26
- package/dist/cdn/components/hexagram.js.map +3 -3
- package/dist/cdn/components/horoscope-card.js +38 -38
- package/dist/cdn/components/horoscope-card.js.map +3 -3
- package/dist/cdn/components/kp-planets-table.js +10 -10
- package/dist/cdn/components/kp-planets-table.js.map +4 -4
- package/dist/cdn/components/location-search.js +6 -6
- package/dist/cdn/components/location-search.js.map +3 -3
- package/dist/cdn/components/moon-phase.js +21 -21
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +61 -19
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +40 -31
- package/dist/cdn/components/numerology-card.js.map +3 -3
- package/dist/cdn/components/panchang-table.js +25 -25
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/synastry-chart.js +129 -39
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/tarot-card.js +49 -20
- package/dist/cdn/components/tarot-card.js.map +3 -3
- package/dist/cdn/components/tarot-spread.js +43 -27
- package/dist/cdn/components/tarot-spread.js.map +3 -3
- package/dist/cdn/components/vedic-kundli.js +23 -9
- package/dist/cdn/components/vedic-kundli.js.map +3 -3
- package/dist/cdn/roxy-ui.js +560 -350
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/biorhythm-chart.d.ts +2 -46
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +24 -23
- package/dist/components/biorhythm-chart.js.map +2 -2
- package/dist/components/compatibility-card.d.ts +2 -27
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +50 -29
- package/dist/components/compatibility-card.js.map +3 -3
- package/dist/components/dasha-timeline.d.ts +2 -31
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +32 -30
- package/dist/components/dasha-timeline.js.map +3 -3
- package/dist/components/data.d.ts +6 -0
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +9 -1
- package/dist/components/data.js.map +2 -2
- package/dist/components/dosha-card.d.ts +2 -16
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +12 -13
- package/dist/components/dosha-card.js.map +2 -2
- package/dist/components/endpoint-form.d.ts +2 -0
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +66 -8
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/guna-milan.d.ts +2 -20
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +22 -12
- package/dist/components/guna-milan.js.map +3 -3
- package/dist/components/hexagram.d.ts +3 -27
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +31 -15
- package/dist/components/hexagram.js.map +2 -2
- package/dist/components/horoscope-card.d.ts +2 -20
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +24 -15
- package/dist/components/horoscope-card.js.map +2 -2
- package/dist/components/kp-planets-table.d.ts +2 -21
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +10 -4
- package/dist/components/kp-planets-table.js.map +3 -3
- package/dist/components/location-search.d.ts +3 -11
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js +45 -5
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.d.ts +4 -21
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +17 -4
- package/dist/components/moon-phase.js.map +3 -3
- package/dist/components/natal-chart.d.ts +7 -43
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +130 -70
- package/dist/components/natal-chart.js.map +3 -3
- package/dist/components/numerology-card.d.ts +5 -37
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +54 -28
- package/dist/components/numerology-card.js.map +2 -2
- package/dist/components/panchang-table.d.ts +3 -62
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +62 -32
- package/dist/components/panchang-table.js.map +3 -3
- package/dist/components/synastry-chart.d.ts +9 -28
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +178 -38
- package/dist/components/synastry-chart.js.map +3 -3
- package/dist/components/tarot-card.d.ts +5 -29
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +59 -20
- package/dist/components/tarot-card.js.map +2 -2
- package/dist/components/tarot-spread.d.ts +2 -24
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +39 -13
- package/dist/components/tarot-spread.js.map +2 -2
- package/dist/components/vedic-kundli.d.ts +3 -23
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +25 -13
- package/dist/components/vedic-kundli.js.map +2 -2
- package/dist/index.cjs +1149 -358
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1149 -358
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts +49 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.json +1 -1
- package/dist/styles/tokens.css +47 -1
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/types.gen.d.ts +27811 -0
- package/dist/types/types.gen.d.ts.map +1 -0
- package/dist/utils/debounce.d.ts +9 -1
- package/dist/utils/debounce.d.ts.map +1 -1
- package/dist/utils/format.d.ts +15 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +9 -1
- package/src/components/biorhythm-chart.ts +39 -84
- package/src/components/compatibility-card.ts +85 -52
- package/src/components/dasha-timeline.ts +55 -73
- package/src/components/data.ts +20 -1
- package/src/components/dosha-card.ts +18 -31
- package/src/components/endpoint-form.ts +79 -11
- package/src/components/guna-milan.ts +16 -34
- package/src/components/hexagram.ts +53 -43
- package/src/components/horoscope-card.ts +51 -39
- package/src/components/kp-planets-table.ts +8 -27
- package/src/components/location-search.ts +45 -20
- package/src/components/moon-phase.ts +28 -25
- package/src/components/natal-chart.ts +129 -84
- package/src/components/numerology-card.ts +87 -79
- package/src/components/panchang-table.ts +40 -78
- package/src/components/synastry-chart.ts +220 -78
- package/src/components/tarot-card.ts +76 -62
- package/src/components/tarot-spread.ts +72 -45
- package/src/components/vedic-kundli.ts +42 -51
- package/src/index.ts +14 -24
- package/src/manifest.ts +366 -0
- package/src/styles/tokens.css +47 -1
- package/src/tokens/index.ts +5 -0
- package/src/types/types.gen.ts +1 -1
- package/src/utils/debounce.ts +23 -4
- package/src/utils/format.ts +57 -0
- package/src/version.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";var RoxyUI_natal_chart=(()=>{var q=Object.defineProperty;var
|
|
2
|
-
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
"use strict";var RoxyUI_natal_chart=(()=>{var q=Object.defineProperty;var dt=Object.getOwnPropertyDescriptor;var Lt=Object.getOwnPropertyNames;var Ut=Object.prototype.hasOwnProperty;var Ot=(n,t)=>{for(var e in t)q(n,e,{get:t[e],enumerable:!0})},Ht=(n,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Lt(t))!Ut.call(n,r)&&r!==e&&q(n,r,{get:()=>t[r],enumerable:!(s=dt(t,r))||s.enumerable});return n};var qt=n=>Ht(q({},"__esModule",{value:!0}),n),z=(n,t,e,s)=>{for(var r=s>1?void 0:s?dt(t,e):t,i=n.length-1,o;i>=0;i--)(o=n[i])&&(r=(s?o(t,e,r):o(r))||r);return s&&r&&q(t,e,r),r};var ie={};Ot(ie,{RoxyNatalChart:()=>_});var D=globalThis,I=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,J=Symbol(),pt=new WeakMap,C=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==J)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(I&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=pt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&pt.set(e,t))}return t}toString(){return this.cssText}},ut=n=>new C(typeof n=="string"?n:n+"",void 0,J),N=(n,...t)=>{let e=n.length===1?n[0]:t.reduce((s,r,i)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+n[i+1],n[0]);return new C(e,n,J)},mt=(n,t)=>{if(I)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let s=document.createElement("style"),r=D.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,n.appendChild(s)}},Z=I?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return ut(e)})(n):n;var{is:zt,defineProperty:Dt,getOwnPropertyDescriptor:It,getOwnPropertyNames:jt,getOwnPropertySymbols:Bt,getPrototypeOf:Gt}=Object,j=globalThis,gt=j.trustedTypes,Vt=gt?gt.emptyScript:"",Ft=j.reactiveElementPolyfillSupport,M=(n,t)=>n,R={toAttribute(n,t){switch(t){case Boolean:n=n?Vt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},B=(n,t)=>!zt(n,t),ft={attribute:!0,type:String,converter:R,reflect:!1,useDefault:!1,hasChanged:B};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=ft){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 s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Dt(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=It(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:r,set(o){let c=r?.call(this);i?.call(this,o),this.requestUpdate(t,c,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ft}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;let t=Gt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){let e=this.properties,s=[...jt(e),...Bt(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(Z(r))}else t!==void 0&&e.push(Z(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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 s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return mt(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,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:R).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),o=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:R;this._$Em=r;let c=o.fromAttribute(e,i.type);this[r]=c??this._$Ej?.get(r)??c,this._$Em=null}}requestUpdate(t,e,s,r=!1,i){if(t!==void 0){let o=this.constructor;if(r===!1&&(i=this[t]),s??=o.getPropertyOptions(t),!((s.hasChanged??B)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},o){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),i!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!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[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:o}=i,c=this[r];o!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,i,c)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}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[M("elementProperties")]=new Map,f[M("finalized")]=new Map,Ft?.({ReactiveElement:f}),(j.reactiveElementVersions??=[]).push("2.1.2");var nt=globalThis,yt=n=>n,G=nt.trustedTypes,$t=G?G.createPolicy("lit-html",{createHTML:n=>n}):void 0,St="$lit$",$=`lit$${Math.random().toFixed(9).slice(2)}$`,Et="?"+$,Wt=`<${Et}>`,v=document,k=()=>v.createComment(""),L=n=>n===null||typeof n!="object"&&typeof n!="function",it=Array.isArray,Kt=n=>it(n)||typeof n?.[Symbol.iterator]=="function",Q=`[
|
|
2
|
+
\f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xt=/-->/g,_t=/>/g,A=RegExp(`>|${Q}(?:([^\\s"'>=/]+)(${Q}*=${Q}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),At=/'/g,bt=/"/g,wt=/^(?:script|style|textarea|title)$/i,ot=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),V=ot(1),E=ot(2),de=ot(3),S=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),vt=new WeakMap,b=v.createTreeWalker(v,129);function Pt(n,t){if(!it(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return $t!==void 0?$t.createHTML(t):t}var Yt=(n,t)=>{let e=n.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",o=T;for(let c=0;c<e;c++){let a=n[c],p,u,l=-1,m=0;for(;m<a.length&&(o.lastIndex=m,u=o.exec(a),u!==null);)m=o.lastIndex,o===T?u[1]==="!--"?o=xt:u[1]!==void 0?o=_t:u[2]!==void 0?(wt.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=A):u[3]!==void 0&&(o=A):o===A?u[0]===">"?(o=r??T,l=-1):u[1]===void 0?l=-2:(l=o.lastIndex-u[2].length,p=u[1],o=u[3]===void 0?A:u[3]==='"'?bt:At):o===bt||o===At?o=A:o===xt||o===_t?o=T:(o=A,r=void 0);let y=o===A&&n[c+1].startsWith("/>")?" ":"";i+=o===T?a+Wt:l>=0?(s.push(p),a.slice(0,l)+St+a.slice(l)+$+y):a+$+(l===-2?c:y)}return[Pt(n,i+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},U=class n{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,o=0,c=t.length-1,a=this.parts,[p,u]=Yt(t,e);if(this.el=n.createElement(p,s),b.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=b.nextNode())!==null&&a.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith(St)){let m=u[o++],y=r.getAttribute(l).split($),H=/([.?@])?(.*)/.exec(m);a.push({type:1,index:i,name:H[2],strings:y,ctor:H[1]==="."?tt:H[1]==="?"?et:H[1]==="@"?st:P}),r.removeAttribute(l)}else l.startsWith($)&&(a.push({type:6,index:i}),r.removeAttribute(l));if(wt.test(r.tagName)){let l=r.textContent.split($),m=l.length-1;if(m>0){r.textContent=G?G.emptyScript:"";for(let y=0;y<m;y++)r.append(l[y],k()),b.nextNode(),a.push({type:2,index:++i});r.append(l[m],k())}}}else if(r.nodeType===8)if(r.data===Et)a.push({type:2,index:i});else{let l=-1;for(;(l=r.data.indexOf($,l+1))!==-1;)a.push({type:7,index:i}),l+=$.length-1}i++}}static createElement(t,e){let s=v.createElement("template");return s.innerHTML=t,s}};function w(n,t,e=n,s){if(t===S)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=L(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(n),r._$AT(n,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=w(n,r._$AS(n,t.values),r,s)),t}var X=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:s}=this._$AD,r=(t?.creationScope??v).importNode(e,!0);b.currentNode=r;let i=b.nextNode(),o=0,c=0,a=s[0];for(;a!==void 0;){if(o===a.index){let p;a.type===2?p=new O(i,i.nextSibling,this,t):a.type===1?p=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(p=new rt(i,this,t)),this._$AV.push(p),a=s[++c]}o!==a?.index&&(i=b.nextNode(),o++)}return b.currentNode=v,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},O=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.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),L(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==S&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Kt(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!==d&&L(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=U.createElement(Pt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new X(r,this),o=i.u(this.options);i.p(e),this.T(o),this._$AH=i}}_$AC(t){let e=vt.get(t.strings);return e===void 0&&vt.set(t.strings,e=new U(t)),e}k(t){it(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new n(this.O(k()),this.O(k()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=yt(t).nextSibling;yt(t).remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let i=this.strings,o=!1;if(i===void 0)t=w(this,t,e,0),o=!L(t)||t!==this._$AH&&t!==S,o&&(this._$AH=t);else{let c=t,a,p;for(t=i[0],a=0;a<i.length-1;a++)p=w(this,c[s+a],e,a),p===S&&(p=this._$AH[a]),o||=!L(p)||p!==this._$AH[a],p===d?t=d:t!==d&&(t+=(p??"")+i[a+1]),this._$AH[a]=p}o&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},tt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},et=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},st=class extends P{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=w(this,t,e,0)??d)===S)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),i&&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)}},rt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){w(this,t)}};var Jt=nt.litHtmlPolyfillSupport;Jt?.(U,O),(nt.litHtmlVersions??=[]).push("3.3.2");var Ct=(n,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new O(t.insertBefore(k(),i),i,void 0,e??{})}return r._$AI(n),r};var at=globalThis,x=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=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return S}};x._$litElement$=!0,x.finalized=!0,at.litElementHydrateSupport?.({LitElement:x});var Zt=at.litElementPolyfillSupport;Zt?.({LitElement:x});(at.litElementVersions??=[]).push("4.2.2");var Nt=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t)}):customElements.define(n,t)};var Qt={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:B},Xt=(n=Qt,t,e)=>{let{kind:s,metadata:r}=e,i=globalThis.litPropertyMetadata.get(r);if(i===void 0&&globalThis.litPropertyMetadata.set(r,i=new Map),s==="setter"&&((n=Object.create(n)).wrapped=!0),i.set(e.name,n),s==="accessor"){let{name:o}=e;return{set(c){let a=t.get.call(this);t.set.call(this,c),this.requestUpdate(o,a,n,!0,c)},init(c){return c!==void 0&&this.C(o,void 0,n,c),c}}}if(s==="setter"){let{name:o}=e;return function(c){let a=this[o];t.call(this,c),this.requestUpdate(o,a,n,!0,c)}}throw Error("Unsupported decorator location: "+s)};function F(n){return(t,e)=>typeof e=="object"?Xt(n,t,e):((s,r,i)=>{let o=r.hasOwnProperty(i);return r.constructor.createProperty(i,s),o?Object.getOwnPropertyDescriptor(r,i):void 0})(n,t,e)}var Mt={Sun:"\u2609",Moon:"\u263D",Mercury:"\u263F",Venus:"\u2640",Earth:"\u2641",Mars:"\u2642",Jupiter:"\u2643",Saturn:"\u2644",Uranus:"\u2645",Neptune:"\u2646",Pluto:"\u2647",Rahu:"\u260A",Ketu:"\u260B",Ascendant:"Asc",Lagna:"La",NorthNode:"\u260A",SouthNode:"\u260B","North node":"\u260A","South node":"\u260B",Chiron:"\u26B7",Lilith:"\u26B8","Black moon lilith":"\u26B8"};var Rt={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 Tt=N`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
6
6
|
container-type: inline-size;
|
|
@@ -82,15 +82,15 @@
|
|
|
82
82
|
outline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));
|
|
83
83
|
outline-offset: 2px;
|
|
84
84
|
}
|
|
85
|
-
`;function
|
|
85
|
+
`;function g(n,t,e,s){let r=s*Math.PI/180;return{x:n+e*Math.cos(r),y:t+e*Math.sin(r)}}function kt(n,t=1){return typeof n!="number"||!Number.isFinite(n)?"":n.toFixed(t).replace(/\.?0+$/,"")}var ht=384,h=ht/2,ct=150,te=134,lt=110,K=88,ee=162,se=176,_=class extends x{constructor(){super(...arguments);this.data=null;this.houseSystem="placidus"}getPlanets(){return this.data?.planets??[]}getAscendant(){return this.data?.ascendant?.longitude??0}getMidheaven(){let e=this.data?.midheaven?.longitude;return typeof e=="number"?e:null}toAngle(e){return 180+this.getAscendant()-e}render(){if(!this.data)return V`<div class="roxy-empty" role="status">No chart data</div>`;let e=this.getPlanets(),s=this.data.aspects??[];return V`<div class="wrap">
|
|
86
86
|
<header>
|
|
87
87
|
<h2 class="title">Natal chart</h2>
|
|
88
88
|
${this.data.birthDetails?V`<div class="meta">
|
|
89
|
-
${[this.data.birthDetails.date,this.data.birthDetails.time
|
|
89
|
+
${[this.data.birthDetails.date,this.data.birthDetails.time].filter(Boolean).join(" \xB7 ")}
|
|
90
90
|
</div>`:d}
|
|
91
91
|
</header>
|
|
92
92
|
<svg
|
|
93
|
-
viewBox="0 0 ${
|
|
93
|
+
viewBox="0 0 ${ht} ${ht}"
|
|
94
94
|
role="img"
|
|
95
95
|
aria-label="Natal chart wheel with twelve houses, planets, and aspects"
|
|
96
96
|
>
|
|
@@ -101,34 +101,41 @@
|
|
|
101
101
|
</desc>
|
|
102
102
|
<circle
|
|
103
103
|
class="wheel-line"
|
|
104
|
-
cx=${
|
|
105
|
-
cy=${
|
|
106
|
-
r=${
|
|
104
|
+
cx=${h}
|
|
105
|
+
cy=${h}
|
|
106
|
+
r=${ct}
|
|
107
107
|
stroke-width="1.5"
|
|
108
108
|
/>
|
|
109
109
|
<circle
|
|
110
110
|
class="wheel-line"
|
|
111
|
-
cx=${
|
|
112
|
-
cy=${
|
|
111
|
+
cx=${h}
|
|
112
|
+
cy=${h}
|
|
113
113
|
r=${lt}
|
|
114
114
|
stroke-width="1"
|
|
115
115
|
/>
|
|
116
116
|
<circle
|
|
117
117
|
class="wheel-line"
|
|
118
|
-
cx=${
|
|
119
|
-
cy=${
|
|
120
|
-
r=${
|
|
118
|
+
cx=${h}
|
|
119
|
+
cy=${h}
|
|
120
|
+
r=${K-16}
|
|
121
121
|
stroke-width="0.5"
|
|
122
122
|
/>
|
|
123
123
|
${this.renderSpokes()} ${this.renderSigns()} ${this.renderHouseNumbers()}
|
|
124
124
|
${this.renderAspects(e,s)} ${this.renderPlanets(e)}
|
|
125
|
+
${this.renderAngles()}
|
|
125
126
|
</svg>
|
|
126
127
|
<div class="legend">
|
|
127
128
|
<span>${e.length} planets</span>
|
|
128
129
|
<span>${s.length} aspects</span>
|
|
129
|
-
<span
|
|
130
|
+
<span><span class="legend-swatch" style="background: var(--roxy-success)"></span>harmonious</span>
|
|
131
|
+
<span><span class="legend-swatch" style="background: var(--roxy-danger)"></span>challenging</span>
|
|
130
132
|
</div>
|
|
131
|
-
</div>`}
|
|
133
|
+
</div>`}renderAngles(){let e=this.getAscendant(),s=this.getMidheaven(),r=[this.renderAngleMark(e,"ASC")];return s!==null&&r.push(this.renderAngleMark(s,"MC")),r}renderAngleMark(e,s){let r=this.toAngle(e),i=g(h,h,ct,r),o=g(h,h,ee,r),c=g(h,h,se,r);return E`
|
|
134
|
+
<g>
|
|
135
|
+
<line class="angle-tick" x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} />
|
|
136
|
+
<text class="angle-marker" x=${c.x} y=${c.y} text-anchor="middle" dominant-baseline="central">${s}</text>
|
|
137
|
+
</g>
|
|
138
|
+
`}renderSpokes(){return Array.from({length:12},(e,s)=>{let r=this.toAngle(s*30),i=g(h,h,lt,r),o=g(h,h,ct,r);return E`<line class="wheel-line" x1=${i.x} y1=${i.y} x2=${o.x} y2=${o.y} stroke-width="0.8" />`})}renderSigns(){return["Aries","Taurus","Gemini","Cancer","Leo","Virgo","Libra","Scorpio","Sagittarius","Capricorn","Aquarius","Pisces"].map((s,r)=>{let i=this.toAngle(r*30+15),o=g(h,h,te,i);return E`<text class="sign-glyph" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${Rt[s]}</text>`})}renderHouseNumbers(){let e=Math.floor(this.getAscendant()/30);return Array.from({length:12},(s,r)=>{let i=this.toAngle(r*30+15),o=g(h,h,lt-12,i),c=(r-e+12)%12+1;return E`<text class="house-num" x=${o.x} y=${o.y} text-anchor="middle" dominant-baseline="central">${c}</text>`})}renderPlanets(e){return e.map(s=>{if(!Number.isFinite(s.longitude))return d;let r=this.toAngle(s.longitude),i=g(h,h,K,r),o=Mt[Y(s.name)]??s.name.slice(0,2),c=s.isRetrograde?" R":"",a=c?`${o}\u1D3F`:o;return E`<text class="planet-glyph" x=${i.x} y=${i.y} text-anchor="middle" dominant-baseline="central"><title>${s.name}${c}</title>${a}</text>`})}renderAspects(e,s){let r=new Map;for(let i of e){if(typeof i.longitude!="number")continue;let o=Y(i.name);o&&r.set(o,i.longitude)}return s.map(i=>{let o=r.get(Y(i.planet1)),c=r.get(Y(i.planet2));if(o===void 0||c===void 0)return d;let a=g(h,h,K-18,this.toAngle(o)),p=g(h,h,K-18,this.toAngle(c)),u=ne(i),l=re[u]??"aspect-other",m=kt(i.orb,1);return E`<line class=${`aspect ${l}`} x1=${a.x} y1=${a.y} x2=${p.x} y2=${p.y}><title>${i.planet1} ${u||""} ${i.planet2}${m?` (orb ${m}\xB0)`:""}</title></line>`})}};_.styles=[Tt,N`
|
|
132
139
|
.wrap {
|
|
133
140
|
width: 100%;
|
|
134
141
|
display: grid;
|
|
@@ -180,9 +187,36 @@
|
|
|
180
187
|
}
|
|
181
188
|
|
|
182
189
|
.aspect {
|
|
183
|
-
stroke:
|
|
184
|
-
stroke-width: 0.6;
|
|
190
|
+
stroke-width: 0.8;
|
|
185
191
|
fill: none;
|
|
192
|
+
opacity: 0.55;
|
|
193
|
+
}
|
|
194
|
+
.aspect-trine,
|
|
195
|
+
.aspect-sextile {
|
|
196
|
+
stroke: var(--roxy-success, #16a34a);
|
|
197
|
+
}
|
|
198
|
+
.aspect-square,
|
|
199
|
+
.aspect-opposition {
|
|
200
|
+
stroke: var(--roxy-danger, #dc2626);
|
|
201
|
+
}
|
|
202
|
+
.aspect-conjunction {
|
|
203
|
+
stroke: var(--roxy-accent-fg, #b45309);
|
|
204
|
+
}
|
|
205
|
+
.aspect-other {
|
|
206
|
+
stroke: var(--roxy-muted, #71717a);
|
|
207
|
+
opacity: 0.4;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.angle-marker {
|
|
211
|
+
fill: var(--roxy-accent-fg, #b45309);
|
|
212
|
+
font-size: 10px;
|
|
213
|
+
font-weight: 700;
|
|
214
|
+
font-family: var(--roxy-font-sans);
|
|
215
|
+
letter-spacing: 0.04em;
|
|
216
|
+
}
|
|
217
|
+
.angle-tick {
|
|
218
|
+
stroke: var(--roxy-accent-fg, #b45309);
|
|
219
|
+
stroke-width: 1.5;
|
|
186
220
|
}
|
|
187
221
|
|
|
188
222
|
.legend {
|
|
@@ -192,7 +226,15 @@
|
|
|
192
226
|
flex-wrap: wrap;
|
|
193
227
|
gap: var(--roxy-space-md, 1rem);
|
|
194
228
|
}
|
|
195
|
-
|
|
229
|
+
.legend-swatch {
|
|
230
|
+
display: inline-block;
|
|
231
|
+
width: 8px;
|
|
232
|
+
height: 8px;
|
|
233
|
+
border-radius: 50%;
|
|
234
|
+
margin-right: 4px;
|
|
235
|
+
vertical-align: middle;
|
|
236
|
+
}
|
|
237
|
+
`],z([F({attribute:!1})],_.prototype,"data",2),z([F({type:String,attribute:"house-system",reflect:!0})],_.prototype,"houseSystem",2),_=z([Nt("roxy-natal-chart")],_);function Y(n){return n?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():""}var re={conjunction:"aspect-conjunction",sextile:"aspect-sextile",square:"aspect-square",trine:"aspect-trine",opposition:"aspect-opposition"};function ne(n){return(n.type??"").toLowerCase().replace(/_/g,"-")}return qt(ie);})();
|
|
196
238
|
/*! Bundled license information:
|
|
197
239
|
|
|
198
240
|
@lit/reactive-element/css-tag.js:
|