@roxyapi/ui 0.9.0 → 0.11.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 +53 -27
- package/README.md +42 -12
- package/components-catalog.json +1022 -0
- package/dist/cdn/components/angel-number-card.js +52 -0
- package/dist/cdn/components/angel-number-card.js.map +7 -0
- package/dist/cdn/components/angel-number-lookup.js +52 -0
- package/dist/cdn/components/angel-number-lookup.js.map +7 -0
- package/dist/cdn/components/ashtakavarga-grid.js +10 -3
- package/dist/cdn/components/ashtakavarga-grid.js.map +4 -4
- package/dist/cdn/components/aspects-table.js +52 -0
- package/dist/cdn/components/aspects-table.js.map +7 -0
- package/dist/cdn/components/biorhythm-chart.js +10 -3
- package/dist/cdn/components/biorhythm-chart.js.map +4 -4
- package/dist/cdn/components/bodygraph.js +17 -10
- package/dist/cdn/components/bodygraph.js.map +4 -4
- package/dist/cdn/components/choghadiya-grid.js +10 -3
- package/dist/cdn/components/choghadiya-grid.js.map +4 -4
- package/dist/cdn/components/compatibility-card.js +10 -3
- package/dist/cdn/components/compatibility-card.js.map +4 -4
- package/dist/cdn/components/crystal-card.js +52 -0
- package/dist/cdn/components/crystal-card.js.map +7 -0
- package/dist/cdn/components/crystal-grid.js +52 -0
- package/dist/cdn/components/crystal-grid.js.map +7 -0
- package/dist/cdn/components/dasha-timeline.js +10 -3
- package/dist/cdn/components/dasha-timeline.js.map +4 -4
- package/dist/cdn/components/data.js +10 -3
- package/dist/cdn/components/data.js.map +4 -4
- package/dist/cdn/components/divisional-chart.js +31 -24
- package/dist/cdn/components/divisional-chart.js.map +4 -4
- package/dist/cdn/components/dosha-card.js +10 -3
- package/dist/cdn/components/dosha-card.js.map +4 -4
- package/dist/cdn/components/dream-card.js +52 -0
- package/dist/cdn/components/dream-card.js.map +7 -0
- package/dist/cdn/components/dream-search.js +52 -0
- package/dist/cdn/components/dream-search.js.map +7 -0
- package/dist/cdn/components/endpoint-form.js +3 -3
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/components/forecast-digest.js +52 -0
- package/dist/cdn/components/forecast-digest.js.map +7 -0
- package/dist/cdn/components/forecast-timeline.js +10 -3
- package/dist/cdn/components/forecast-timeline.js.map +4 -4
- package/dist/cdn/components/guna-milan.js +10 -3
- package/dist/cdn/components/guna-milan.js.map +4 -4
- package/dist/cdn/components/hd-connection.js +52 -0
- package/dist/cdn/components/hd-connection.js.map +7 -0
- package/dist/cdn/components/hd-penta.js +52 -0
- package/dist/cdn/components/hd-penta.js.map +7 -0
- package/dist/cdn/components/hd-variables.js +52 -0
- package/dist/cdn/components/hd-variables.js.map +7 -0
- package/dist/cdn/components/hexagram.js +10 -3
- package/dist/cdn/components/hexagram.js.map +4 -4
- package/dist/cdn/components/hora-table.js +52 -0
- package/dist/cdn/components/hora-table.js.map +7 -0
- package/dist/cdn/components/horoscope-card.js +10 -3
- package/dist/cdn/components/horoscope-card.js.map +4 -4
- package/dist/cdn/components/kp-chart.js +10 -3
- package/dist/cdn/components/kp-chart.js.map +4 -4
- package/dist/cdn/components/kp-planets-table.js +10 -3
- package/dist/cdn/components/kp-planets-table.js.map +4 -4
- package/dist/cdn/components/kp-ruling-planets.js +10 -3
- package/dist/cdn/components/kp-ruling-planets.js.map +4 -4
- package/dist/cdn/components/location-search.js +3 -3
- package/dist/cdn/components/location-search.js.map +2 -2
- package/dist/cdn/components/moon-phase.js +10 -3
- package/dist/cdn/components/moon-phase.js.map +4 -4
- package/dist/cdn/components/nakshatra-card.js +10 -3
- package/dist/cdn/components/nakshatra-card.js.map +4 -4
- package/dist/cdn/components/natal-chart.js +16 -9
- package/dist/cdn/components/natal-chart.js.map +4 -4
- package/dist/cdn/components/numerology-card.js +10 -3
- package/dist/cdn/components/numerology-card.js.map +4 -4
- package/dist/cdn/components/panchang-table.js +10 -3
- package/dist/cdn/components/panchang-table.js.map +4 -4
- package/dist/cdn/components/reference-card.js +52 -0
- package/dist/cdn/components/reference-card.js.map +7 -0
- package/dist/cdn/components/shadbala-table.js +10 -3
- package/dist/cdn/components/shadbala-table.js.map +4 -4
- package/dist/cdn/components/synastry-chart.js +16 -9
- package/dist/cdn/components/synastry-chart.js.map +4 -4
- package/dist/cdn/components/tarot-card.js +10 -3
- package/dist/cdn/components/tarot-card.js.map +4 -4
- package/dist/cdn/components/tarot-catalog.js +52 -0
- package/dist/cdn/components/tarot-catalog.js.map +7 -0
- package/dist/cdn/components/tarot-spread.js +10 -3
- package/dist/cdn/components/tarot-spread.js.map +4 -4
- package/dist/cdn/components/transits-table.js +10 -3
- package/dist/cdn/components/transits-table.js.map +4 -4
- package/dist/cdn/components/vedic-aspects.js +52 -0
- package/dist/cdn/components/vedic-aspects.js.map +7 -0
- package/dist/cdn/components/vedic-kundli.js +31 -24
- package/dist/cdn/components/vedic-kundli.js.map +4 -4
- package/dist/cdn/components/vedic-planets-table.js +10 -3
- package/dist/cdn/components/vedic-planets-table.js.map +4 -4
- package/dist/cdn/components/western-planets-table.js +10 -3
- package/dist/cdn/components/western-planets-table.js.map +4 -4
- package/dist/cdn/components/yoga-list.js +10 -3
- package/dist/cdn/components/yoga-list.js.map +4 -4
- package/dist/cdn/roxy-ui.js +92 -81
- package/dist/cdn/roxy-ui.js.map +4 -4
- package/dist/components/angel-number-card.d.ts +17 -0
- package/dist/components/angel-number-card.d.ts.map +1 -0
- package/dist/components/angel-number-card.js +2 -0
- package/dist/components/angel-number-card.js.map +7 -0
- package/dist/components/angel-number-lookup.d.ts +21 -0
- package/dist/components/angel-number-lookup.d.ts.map +1 -0
- package/dist/components/angel-number-lookup.js +2 -0
- package/dist/components/angel-number-lookup.js.map +7 -0
- package/dist/components/ashtakavarga-grid.d.ts +4 -5
- package/dist/components/ashtakavarga-grid.d.ts.map +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -1
- package/dist/components/ashtakavarga-grid.js.map +4 -4
- package/dist/components/aspects-table.d.ts +23 -0
- package/dist/components/aspects-table.d.ts.map +1 -0
- package/dist/components/aspects-table.js +2 -0
- package/dist/components/aspects-table.js.map +7 -0
- package/dist/components/biorhythm-chart.d.ts +4 -5
- package/dist/components/biorhythm-chart.d.ts.map +1 -1
- package/dist/components/biorhythm-chart.js +1 -1
- package/dist/components/biorhythm-chart.js.map +4 -4
- package/dist/components/bodygraph.d.ts +4 -5
- package/dist/components/bodygraph.d.ts.map +1 -1
- package/dist/components/bodygraph.js +9 -9
- package/dist/components/bodygraph.js.map +4 -4
- package/dist/components/choghadiya-grid.d.ts +4 -5
- package/dist/components/choghadiya-grid.d.ts.map +1 -1
- package/dist/components/choghadiya-grid.js +1 -1
- package/dist/components/choghadiya-grid.js.map +4 -4
- package/dist/components/compatibility-card.d.ts +4 -5
- package/dist/components/compatibility-card.d.ts.map +1 -1
- package/dist/components/compatibility-card.js +1 -1
- package/dist/components/compatibility-card.js.map +4 -4
- package/dist/components/crystal-card.d.ts +19 -0
- package/dist/components/crystal-card.d.ts.map +1 -0
- package/dist/components/crystal-card.js +2 -0
- package/dist/components/crystal-card.js.map +7 -0
- package/dist/components/crystal-grid.d.ts +26 -0
- package/dist/components/crystal-grid.d.ts.map +1 -0
- package/dist/components/crystal-grid.js +2 -0
- package/dist/components/crystal-grid.js.map +7 -0
- package/dist/components/dasha-timeline.d.ts +4 -5
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/dasha-timeline.js.map +4 -4
- package/dist/components/data.d.ts +5 -8
- package/dist/components/data.d.ts.map +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/data.js.map +4 -4
- package/dist/components/divisional-chart.d.ts +4 -5
- package/dist/components/divisional-chart.d.ts.map +1 -1
- package/dist/components/divisional-chart.js +59 -59
- package/dist/components/divisional-chart.js.map +4 -4
- package/dist/components/dosha-card.d.ts +4 -5
- package/dist/components/dosha-card.d.ts.map +1 -1
- package/dist/components/dosha-card.js +1 -1
- package/dist/components/dosha-card.js.map +4 -4
- package/dist/components/dream-card.d.ts +16 -0
- package/dist/components/dream-card.d.ts.map +1 -0
- package/dist/components/dream-card.js +2 -0
- package/dist/components/dream-card.js.map +7 -0
- package/dist/components/dream-search.d.ts +18 -0
- package/dist/components/dream-search.d.ts.map +1 -0
- package/dist/components/dream-search.js +2 -0
- package/dist/components/dream-search.js.map +7 -0
- package/dist/components/endpoint-form.d.ts +10 -5
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +3 -3
- package/dist/components/forecast-digest.d.ts +19 -0
- package/dist/components/forecast-digest.d.ts.map +1 -0
- package/dist/components/forecast-digest.js +2 -0
- package/dist/components/forecast-digest.js.map +7 -0
- package/dist/components/forecast-timeline.d.ts +8 -6
- package/dist/components/forecast-timeline.d.ts.map +1 -1
- package/dist/components/forecast-timeline.js +1 -1
- package/dist/components/forecast-timeline.js.map +4 -4
- package/dist/components/guna-milan.d.ts +4 -5
- package/dist/components/guna-milan.d.ts.map +1 -1
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/guna-milan.js.map +4 -4
- package/dist/components/hd-connection.d.ts +18 -0
- package/dist/components/hd-connection.d.ts.map +1 -0
- package/dist/components/hd-connection.js +2 -0
- package/dist/components/hd-connection.js.map +7 -0
- package/dist/components/hd-penta.d.ts +18 -0
- package/dist/components/hd-penta.d.ts.map +1 -0
- package/dist/components/hd-penta.js +2 -0
- package/dist/components/hd-penta.js.map +7 -0
- package/dist/components/hd-variables.d.ts +17 -0
- package/dist/components/hd-variables.d.ts.map +1 -0
- package/dist/components/hd-variables.js +2 -0
- package/dist/components/hd-variables.js.map +7 -0
- package/dist/components/hexagram.d.ts +4 -5
- package/dist/components/hexagram.d.ts.map +1 -1
- package/dist/components/hexagram.js +1 -1
- package/dist/components/hexagram.js.map +4 -4
- package/dist/components/hora-table.d.ts +17 -0
- package/dist/components/hora-table.d.ts.map +1 -0
- package/dist/components/hora-table.js +2 -0
- package/dist/components/hora-table.js.map +7 -0
- package/dist/components/horoscope-card.d.ts +4 -5
- package/dist/components/horoscope-card.d.ts.map +1 -1
- package/dist/components/horoscope-card.js +1 -1
- package/dist/components/horoscope-card.js.map +4 -4
- package/dist/components/kp-chart.d.ts +4 -5
- package/dist/components/kp-chart.d.ts.map +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-chart.js.map +4 -4
- package/dist/components/kp-planets-table.d.ts +4 -5
- package/dist/components/kp-planets-table.d.ts.map +1 -1
- package/dist/components/kp-planets-table.js +1 -1
- package/dist/components/kp-planets-table.js.map +4 -4
- package/dist/components/kp-ruling-planets.d.ts +4 -5
- package/dist/components/kp-ruling-planets.d.ts.map +1 -1
- package/dist/components/kp-ruling-planets.js +1 -1
- package/dist/components/kp-ruling-planets.js.map +4 -4
- package/dist/components/location-search.js +1 -1
- package/dist/components/location-search.js.map +2 -2
- package/dist/components/moon-phase.d.ts +5 -5
- package/dist/components/moon-phase.d.ts.map +1 -1
- package/dist/components/moon-phase.js +1 -1
- package/dist/components/moon-phase.js.map +4 -4
- package/dist/components/nakshatra-card.d.ts +4 -5
- package/dist/components/nakshatra-card.d.ts.map +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/nakshatra-card.js.map +4 -4
- package/dist/components/natal-chart.d.ts +4 -5
- package/dist/components/natal-chart.d.ts.map +1 -1
- package/dist/components/natal-chart.js +8 -8
- package/dist/components/natal-chart.js.map +4 -4
- package/dist/components/numerology-card.d.ts +15 -10
- package/dist/components/numerology-card.d.ts.map +1 -1
- package/dist/components/numerology-card.js +1 -1
- package/dist/components/numerology-card.js.map +4 -4
- package/dist/components/panchang-table.d.ts +4 -5
- package/dist/components/panchang-table.d.ts.map +1 -1
- package/dist/components/panchang-table.js +1 -1
- package/dist/components/panchang-table.js.map +4 -4
- package/dist/components/reference-card.d.ts +19 -0
- package/dist/components/reference-card.d.ts.map +1 -0
- package/dist/components/reference-card.js +2 -0
- package/dist/components/reference-card.js.map +7 -0
- package/dist/components/shadbala-table.d.ts +4 -5
- package/dist/components/shadbala-table.d.ts.map +1 -1
- package/dist/components/shadbala-table.js +1 -1
- package/dist/components/shadbala-table.js.map +4 -4
- package/dist/components/synastry-chart.d.ts +4 -5
- package/dist/components/synastry-chart.d.ts.map +1 -1
- package/dist/components/synastry-chart.js +7 -7
- package/dist/components/synastry-chart.js.map +4 -4
- package/dist/components/tarot-card.d.ts +4 -5
- package/dist/components/tarot-card.d.ts.map +1 -1
- package/dist/components/tarot-card.js +1 -1
- package/dist/components/tarot-card.js.map +4 -4
- package/dist/components/tarot-catalog.d.ts +20 -0
- package/dist/components/tarot-catalog.d.ts.map +1 -0
- package/dist/components/tarot-catalog.js +2 -0
- package/dist/components/tarot-catalog.js.map +7 -0
- package/dist/components/tarot-spread.d.ts +7 -8
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/tarot-spread.js.map +4 -4
- package/dist/components/transits-table.d.ts +4 -5
- package/dist/components/transits-table.d.ts.map +1 -1
- package/dist/components/transits-table.js +1 -1
- package/dist/components/transits-table.js.map +4 -4
- package/dist/components/vedic-aspects.d.ts +16 -0
- package/dist/components/vedic-aspects.d.ts.map +1 -0
- package/dist/components/vedic-aspects.js +2 -0
- package/dist/components/vedic-aspects.js.map +7 -0
- package/dist/components/vedic-kundli.d.ts +22 -5
- package/dist/components/vedic-kundli.d.ts.map +1 -1
- package/dist/components/vedic-kundli.js +63 -63
- package/dist/components/vedic-kundli.js.map +4 -4
- package/dist/components/vedic-planets-table.d.ts +4 -5
- package/dist/components/vedic-planets-table.d.ts.map +1 -1
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/vedic-planets-table.js.map +4 -4
- package/dist/components/western-planets-table.d.ts +4 -5
- package/dist/components/western-planets-table.d.ts.map +1 -1
- package/dist/components/western-planets-table.js +1 -1
- package/dist/components/western-planets-table.js.map +4 -4
- package/dist/components/yoga-list.d.ts +6 -7
- package/dist/components/yoga-list.d.ts.map +1 -1
- package/dist/components/yoga-list.js +1 -1
- package/dist/components/yoga-list.js.map +4 -4
- package/dist/generated/endpoint-bindings.d.ts +15 -0
- package/dist/generated/endpoint-bindings.d.ts.map +1 -0
- package/dist/index.cjs +73 -73
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -71
- package/dist/index.js.map +4 -4
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.json +39 -24
- package/dist/styles/tokens-css.d.ts +1 -1
- package/dist/styles/tokens-css.d.ts.map +1 -1
- package/dist/styles/tokens.css +4 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.gen.d.ts +1103 -164
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/utils/angel-sections.d.ts +14 -0
- package/dist/utils/angel-sections.d.ts.map +1 -0
- package/dist/utils/base-element.d.ts +73 -0
- package/dist/utils/base-element.d.ts.map +1 -0
- package/dist/utils/base-styles.d.ts.map +1 -1
- package/dist/utils/fetch-controller.d.ts +60 -0
- package/dist/utils/fetch-controller.d.ts.map +1 -0
- package/dist/utils/kundli-render.d.ts +2 -1
- package/dist/utils/kundli-render.d.ts.map +1 -1
- package/dist/utils/kundli-styles.d.ts.map +1 -1
- package/dist/utils/markup-data.d.ts +34 -0
- package/dist/utils/markup-data.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/angel-number-card.ts +210 -0
- package/src/components/angel-number-lookup.ts +207 -0
- package/src/components/ashtakavarga-grid.ts +15 -20
- package/src/components/aspects-table.ts +329 -0
- package/src/components/biorhythm-chart.ts +14 -18
- package/src/components/bodygraph.ts +9 -20
- package/src/components/choghadiya-grid.ts +15 -19
- package/src/components/compatibility-card.ts +9 -19
- package/src/components/crystal-card.ts +242 -0
- package/src/components/crystal-grid.ts +182 -0
- package/src/components/dasha-timeline.ts +9 -20
- package/src/components/data.ts +8 -27
- package/src/components/divisional-chart.ts +10 -18
- package/src/components/dosha-card.ts +8 -19
- package/src/components/dream-card.ts +88 -0
- package/src/components/dream-search.ts +135 -0
- package/src/components/endpoint-form.ts +149 -55
- package/src/components/forecast-digest.ts +213 -0
- package/src/components/forecast-timeline.ts +24 -19
- package/src/components/guna-milan.ts +8 -19
- package/src/components/hd-connection.ts +188 -0
- package/src/components/hd-penta.ts +165 -0
- package/src/components/hd-variables.ts +128 -0
- package/src/components/hexagram.ts +10 -18
- package/src/components/hora-table.ts +149 -0
- package/src/components/horoscope-card.ts +9 -19
- package/src/components/kp-chart.ts +11 -20
- package/src/components/kp-planets-table.ts +11 -20
- package/src/components/kp-ruling-planets.ts +8 -18
- package/src/components/moon-phase.ts +10 -19
- package/src/components/nakshatra-card.ts +11 -20
- package/src/components/natal-chart.ts +20 -23
- package/src/components/numerology-card.ts +90 -31
- package/src/components/panchang-table.ts +9 -19
- package/src/components/reference-card.ts +212 -0
- package/src/components/shadbala-table.ts +15 -18
- package/src/components/synastry-chart.ts +17 -20
- package/src/components/tarot-card.ts +9 -20
- package/src/components/tarot-catalog.ts +129 -0
- package/src/components/tarot-spread.ts +20 -21
- package/src/components/transits-table.ts +17 -20
- package/src/components/vedic-aspects.ts +188 -0
- package/src/components/vedic-kundli.ts +46 -19
- package/src/components/vedic-planets-table.ts +11 -19
- package/src/components/western-planets-table.ts +11 -19
- package/src/components/yoga-list.ts +17 -23
- package/src/generated/endpoint-bindings.ts +655 -0
- package/src/index.ts +27 -0
- package/src/manifest.ts +198 -6
- package/src/styles/tokens-css.ts +4 -0
- package/src/styles/tokens.css +4 -0
- package/src/types/index.ts +1 -1
- package/src/types/types.gen.ts +1123 -164
- package/src/utils/angel-sections.ts +38 -0
- package/src/utils/base-element.ts +183 -0
- package/src/utils/base-styles.ts +33 -0
- package/src/utils/fetch-controller.ts +166 -0
- package/src/utils/kundli-render.ts +9 -2
- package/src/utils/kundli-styles.ts +7 -1
- package/src/utils/markup-data.ts +45 -0
- package/src/version.ts +1 -1
package/src/components/data.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { css, html,
|
|
1
|
+
import { css, html, nothing, type TemplateResult } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
|
+
import { RoxyDataElement } from '../utils/base-element.js';
|
|
3
4
|
import { baseStyles } from '../utils/base-styles.js';
|
|
4
|
-
import { MarkupDataController } from '../utils/markup-data.js';
|
|
5
5
|
import { humanize } from '../utils/string.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -35,12 +35,12 @@ const SKIP_KEYS = ['imageUrl', 'image']; // rendered separately, not in body row
|
|
|
35
35
|
const MAX_DEPTH = 6;
|
|
36
36
|
|
|
37
37
|
@customElement('roxy-data')
|
|
38
|
-
export class RoxyData extends
|
|
38
|
+
export class RoxyData extends RoxyDataElement<Json> {
|
|
39
39
|
static styles = [
|
|
40
40
|
baseStyles,
|
|
41
41
|
css`
|
|
42
42
|
.roxy-card {
|
|
43
|
-
background: var(--roxy-
|
|
43
|
+
background: var(--roxy-surface, #fff);
|
|
44
44
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
45
45
|
border-radius: var(--roxy-radius-md, 8px);
|
|
46
46
|
padding: var(--roxy-space-md, 1rem);
|
|
@@ -135,37 +135,18 @@ export class RoxyData extends LitElement {
|
|
|
135
135
|
`,
|
|
136
136
|
];
|
|
137
137
|
|
|
138
|
-
constructor() {
|
|
139
|
-
super();
|
|
140
|
-
// Enables hydrating `data` from a direct-child
|
|
141
|
-
// <script type="application/json" class="roxy-data"> for server-rendered
|
|
142
|
-
// and cached consumers. The JavaScript `data` property still wins.
|
|
143
|
-
new MarkupDataController(this);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
@property({ attribute: false })
|
|
147
|
-
data: Json = null;
|
|
148
|
-
|
|
149
138
|
/**
|
|
150
|
-
* Internal recursion depth. Nested <roxy-data> instances inherit this from
|
|
151
|
-
* the parent and increment to guard against circular references in the
|
|
152
|
-
* input. Not part of the public API; do not set from consumer code.
|
|
139
|
+
* Internal recursion depth. Nested <roxy-data> instances inherit this from the parent and increment to guard against circular references in the input. Not part of the public API; do not set from consumer code.
|
|
153
140
|
*/
|
|
154
141
|
@property({ attribute: false })
|
|
155
142
|
depth = 0;
|
|
156
143
|
|
|
157
|
-
|
|
158
|
-
if (this.data == null) {
|
|
159
|
-
return html`<div class="roxy-empty" role="status">No data</div>`;
|
|
160
|
-
}
|
|
144
|
+
protected renderData(data: Json) {
|
|
161
145
|
if (this.depth >= MAX_DEPTH) {
|
|
162
146
|
return html`<div class="roxy-empty" role="status">…</div>`;
|
|
163
147
|
}
|
|
164
|
-
return html`<div
|
|
165
|
-
|
|
166
|
-
aria-label="Generic data display"
|
|
167
|
-
>
|
|
168
|
-
${this.renderValue(this.data)}
|
|
148
|
+
return html`<div class="roxy-card" aria-label="Generic data display">
|
|
149
|
+
${this.renderValue(data)}
|
|
169
150
|
</div>`;
|
|
170
151
|
}
|
|
171
152
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { css, html,
|
|
1
|
+
import { css, html, nothing } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import { PLANET_GLYPH } from '../tokens/index.js';
|
|
4
4
|
import type { DivisionalChartResponse } from '../types/index.js';
|
|
5
|
+
import { RoxyDataElement } from '../utils/base-element.js';
|
|
5
6
|
import { baseStyles } from '../utils/base-styles.js';
|
|
6
7
|
import {
|
|
7
8
|
type ChartStyle,
|
|
@@ -11,7 +12,6 @@ import {
|
|
|
11
12
|
toKundliViewModel,
|
|
12
13
|
} from '../utils/kundli-render.js';
|
|
13
14
|
import { kundliStyles } from '../utils/kundli-styles.js';
|
|
14
|
-
import { MarkupDataController } from '../utils/markup-data.js';
|
|
15
15
|
import { tablistStyles } from '../utils/tablist.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -23,7 +23,7 @@ import { tablistStyles } from '../utils/tablist.js';
|
|
|
23
23
|
* map.
|
|
24
24
|
*/
|
|
25
25
|
@customElement('roxy-divisional-chart')
|
|
26
|
-
export class RoxyDivisionalChart extends
|
|
26
|
+
export class RoxyDivisionalChart extends RoxyDataElement<DivisionalChartResponse> {
|
|
27
27
|
static styles = [
|
|
28
28
|
baseStyles,
|
|
29
29
|
kundliStyles,
|
|
@@ -68,17 +68,6 @@ export class RoxyDivisionalChart extends LitElement {
|
|
|
68
68
|
`,
|
|
69
69
|
];
|
|
70
70
|
|
|
71
|
-
constructor() {
|
|
72
|
-
super();
|
|
73
|
-
// Enables hydrating `data` from a direct-child
|
|
74
|
-
// <script type="application/json" class="roxy-data"> for server-rendered
|
|
75
|
-
// and cached consumers. The JavaScript `data` property still wins.
|
|
76
|
-
new MarkupDataController(this);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@property({ attribute: false })
|
|
80
|
-
data: DivisionalChartResponse | null = null;
|
|
81
|
-
|
|
82
71
|
@property({ type: String, reflect: true, attribute: 'chart-style' })
|
|
83
72
|
chartStyle: ChartStyle = 'north';
|
|
84
73
|
|
|
@@ -93,12 +82,15 @@ export class RoxyDivisionalChart extends LitElement {
|
|
|
93
82
|
return toKundliViewModel(this.data.chart.meta, label);
|
|
94
83
|
}
|
|
95
84
|
|
|
96
|
-
|
|
85
|
+
protected renderEmpty() {
|
|
86
|
+
return html`<div class="roxy-empty" role="status">No divisional chart data</div>`;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
protected renderData(d: DivisionalChartResponse) {
|
|
97
90
|
const vm = this.viewModel();
|
|
98
|
-
if (!this.
|
|
99
|
-
return html`<div class="roxy-empty" role="status">No divisional chart data</div>`;
|
|
91
|
+
if (!vm) return this.renderEmpty();
|
|
100
92
|
|
|
101
|
-
const { division, vargottama } =
|
|
93
|
+
const { division, vargottama } = d;
|
|
102
94
|
|
|
103
95
|
return html`<div class="wrap">
|
|
104
96
|
<div class="header">
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { css, html,
|
|
1
|
+
import { css, html, nothing } from 'lit';
|
|
2
2
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
3
|
import type {
|
|
4
4
|
KalsarpaResponse,
|
|
5
5
|
ManglikResponse,
|
|
6
6
|
SadhesatiResponse,
|
|
7
7
|
} from '../types/index.js';
|
|
8
|
+
import { RoxyDataElement } from '../utils/base-element.js';
|
|
8
9
|
import { baseStyles } from '../utils/base-styles.js';
|
|
9
|
-
import { MarkupDataController } from '../utils/markup-data.js';
|
|
10
10
|
|
|
11
11
|
type DoshaData = ManglikResponse | KalsarpaResponse | SadhesatiResponse;
|
|
12
12
|
|
|
@@ -21,12 +21,12 @@ const DOSHA_LABELS: Record<string, string> = {
|
|
|
21
21
|
* Visual severity indicator + remedies + scoped effects.
|
|
22
22
|
*/
|
|
23
23
|
@customElement('roxy-dosha-card')
|
|
24
|
-
export class RoxyDoshaCard extends
|
|
24
|
+
export class RoxyDoshaCard extends RoxyDataElement<DoshaData> {
|
|
25
25
|
static styles = [
|
|
26
26
|
baseStyles,
|
|
27
27
|
css`
|
|
28
28
|
.card {
|
|
29
|
-
background: var(--roxy-
|
|
29
|
+
background: var(--roxy-surface, #fff);
|
|
30
30
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
31
31
|
border-radius: var(--roxy-radius-md, 8px);
|
|
32
32
|
padding: var(--roxy-space-lg, 1.5rem);
|
|
@@ -115,25 +115,14 @@ export class RoxyDoshaCard extends LitElement {
|
|
|
115
115
|
`,
|
|
116
116
|
];
|
|
117
117
|
|
|
118
|
-
constructor() {
|
|
119
|
-
super();
|
|
120
|
-
// Enables hydrating `data` from a direct-child
|
|
121
|
-
// <script type="application/json" class="roxy-data"> for server-rendered
|
|
122
|
-
// and cached consumers. The JavaScript `data` property still wins.
|
|
123
|
-
new MarkupDataController(this);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
@property({ attribute: false })
|
|
127
|
-
data: DoshaData | null = null;
|
|
128
|
-
|
|
129
118
|
@property({ type: String, reflect: true })
|
|
130
119
|
type: 'manglik' | 'kalsarpa' | 'sadhesati' | string = 'manglik';
|
|
131
120
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
return html`<div class="roxy-empty" role="status">No dosha data</div>`;
|
|
121
|
+
protected renderEmpty() {
|
|
122
|
+
return html`<div class="roxy-empty" role="status">No dosha data</div>`;
|
|
123
|
+
}
|
|
136
124
|
|
|
125
|
+
protected renderData(d: DoshaData) {
|
|
137
126
|
const present = !!d.present;
|
|
138
127
|
const label = DOSHA_LABELS[this.type] ?? this.type;
|
|
139
128
|
const sevLower = (d.severity ?? '').toLowerCase();
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { css, html, nothing } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import type { GetDreamSymbolResponse } from '../types/index.js';
|
|
4
|
+
import { RoxyDataElement } from '../utils/base-element.js';
|
|
5
|
+
import { baseStyles } from '../utils/base-styles.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Dream symbol card. Renders /dreams/symbols/{id}: the symbol name as a heading, the full psychological interpretation as the body, and the dictionary letter as a chip for alphabetical context.
|
|
9
|
+
*/
|
|
10
|
+
@customElement('roxy-dream-card')
|
|
11
|
+
export class RoxyDreamCard extends RoxyDataElement<GetDreamSymbolResponse> {
|
|
12
|
+
static styles = [
|
|
13
|
+
baseStyles,
|
|
14
|
+
css`
|
|
15
|
+
.card {
|
|
16
|
+
background: var(--roxy-surface, #fff);
|
|
17
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
18
|
+
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
19
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
20
|
+
padding: var(--roxy-space-lg, 1.5rem);
|
|
21
|
+
box-shadow: var(--roxy-shadow-sm);
|
|
22
|
+
display: grid;
|
|
23
|
+
gap: var(--roxy-space-md, 1rem);
|
|
24
|
+
}
|
|
25
|
+
.head {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
gap: var(--roxy-space-md, 1rem);
|
|
29
|
+
}
|
|
30
|
+
.letter {
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 2.5rem;
|
|
35
|
+
height: 2.5rem;
|
|
36
|
+
flex: none;
|
|
37
|
+
border-radius: var(--roxy-radius-full, 9999px);
|
|
38
|
+
background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 16%, transparent);
|
|
39
|
+
color: var(--roxy-accent-ink, #b45309);
|
|
40
|
+
font-size: var(--roxy-text-lg, 1.125rem);
|
|
41
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
42
|
+
text-transform: uppercase;
|
|
43
|
+
font-variant-numeric: tabular-nums;
|
|
44
|
+
}
|
|
45
|
+
.label {
|
|
46
|
+
margin: 0;
|
|
47
|
+
font-size: var(--roxy-text-xs, 0.75rem);
|
|
48
|
+
color: var(--roxy-muted, #71717a);
|
|
49
|
+
text-transform: uppercase;
|
|
50
|
+
letter-spacing: 0.06em;
|
|
51
|
+
}
|
|
52
|
+
.name {
|
|
53
|
+
margin: 0;
|
|
54
|
+
font-size: var(--roxy-text-lg, 1.125rem);
|
|
55
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
56
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
57
|
+
}
|
|
58
|
+
.meaning {
|
|
59
|
+
margin: 0;
|
|
60
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
61
|
+
line-height: 1.6;
|
|
62
|
+
}
|
|
63
|
+
`,
|
|
64
|
+
];
|
|
65
|
+
|
|
66
|
+
protected renderData(d: GetDreamSymbolResponse) {
|
|
67
|
+
return html`<article class="card" aria-label=${d.name ?? 'Dream symbol'}>
|
|
68
|
+
<header class="head">
|
|
69
|
+
${d.letter ? html`<span class="letter" aria-hidden="true">${d.letter}</span>` : nothing}
|
|
70
|
+
<div>
|
|
71
|
+
<p class="label">Dream symbol</p>
|
|
72
|
+
${d.name ? html`<h2 class="name">${d.name}</h2>` : nothing}
|
|
73
|
+
</div>
|
|
74
|
+
</header>
|
|
75
|
+
${d.meaning ? html`<p class="meaning">${d.meaning}</p>` : nothing}
|
|
76
|
+
</article>`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
protected renderEmpty() {
|
|
80
|
+
return html`<div class="roxy-empty" role="status">No dream symbol</div>`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare global {
|
|
85
|
+
interface HTMLElementTagNameMap {
|
|
86
|
+
'roxy-dream-card': RoxyDreamCard;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { css, html, nothing } from 'lit';
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import type { SearchDreamSymbolsResponse } from '../types/index.js';
|
|
4
|
+
import { RoxyDataElement } from '../utils/base-element.js';
|
|
5
|
+
import { baseStyles } from '../utils/base-styles.js';
|
|
6
|
+
|
|
7
|
+
type DreamSymbol = NonNullable<SearchDreamSymbolsResponse['symbols']>[number];
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Dream-symbol search results. Renders /dreams/symbols (the `q` search): the matched symbols as selectable tiles. In self-fetch mode the base renders the search input and this lists the matches. Selecting a result emits a `roxy-symbol-select` CustomEvent ({ id, name, letter }) that bubbles and is composed, so a host pairs it with a roxy-dream-card to show the full meaning. This is the dreams form-mode analog of roxy-location-search.
|
|
11
|
+
*/
|
|
12
|
+
@customElement('roxy-dream-search')
|
|
13
|
+
export class RoxyDreamSearch extends RoxyDataElement<SearchDreamSymbolsResponse> {
|
|
14
|
+
static styles = [
|
|
15
|
+
baseStyles,
|
|
16
|
+
css`
|
|
17
|
+
.wrap {
|
|
18
|
+
background: var(--roxy-surface, #fff);
|
|
19
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
20
|
+
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
21
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
22
|
+
padding: var(--roxy-space-lg, 1.5rem);
|
|
23
|
+
box-shadow: var(--roxy-shadow-sm);
|
|
24
|
+
display: grid;
|
|
25
|
+
gap: var(--roxy-space-md, 1rem);
|
|
26
|
+
}
|
|
27
|
+
.head {
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
align-items: baseline;
|
|
31
|
+
gap: var(--roxy-space-md, 1rem);
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
}
|
|
34
|
+
.title {
|
|
35
|
+
font-size: var(--roxy-text-lg, 1.125rem);
|
|
36
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
.count {
|
|
40
|
+
color: var(--roxy-muted, #71717a);
|
|
41
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
42
|
+
}
|
|
43
|
+
.grid {
|
|
44
|
+
list-style: none;
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
display: grid;
|
|
48
|
+
grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
|
|
49
|
+
gap: var(--roxy-space-sm, 0.5rem);
|
|
50
|
+
}
|
|
51
|
+
.result {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: var(--roxy-space-sm, 0.5rem);
|
|
55
|
+
width: 100%;
|
|
56
|
+
text-align: left;
|
|
57
|
+
font: inherit;
|
|
58
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
59
|
+
background: transparent;
|
|
60
|
+
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
61
|
+
border-radius: var(--roxy-radius-md, 8px);
|
|
62
|
+
padding: var(--roxy-space-sm, 0.5rem) var(--roxy-space-md, 1rem);
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
transition: border-color 0.12s ease, background 0.12s ease;
|
|
65
|
+
}
|
|
66
|
+
.result:hover,
|
|
67
|
+
.result:focus-visible {
|
|
68
|
+
border-color: var(--roxy-accent, #f59e0b);
|
|
69
|
+
background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 8%, transparent);
|
|
70
|
+
outline: none;
|
|
71
|
+
}
|
|
72
|
+
.letter {
|
|
73
|
+
flex: none;
|
|
74
|
+
width: 1.6rem;
|
|
75
|
+
height: 1.6rem;
|
|
76
|
+
display: grid;
|
|
77
|
+
place-items: center;
|
|
78
|
+
border-radius: var(--roxy-radius-full, 9999px);
|
|
79
|
+
background: color-mix(in srgb, var(--roxy-accent, #f59e0b) 16%, transparent);
|
|
80
|
+
color: var(--roxy-fg, #0a0a0a);
|
|
81
|
+
font-size: var(--roxy-text-xs, 0.75rem);
|
|
82
|
+
font-weight: var(--roxy-weight-bold, 600);
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
}
|
|
85
|
+
.name {
|
|
86
|
+
font-size: var(--roxy-text-sm, 0.875rem);
|
|
87
|
+
font-weight: 500;
|
|
88
|
+
}
|
|
89
|
+
`,
|
|
90
|
+
];
|
|
91
|
+
|
|
92
|
+
protected renderEmpty() {
|
|
93
|
+
return html`<div class="roxy-empty" role="status">No symbols match</div>`;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
protected renderData(d: SearchDreamSymbolsResponse) {
|
|
97
|
+
const symbols = d.symbols ?? [];
|
|
98
|
+
if (symbols.length === 0) return this.renderEmpty();
|
|
99
|
+
const total = typeof d.total === 'number' ? d.total : symbols.length;
|
|
100
|
+
|
|
101
|
+
return html`<section class="wrap" aria-label="Dream symbols">
|
|
102
|
+
<header class="head">
|
|
103
|
+
<h2 class="title">Dream Symbols</h2>
|
|
104
|
+
<span class="count">${total} match${total === 1 ? '' : 'es'}</span>
|
|
105
|
+
</header>
|
|
106
|
+
<ul class="grid">
|
|
107
|
+
${symbols.map(
|
|
108
|
+
(s) => html`<li>
|
|
109
|
+
<button type="button" class="result" @click=${() => this.select(s)}>
|
|
110
|
+
${s.letter ? html`<span class="letter" aria-hidden="true">${s.letter}</span>` : nothing}
|
|
111
|
+
<span class="name">${s.name}</span>
|
|
112
|
+
</button>
|
|
113
|
+
</li>`,
|
|
114
|
+
)}
|
|
115
|
+
</ul>
|
|
116
|
+
</section>`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/** Emit the chosen symbol so a host can load its detail (e.g. into a roxy-dream-card). */
|
|
120
|
+
private select(s: DreamSymbol) {
|
|
121
|
+
this.dispatchEvent(
|
|
122
|
+
new CustomEvent('roxy-symbol-select', {
|
|
123
|
+
detail: { id: s.id, name: s.name, letter: s.letter },
|
|
124
|
+
bubbles: true,
|
|
125
|
+
composed: true,
|
|
126
|
+
}),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare global {
|
|
132
|
+
interface HTMLElementTagNameMap {
|
|
133
|
+
'roxy-dream-search': RoxyDreamSearch;
|
|
134
|
+
}
|
|
135
|
+
}
|