@roxyapi/ui 0.1.2 → 0.2.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 +6 -0
- package/README.md +327 -14
- package/THEMING.md +24 -7
- package/dist/cdn/components/ashtakavarga-grid.js +349 -0
- package/dist/cdn/components/ashtakavarga-grid.js.map +7 -0
- package/dist/cdn/components/biorhythm-chart.js +15 -22
- package/dist/cdn/components/biorhythm-chart.js.map +3 -3
- package/dist/cdn/components/choghadiya-grid.js +239 -0
- package/dist/cdn/components/choghadiya-grid.js.map +7 -0
- 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 +9 -9
- package/dist/cdn/components/data.js.map +4 -4
- package/dist/cdn/components/divisional-chart.js +279 -0
- package/dist/cdn/components/divisional-chart.js.map +7 -0
- package/dist/cdn/components/dosha-card.js +49 -49
- package/dist/cdn/components/dosha-card.js.map +3 -3
- package/dist/cdn/components/endpoint-form.js +47 -28
- package/dist/cdn/components/endpoint-form.js.map +4 -4
- package/dist/cdn/components/guna-milan.js +66 -24
- 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 +47 -40
- package/dist/cdn/components/horoscope-card.js.map +4 -4
- 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 +18 -18
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +240 -24
- 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 +4 -4
- package/dist/cdn/components/panchang-table.js +30 -30
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/shadbala-table.js +312 -0
- package/dist/cdn/components/shadbala-table.js.map +7 -0
- 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/transits-table.js +391 -0
- package/dist/cdn/components/transits-table.js.map +7 -0
- package/dist/cdn/components/vedic-kundli.js +63 -27
- package/dist/cdn/components/vedic-kundli.js.map +4 -4
- package/dist/cdn/components/yoga-list.js +334 -0
- package/dist/cdn/components/yoga-list.js.map +7 -0
- package/dist/cdn/roxy-ui.js +2104 -544
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/ashtakavarga-grid.d.ts +26 -0
- package/dist/components/ashtakavarga-grid.d.ts.map +1 -0
- package/dist/components/ashtakavarga-grid.js +457 -0
- package/dist/components/ashtakavarga-grid.js.map +7 -0
- 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/choghadiya-grid.d.ts +19 -0
- package/dist/components/choghadiya-grid.d.ts.map +1 -0
- package/dist/components/choghadiya-grid.js +304 -0
- package/dist/components/choghadiya-grid.js.map +7 -0
- 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 +11 -7
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +16 -6
- package/dist/components/data.js.map +3 -3
- package/dist/components/divisional-chart.d.ts +20 -0
- package/dist/components/divisional-chart.d.ts.map +1 -0
- package/dist/components/divisional-chart.js +471 -0
- package/dist/components/divisional-chart.js.map +7 -0
- 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 +45 -43
- 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 +71 -11
- package/dist/components/endpoint-form.js.map +3 -3
- 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 +79 -20
- package/dist/components/guna-milan.js.map +4 -4
- package/dist/components/hexagram.d.ts +3 -27
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +48 -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 +54 -18
- package/dist/components/horoscope-card.js.map +3 -3
- 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 +5 -14
- 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 +34 -4
- package/dist/components/moon-phase.js.map +3 -3
- package/dist/components/natal-chart.d.ts +9 -43
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +346 -79
- 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 +58 -30
- package/dist/components/numerology-card.js.map +3 -3
- 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/shadbala-table.d.ts +18 -0
- package/dist/components/shadbala-table.d.ts.map +1 -0
- package/dist/components/shadbala-table.js +400 -0
- package/dist/components/shadbala-table.js.map +7 -0
- 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 +201 -56
- 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/transits-table.d.ts +21 -0
- package/dist/components/transits-table.d.ts.map +1 -0
- package/dist/components/transits-table.js +515 -0
- package/dist/components/transits-table.js.map +7 -0
- package/dist/components/vedic-kundli.d.ts +5 -28
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +147 -83
- package/dist/components/vedic-kundli.js.map +3 -3
- package/dist/components/yoga-list.d.ts +29 -0
- package/dist/components/yoga-list.d.ts.map +1 -0
- package/dist/components/yoga-list.js +389 -0
- package/dist/components/yoga-list.js.map +7 -0
- package/dist/index.cjs +3693 -1180
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3709 -1196
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts +43 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.json +7 -2
- package/dist/styles/tokens.css +73 -1
- package/dist/tokens/index.d.ts +6 -0
- 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 +29 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/kundli-render.d.ts +63 -0
- package/dist/utils/kundli-render.d.ts.map +1 -0
- package/dist/utils/string.d.ts +14 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +7 -1
- package/src/components/ashtakavarga-grid.ts +354 -0
- package/src/components/biorhythm-chart.ts +39 -84
- package/src/components/choghadiya-grid.ts +185 -0
- package/src/components/compatibility-card.ts +85 -52
- package/src/components/dasha-timeline.ts +55 -73
- package/src/components/data.ts +28 -16
- package/src/components/divisional-chart.ts +214 -0
- package/src/components/dosha-card.ts +72 -68
- package/src/components/endpoint-form.ts +80 -18
- package/src/components/guna-milan.ts +87 -47
- package/src/components/hexagram.ts +53 -43
- package/src/components/horoscope-card.ts +59 -43
- package/src/components/kp-planets-table.ts +8 -27
- package/src/components/location-search.ts +47 -23
- package/src/components/moon-phase.ts +28 -25
- package/src/components/natal-chart.ts +364 -110
- package/src/components/numerology-card.ts +86 -84
- package/src/components/panchang-table.ts +40 -78
- package/src/components/shadbala-table.ts +286 -0
- package/src/components/synastry-chart.ts +213 -97
- package/src/components/tarot-card.ts +76 -62
- package/src/components/tarot-spread.ts +72 -45
- package/src/components/transits-table.ts +350 -0
- package/src/components/vedic-kundli.ts +59 -173
- package/src/components/yoga-list.ts +328 -0
- package/src/index.ts +18 -26
- package/src/manifest.ts +340 -0
- package/src/styles/tokens.css +73 -1
- package/src/tokens/index.ts +14 -0
- package/src/types/types.gen.ts +3 -3
- package/src/utils/debounce.ts +23 -4
- package/src/utils/format.ts +75 -0
- package/src/utils/kundli-render.ts +197 -0
- package/src/utils/string.ts +23 -0
- package/src/version.ts +2 -0
- package/dist/utils/motion.d.ts +0 -13
- package/dist/utils/motion.d.ts.map +0 -1
- package/src/utils/motion.ts +0 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/data.ts", "../../src/utils/base-styles.ts"],
|
|
4
|
-
"sourcesContent": ["import { css, html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { baseStyles } from '../utils/base-styles.js';\n\n/**\n * Generic fallback renderer. Accepts ANY OpenAPI response shape and renders it\n * via field-name heuristics so future spec additions render reasonably without\n * hand-wired components. Mirrors the WordPress GenericRenderer pattern.\n *\n * Heuristic order:\n * 1. Primitive (string, number, boolean) -> single line.\n * 2. Array of primitives -> chip list.\n * 3. Array of objects with shared keys -> table.\n * 4. Object with title-like field -> card with key/value rows.\n * 5. Otherwise -> definition list of all keys.\n *\n * Future spec hint: when the server emits `x-roxy-ui` on a schema, the\n * dispatcher in tool-call (Phase 2.5) will select a hand-tuned component\n * instead of this fallback.\n */\n\ntype Json = string | number | boolean | null | Json[] | { [key: string]: Json };\n\nconst TITLE_KEYS = ['title', 'name', 'label', 'heading', 'overview', 'summary'];\nconst IMAGE_KEYS = ['imageUrl', 'image', 'icon', 'symbol'];\nconst SKIP_KEYS = ['imageUrl', 'image']; // rendered separately, not in body rows\n\n@customElement('roxy-data')\nexport class RoxyData extends LitElement {\n\tstatic styles = [\n\t\tbaseStyles,\n\t\tcss`\n\t\t\t.roxy-card {\n\t\t\t\tbackground: var(--roxy-bg, #fff);\n\t\t\t\tborder: 1px solid var(--roxy-border, #e4e4e7);\n\t\t\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t\t\t\tpadding: var(--roxy-space-md, 1rem);\n\t\t\t\tbox-shadow: var(--roxy-shadow-sm);\n\t\t\t}\n\n\t\t\t.roxy-title {\n\t\t\t\tfont-size: var(--roxy-text-lg, 1.125rem);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\tmargin: 0 0 var(--roxy-space-sm, 0.5rem) 0;\n\t\t\t\tcolor: var(--roxy-primary, #0f172a);\n\t\t\t\tletter-spacing: var(--roxy-tracking-tight);\n\t\t\t}\n\n\t\t\t.roxy-summary {\n\t\t\t\tcolor: var(--roxy-secondary, #475569);\n\t\t\t\tmargin: 0 0 var(--roxy-space-md, 1rem) 0;\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t}\n\n\t\t\tdl.roxy-rows {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: grid;\n\t\t\t\tgrid-template-columns: minmax(8ch, max-content) 1fr;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem) var(--roxy-space-md, 1rem);\n\t\t\t}\n\t\t\tdl.roxy-rows dt {\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\ttext-transform: capitalize;\n\t\t\t}\n\t\t\tdl.roxy-rows dd {\n\t\t\t\tmargin: 0;\n\t\t\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tword-break: break-word;\n\t\t\t}\n\n\t\t\tul.roxy-chips {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem);\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tlist-style: none;\n\t\t\t}\n\t\t\tul.roxy-chips li {\n\t\t\t\tbackground: color-mix(in srgb, var(--roxy-accent, #f59e0b) 14%, transparent);\n\t\t\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\t\t\tpadding: 2px 8px;\n\t\t\t\tborder-radius: var(--roxy-radius-full, 9999px);\n\t\t\t\tfont-size: var(--roxy-text-xs, 0.75rem);\n\t\t\t}\n\n\t\t\ttable.roxy-table {\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-collapse: collapse;\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t}\n\t\t\ttable.roxy-table th,\n\t\t\ttable.roxy-table td {\n\t\t\t\tborder-bottom: 1px solid var(--roxy-border, #e4e4e7);\n\t\t\t\tpadding: var(--roxy-space-sm, 0.5rem);\n\t\t\t\ttext-align: left;\n\t\t\t\ttext-transform: none;\n\t\t\t}\n\t\t\ttable.roxy-table th {\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\ttext-transform: capitalize;\n\t\t\t\tfont-size: var(--roxy-text-xs, 0.75rem);\n\t\t\t\tletter-spacing: 0.04em;\n\t\t\t}\n\n\t\t\t.roxy-image {\n\t\t\t\tmax-width: 100%;\n\t\t\t\theight: auto;\n\t\t\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t\t\t\tmargin-bottom: var(--roxy-space-md, 1rem);\n\t\t\t}\n\n\t\t\t.roxy-section {\n\t\t\t\tmargin-bottom: var(--roxy-space-md, 1rem);\n\t\t\t}\n\t\t\t.roxy-section h4 {\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\tcolor: var(--roxy-secondary, #475569);\n\t\t\t\tmargin: 0 0 var(--roxy-space-xs, 0.25rem) 0;\n\t\t\t\ttext-transform: capitalize;\n\t\t\t}\n\t\t`,\n\t];\n\n\t@property({ attribute: false })\n\tdata: Json = null;\n\n\trender() {\n\t\tif (this.data == null) {\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">No data</div>`;\n\t\t}\n\t\treturn html`<div\n\t\t\tclass=\"roxy-card\"\n\t\t\taria-label=\"Generic data display\"\n\t\t>\n\t\t\t${this.renderValue(this.data)}\n\t\t</div>`;\n\t}\n\n\tprivate renderValue(value: Json): TemplateResult | typeof nothing {\n\t\tif (value === null || value === undefined) return nothing;\n\t\tif (typeof value === 'string') return html`<p>${value}</p>`;\n\t\tif (typeof value === 'number' || typeof value === 'boolean') {\n\t\t\treturn html`<p>${String(value)}</p>`;\n\t\t}\n\t\tif (Array.isArray(value)) return this.renderArray(value);\n\t\treturn this.renderObject(value as Record<string, Json>);\n\t}\n\n\tprivate renderArray(arr: Json[]): TemplateResult {\n\t\tif (arr.length === 0) {\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">Empty list</div>`;\n\t\t}\n\t\tconst allPrimitive = arr.every(\n\t\t\t(v) => v === null || ['string', 'number', 'boolean'].includes(typeof v),\n\t\t);\n\t\tif (allPrimitive) {\n\t\t\treturn html`<ul class=\"roxy-chips\">\n\t\t\t\t${arr.map((v) => html`<li>${String(v)}</li>`)}\n\t\t\t</ul>`;\n\t\t}\n\t\tconst allObjects = arr.every(\n\t\t\t(v) => v !== null && typeof v === 'object' && !Array.isArray(v),\n\t\t);\n\t\tif (allObjects) return this.renderTable(arr as Record<string, Json>[]);\n\t\treturn html`<ol>\n\t\t\t${arr.map((v) => html`<li>${this.renderValue(v)}</li>`)}\n\t\t</ol>`;\n\t}\n\n\tprivate renderTable(rows: Record<string, Json>[]): TemplateResult {\n\t\tconst keys = this.collectKeys(rows);\n\t\treturn html`<table class=\"roxy-table\" role=\"table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t${keys.map((k) => html`<th>${this.humanize(k)}</th>`)}\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t${rows.map(\n\t\t\t\t\t(row) => html`<tr>\n\t\t\t\t\t\t${keys.map((k) => html`<td>${this.formatPrimitive(row[k])}</td>`)}\n\t\t\t\t\t</tr>`,\n\t\t\t\t)}\n\t\t\t</tbody>\n\t\t</table>`;\n\t}\n\n\tprivate renderObject(obj: Record<string, Json>): TemplateResult {\n\t\tconst titleKey = TITLE_KEYS.find((k) => typeof obj[k] === 'string');\n\t\tconst imageKey = IMAGE_KEYS.find(\n\t\t\t(k) =>\n\t\t\t\ttypeof obj[k] === 'string' && (obj[k] as string).startsWith('http'),\n\t\t);\n\t\tconst summaryKey =\n\t\t\ttitleKey !== 'summary' && typeof obj.summary === 'string'\n\t\t\t\t? 'summary'\n\t\t\t\t: null;\n\t\tconst rows = Object.entries(obj).filter(\n\t\t\t([k, v]) =>\n\t\t\t\tk !== titleKey &&\n\t\t\t\tk !== summaryKey &&\n\t\t\t\t!SKIP_KEYS.includes(k) &&\n\t\t\t\tv !== null &&\n\t\t\t\tv !== undefined,\n\t\t);\n\n\t\treturn html`\n\t\t\t${\n\t\t\t\timageKey\n\t\t\t\t\t? html`<img\n\t\t\t\t\t\tclass=\"roxy-image\"\n\t\t\t\t\t\tsrc=${String(obj[imageKey])}\n\t\t\t\t\t\talt=${titleKey ? String(obj[titleKey]) : 'illustration'}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t/>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${titleKey ? html`<h3 class=\"roxy-title\">${obj[titleKey]}</h3>` : nothing}\n\t\t\t${summaryKey ? html`<p class=\"roxy-summary\">${obj[summaryKey]}</p>` : nothing}\n\t\t\t${\n\t\t\t\trows.length > 0\n\t\t\t\t\t? html`<dl class=\"roxy-rows\">\n\t\t\t\t\t\t${rows.map(\n\t\t\t\t\t\t\t([k, v]) => html`\n\t\t\t\t\t\t\t\t<dt>${this.humanize(k)}</dt>\n\t\t\t\t\t\t\t\t<dd>${this.renderField(v)}</dd>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</dl>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t`;\n\t}\n\n\tprivate renderField(value: Json): TemplateResult | string {\n\t\tif (value === null || value === undefined) return '';\n\t\tif (typeof value === 'string') return value;\n\t\tif (typeof value === 'number' || typeof value === 'boolean')\n\t\t\treturn String(value);\n\t\tif (Array.isArray(value)) {\n\t\t\tconst allPrimitive = value.every((v) =>\n\t\t\t\t['string', 'number', 'boolean'].includes(typeof v),\n\t\t\t);\n\t\t\tif (allPrimitive) {\n\t\t\t\treturn html`<ul class=\"roxy-chips\">\n\t\t\t\t\t${value.map((v) => html`<li>${String(v)}</li>`)}\n\t\t\t\t</ul>`;\n\t\t\t}\n\t\t}\n\t\treturn html`<roxy-data .data=${value}></roxy-data>`;\n\t}\n\n\tprivate formatPrimitive(value: Json | undefined): string {\n\t\tif (value === null || value === undefined) return '';\n\t\tif (typeof value === 'string') return value;\n\t\tif (typeof value === 'number' || typeof value === 'boolean')\n\t\t\treturn String(value);\n\t\tif (Array.isArray(value)) return value.map(String).join(', ');\n\t\treturn JSON.stringify(value);\n\t}\n\n\tprivate collectKeys(rows: Record<string, Json>[]): string[] {\n\t\tconst seen = new Set<string>();\n\t\tfor (const row of rows) {\n\t\t\tfor (const k of Object.keys(row)) seen.add(k);\n\t\t}\n\t\treturn Array.from(seen);\n\t}\n\n\tprivate humanize(key: string): string {\n\t\treturn key\n\t\t\t.replace(/[_-]+/g, ' ')\n\t\t\t.replace(/([a-z])([A-Z])/g, '$1 $2')\n\t\t\t.replace(/^\\w/, (c) => c.toUpperCase());\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'roxy-data': RoxyData;\n\t}\n}\n", "import { css } from 'lit';\n\n/**\n * Shared host styles every component pulls in. Sets default font, color,\n * container query support, and the entry fade-in.\n */\nexport const baseStyles = css`\n\t:host {\n\t\tdisplay: block;\n\t\tcontainer-type: inline-size;\n\t\tfont-family: var(\n\t\t\t--roxy-font-sans,\n\t\t\tsystem-ui,\n\t\t\t-apple-system,\n\t\t\tBlinkMacSystemFont,\n\t\t\t'Segoe UI',\n\t\t\tRoboto,\n\t\t\tsans-serif\n\t\t);\n\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\tbackground: transparent;\n\t\tfont-size: var(--roxy-text-base, 1rem);\n\t\tline-height: var(--roxy-leading-normal, 1.5);\n\t\tanimation: roxy-fade-in var(--roxy-motion-duration, 200ms)\n\t\t\tvar(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both;\n\t}\n\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t}\n\n\t@keyframes roxy-fade-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(2px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-skeleton {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--roxy-border, #e4e4e7) 0%,\n\t\t\tcolor-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%,\n\t\t\tvar(--roxy-border, #e4e4e7) 100%\n\t\t);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: roxy-shimmer 1.4s ease-in-out infinite;\n\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t}\n\n\t@keyframes roxy-shimmer {\n\t\t0% {\n\t\t\tbackground-position: 200% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -200% 0;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.roxy-skeleton {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-empty {\n\t\tpadding: var(--roxy-space-lg, 1.5rem);\n\t\tcolor: var(--roxy-muted, #71717a);\n\t\ttext-align: center;\n\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t}\n\n\t:host(:focus-within) .roxy-card {\n\t\toutline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));\n\t\toutline-offset: 2px;\n\t}\n`;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAAA,SAAS,OAAAA,MAAK,MAAM,YAAY,eAAoC;AACpE,SAAS,eAAe,gBAAgB;;;ACDxC,SAAS,WAAW;AAMb,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;
|
|
3
|
+
"sources": ["../../src/components/data.ts", "../../src/utils/base-styles.ts", "../../src/utils/string.ts"],
|
|
4
|
+
"sourcesContent": ["import { css, html, LitElement, nothing, type TemplateResult } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { baseStyles } from '../utils/base-styles.js';\nimport { humanize } from '../utils/string.js';\n\n/**\n * Generic fallback renderer. Accepts ANY OpenAPI response shape and renders\n * it via field-name heuristics so future spec additions render reasonably\n * without hand-wired components.\n *\n * Heuristic order:\n * 1. Primitive (string, number, boolean) -> single line.\n * 2. Array of primitives -> chip list.\n * 3. Array of objects with shared keys -> table.\n * 4. Object with title-like field -> card with key/value rows.\n * 5. Otherwise -> definition list of all keys.\n *\n * When a schema declares an `x-roxy-ui` hint, a future dispatcher can opt\n * into a hand-tuned component instead of this fallback.\n */\n\ntype Json = string | number | boolean | null | Json[] | { [key: string]: Json };\n\nconst TITLE_KEYS = ['title', 'name', 'label', 'heading', 'overview', 'summary'];\nconst IMAGE_KEYS = ['imageUrl', 'image', 'icon', 'symbol'];\nconst SKIP_KEYS = ['imageUrl', 'image']; // rendered separately, not in body rows\n\n// Hard cap on recursion. Real RoxyAPI responses nest at most 5-6 deep; anything\n// deeper is either a circular reference (which would otherwise infinite-loop)\n// or a payload too rich for the generic fallback to render usefully. The\n// recursion is otherwise safe: <roxy-data> is registered globally by its\n// `@customElement` decorator on import, so the nested template resolves to\n// this same class without a separate import.\nconst MAX_DEPTH = 6;\n\n@customElement('roxy-data')\nexport class RoxyData extends LitElement {\n\tstatic styles = [\n\t\tbaseStyles,\n\t\tcss`\n\t\t\t.roxy-card {\n\t\t\t\tbackground: var(--roxy-bg, #fff);\n\t\t\t\tborder: 1px solid var(--roxy-border, #e4e4e7);\n\t\t\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t\t\t\tpadding: var(--roxy-space-md, 1rem);\n\t\t\t\tbox-shadow: var(--roxy-shadow-sm);\n\t\t\t}\n\n\t\t\t.roxy-title {\n\t\t\t\tfont-size: var(--roxy-text-lg, 1.125rem);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\tmargin: 0 0 var(--roxy-space-sm, 0.5rem) 0;\n\t\t\t\tcolor: var(--roxy-primary, #0f172a);\n\t\t\t\tletter-spacing: var(--roxy-tracking-tight);\n\t\t\t}\n\n\t\t\t.roxy-summary {\n\t\t\t\tcolor: var(--roxy-secondary, #475569);\n\t\t\t\tmargin: 0 0 var(--roxy-space-md, 1rem) 0;\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t}\n\n\t\t\tdl.roxy-rows {\n\t\t\t\tmargin: 0;\n\t\t\t\tdisplay: grid;\n\t\t\t\tgrid-template-columns: minmax(8ch, max-content) 1fr;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem) var(--roxy-space-md, 1rem);\n\t\t\t}\n\t\t\tdl.roxy-rows dt {\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\ttext-transform: capitalize;\n\t\t\t}\n\t\t\tdl.roxy-rows dd {\n\t\t\t\tmargin: 0;\n\t\t\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tword-break: break-word;\n\t\t\t}\n\n\t\t\tul.roxy-chips {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem);\n\t\t\t\tpadding: 0;\n\t\t\t\tmargin: 0;\n\t\t\t\tlist-style: none;\n\t\t\t}\n\t\t\tul.roxy-chips li {\n\t\t\t\tbackground: color-mix(in srgb, var(--roxy-accent, #f59e0b) 14%, transparent);\n\t\t\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\t\t\tpadding: 2px 8px;\n\t\t\t\tborder-radius: var(--roxy-radius-full, 9999px);\n\t\t\t\tfont-size: var(--roxy-text-xs, 0.75rem);\n\t\t\t}\n\n\t\t\ttable.roxy-table {\n\t\t\t\twidth: 100%;\n\t\t\t\tborder-collapse: collapse;\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t}\n\t\t\ttable.roxy-table th,\n\t\t\ttable.roxy-table td {\n\t\t\t\tborder-bottom: 1px solid var(--roxy-border, #e4e4e7);\n\t\t\t\tpadding: var(--roxy-space-sm, 0.5rem);\n\t\t\t\ttext-align: left;\n\t\t\t\ttext-transform: none;\n\t\t\t}\n\t\t\ttable.roxy-table th {\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\ttext-transform: capitalize;\n\t\t\t\tfont-size: var(--roxy-text-xs, 0.75rem);\n\t\t\t\tletter-spacing: 0.04em;\n\t\t\t}\n\n\t\t\t.roxy-image {\n\t\t\t\tmax-width: 100%;\n\t\t\t\theight: auto;\n\t\t\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t\t\t\tmargin-bottom: var(--roxy-space-md, 1rem);\n\t\t\t}\n\n\t\t\t.roxy-section {\n\t\t\t\tmargin-bottom: var(--roxy-space-md, 1rem);\n\t\t\t}\n\t\t\t.roxy-section h4 {\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\tcolor: var(--roxy-secondary, #475569);\n\t\t\t\tmargin: 0 0 var(--roxy-space-xs, 0.25rem) 0;\n\t\t\t\ttext-transform: capitalize;\n\t\t\t}\n\t\t`,\n\t];\n\n\t@property({ attribute: false })\n\tdata: Json = null;\n\n\t/**\n\t * Internal recursion depth. Nested <roxy-data> instances inherit this from\n\t * the parent and increment to guard against circular references in the\n\t * input. Not part of the public API; do not set from consumer code.\n\t */\n\t@property({ attribute: false })\n\tdepth = 0;\n\n\trender() {\n\t\tif (this.data == null) {\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">No data</div>`;\n\t\t}\n\t\tif (this.depth >= MAX_DEPTH) {\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">\u2026</div>`;\n\t\t}\n\t\treturn html`<div\n\t\t\tclass=\"roxy-card\"\n\t\t\taria-label=\"Generic data display\"\n\t\t>\n\t\t\t${this.renderValue(this.data)}\n\t\t</div>`;\n\t}\n\n\tprivate renderValue(value: Json): TemplateResult | typeof nothing {\n\t\tif (value === null || value === undefined) return nothing;\n\t\tif (typeof value === 'string') return html`<p>${value}</p>`;\n\t\tif (typeof value === 'number' || typeof value === 'boolean') {\n\t\t\treturn html`<p>${String(value)}</p>`;\n\t\t}\n\t\tif (Array.isArray(value)) return this.renderArray(value);\n\t\treturn this.renderObject(value as Record<string, Json>);\n\t}\n\n\tprivate renderArray(arr: Json[]): TemplateResult {\n\t\tif (arr.length === 0) {\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">Empty list</div>`;\n\t\t}\n\t\tconst allPrimitive = arr.every(\n\t\t\t(v) => v === null || ['string', 'number', 'boolean'].includes(typeof v),\n\t\t);\n\t\tif (allPrimitive) {\n\t\t\treturn html`<ul class=\"roxy-chips\">\n\t\t\t\t${arr.map((v) => html`<li>${String(v)}</li>`)}\n\t\t\t</ul>`;\n\t\t}\n\t\tconst allObjects = arr.every(\n\t\t\t(v) => v !== null && typeof v === 'object' && !Array.isArray(v),\n\t\t);\n\t\tif (allObjects) return this.renderTable(arr as Record<string, Json>[]);\n\t\treturn html`<ol>\n\t\t\t${arr.map((v) => html`<li>${this.renderValue(v)}</li>`)}\n\t\t</ol>`;\n\t}\n\n\tprivate renderTable(rows: Record<string, Json>[]): TemplateResult {\n\t\tconst keys = this.collectKeys(rows);\n\t\treturn html`<table class=\"roxy-table\" role=\"table\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t${keys.map((k) => html`<th>${humanize(k)}</th>`)}\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t\t${rows.map(\n\t\t\t\t\t(row) => html`<tr>\n\t\t\t\t\t\t${keys.map((k) => html`<td>${this.formatPrimitive(row[k])}</td>`)}\n\t\t\t\t\t</tr>`,\n\t\t\t\t)}\n\t\t\t</tbody>\n\t\t</table>`;\n\t}\n\n\tprivate renderObject(obj: Record<string, Json>): TemplateResult {\n\t\tconst titleKey = TITLE_KEYS.find((k) => typeof obj[k] === 'string');\n\t\tconst imageKey = IMAGE_KEYS.find(\n\t\t\t(k) =>\n\t\t\t\ttypeof obj[k] === 'string' && (obj[k] as string).startsWith('http'),\n\t\t);\n\t\tconst summaryKey =\n\t\t\ttitleKey !== 'summary' && typeof obj.summary === 'string'\n\t\t\t\t? 'summary'\n\t\t\t\t: null;\n\t\tconst rows = Object.entries(obj).filter(\n\t\t\t([k, v]) =>\n\t\t\t\tk !== titleKey &&\n\t\t\t\tk !== summaryKey &&\n\t\t\t\t!SKIP_KEYS.includes(k) &&\n\t\t\t\tv !== null &&\n\t\t\t\tv !== undefined,\n\t\t);\n\n\t\treturn html`\n\t\t\t${\n\t\t\t\timageKey\n\t\t\t\t\t? html`<img\n\t\t\t\t\t\tclass=\"roxy-image\"\n\t\t\t\t\t\tsrc=${String(obj[imageKey])}\n\t\t\t\t\t\talt=${titleKey ? String(obj[titleKey]) : 'illustration'}\n\t\t\t\t\t\tloading=\"lazy\"\n\t\t\t\t\t/>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${titleKey ? html`<h3 class=\"roxy-title\">${obj[titleKey]}</h3>` : nothing}\n\t\t\t${summaryKey ? html`<p class=\"roxy-summary\">${obj[summaryKey]}</p>` : nothing}\n\t\t\t${\n\t\t\t\trows.length > 0\n\t\t\t\t\t? html`<dl class=\"roxy-rows\">\n\t\t\t\t\t\t${rows.map(\n\t\t\t\t\t\t\t([k, v]) => html`\n\t\t\t\t\t\t\t\t<dt>${humanize(k)}</dt>\n\t\t\t\t\t\t\t\t<dd>${this.renderField(v)}</dd>\n\t\t\t\t\t\t\t`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</dl>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t`;\n\t}\n\n\tprivate renderField(value: Json): TemplateResult | string {\n\t\tif (value === null || value === undefined) return '';\n\t\tif (typeof value === 'string') return value;\n\t\tif (typeof value === 'number' || typeof value === 'boolean')\n\t\t\treturn String(value);\n\t\tif (Array.isArray(value)) {\n\t\t\tconst allPrimitive = value.every((v) =>\n\t\t\t\t['string', 'number', 'boolean'].includes(typeof v),\n\t\t\t);\n\t\t\tif (allPrimitive) {\n\t\t\t\treturn html`<ul class=\"roxy-chips\">\n\t\t\t\t\t${value.map((v) => html`<li>${String(v)}</li>`)}\n\t\t\t\t</ul>`;\n\t\t\t}\n\t\t}\n\t\treturn html`<roxy-data .data=${value} .depth=${this.depth + 1}></roxy-data>`;\n\t}\n\n\tprivate formatPrimitive(value: Json | undefined): string {\n\t\tif (value === null || value === undefined) return '';\n\t\tif (typeof value === 'string') return value;\n\t\tif (typeof value === 'number' || typeof value === 'boolean')\n\t\t\treturn String(value);\n\t\tif (Array.isArray(value)) return value.map(String).join(', ');\n\t\treturn JSON.stringify(value);\n\t}\n\n\tprivate collectKeys(rows: Record<string, Json>[]): string[] {\n\t\tconst seen = new Set<string>();\n\t\tfor (const row of rows) {\n\t\t\tfor (const k of Object.keys(row)) seen.add(k);\n\t\t}\n\t\treturn Array.from(seen);\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'roxy-data': RoxyData;\n\t}\n}\n", "import { css } from 'lit';\n\n/**\n * Shared host styles every component pulls in. Sets default font, color,\n * container query support, and the entry fade-in.\n */\nexport const baseStyles = css`\n\t:host {\n\t\tdisplay: block;\n\t\tcontainer-type: inline-size;\n\t\tfont-family: var(\n\t\t\t--roxy-font-sans,\n\t\t\tsystem-ui,\n\t\t\t-apple-system,\n\t\t\tBlinkMacSystemFont,\n\t\t\t'Segoe UI',\n\t\t\tRoboto,\n\t\t\tsans-serif\n\t\t);\n\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\tbackground: transparent;\n\t\tfont-size: var(--roxy-text-base, 1rem);\n\t\tline-height: var(--roxy-leading-normal, 1.5);\n\t\tanimation: roxy-fade-in var(--roxy-motion-duration, 200ms)\n\t\t\tvar(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both;\n\t}\n\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t}\n\n\t@keyframes roxy-fade-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(2px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-skeleton {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--roxy-border, #e4e4e7) 0%,\n\t\t\tcolor-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%,\n\t\t\tvar(--roxy-border, #e4e4e7) 100%\n\t\t);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: roxy-shimmer 1.4s ease-in-out infinite;\n\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t}\n\n\t@keyframes roxy-shimmer {\n\t\t0% {\n\t\t\tbackground-position: 200% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -200% 0;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.roxy-skeleton {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-empty {\n\t\tpadding: var(--roxy-space-lg, 1.5rem);\n\t\tcolor: var(--roxy-muted, #71717a);\n\t\ttext-align: center;\n\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t}\n\n\t:host(:focus-within) .roxy-card {\n\t\toutline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));\n\t\toutline-offset: 2px;\n\t}\n`;\n", "/**\n * Shared string helpers used across components. Single source of truth so the\n * same formatting rules apply to every key/label/title that surfaces in the\n * shadow tree.\n *\n * - `capitalize`: title-cases the first character, lowercases the rest. Used\n * when matching API-supplied planet/sign names against the glyph maps in\n * `tokens/index.ts`, which use canonical TitleCase keys.\n * - `humanize`: turns an API key (`birth_date`, `birthDate`, `mahadasha-end`)\n * into a label suitable for display (\"Birth date\", \"Mahadasha end\").\n */\n\nexport function capitalize(s: string): string {\n\tif (!s) return '';\n\treturn s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nexport function humanize(s: string): string {\n\treturn s\n\t\t.replace(/[_-]+/g, ' ')\n\t\t.replace(/([a-z])([A-Z])/g, '$1 $2')\n\t\t.replace(/^\\w/, (c) => c.toUpperCase());\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAAA,SAAS,OAAAA,MAAK,MAAM,YAAY,eAAoC;AACpE,SAAS,eAAe,gBAAgB;;;ACDxC,SAAS,WAAW;AAMb,IAAM,aAAa;A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AA;AA+FD;AAGA;AAAA,EADC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GApGlB,SAqGZ;AAQA;AAAA,EADC,SAAS,EAAE,WAAW,MAAM,CAAC;AAAA,GA5GlB,SA6GZ;AA7GY,WAAN;AAAA,EADN,cAAc,WAAW;AAAA,GACb;",
|
|
6
6
|
"names": ["css", "css"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import type { DivisionalChartResponse } from '../types/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Divisional chart renderer (D2-D60). Accepts a DivisionalChartResponse and
|
|
5
|
+
* renders the same south/north kundli wheel as the birth chart, plus division
|
|
6
|
+
* metadata and Vargottama planet pills.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RoxyDivisionalChart extends LitElement {
|
|
9
|
+
static styles: import("lit").CSSResult[];
|
|
10
|
+
data: DivisionalChartResponse | null;
|
|
11
|
+
chartStyle: 'south' | 'north';
|
|
12
|
+
private buildHouses;
|
|
13
|
+
render(): import("lit").TemplateResult<1>;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
'roxy-divisional-chart': RoxyDivisionalChart;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=divisional-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"divisional-chart.d.ts","sourceRoot":"","sources":["../../src/components/divisional-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAW,MAAM,KAAK,CAAC;AAGrD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAiBjE;;;;GAIG;AACH,qBACa,mBAAoB,SAAQ,UAAU;IAClD,MAAM,CAAC,MAAM,4BA6FX;IAGF,IAAI,EAAE,uBAAuB,GAAG,IAAI,CAAQ;IAG5C,UAAU,EAAE,OAAO,GAAG,OAAO,CAAW;IAExC,OAAO,CAAC,WAAW;IAyBnB,MAAM;CAsDN;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,uBAAuB,EAAE,mBAAmB,CAAC;KAC7C;CACD"}
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
4
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
5
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
6
|
+
if (decorator = decorators[i])
|
|
7
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
8
|
+
if (kind && result) __defProp(target, key, result);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// packages/ui/src/components/divisional-chart.ts
|
|
13
|
+
import { css as css2, html, LitElement, nothing as nothing2 } from "lit";
|
|
14
|
+
import { customElement, property } from "lit/decorators.js";
|
|
15
|
+
|
|
16
|
+
// packages/ui/src/tokens/index.ts
|
|
17
|
+
var PLANET_GLYPH = {
|
|
18
|
+
Sun: "\u2609",
|
|
19
|
+
Moon: "\u263D",
|
|
20
|
+
Mercury: "\u263F",
|
|
21
|
+
Venus: "\u2640",
|
|
22
|
+
Earth: "\u2641",
|
|
23
|
+
Mars: "\u2642",
|
|
24
|
+
Jupiter: "\u2643",
|
|
25
|
+
Saturn: "\u2644",
|
|
26
|
+
Uranus: "\u2645",
|
|
27
|
+
Neptune: "\u2646",
|
|
28
|
+
Pluto: "\u2647",
|
|
29
|
+
Rahu: "\u260A",
|
|
30
|
+
Ketu: "\u260B",
|
|
31
|
+
Ascendant: "Asc",
|
|
32
|
+
Lagna: "La",
|
|
33
|
+
NorthNode: "\u260A",
|
|
34
|
+
SouthNode: "\u260B",
|
|
35
|
+
"North node": "\u260A",
|
|
36
|
+
"South node": "\u260B",
|
|
37
|
+
Chiron: "\u26B7",
|
|
38
|
+
Lilith: "\u26B8",
|
|
39
|
+
"Black moon lilith": "\u26B8"
|
|
40
|
+
};
|
|
41
|
+
var PLANET_ABBR = {
|
|
42
|
+
Sun: "Su",
|
|
43
|
+
Moon: "Mo",
|
|
44
|
+
Mercury: "Me",
|
|
45
|
+
Venus: "Ve",
|
|
46
|
+
Mars: "Ma",
|
|
47
|
+
Jupiter: "Ju",
|
|
48
|
+
Saturn: "Sa",
|
|
49
|
+
Uranus: "Ur",
|
|
50
|
+
Neptune: "Ne",
|
|
51
|
+
Pluto: "Pl",
|
|
52
|
+
Rahu: "Ra",
|
|
53
|
+
Ketu: "Ke",
|
|
54
|
+
Ascendant: "Asc",
|
|
55
|
+
Lagna: "La"
|
|
56
|
+
};
|
|
57
|
+
var SIGN_ABBR = {
|
|
58
|
+
Aries: "Ar",
|
|
59
|
+
Taurus: "Ta",
|
|
60
|
+
Gemini: "Ge",
|
|
61
|
+
Cancer: "Cn",
|
|
62
|
+
Leo: "Le",
|
|
63
|
+
Virgo: "Vi",
|
|
64
|
+
Libra: "Li",
|
|
65
|
+
Scorpio: "Sc",
|
|
66
|
+
Sagittarius: "Sg",
|
|
67
|
+
Capricorn: "Cp",
|
|
68
|
+
Aquarius: "Aq",
|
|
69
|
+
Pisces: "Pi"
|
|
70
|
+
};
|
|
71
|
+
var SIGNS_ORDER = [
|
|
72
|
+
"Aries",
|
|
73
|
+
"Taurus",
|
|
74
|
+
"Gemini",
|
|
75
|
+
"Cancer",
|
|
76
|
+
"Leo",
|
|
77
|
+
"Virgo",
|
|
78
|
+
"Libra",
|
|
79
|
+
"Scorpio",
|
|
80
|
+
"Sagittarius",
|
|
81
|
+
"Capricorn",
|
|
82
|
+
"Aquarius",
|
|
83
|
+
"Pisces"
|
|
84
|
+
];
|
|
85
|
+
var RASHI_KEYS = SIGNS_ORDER.map(
|
|
86
|
+
(s) => s.toLowerCase()
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
// packages/ui/src/utils/base-styles.ts
|
|
90
|
+
import { css } from "lit";
|
|
91
|
+
var baseStyles = css`
|
|
92
|
+
:host {
|
|
93
|
+
display: block;
|
|
94
|
+
container-type: inline-size;
|
|
95
|
+
font-family: var(
|
|
96
|
+
--roxy-font-sans,
|
|
97
|
+
system-ui,
|
|
98
|
+
-apple-system,
|
|
99
|
+
BlinkMacSystemFont,
|
|
100
|
+
'Segoe UI',
|
|
101
|
+
Roboto,
|
|
102
|
+
sans-serif
|
|
103
|
+
);
|
|
104
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
105
|
+
background: transparent;
|
|
106
|
+
font-size: var(--roxy-text-base, 1rem);
|
|
107
|
+
line-height: var(--roxy-leading-normal, 1.5);
|
|
108
|
+
animation: roxy-fade-in var(--roxy-motion-duration, 200ms)
|
|
109
|
+
var(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
*,
|
|
113
|
+
*::before,
|
|
114
|
+
*::after {
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes roxy-fade-in {
|
|
119
|
+
from {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
transform: translateY(2px);
|
|
122
|
+
}
|
|
123
|
+
to {
|
|
124
|
+
opacity: 1;
|
|
125
|
+
transform: translateY(0);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (prefers-reduced-motion: reduce) {
|
|
130
|
+
:host {
|
|
131
|
+
animation: none;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.roxy-skeleton {
|
|
136
|
+
background: linear-gradient(
|
|
137
|
+
90deg,
|
|
138
|
+
var(--roxy-border, #e4e4e7) 0%,
|
|
139
|
+
color-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%,
|
|
140
|
+
var(--roxy-border, #e4e4e7) 100%
|
|
141
|
+
);
|
|
142
|
+
background-size: 200% 100%;
|
|
143
|
+
animation: roxy-shimmer 1.4s ease-in-out infinite;
|
|
144
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@keyframes roxy-shimmer {
|
|
148
|
+
0% {
|
|
149
|
+
background-position: 200% 0;
|
|
150
|
+
}
|
|
151
|
+
100% {
|
|
152
|
+
background-position: -200% 0;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media (prefers-reduced-motion: reduce) {
|
|
157
|
+
.roxy-skeleton {
|
|
158
|
+
animation: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.roxy-empty {
|
|
163
|
+
padding: var(--roxy-space-lg, 1.5rem);
|
|
164
|
+
color: var(--roxy-muted, #71717a);
|
|
165
|
+
text-align: center;
|
|
166
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
:host(:focus-within) .roxy-card {
|
|
170
|
+
outline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));
|
|
171
|
+
outline-offset: 2px;
|
|
172
|
+
}
|
|
173
|
+
`;
|
|
174
|
+
|
|
175
|
+
// packages/ui/src/utils/kundli-render.ts
|
|
176
|
+
import { nothing, svg } from "lit";
|
|
177
|
+
|
|
178
|
+
// packages/ui/src/utils/string.ts
|
|
179
|
+
function capitalize(s) {
|
|
180
|
+
if (!s) return "";
|
|
181
|
+
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// packages/ui/src/utils/kundli-render.ts
|
|
185
|
+
var RASHI_TO_SIGN = Object.fromEntries(
|
|
186
|
+
SIGNS_ORDER.map((s) => [s.toLowerCase(), s])
|
|
187
|
+
);
|
|
188
|
+
var SOUTH_HOUSE_CENTERS = {
|
|
189
|
+
1: { x: 150, y: 58 },
|
|
190
|
+
2: { x: 205, y: 52 },
|
|
191
|
+
3: { x: 253, y: 112 },
|
|
192
|
+
4: { x: 243, y: 150 },
|
|
193
|
+
5: { x: 253, y: 188 },
|
|
194
|
+
6: { x: 205, y: 248 },
|
|
195
|
+
7: { x: 150, y: 242 },
|
|
196
|
+
8: { x: 95, y: 248 },
|
|
197
|
+
9: { x: 47, y: 188 },
|
|
198
|
+
10: { x: 57, y: 150 },
|
|
199
|
+
11: { x: 47, y: 112 },
|
|
200
|
+
12: { x: 95, y: 52 }
|
|
201
|
+
};
|
|
202
|
+
var SOUTH_SIGN_POSITIONS = {
|
|
203
|
+
1: { x: 150, y: 35 },
|
|
204
|
+
2: { x: 222, y: 40 },
|
|
205
|
+
3: { x: 265, y: 100 },
|
|
206
|
+
4: { x: 265, y: 150 },
|
|
207
|
+
5: { x: 265, y: 200 },
|
|
208
|
+
6: { x: 222, y: 260 },
|
|
209
|
+
7: { x: 150, y: 265 },
|
|
210
|
+
8: { x: 78, y: 260 },
|
|
211
|
+
9: { x: 35, y: 200 },
|
|
212
|
+
10: { x: 35, y: 150 },
|
|
213
|
+
11: { x: 35, y: 100 },
|
|
214
|
+
12: { x: 78, y: 40 }
|
|
215
|
+
};
|
|
216
|
+
var NORTH_HOUSE_CENTERS = {
|
|
217
|
+
1: { x: 150, y: 60 },
|
|
218
|
+
2: { x: 225, y: 100 },
|
|
219
|
+
3: { x: 255, y: 150 },
|
|
220
|
+
4: { x: 225, y: 200 },
|
|
221
|
+
5: { x: 150, y: 240 },
|
|
222
|
+
6: { x: 75, y: 200 },
|
|
223
|
+
7: { x: 45, y: 150 },
|
|
224
|
+
8: { x: 75, y: 100 },
|
|
225
|
+
9: { x: 100, y: 80 },
|
|
226
|
+
10: { x: 150, y: 108 },
|
|
227
|
+
11: { x: 200, y: 80 },
|
|
228
|
+
12: { x: 200, y: 220 }
|
|
229
|
+
};
|
|
230
|
+
function renderSouthHouseGroup(h) {
|
|
231
|
+
const center = SOUTH_HOUSE_CENTERS[h.number];
|
|
232
|
+
const signPos = SOUTH_SIGN_POSITIONS[h.number];
|
|
233
|
+
if (!center || !signPos) return nothing;
|
|
234
|
+
const signAbbr = SIGN_ABBR[h.sign] ?? "";
|
|
235
|
+
const planets = h.planets;
|
|
236
|
+
return svg`
|
|
237
|
+
<g>
|
|
238
|
+
${h.isLagna ? svg`<rect
|
|
239
|
+
class="lagna-bg"
|
|
240
|
+
x=${center.x - 30} y=${center.y - 28}
|
|
241
|
+
width="60" height="56" rx="6"
|
|
242
|
+
/>` : nothing}
|
|
243
|
+
${signAbbr ? svg`<text class="sign-text" x=${signPos.x} y=${signPos.y} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>` : nothing}
|
|
244
|
+
${h.isLagna ? svg`<text class="lagna-marker" x=${center.x} y=${center.y - 18} text-anchor="middle" dominant-baseline="central">LAGNA</text>` : nothing}
|
|
245
|
+
${planets.map((planet, j) => {
|
|
246
|
+
const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
|
|
247
|
+
const lineHeight = 13;
|
|
248
|
+
const baseY = h.isLagna ? center.y + 8 : center.y;
|
|
249
|
+
const startY = baseY - (planets.length - 1) * lineHeight / 2;
|
|
250
|
+
const yPos = startY + j * lineHeight;
|
|
251
|
+
return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
|
|
252
|
+
})}
|
|
253
|
+
</g>
|
|
254
|
+
`;
|
|
255
|
+
}
|
|
256
|
+
function renderNorthFrame() {
|
|
257
|
+
return svg`
|
|
258
|
+
<polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
|
|
259
|
+
<line class="line" x1="150" y1="10" x2="150" y2="290" stroke-width="1" />
|
|
260
|
+
<line class="line" x1="10" y1="150" x2="290" y2="150" stroke-width="1" />
|
|
261
|
+
<line class="line" x1="150" y1="10" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
262
|
+
<line class="line" x1="150" y1="10" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
263
|
+
<line class="line" x1="150" y1="290" x2="10" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
264
|
+
<line class="line" x1="150" y1="290" x2="290" y2="150" stroke-width="0.6" stroke-dasharray="3,3" />
|
|
265
|
+
`;
|
|
266
|
+
}
|
|
267
|
+
function renderNorthHouseGroup(h) {
|
|
268
|
+
const center = NORTH_HOUSE_CENTERS[h.number];
|
|
269
|
+
if (!center) return nothing;
|
|
270
|
+
const signAbbr = SIGN_ABBR[h.sign] ?? "";
|
|
271
|
+
const planets = h.planets;
|
|
272
|
+
return svg`
|
|
273
|
+
<g>
|
|
274
|
+
${h.isLagna ? svg`<circle class="lagna-bg" cx=${center.x} cy=${center.y} r="22" />` : nothing}
|
|
275
|
+
${signAbbr ? svg`<text class="sign-text" x=${center.x} y=${center.y - 10} text-anchor="middle" dominant-baseline="central">${signAbbr}</text>` : nothing}
|
|
276
|
+
<text class="house-num" x=${center.x} y=${center.y + 2} text-anchor="middle" dominant-baseline="central">${h.number}</text>
|
|
277
|
+
${planets.map((planet, j) => {
|
|
278
|
+
const abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);
|
|
279
|
+
const lineHeight = 11;
|
|
280
|
+
const startY = center.y + 14 - (planets.length - 1) * lineHeight / 2;
|
|
281
|
+
const yPos = startY + j * lineHeight;
|
|
282
|
+
return svg`<text class="planet-text" x=${center.x} y=${yPos} text-anchor="middle" dominant-baseline="central">${abbr}</text>`;
|
|
283
|
+
})}
|
|
284
|
+
</g>
|
|
285
|
+
`;
|
|
286
|
+
}
|
|
287
|
+
function renderSouthFrame() {
|
|
288
|
+
return svg`
|
|
289
|
+
<polygon class="line" points="150,10 290,150 150,290 10,150" stroke-width="1.5" />
|
|
290
|
+
<polygon class="line" points="220,80 220,220 80,220 80,80" stroke-width="1" fill="none" />
|
|
291
|
+
<line class="line" x1="150" y1="10" x2="80" y2="80" stroke-width="1" />
|
|
292
|
+
<line class="line" x1="150" y1="10" x2="220" y2="80" stroke-width="1" />
|
|
293
|
+
<line class="line" x1="290" y1="150" x2="220" y2="80" stroke-width="1" />
|
|
294
|
+
<line class="line" x1="290" y1="150" x2="220" y2="220" stroke-width="1" />
|
|
295
|
+
<line class="line" x1="150" y1="290" x2="220" y2="220" stroke-width="1" />
|
|
296
|
+
<line class="line" x1="150" y1="290" x2="80" y2="220" stroke-width="1" />
|
|
297
|
+
<line class="line" x1="10" y1="150" x2="80" y2="220" stroke-width="1" />
|
|
298
|
+
<line class="line" x1="10" y1="150" x2="80" y2="80" stroke-width="1" />
|
|
299
|
+
`;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// packages/ui/src/components/divisional-chart.ts
|
|
303
|
+
var RoxyDivisionalChart = class extends LitElement {
|
|
304
|
+
constructor() {
|
|
305
|
+
super(...arguments);
|
|
306
|
+
this.data = null;
|
|
307
|
+
this.chartStyle = "south";
|
|
308
|
+
}
|
|
309
|
+
buildHouses() {
|
|
310
|
+
if (!this.data) return [];
|
|
311
|
+
const chart = this.data.chart;
|
|
312
|
+
const meta = this.data.chart.meta ?? {};
|
|
313
|
+
const lagnaSign = meta.Lagna?.rashi ?? "";
|
|
314
|
+
const houses = [];
|
|
315
|
+
for (let i = 0; i < 12; i++) {
|
|
316
|
+
const key = RASHI_KEYS[i];
|
|
317
|
+
const bucket = chart[key];
|
|
318
|
+
const planets = (bucket?.signs ?? []).map((p) => p.graha).filter(Boolean);
|
|
319
|
+
const sign = RASHI_TO_SIGN[key] ?? "";
|
|
320
|
+
houses.push({
|
|
321
|
+
number: i + 1,
|
|
322
|
+
sign,
|
|
323
|
+
planets,
|
|
324
|
+
isLagna: lagnaSign ? lagnaSign.toLowerCase() === sign.toLowerCase() : false
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
return houses;
|
|
328
|
+
}
|
|
329
|
+
render() {
|
|
330
|
+
if (!this.data)
|
|
331
|
+
return html`<div class="roxy-empty" role="status">No divisional chart data</div>`;
|
|
332
|
+
const { division, vargottama } = this.data;
|
|
333
|
+
const houses = this.buildHouses();
|
|
334
|
+
const isNorth = this.chartStyle === "north";
|
|
335
|
+
return html`<div class="wrap">
|
|
336
|
+
<div class="header">
|
|
337
|
+
<h2 class="title">
|
|
338
|
+
D${division.number} ${division.name}
|
|
339
|
+
${division.sanskritName && division.sanskritName !== division.name ? html`<span class="division-meta"> · ${division.sanskritName}</span>` : nothing2}
|
|
340
|
+
</h2>
|
|
341
|
+
${division.significance ? html`<p class="significance">${division.significance}</p>` : nothing2}
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
<svg
|
|
345
|
+
viewBox="0 0 300 300"
|
|
346
|
+
role="img"
|
|
347
|
+
aria-label="D${division.number} ${division.name} divisional chart with twelve sign houses"
|
|
348
|
+
>
|
|
349
|
+
<title>D${division.number} ${division.name}</title>
|
|
350
|
+
${isNorth ? renderNorthFrame() : renderSouthFrame()}
|
|
351
|
+
${isNorth ? houses.map((h) => renderNorthHouseGroup(h)) : houses.map((h) => renderSouthHouseGroup(h))}
|
|
352
|
+
</svg>
|
|
353
|
+
|
|
354
|
+
${vargottama && vargottama.length > 0 ? html`<div class="vargottama-row" role="list" aria-label="Vargottama planets">
|
|
355
|
+
<span class="vargottama-label">Vargottama:</span>
|
|
356
|
+
${vargottama.map(
|
|
357
|
+
(planet) => html`<span class="vargottama-pill" role="listitem">
|
|
358
|
+
${PLANET_GLYPH[planet] ?? ""} ${planet}
|
|
359
|
+
</span>`
|
|
360
|
+
)}
|
|
361
|
+
</div>` : nothing2}
|
|
362
|
+
</div>`;
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
RoxyDivisionalChart.styles = [
|
|
366
|
+
baseStyles,
|
|
367
|
+
css2`
|
|
368
|
+
.wrap {
|
|
369
|
+
display: grid;
|
|
370
|
+
gap: var(--roxy-space-md, 1rem);
|
|
371
|
+
}
|
|
372
|
+
.header {
|
|
373
|
+
display: grid;
|
|
374
|
+
gap: var(--roxy-space-xs, 0.25rem);
|
|
375
|
+
}
|
|
376
|
+
.title {
|
|
377
|
+
font-size: var(--roxy-text-lg, 1.125rem);
|
|
378
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
379
|
+
margin: 0;
|
|
380
|
+
}
|
|
381
|
+
.division-meta {
|
|
382
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
383
|
+
color: var(--roxy-muted, #71717a);
|
|
384
|
+
margin: 0;
|
|
385
|
+
}
|
|
386
|
+
.significance {
|
|
387
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
388
|
+
color: var(--roxy-muted, #71717a);
|
|
389
|
+
border-left: 2px solid var(--roxy-border, #e4e4e7);
|
|
390
|
+
padding-left: var(--roxy-space-sm, 0.5rem);
|
|
391
|
+
margin: 0;
|
|
392
|
+
}
|
|
393
|
+
svg {
|
|
394
|
+
display: block;
|
|
395
|
+
width: 100%;
|
|
396
|
+
max-width: 360px;
|
|
397
|
+
margin: 0 auto;
|
|
398
|
+
}
|
|
399
|
+
.line {
|
|
400
|
+
fill: transparent;
|
|
401
|
+
stroke: var(--roxy-border, #e4e4e7);
|
|
402
|
+
}
|
|
403
|
+
.sign-text {
|
|
404
|
+
fill: var(--roxy-muted, #71717a);
|
|
405
|
+
font-size: 9px;
|
|
406
|
+
font-weight: 500;
|
|
407
|
+
font-family: var(--roxy-font-sans);
|
|
408
|
+
}
|
|
409
|
+
.planet-text {
|
|
410
|
+
fill: var(--roxy-fg, #0a0a0a);
|
|
411
|
+
font-size: 11px;
|
|
412
|
+
font-weight: 600;
|
|
413
|
+
font-family: var(--roxy-font-sans);
|
|
414
|
+
}
|
|
415
|
+
.house-num {
|
|
416
|
+
fill: var(--roxy-muted, #71717a);
|
|
417
|
+
font-size: 9px;
|
|
418
|
+
font-weight: 400;
|
|
419
|
+
font-family: var(--roxy-font-sans);
|
|
420
|
+
}
|
|
421
|
+
.lagna-marker {
|
|
422
|
+
fill: var(--roxy-accent-fg, #b45309);
|
|
423
|
+
font-size: 8px;
|
|
424
|
+
font-weight: 700;
|
|
425
|
+
font-family: var(--roxy-font-sans);
|
|
426
|
+
letter-spacing: 0.05em;
|
|
427
|
+
}
|
|
428
|
+
.lagna-bg {
|
|
429
|
+
fill: color-mix(in srgb, var(--roxy-accent, #f59e0b) 12%, transparent);
|
|
430
|
+
stroke: color-mix(in srgb, var(--roxy-accent, #f59e0b) 45%, transparent);
|
|
431
|
+
stroke-width: 0.8;
|
|
432
|
+
}
|
|
433
|
+
.vargottama-row {
|
|
434
|
+
display: flex;
|
|
435
|
+
flex-wrap: wrap;
|
|
436
|
+
gap: var(--roxy-space-xs, 0.25rem);
|
|
437
|
+
align-items: center;
|
|
438
|
+
}
|
|
439
|
+
.vargottama-label {
|
|
440
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
441
|
+
color: var(--roxy-muted, #71717a);
|
|
442
|
+
font-weight: 500;
|
|
443
|
+
margin-right: var(--roxy-space-xs, 0.25rem);
|
|
444
|
+
}
|
|
445
|
+
.vargottama-pill {
|
|
446
|
+
display: inline-flex;
|
|
447
|
+
align-items: center;
|
|
448
|
+
gap: 0.2em;
|
|
449
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
450
|
+
font-weight: 600;
|
|
451
|
+
padding: 0.15em 0.6em;
|
|
452
|
+
border-radius: 999px;
|
|
453
|
+
background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 22%, transparent);
|
|
454
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
455
|
+
border: 1px solid color-mix(in srgb, var(--roxy-accent, #f59e0b) 45%, transparent);
|
|
456
|
+
}
|
|
457
|
+
`
|
|
458
|
+
];
|
|
459
|
+
__decorateClass([
|
|
460
|
+
property({ attribute: false })
|
|
461
|
+
], RoxyDivisionalChart.prototype, "data", 2);
|
|
462
|
+
__decorateClass([
|
|
463
|
+
property({ type: String, reflect: true, attribute: "chart-style" })
|
|
464
|
+
], RoxyDivisionalChart.prototype, "chartStyle", 2);
|
|
465
|
+
RoxyDivisionalChart = __decorateClass([
|
|
466
|
+
customElement("roxy-divisional-chart")
|
|
467
|
+
], RoxyDivisionalChart);
|
|
468
|
+
export {
|
|
469
|
+
RoxyDivisionalChart
|
|
470
|
+
};
|
|
471
|
+
//# sourceMappingURL=divisional-chart.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/divisional-chart.ts", "../../src/tokens/index.ts", "../../src/utils/base-styles.ts", "../../src/utils/kundli-render.ts", "../../src/utils/string.ts"],
|
|
4
|
+
"sourcesContent": ["import { css, html, LitElement, nothing } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { PLANET_GLYPH, RASHI_KEYS } from '../tokens/index.js';\nimport type { DivisionalChartResponse } from '../types/index.js';\nimport { baseStyles } from '../utils/base-styles.js';\nimport type { HouseDef } from '../utils/kundli-render.js';\nimport {\n\tRASHI_TO_SIGN,\n\trenderNorthFrame,\n\trenderNorthHouseGroup,\n\trenderSouthFrame,\n\trenderSouthHouseGroup,\n} from '../utils/kundli-render.js';\n\ntype RashiBucket = {\n\trashi?: string;\n\tsigns?: Array<{ graha: string; isRetrograde?: boolean }>;\n};\ntype ChartByRashi = { [key: string]: RashiBucket | unknown };\n\n/**\n * Divisional chart renderer (D2-D60). Accepts a DivisionalChartResponse and\n * renders the same south/north kundli wheel as the birth chart, plus division\n * metadata and Vargottama planet pills.\n */\n@customElement('roxy-divisional-chart')\nexport class RoxyDivisionalChart extends LitElement {\n\tstatic styles = [\n\t\tbaseStyles,\n\t\tcss`\n\t\t\t.wrap {\n\t\t\t\tdisplay: grid;\n\t\t\t\tgap: var(--roxy-space-md, 1rem);\n\t\t\t}\n\t\t\t.header {\n\t\t\t\tdisplay: grid;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem);\n\t\t\t}\n\t\t\t.title {\n\t\t\t\tfont-size: var(--roxy-text-lg, 1.125rem);\n\t\t\t\tfont-weight: var(--roxy-weight-bold, 600);\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.division-meta {\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\t.significance {\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tborder-left: 2px solid var(--roxy-border, #e4e4e7);\n\t\t\t\tpadding-left: var(--roxy-space-sm, 0.5rem);\n\t\t\t\tmargin: 0;\n\t\t\t}\n\t\t\tsvg {\n\t\t\t\tdisplay: block;\n\t\t\t\twidth: 100%;\n\t\t\t\tmax-width: 360px;\n\t\t\t\tmargin: 0 auto;\n\t\t\t}\n\t\t\t.line {\n\t\t\t\tfill: transparent;\n\t\t\t\tstroke: var(--roxy-border, #e4e4e7);\n\t\t\t}\n\t\t\t.sign-text {\n\t\t\t\tfill: var(--roxy-muted, #71717a);\n\t\t\t\tfont-size: 9px;\n\t\t\t\tfont-weight: 500;\n\t\t\t\tfont-family: var(--roxy-font-sans);\n\t\t\t}\n\t\t\t.planet-text {\n\t\t\t\tfill: var(--roxy-fg, #0a0a0a);\n\t\t\t\tfont-size: 11px;\n\t\t\t\tfont-weight: 600;\n\t\t\t\tfont-family: var(--roxy-font-sans);\n\t\t\t}\n\t\t\t.house-num {\n\t\t\t\tfill: var(--roxy-muted, #71717a);\n\t\t\t\tfont-size: 9px;\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-family: var(--roxy-font-sans);\n\t\t\t}\n\t\t\t.lagna-marker {\n\t\t\t\tfill: var(--roxy-accent-fg, #b45309);\n\t\t\t\tfont-size: 8px;\n\t\t\t\tfont-weight: 700;\n\t\t\t\tfont-family: var(--roxy-font-sans);\n\t\t\t\tletter-spacing: 0.05em;\n\t\t\t}\n\t\t\t.lagna-bg {\n\t\t\t\tfill: color-mix(in srgb, var(--roxy-accent, #f59e0b) 12%, transparent);\n\t\t\t\tstroke: color-mix(in srgb, var(--roxy-accent, #f59e0b) 45%, transparent);\n\t\t\t\tstroke-width: 0.8;\n\t\t\t}\n\t\t\t.vargottama-row {\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: wrap;\n\t\t\t\tgap: var(--roxy-space-xs, 0.25rem);\n\t\t\t\talign-items: center;\n\t\t\t}\n\t\t\t.vargottama-label {\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tcolor: var(--roxy-muted, #71717a);\n\t\t\t\tfont-weight: 500;\n\t\t\t\tmargin-right: var(--roxy-space-xs, 0.25rem);\n\t\t\t}\n\t\t\t.vargottama-pill {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\talign-items: center;\n\t\t\t\tgap: 0.2em;\n\t\t\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t\t\t\tfont-weight: 600;\n\t\t\t\tpadding: 0.15em 0.6em;\n\t\t\t\tborder-radius: 999px;\n\t\t\t\tbackground: color-mix(in srgb, var(--roxy-accent, #f59e0b) 22%, transparent);\n\t\t\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\t\t\tborder: 1px solid color-mix(in srgb, var(--roxy-accent, #f59e0b) 45%, transparent);\n\t\t\t}\n\t\t`,\n\t];\n\n\t@property({ attribute: false })\n\tdata: DivisionalChartResponse | null = null;\n\n\t@property({ type: String, reflect: true, attribute: 'chart-style' })\n\tchartStyle: 'south' | 'north' = 'south';\n\n\tprivate buildHouses(): HouseDef[] {\n\t\tif (!this.data) return [];\n\t\tconst chart = this.data.chart as ChartByRashi;\n\t\tconst meta =\n\t\t\t(this.data.chart as { meta?: Record<string, { rashi?: string }> }).meta ??\n\t\t\t{};\n\t\tconst lagnaSign = meta.Lagna?.rashi ?? '';\n\t\tconst houses: HouseDef[] = [];\n\t\tfor (let i = 0; i < 12; i++) {\n\t\t\tconst key = RASHI_KEYS[i];\n\t\t\tconst bucket = chart[key] as RashiBucket | undefined;\n\t\t\tconst planets = (bucket?.signs ?? []).map((p) => p.graha).filter(Boolean);\n\t\t\tconst sign = RASHI_TO_SIGN[key] ?? '';\n\t\t\thouses.push({\n\t\t\t\tnumber: i + 1,\n\t\t\t\tsign,\n\t\t\t\tplanets,\n\t\t\t\tisLagna: lagnaSign\n\t\t\t\t\t? lagnaSign.toLowerCase() === sign.toLowerCase()\n\t\t\t\t\t: false,\n\t\t\t});\n\t\t}\n\t\treturn houses;\n\t}\n\n\trender() {\n\t\tif (!this.data)\n\t\t\treturn html`<div class=\"roxy-empty\" role=\"status\">No divisional chart data</div>`;\n\n\t\tconst { division, vargottama } = this.data;\n\t\tconst houses = this.buildHouses();\n\t\tconst isNorth = this.chartStyle === 'north';\n\n\t\treturn html`<div class=\"wrap\">\n\t\t\t<div class=\"header\">\n\t\t\t\t<h2 class=\"title\">\n\t\t\t\t\tD${division.number} ${division.name}\n\t\t\t\t\t${\n\t\t\t\t\t\tdivision.sanskritName && division.sanskritName !== division.name\n\t\t\t\t\t\t\t? html`<span class=\"division-meta\"> \u00B7 ${division.sanskritName}</span>`\n\t\t\t\t\t\t\t: nothing\n\t\t\t\t\t}\n\t\t\t\t</h2>\n\t\t\t\t${\n\t\t\t\t\tdivision.significance\n\t\t\t\t\t\t? html`<p class=\"significance\">${division.significance}</p>`\n\t\t\t\t\t\t: nothing\n\t\t\t\t}\n\t\t\t</div>\n\n\t\t\t<svg\n\t\t\t\tviewBox=\"0 0 300 300\"\n\t\t\t\trole=\"img\"\n\t\t\t\taria-label=\"D${division.number} ${division.name} divisional chart with twelve sign houses\"\n\t\t\t>\n\t\t\t\t<title>D${division.number} ${division.name}</title>\n\t\t\t\t${isNorth ? renderNorthFrame() : renderSouthFrame()}\n\t\t\t\t${\n\t\t\t\t\tisNorth\n\t\t\t\t\t\t? houses.map((h) => renderNorthHouseGroup(h))\n\t\t\t\t\t\t: houses.map((h) => renderSouthHouseGroup(h))\n\t\t\t\t}\n\t\t\t</svg>\n\n\t\t\t${\n\t\t\t\tvargottama && vargottama.length > 0\n\t\t\t\t\t? html`<div class=\"vargottama-row\" role=\"list\" aria-label=\"Vargottama planets\">\n\t\t\t\t\t\t<span class=\"vargottama-label\">Vargottama:</span>\n\t\t\t\t\t\t${vargottama.map(\n\t\t\t\t\t\t\t(planet) =>\n\t\t\t\t\t\t\t\thtml`<span class=\"vargottama-pill\" role=\"listitem\">\n\t\t\t\t\t\t\t\t\t${PLANET_GLYPH[planet] ?? ''} ${planet}\n\t\t\t\t\t\t\t\t</span>`,\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t</div>`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'roxy-divisional-chart': RoxyDivisionalChart;\n\t}\n}\n", "/**\n * Symbol constants used across components. Single source of truth so chart\n * wheels, card headers, hexagram displays, and panchang tables stay visually\n * consistent.\n */\n\nexport const PLANET_GLYPH: Record<string, string> = {\n\tSun: '\u2609',\n\tMoon: '\u263D',\n\tMercury: '\u263F',\n\tVenus: '\u2640',\n\tEarth: '\u2641',\n\tMars: '\u2642',\n\tJupiter: '\u2643',\n\tSaturn: '\u2644',\n\tUranus: '\u2645',\n\tNeptune: '\u2646',\n\tPluto: '\u2647',\n\tRahu: '\u260A',\n\tKetu: '\u260B',\n\tAscendant: 'Asc',\n\tLagna: 'La',\n\tNorthNode: '\u260A',\n\tSouthNode: '\u260B',\n\t'North node': '\u260A',\n\t'South node': '\u260B',\n\tChiron: '\u26B7',\n\tLilith: '\u26B8',\n\t'Black moon lilith': '\u26B8',\n};\n\nexport const PLANET_ABBR: Record<string, string> = {\n\tSun: 'Su',\n\tMoon: 'Mo',\n\tMercury: 'Me',\n\tVenus: 'Ve',\n\tMars: 'Ma',\n\tJupiter: 'Ju',\n\tSaturn: 'Sa',\n\tUranus: 'Ur',\n\tNeptune: 'Ne',\n\tPluto: 'Pl',\n\tRahu: 'Ra',\n\tKetu: 'Ke',\n\tAscendant: 'Asc',\n\tLagna: 'La',\n};\n\nexport const SIGN_GLYPH: Record<string, string> = {\n\tAries: '\u2648',\n\tTaurus: '\u2649',\n\tGemini: '\u264A',\n\tCancer: '\u264B',\n\tLeo: '\u264C',\n\tVirgo: '\u264D',\n\tLibra: '\u264E',\n\tScorpio: '\u264F',\n\tSagittarius: '\u2650',\n\tCapricorn: '\u2651',\n\tAquarius: '\u2652',\n\tPisces: '\u2653',\n};\n\nexport const SIGN_ABBR: Record<string, string> = {\n\tAries: 'Ar',\n\tTaurus: 'Ta',\n\tGemini: 'Ge',\n\tCancer: 'Cn',\n\tLeo: 'Le',\n\tVirgo: 'Vi',\n\tLibra: 'Li',\n\tScorpio: 'Sc',\n\tSagittarius: 'Sg',\n\tCapricorn: 'Cp',\n\tAquarius: 'Aq',\n\tPisces: 'Pi',\n};\n\nexport const SIGNS_ORDER = [\n\t'Aries',\n\t'Taurus',\n\t'Gemini',\n\t'Cancer',\n\t'Leo',\n\t'Virgo',\n\t'Libra',\n\t'Scorpio',\n\t'Sagittarius',\n\t'Capricorn',\n\t'Aquarius',\n\t'Pisces',\n] as const;\n\n/**\n * Lowercase rashi keys in canonical zodiac order. Derived from `SIGNS_ORDER`\n * so the two stay in lockstep. The /vedic-astrology/birth-chart response\n * carries planet buckets keyed by these names.\n */\nexport const RASHI_KEYS = SIGNS_ORDER.map((s) =>\n\ts.toLowerCase(),\n) as readonly Lowercase<(typeof SIGNS_ORDER)[number]>[];\n\n/** Aspect symbols. Used by synastry and natal chart aspect tables. */\nexport const ASPECT_SYMBOL: Record<string, string> = {\n\tconjunction: '\u260C',\n\topposition: '\u260D',\n\ttrine: '\u25B3',\n\tsquare: '\u25A1',\n\tsextile: '\u2731',\n\tquincunx: '\u22BB',\n\tsemisextile: '\u22BC',\n};\n\n/** Trigrams used by I Ching hexagrams. Eight trigrams compose 64 hexagrams. */\nexport const TRIGRAM_GLYPH: Record<string, string> = {\n\theaven: '\u2630',\n\tlake: '\u2631',\n\tfire: '\u2632',\n\tthunder: '\u2633',\n\twind: '\u2634',\n\twater: '\u2635',\n\tmountain: '\u2636',\n\tearth: '\u2637',\n\tHeaven: '\u2630',\n\tLake: '\u2631',\n\tFire: '\u2632',\n\tThunder: '\u2633',\n\tWind: '\u2634',\n\tWater: '\u2635',\n\tMountain: '\u2636',\n\tEarth: '\u2637',\n};\n\n/** Moon phase emoji set. Used by moon phase card. */\nexport const MOON_PHASE_EMOJI: Record<string, string> = {\n\t'new moon': '\uD83C\uDF11',\n\t'waxing crescent': '\uD83C\uDF12',\n\t'first quarter': '\uD83C\uDF13',\n\t'waxing gibbous': '\uD83C\uDF14',\n\t'full moon': '\uD83C\uDF15',\n\t'waning gibbous': '\uD83C\uDF16',\n\t'last quarter': '\uD83C\uDF17',\n\t'waning crescent': '\uD83C\uDF18',\n};\n", "import { css } from 'lit';\n\n/**\n * Shared host styles every component pulls in. Sets default font, color,\n * container query support, and the entry fade-in.\n */\nexport const baseStyles = css`\n\t:host {\n\t\tdisplay: block;\n\t\tcontainer-type: inline-size;\n\t\tfont-family: var(\n\t\t\t--roxy-font-sans,\n\t\t\tsystem-ui,\n\t\t\t-apple-system,\n\t\t\tBlinkMacSystemFont,\n\t\t\t'Segoe UI',\n\t\t\tRoboto,\n\t\t\tsans-serif\n\t\t);\n\t\tcolor: var(--roxy-fg, #0a0a0a);\n\t\tbackground: transparent;\n\t\tfont-size: var(--roxy-text-base, 1rem);\n\t\tline-height: var(--roxy-leading-normal, 1.5);\n\t\tanimation: roxy-fade-in var(--roxy-motion-duration, 200ms)\n\t\t\tvar(--roxy-motion-easing, cubic-bezier(0.4, 0, 0.2, 1)) both;\n\t}\n\n\t*,\n\t*::before,\n\t*::after {\n\t\tbox-sizing: border-box;\n\t}\n\n\t@keyframes roxy-fade-in {\n\t\tfrom {\n\t\t\topacity: 0;\n\t\t\ttransform: translateY(2px);\n\t\t}\n\t\tto {\n\t\t\topacity: 1;\n\t\t\ttransform: translateY(0);\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t:host {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-skeleton {\n\t\tbackground: linear-gradient(\n\t\t\t90deg,\n\t\t\tvar(--roxy-border, #e4e4e7) 0%,\n\t\t\tcolor-mix(in srgb, var(--roxy-border, #e4e4e7) 60%, transparent) 50%,\n\t\t\tvar(--roxy-border, #e4e4e7) 100%\n\t\t);\n\t\tbackground-size: 200% 100%;\n\t\tanimation: roxy-shimmer 1.4s ease-in-out infinite;\n\t\tborder-radius: var(--roxy-radius-md, 8px);\n\t}\n\n\t@keyframes roxy-shimmer {\n\t\t0% {\n\t\t\tbackground-position: 200% 0;\n\t\t}\n\t\t100% {\n\t\t\tbackground-position: -200% 0;\n\t\t}\n\t}\n\n\t@media (prefers-reduced-motion: reduce) {\n\t\t.roxy-skeleton {\n\t\t\tanimation: none;\n\t\t}\n\t}\n\n\t.roxy-empty {\n\t\tpadding: var(--roxy-space-lg, 1.5rem);\n\t\tcolor: var(--roxy-muted, #71717a);\n\t\ttext-align: center;\n\t\tfont-size: var(--roxy-text-sm, 0.875rem);\n\t}\n\n\t:host(:focus-within) .roxy-card {\n\t\toutline: 2px solid var(--roxy-ring, rgba(245, 158, 11, 0.4));\n\t\toutline-offset: 2px;\n\t}\n`;\n", "import type { TemplateResult } from 'lit';\nimport { nothing, svg } from 'lit';\nimport { PLANET_ABBR, SIGN_ABBR, SIGNS_ORDER } from '../tokens/index.js';\nimport { capitalize } from './string.js';\n\nexport const KUNDLI_SIZE = 300;\nexport const KUNDLI_CENTER = 150;\n\n/**\n * Maps a lowercase rashi key (e.g. \"aries\") back to its canonical sign name\n * (e.g. \"Aries\"). Used by every kundli consumer to bridge spec lowercase\n * rashi keys to the title-cased SIGNS_ORDER tokens.\n */\nexport const RASHI_TO_SIGN: Record<string, string> = Object.fromEntries(\n\tSIGNS_ORDER.map((s) => [s.toLowerCase(), s] as const),\n);\n\n/**\n * South Indian fixed-house square grid: house centers for planet text labels.\n * House 1 is fixed top-center; positions are in the 300x300 viewBox.\n */\nexport const SOUTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {\n\t1: { x: 150, y: 58 },\n\t2: { x: 205, y: 52 },\n\t3: { x: 253, y: 112 },\n\t4: { x: 243, y: 150 },\n\t5: { x: 253, y: 188 },\n\t6: { x: 205, y: 248 },\n\t7: { x: 150, y: 242 },\n\t8: { x: 95, y: 248 },\n\t9: { x: 47, y: 188 },\n\t10: { x: 57, y: 150 },\n\t11: { x: 47, y: 112 },\n\t12: { x: 95, y: 52 },\n};\n\n/**\n * South Indian sign abbreviation positions (slightly outward from center).\n */\nexport const SOUTH_SIGN_POSITIONS: Record<number, { x: number; y: number }> = {\n\t1: { x: 150, y: 35 },\n\t2: { x: 222, y: 40 },\n\t3: { x: 265, y: 100 },\n\t4: { x: 265, y: 150 },\n\t5: { x: 265, y: 200 },\n\t6: { x: 222, y: 260 },\n\t7: { x: 150, y: 265 },\n\t8: { x: 78, y: 260 },\n\t9: { x: 35, y: 200 },\n\t10: { x: 35, y: 150 },\n\t11: { x: 35, y: 100 },\n\t12: { x: 78, y: 40 },\n};\n\n/**\n * North Indian style: 12 triangular house positions.\n * Lagna (house 1) is the top diamond, numbered clockwise.\n * Centers represent the visual midpoint of each triangular cell.\n */\nexport const NORTH_HOUSE_CENTERS: Record<number, { x: number; y: number }> = {\n\t1: { x: 150, y: 60 },\n\t2: { x: 225, y: 100 },\n\t3: { x: 255, y: 150 },\n\t4: { x: 225, y: 200 },\n\t5: { x: 150, y: 240 },\n\t6: { x: 75, y: 200 },\n\t7: { x: 45, y: 150 },\n\t8: { x: 75, y: 100 },\n\t9: { x: 100, y: 80 },\n\t10: { x: 150, y: 108 },\n\t11: { x: 200, y: 80 },\n\t12: { x: 200, y: 220 },\n};\n\nexport interface HouseDef {\n\t/** 1-based house number. */\n\tnumber: number;\n\t/** Sign name (TitleCase, e.g. \"Aries\"). */\n\tsign: string;\n\t/** Planet abbreviation strings to display. */\n\tplanets: string[];\n\t/** Whether this house is the ascendant (Lagna). */\n\tisLagna: boolean;\n}\n\n/**\n * Render a single house group: lagna highlight, sign abbreviation, planet labels.\n * Returns an SVG fragment for use inside an `<svg>` element.\n */\nexport function renderSouthHouseGroup(\n\th: HouseDef,\n): TemplateResult | typeof nothing {\n\tconst center = SOUTH_HOUSE_CENTERS[h.number];\n\tconst signPos = SOUTH_SIGN_POSITIONS[h.number];\n\tif (!center || !signPos) return nothing;\n\tconst signAbbr = SIGN_ABBR[h.sign] ?? '';\n\tconst planets = h.planets;\n\treturn svg`\n\t\t<g>\n\t\t\t${\n\t\t\t\th.isLagna\n\t\t\t\t\t? svg`<rect\n\t\t\t\t\t\t\tclass=\"lagna-bg\"\n\t\t\t\t\t\t\tx=${center.x - 30} y=${center.y - 28}\n\t\t\t\t\t\t\twidth=\"60\" height=\"56\" rx=\"6\"\n\t\t\t\t\t\t/>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${\n\t\t\t\tsignAbbr\n\t\t\t\t\t? svg`<text class=\"sign-text\" x=${signPos.x} y=${signPos.y} text-anchor=\"middle\" dominant-baseline=\"central\">${signAbbr}</text>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${\n\t\t\t\th.isLagna\n\t\t\t\t\t? svg`<text class=\"lagna-marker\" x=${center.x} y=${center.y - 18} text-anchor=\"middle\" dominant-baseline=\"central\">LAGNA</text>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${planets.map((planet, j) => {\n\t\t\t\tconst abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);\n\t\t\t\tconst lineHeight = 13;\n\t\t\t\tconst baseY = h.isLagna ? center.y + 8 : center.y;\n\t\t\t\tconst startY = baseY - ((planets.length - 1) * lineHeight) / 2;\n\t\t\t\tconst yPos = startY + j * lineHeight;\n\t\t\t\treturn svg`<text class=\"planet-text\" x=${center.x} y=${yPos} text-anchor=\"middle\" dominant-baseline=\"central\">${abbr}</text>`;\n\t\t\t})}\n\t\t</g>\n\t`;\n}\n\n/**\n * Render a north-Indian-style kundli wheel frame (grid lines only).\n * Returns the SVG structural lines; call `renderNorthHouseGroup` for content.\n */\nexport function renderNorthFrame(): TemplateResult {\n\treturn svg`\n\t\t<polygon class=\"line\" points=\"150,10 290,150 150,290 10,150\" stroke-width=\"1.5\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"10\" x2=\"150\" y2=\"290\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"10\" y1=\"150\" x2=\"290\" y2=\"150\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"10\" x2=\"10\" y2=\"150\" stroke-width=\"0.6\" stroke-dasharray=\"3,3\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"10\" x2=\"290\" y2=\"150\" stroke-width=\"0.6\" stroke-dasharray=\"3,3\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"290\" x2=\"10\" y2=\"150\" stroke-width=\"0.6\" stroke-dasharray=\"3,3\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"290\" x2=\"290\" y2=\"150\" stroke-width=\"0.6\" stroke-dasharray=\"3,3\" />\n\t`;\n}\n\n/**\n * Render a north-Indian house group (sign abbr + house number + planets).\n */\nexport function renderNorthHouseGroup(\n\th: HouseDef,\n): TemplateResult | typeof nothing {\n\tconst center = NORTH_HOUSE_CENTERS[h.number];\n\tif (!center) return nothing;\n\tconst signAbbr = SIGN_ABBR[h.sign] ?? '';\n\tconst planets = h.planets;\n\treturn svg`\n\t\t<g>\n\t\t\t${\n\t\t\t\th.isLagna\n\t\t\t\t\t? svg`<circle class=\"lagna-bg\" cx=${center.x} cy=${center.y} r=\"22\" />`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t${\n\t\t\t\tsignAbbr\n\t\t\t\t\t? svg`<text class=\"sign-text\" x=${center.x} y=${center.y - 10} text-anchor=\"middle\" dominant-baseline=\"central\">${signAbbr}</text>`\n\t\t\t\t\t: nothing\n\t\t\t}\n\t\t\t<text class=\"house-num\" x=${center.x} y=${center.y + 2} text-anchor=\"middle\" dominant-baseline=\"central\">${h.number}</text>\n\t\t\t${planets.map((planet, j) => {\n\t\t\t\tconst abbr = PLANET_ABBR[capitalize(planet)] ?? planet.slice(0, 2);\n\t\t\t\tconst lineHeight = 11;\n\t\t\t\tconst startY = center.y + 14 - ((planets.length - 1) * lineHeight) / 2;\n\t\t\t\tconst yPos = startY + j * lineHeight;\n\t\t\t\treturn svg`<text class=\"planet-text\" x=${center.x} y=${yPos} text-anchor=\"middle\" dominant-baseline=\"central\">${abbr}</text>`;\n\t\t\t})}\n\t\t</g>\n\t`;\n}\n\n/**\n * Render the south-Indian square frame (border diamond + inner square + radial lines).\n */\nexport function renderSouthFrame(): TemplateResult {\n\treturn svg`\n\t\t<polygon class=\"line\" points=\"150,10 290,150 150,290 10,150\" stroke-width=\"1.5\" />\n\t\t<polygon class=\"line\" points=\"220,80 220,220 80,220 80,80\" stroke-width=\"1\" fill=\"none\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"10\" x2=\"80\" y2=\"80\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"10\" x2=\"220\" y2=\"80\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"290\" y1=\"150\" x2=\"220\" y2=\"80\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"290\" y1=\"150\" x2=\"220\" y2=\"220\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"290\" x2=\"220\" y2=\"220\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"150\" y1=\"290\" x2=\"80\" y2=\"220\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"10\" y1=\"150\" x2=\"80\" y2=\"220\" stroke-width=\"1\" />\n\t\t<line class=\"line\" x1=\"10\" y1=\"150\" x2=\"80\" y2=\"80\" stroke-width=\"1\" />\n\t`;\n}\n", "/**\n * Shared string helpers used across components. Single source of truth so the\n * same formatting rules apply to every key/label/title that surfaces in the\n * shadow tree.\n *\n * - `capitalize`: title-cases the first character, lowercases the rest. Used\n * when matching API-supplied planet/sign names against the glyph maps in\n * `tokens/index.ts`, which use canonical TitleCase keys.\n * - `humanize`: turns an API key (`birth_date`, `birthDate`, `mahadasha-end`)\n * into a label suitable for display (\"Birth date\", \"Mahadasha end\").\n */\n\nexport function capitalize(s: string): string {\n\tif (!s) return '';\n\treturn s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();\n}\n\nexport function humanize(s: string): string {\n\treturn s\n\t\t.replace(/[_-]+/g, ' ')\n\t\t.replace(/([a-z])([A-Z])/g, '$1 $2')\n\t\t.replace(/^\\w/, (c) => c.toUpperCase());\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAAA,SAAS,OAAAA,MAAK,MAAM,YAAY,WAAAC,gBAAe;AAC/C,SAAS,eAAe,gBAAgB;;;ACKjC,IAAM,eAAuC;AAAA,EACnD,KAAK;AAAA,EACL,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,WAAW;AAAA,EACX,cAAc;AAAA,EACd,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,qBAAqB;AACtB;AAEO,IAAM,cAAsC;AAAA,EAClD,KAAK;AAAA,EACL,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,OAAO;AAAA,EACP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