@roxyapi/ui-vue 0.35.0 → 0.37.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 +5 -1
- package/README.md +113 -6
- package/dist/components/almanac-day.js +1 -1
- package/dist/components/almanac-day.js.map +1 -1
- package/dist/components/angel-number-card.js +1 -1
- package/dist/components/angel-number-card.js.map +1 -1
- package/dist/components/angel-number-lookup.js +1 -1
- package/dist/components/angel-number-lookup.js.map +1 -1
- package/dist/components/arudha-padas.js +1 -1
- package/dist/components/arudha-padas.js.map +1 -1
- package/dist/components/ashtakavarga-grid.js +1 -1
- package/dist/components/ashtakavarga-grid.js.map +1 -1
- package/dist/components/aspects-table.js +1 -1
- package/dist/components/aspects-table.js.map +1 -1
- package/dist/components/astrocartography-map.js +1 -1
- package/dist/components/astrocartography-map.js.map +1 -1
- package/dist/components/bazi-chart.js +1 -1
- package/dist/components/bazi-chart.js.map +1 -1
- package/dist/components/bhav-chalit-table.js +1 -1
- package/dist/components/bhav-chalit-table.js.map +1 -1
- package/dist/components/bhava-bala-table.js +1 -1
- package/dist/components/bhava-bala-table.js.map +1 -1
- package/dist/components/biorhythm-chart.js +1 -1
- package/dist/components/biorhythm-chart.js.map +1 -1
- package/dist/components/bodygraph.js +1 -1
- package/dist/components/bodygraph.js.map +1 -1
- package/dist/components/chara-karakas.js +1 -1
- package/dist/components/chara-karakas.js.map +1 -1
- package/dist/components/choghadiya-grid.js +1 -1
- package/dist/components/choghadiya-grid.js.map +1 -1
- package/dist/components/compatibility-card.js +1 -1
- package/dist/components/compatibility-card.js.map +1 -1
- package/dist/components/crystal-card.js +1 -1
- package/dist/components/crystal-card.js.map +1 -1
- package/dist/components/crystal-grid.js +1 -1
- package/dist/components/crystal-grid.js.map +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/dasha-timeline.js.map +1 -1
- package/dist/components/data.js +1 -1
- package/dist/components/data.js.map +1 -1
- package/dist/components/divisional-chart.js +1 -1
- package/dist/components/divisional-chart.js.map +1 -1
- package/dist/components/dosha-card.js +1 -1
- package/dist/components/dosha-card.js.map +1 -1
- package/dist/components/dosha-constitution.d.ts +130 -0
- package/dist/components/dosha-constitution.d.ts.map +1 -0
- package/dist/components/dosha-constitution.js +2 -0
- package/dist/components/dosha-constitution.js.map +7 -0
- package/dist/components/dream-card.js +1 -1
- package/dist/components/dream-card.js.map +1 -1
- package/dist/components/dream-search.js +1 -1
- package/dist/components/dream-search.js.map +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/ephemeris-table.js +1 -1
- package/dist/components/ephemeris-table.js.map +1 -1
- package/dist/components/fixed-stars.js +1 -1
- package/dist/components/fixed-stars.js.map +1 -1
- package/dist/components/flying-star-chart.js +1 -1
- package/dist/components/flying-star-chart.js.map +1 -1
- package/dist/components/forecast-digest.js +1 -1
- package/dist/components/forecast-digest.js.map +1 -1
- package/dist/components/forecast-timeline.js +1 -1
- package/dist/components/forecast-timeline.js.map +1 -1
- package/dist/components/gematria.d.ts +130 -0
- package/dist/components/gematria.d.ts.map +1 -0
- package/dist/components/gematria.js +2 -0
- package/dist/components/gematria.js.map +7 -0
- package/dist/components/gochara-table.js +1 -1
- package/dist/components/gochara-table.js.map +1 -1
- package/dist/components/guna-milan.js +1 -1
- package/dist/components/guna-milan.js.map +1 -1
- package/dist/components/hd-connection.js +1 -1
- package/dist/components/hd-connection.js.map +1 -1
- package/dist/components/hd-penta.js +1 -1
- package/dist/components/hd-penta.js.map +1 -1
- package/dist/components/hd-type-card.js +1 -1
- package/dist/components/hd-type-card.js.map +1 -1
- package/dist/components/hd-variables.js +1 -1
- package/dist/components/hd-variables.js.map +1 -1
- package/dist/components/heliacal-table.js +1 -1
- package/dist/components/heliacal-table.js.map +1 -1
- package/dist/components/hexagram.js +1 -1
- package/dist/components/hexagram.js.map +1 -1
- package/dist/components/hora-table.js +1 -1
- package/dist/components/hora-table.js.map +1 -1
- package/dist/components/horoscope-card.js +1 -1
- package/dist/components/horoscope-card.js.map +1 -1
- package/dist/components/kp-chart.js +1 -1
- package/dist/components/kp-chart.js.map +1 -1
- package/dist/components/kp-planets-table.js +1 -1
- package/dist/components/kp-planets-table.js.map +1 -1
- package/dist/components/kp-ruling-planets.js +1 -1
- package/dist/components/kp-ruling-planets.js.map +1 -1
- package/dist/components/kua-card.js +1 -1
- package/dist/components/kua-card.js.map +1 -1
- package/dist/components/local-space-compass.js +1 -1
- package/dist/components/local-space-compass.js.map +1 -1
- package/dist/components/location-search.js +1 -1
- package/dist/components/location-search.js.map +1 -1
- package/dist/components/luck-pillars.js +1 -1
- package/dist/components/luck-pillars.js.map +1 -1
- package/dist/components/mayan-day-sign.d.ts +138 -0
- package/dist/components/mayan-day-sign.d.ts.map +1 -0
- package/dist/components/mayan-day-sign.js +2 -0
- package/dist/components/mayan-day-sign.js.map +7 -0
- package/dist/components/moon-phase.js +1 -1
- package/dist/components/moon-phase.js.map +1 -1
- package/dist/components/nakshatra-card.js +1 -1
- package/dist/components/nakshatra-card.js.map +1 -1
- package/dist/components/natal-chart.js +1 -1
- package/dist/components/natal-chart.js.map +1 -1
- package/dist/components/numerology-card.js +1 -1
- package/dist/components/numerology-card.js.map +1 -1
- package/dist/components/panchang-table.js +1 -1
- package/dist/components/panchang-table.js.map +1 -1
- package/dist/components/positions-table.js +1 -1
- package/dist/components/positions-table.js.map +1 -1
- package/dist/components/profection-card.js +1 -1
- package/dist/components/profection-card.js.map +1 -1
- package/dist/components/reference-card.js +1 -1
- package/dist/components/reference-card.js.map +1 -1
- package/dist/components/relocation-wheel.js +1 -1
- package/dist/components/relocation-wheel.js.map +1 -1
- package/dist/components/shadbala-table.js +1 -1
- package/dist/components/shadbala-table.js.map +1 -1
- package/dist/components/synastry-chart.js +1 -1
- package/dist/components/synastry-chart.js.map +1 -1
- package/dist/components/tarot-card.js +1 -1
- package/dist/components/tarot-card.js.map +1 -1
- package/dist/components/tarot-catalog.js +1 -1
- package/dist/components/tarot-catalog.js.map +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/tarot-spread.js.map +1 -1
- package/dist/components/transit-wheel.js +1 -1
- package/dist/components/transit-wheel.js.map +1 -1
- package/dist/components/transits-table.js +1 -1
- package/dist/components/transits-table.js.map +1 -1
- package/dist/components/upagraha-table.js +1 -1
- package/dist/components/upagraha-table.js.map +1 -1
- package/dist/components/vastu-mandala.d.ts +138 -0
- package/dist/components/vastu-mandala.d.ts.map +1 -0
- package/dist/components/vastu-mandala.js +2 -0
- package/dist/components/vastu-mandala.js.map +7 -0
- package/dist/components/vedic-aspects.js +1 -1
- package/dist/components/vedic-aspects.js.map +1 -1
- package/dist/components/vedic-daily.js +1 -1
- package/dist/components/vedic-daily.js.map +1 -1
- package/dist/components/vedic-kundli.js +1 -1
- package/dist/components/vedic-kundli.js.map +1 -1
- package/dist/components/vedic-planets-table.js +1 -1
- package/dist/components/vedic-planets-table.js.map +1 -1
- package/dist/components/western-planets-table.js +1 -1
- package/dist/components/western-planets-table.js.map +1 -1
- package/dist/components/yoga-list.js +1 -1
- package/dist/components/yoga-list.js.map +1 -1
- package/dist/components/zodiac-card.js +1 -1
- package/dist/components/zodiac-card.js.map +1 -1
- package/dist/generated/tool-components.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/load-ui.d.ts +1 -1
- package/dist/load-ui.js +1 -1
- package/dist/load-ui.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.gen.d.ts +15342 -2593
- package/dist/types/types.gen.d.ts.map +1 -1
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -102,6 +102,7 @@ Use the table below for the formal endpoint to component mapping.
|
|
|
102
102
|
| `<roxy-nakshatra-card>` | Vedic | GET /vedic-astrology/nakshatras/{id} | Lord, deity, symbol, characteristics, remedies |
|
|
103
103
|
| `<roxy-dosha-card>` | Vedic | POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati} | Presence, severity, remedies, scoped effects |
|
|
104
104
|
| `<roxy-numerology-card>` | Numerology | POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart} | Life path, expression, soul urge, personality, personal year, full chart |
|
|
105
|
+
| `<roxy-gematria>` | Kabbalah | POST /kabbalah/gematria | Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words |
|
|
105
106
|
| `<roxy-tarot-card>` | Tarot | GET /tarot/cards/{id}, POST /tarot/daily | Single card with upright and reversed flip |
|
|
106
107
|
| `<roxy-tarot-catalog>` | Tarot | GET /tarot/cards | Deck gallery tiles with card art, name, and arcana and suit |
|
|
107
108
|
| `<roxy-tarot-spread>` | Tarot | POST /tarot/spreads/{three-card,celtic-cross,love}, /tarot/yes-no, /tarot/draw | Spreads with positions and reading |
|
|
@@ -118,7 +119,10 @@ Use the table below for the formal endpoint to component mapping.
|
|
|
118
119
|
| `<roxy-almanac-day>` | Chinese | GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days | Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search |
|
|
119
120
|
| `<roxy-flying-star-chart>` | Feng Shui | POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year} | Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure |
|
|
120
121
|
| `<roxy-kua-card>` | Feng Shui | POST /feng-shui/kua, POST /feng-shui/eight-mansions | Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked |
|
|
122
|
+
| `<roxy-mayan-day-sign>` | Mesoamerican | POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart | Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response |
|
|
123
|
+
| `<roxy-vastu-mandala>` | Vastu | POST /vastu/mandala, POST /vastu/entrance | Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect |
|
|
121
124
|
| `<roxy-biorhythm-chart>` | Biorhythm | POST /biorhythm/{daily,forecast,critical-days} | Daily bars, forecast cycle lines, critical days |
|
|
125
|
+
| `<roxy-dosha-constitution>` | Ayurveda | POST /ayurveda/constitution | Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it |
|
|
122
126
|
| `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram |
|
|
123
127
|
| `<roxy-crystal-card>` | Crystals | GET /crystals/{id} | Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings |
|
|
124
128
|
| `<roxy-crystal-grid>` | Crystals | GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search | Crystal gallery tiles with photo, name, and colour swatches |
|
|
@@ -323,7 +327,7 @@ If you theme dark differently, set it in your dark block too, exactly as you wou
|
|
|
323
327
|
[data-theme='dark'] { --roxy-accent: #a78bfa; }
|
|
324
328
|
```
|
|
325
329
|
|
|
326
|
-
Do not hardcode `--roxy-accent-ink`: you will pin it to one hue and it will stop tracking your brand. Dark mode already works with no wiring, via `prefers-color-scheme`, a `.dark` class, or `[data-theme='dark']` on any ancestor.
|
|
330
|
+
If the page is not white or near black, also set `--roxy-surface`, the card a component paints, to the surface you place it on (and `--roxy-secondary`, the label ink, if your palette is warm): `--roxy-bg` alone leaves the card at its default sheet. Do not hardcode `--roxy-accent-ink`: you will pin it to one hue and it will stop tracking your brand. Dark mode already works with no wiring, via `prefers-color-scheme`, a `.dark` class, or `[data-theme='dark']` on any ancestor.
|
|
327
331
|
|
|
328
332
|
## Integration patterns
|
|
329
333
|
|
package/README.md
CHANGED
|
@@ -54,9 +54,12 @@ Light, dark, your brand. Set `--roxy-accent` on `:root` and every component foll
|
|
|
54
54
|
|
|
55
55
|
```css
|
|
56
56
|
:root {
|
|
57
|
-
/* Surface
|
|
57
|
+
/* Surface. --roxy-surface is the card a component paints, so match it to the
|
|
58
|
+
surface you place the component on; --roxy-bg is the field behind an input. */
|
|
59
|
+
--roxy-surface: #ffffff;
|
|
58
60
|
--roxy-bg: #ffffff;
|
|
59
61
|
--roxy-fg: #0a0a0a;
|
|
62
|
+
--roxy-secondary: #475569;
|
|
60
63
|
--roxy-muted: #71717a;
|
|
61
64
|
--roxy-border: #e4e4e7;
|
|
62
65
|
|
|
@@ -77,8 +80,10 @@ Light, dark, your brand. Set `--roxy-accent` on `:root` and every component foll
|
|
|
77
80
|
}
|
|
78
81
|
|
|
79
82
|
[data-theme="dark"] {
|
|
83
|
+
--roxy-surface: #18181b;
|
|
80
84
|
--roxy-bg: #0a0a0a;
|
|
81
85
|
--roxy-fg: #fafafa;
|
|
86
|
+
--roxy-secondary: #94a3b8;
|
|
82
87
|
--roxy-muted: #a1a1aa;
|
|
83
88
|
--roxy-border: #27272a;
|
|
84
89
|
/* Only if you want a different accent in dark. Omit it to keep the default. */
|
|
@@ -255,6 +260,34 @@ Every chart, table, and card adapts to light and dark automatically. Hover any i
|
|
|
255
260
|
</picture>
|
|
256
261
|
</td>
|
|
257
262
|
</tr>
|
|
263
|
+
<tr>
|
|
264
|
+
<td width="50%"><strong>Mayan day sign</strong> · <code><roxy-mayan-day-sign></code><br><sub>POST /mesoamerican-astrology/mayan/tzolkin</sub><br>
|
|
265
|
+
<picture>
|
|
266
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/mayan-day-sign-dark.png">
|
|
267
|
+
<img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/mayan-day-sign-light.png" alt="Tzolkin day sign card with the coefficient and the trecena it falls in, and the composed nawal reading">
|
|
268
|
+
</picture>
|
|
269
|
+
</td>
|
|
270
|
+
<td width="50%"><strong>Vastu mandala</strong> · <code><roxy-vastu-mandala></code><br><sub>POST /vastu/mandala</sub><br>
|
|
271
|
+
<picture>
|
|
272
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/vastu-mandala-dark.png">
|
|
273
|
+
<img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/vastu-mandala-light.png" alt="Vastu Purusha Mandala pada grid with a devata on every square and the brahmasthan at the centre">
|
|
274
|
+
</picture>
|
|
275
|
+
</td>
|
|
276
|
+
</tr>
|
|
277
|
+
<tr>
|
|
278
|
+
<td width="50%"><strong>Gematria</strong> · <code><roxy-gematria></code><br><sub>POST /kabbalah/gematria</sub><br>
|
|
279
|
+
<picture>
|
|
280
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/gematria-dark.png">
|
|
281
|
+
<img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/gematria-light.png" alt="Gematria calculator with values by cipher, every candidate Hebrew spelling and its per letter breakdown">
|
|
282
|
+
</picture>
|
|
283
|
+
</td>
|
|
284
|
+
<td width="50%"><strong>Ayurvedic constitution</strong> · <code><roxy-dosha-constitution></code><br><sub>POST /ayurveda/constitution</sub><br>
|
|
285
|
+
<picture>
|
|
286
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/dosha-constitution-dark.png">
|
|
287
|
+
<img src="https://raw.githubusercontent.com/RoxyAPI/ui/main/assets/screenshots/dosha-constitution-light.png" alt="Ayurvedic constitution bar with vata, pitta and kapha shares, the dominant humour, and the cited classical factors behind the blend">
|
|
288
|
+
</picture>
|
|
289
|
+
</td>
|
|
290
|
+
</tr>
|
|
258
291
|
</table>
|
|
259
292
|
|
|
260
293
|
Tables, cards, forms, and helper components in the [live demo](https://roxyapi.github.io/ui/).
|
|
@@ -605,7 +638,47 @@ const { data: plate } = await roxy.fengShui.generateFlyingStarChart({
|
|
|
605
638
|
<RoxyFlyingStarChart data={plate} mode="natal" />
|
|
606
639
|
```
|
|
607
640
|
|
|
608
|
-
### 7.
|
|
641
|
+
### 7. Mesoamerican astrology (Tzolkin day sign, Calendar Round)
|
|
642
|
+
|
|
643
|
+
The 260-day Tzolkin day sign and trecena for any date, plus the full Calendar Round: Haab date, Long Count and year bearer, across four correlation constants. Fits Mayan-zodiac calculators, day-sign lookup tools and Mesoamerican-calendar content.
|
|
644
|
+
|
|
645
|
+
```tsx
|
|
646
|
+
import { RoxyMayanDaySign } from '@roxyapi/ui-react';
|
|
647
|
+
|
|
648
|
+
// Tzolkin day sign. The lead query: day sign, coefficient, the trecena it falls in, and the composed nawal reading.
|
|
649
|
+
const { data: day } = await roxy.mesoamericanAstrology.calculateTzolkin({
|
|
650
|
+
body: { date: '1990-01-15' },
|
|
651
|
+
});
|
|
652
|
+
<RoxyMayanDaySign data={day} mode="day" />
|
|
653
|
+
|
|
654
|
+
// Calendar Round. The fuller chart: Tzolkin and Haab dates, the Long Count, and the year bearer.
|
|
655
|
+
const { data: chart } = await roxy.mesoamericanAstrology.generateMayanChart({
|
|
656
|
+
body: { date: '1990-01-15' },
|
|
657
|
+
});
|
|
658
|
+
<RoxyMayanDaySign data={chart} mode="chart" />
|
|
659
|
+
```
|
|
660
|
+
|
|
661
|
+
### 8. Vastu (Purusha Mandala, entrance pada)
|
|
662
|
+
|
|
663
|
+
The 81-pada Vastu Purusha Mandala projected over any plot shape, and the entrance pada a main door falls on with its verse effect. Fits Vastu consultation tools, floor-plan apps and entrance-direction calculators.
|
|
664
|
+
|
|
665
|
+
```tsx
|
|
666
|
+
import { RoxyVastuMandala } from '@roxyapi/ui-react';
|
|
667
|
+
|
|
668
|
+
// Vastu Purusha Mandala. Every pada over the plot, with the devata holding it and the brahmasthan marked.
|
|
669
|
+
const { data: mandala } = await roxy.vastu.generateMandala({
|
|
670
|
+
body: { plot: { width: 30, depth: 40, unit: 'feet' } },
|
|
671
|
+
});
|
|
672
|
+
<RoxyVastuMandala data={mandala} mode="mandala" />
|
|
673
|
+
|
|
674
|
+
// Entrance pada. Which of the 32 perimeter padas the main door falls on, and the verse effect for it.
|
|
675
|
+
const { data: entrance } = await roxy.vastu.calculateEntrancePada({
|
|
676
|
+
body: { plot: { width: 30, depth: 40, unit: 'feet' }, facing: 'East', doorPosition: 0.4 },
|
|
677
|
+
});
|
|
678
|
+
<RoxyVastuMandala data={entrance} mode="entrance" />
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
### 9. Numerology (life path, full chart, personal year)
|
|
609
682
|
|
|
610
683
|
Life path, the full chart, and the personal year. The easiest domain to integrate: a name and a birth date are enough, with no birth time and no coordinates.
|
|
611
684
|
|
|
@@ -631,7 +704,21 @@ const { data: pyear } = await roxy.numerology.calculatePersonalYear({
|
|
|
631
704
|
<RoxyNumerologyCard data={pyear} type="personal-year" />
|
|
632
705
|
```
|
|
633
706
|
|
|
634
|
-
###
|
|
707
|
+
### 10. Kabbalah (gematria)
|
|
708
|
+
|
|
709
|
+
Gematria for a Latin or Hebrew name: every candidate Hebrew spelling, the value under each cipher, and the words that share it. Fits name-numerology tools, Hebrew-calendar apps and Kabbalah content.
|
|
710
|
+
|
|
711
|
+
```tsx
|
|
712
|
+
import { RoxyGematria } from '@roxyapi/ui-react';
|
|
713
|
+
|
|
714
|
+
// Gematria. Every candidate Hebrew spelling of a Latin name, the value under each cipher, and equal-value words.
|
|
715
|
+
const { data: gematria } = await roxy.kabbalah.calculateGematria({
|
|
716
|
+
body: { text: 'Sarah', latinCiphers: true },
|
|
717
|
+
});
|
|
718
|
+
<RoxyGematria data={gematria} />
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
### 11. Tarot (daily card, three-card, Celtic Cross)
|
|
635
722
|
|
|
636
723
|
Draw a single daily card, a three-card spread, or a full Celtic Cross. The card database is stable reference data, so fetch it once and cache it rather than calling per render.
|
|
637
724
|
|
|
@@ -655,7 +742,7 @@ const { data: cc } = await roxy.tarot.castCelticCross({
|
|
|
655
742
|
<RoxyTarotSpread data={cc} />
|
|
656
743
|
```
|
|
657
744
|
|
|
658
|
-
###
|
|
745
|
+
### 12. Biorhythm (daily, forecast)
|
|
659
746
|
|
|
660
747
|
Physical, emotional and intellectual cycles from a birth date alone, as a daily reading or a forward forecast with the critical days marked. Fits wellness, productivity, sports and couples apps.
|
|
661
748
|
|
|
@@ -676,7 +763,21 @@ const { data: forecast } = await roxy.biorhythm.getForecast({
|
|
|
676
763
|
<RoxyBiorhythmChart data={forecast} mode="forecast" />
|
|
677
764
|
```
|
|
678
765
|
|
|
679
|
-
###
|
|
766
|
+
### 13. Ayurveda (dosha constitution)
|
|
767
|
+
|
|
768
|
+
The three-humour constitution computed from a birth chart: vata, pitta and kapha shares as one blend, with the classical factors and verse citations behind it. Fits wellness apps, Ayurveda consultation tools and birth-chart products adding a dosha reading.
|
|
769
|
+
|
|
770
|
+
```tsx
|
|
771
|
+
import { RoxyDoshaConstitution } from '@roxyapi/ui-react';
|
|
772
|
+
|
|
773
|
+
// Ayurvedic constitution. Vata, pitta and kapha shares from the birth chart, with the cited factors behind the blend.
|
|
774
|
+
const { data: constitution } = await roxy.ayurveda.calculateAyurvedicConstitution({
|
|
775
|
+
body: { date: '1990-01-15', time: '14:30:00', latitude: 19.07, longitude: 72.88, timezone: 5.5 },
|
|
776
|
+
});
|
|
777
|
+
<RoxyDoshaConstitution data={constitution} />
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
### 14. I Ching (cast a reading, hexagram lookup)
|
|
680
781
|
|
|
681
782
|
Cast a reading with its changing lines and the hexagram it transforms into, or look up any of the 64 figures directly. Fits meditation apps, decision-making tools and wisdom chatbots.
|
|
682
783
|
|
|
@@ -770,6 +871,7 @@ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean
|
|
|
770
871
|
| `<roxy-nakshatra-card>` | Vedic | GET /vedic-astrology/nakshatras/{id} | Lord, deity, symbol, characteristics, remedies |
|
|
771
872
|
| `<roxy-dosha-card>` | Vedic | POST /vedic-astrology/dosha/{manglik,kalsarpa,sadhesati} | Presence, severity, remedies, scoped effects |
|
|
772
873
|
| `<roxy-numerology-card>` | Numerology | POST /numerology/{life-path,expression,soul-urge,personality,birth-day,maturity,daily,personal-day,personal-month,personal-year,chart} | Life path, expression, soul urge, personality, personal year, full chart |
|
|
874
|
+
| `<roxy-gematria>` | Kabbalah | POST /kabbalah/gematria | Values by cipher, every candidate Hebrew spelling with its per letter breakdown, and equal-value words |
|
|
773
875
|
| `<roxy-tarot-card>` | Tarot | GET /tarot/cards/{id}, POST /tarot/daily | Single card with upright and reversed flip |
|
|
774
876
|
| `<roxy-tarot-catalog>` | Tarot | GET /tarot/cards | Deck gallery tiles with card art, name, and arcana and suit |
|
|
775
877
|
| `<roxy-tarot-spread>` | Tarot | POST /tarot/spreads/{three-card,celtic-cross,love}, /tarot/yes-no, /tarot/draw | Spreads with positions and reading |
|
|
@@ -786,7 +888,10 @@ The self-fetch form renders spec-driven inputs (a zodiac tile picker, a boolean
|
|
|
786
888
|
| `<roxy-almanac-day>` | Chinese | GET /chinese-astrology/calendar/{day/{date},monthly}, POST /chinese-astrology/calendar/auspicious-days | Day officer, favours and avoids, clash animal and pillars, as one day, a month, or a date search |
|
|
787
889
|
| `<roxy-flying-star-chart>` | Feng Shui | POST /feng-shui/flying-stars/natal, GET /feng-shui/flying-stars/annual/{year} | Nine-palace flying star plate with the mountain, period and water star per palace, the facing and sitting mountains and the structure |
|
|
788
890
|
| `<roxy-kua-card>` | Feng Shui | POST /feng-shui/kua, POST /feng-shui/eight-mansions | Kua number and trigram over the eight-sector direction map, favourable and unfavourable sectors ranked |
|
|
891
|
+
| `<roxy-mayan-day-sign>` | Mesoamerican | POST /mesoamerican-astrology/mayan/tzolkin, POST /mesoamerican-astrology/mayan/chart | Day sign and coefficient with the trecena, the reading, and the Calendar Round on the fuller response |
|
|
892
|
+
| `<roxy-vastu-mandala>` | Vastu | POST /vastu/mandala, POST /vastu/entrance | Pada grid with a devata per square, the brahmasthan, and the entrance pada lit with its effect |
|
|
789
893
|
| `<roxy-biorhythm-chart>` | Biorhythm | POST /biorhythm/{daily,forecast,critical-days} | Daily bars, forecast cycle lines, critical days |
|
|
894
|
+
| `<roxy-dosha-constitution>` | Ayurveda | POST /ayurveda/constitution | Vata, pitta and kapha shares as one bar with the dominant humour and the cited factors behind it |
|
|
790
895
|
| `<roxy-hexagram>` | I Ching | GET /iching/hexagrams/{number}, /iching/cast, POST /iching/daily, /iching/daily/cast | Hexagram figure with trigrams, judgment, image, and a reading per line (statement plus meaning); a cast highlights the moving lines and the resulting hexagram |
|
|
791
896
|
| `<roxy-crystal-card>` | Crystals | GET /crystals/{id} | Photo, meaning sections, chakra, zodiac, element, hardness, keywords, and pairings |
|
|
792
897
|
| `<roxy-crystal-grid>` | Crystals | GET /crystals, /crystals/chakra/{chakra}, /crystals/element/{element}, /crystals/zodiac/{sign}, /crystals/birthstone/{month}, /crystals/search | Crystal gallery tiles with photo, name, and colour swatches |
|
|
@@ -1006,7 +1111,7 @@ Persist the choice in `localStorage` from your own code; the components do not o
|
|
|
1006
1111
|
<details>
|
|
1007
1112
|
<summary><strong>How big is each component? What is the bundle cost?</strong></summary>
|
|
1008
1113
|
|
|
1009
|
-
Every component bundle is under 30 KB gzipped and the full bundle (every component, helpers, base styles, and the inlined design tokens) is under
|
|
1114
|
+
Every component bundle is under 30 KB gzipped and the full bundle (every component, helpers, base styles, and the inlined design tokens) is under 165 KB gzipped. Both ceilings are enforced in CI on every build, measured on the compressed bytes a browser actually downloads, so a release cannot quietly grow past them. A route that renders one chart pays for one component, not the whole catalog. Pin a concrete version in production for byte-stable cache hits.
|
|
1010
1115
|
</details>
|
|
1011
1116
|
|
|
1012
1117
|
<details>
|
|
@@ -1061,8 +1166,10 @@ For Tailwind v4 users, the shadcn registry installs a CSS bridge that maps your
|
|
|
1061
1166
|
|
|
1062
1167
|
```css
|
|
1063
1168
|
:root {
|
|
1169
|
+
--roxy-surface: theme(colors.card.DEFAULT);
|
|
1064
1170
|
--roxy-bg: theme(colors.background);
|
|
1065
1171
|
--roxy-fg: theme(colors.foreground);
|
|
1172
|
+
--roxy-secondary: theme(colors.muted.foreground);
|
|
1066
1173
|
--roxy-accent: theme(colors.primary.DEFAULT);
|
|
1067
1174
|
--roxy-border: theme(colors.border);
|
|
1068
1175
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as f,h as s,onMounted as b,ref as g}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as f,h as s,onMounted as b,ref as g}from"vue";var u="0.37.0",r="roxyapi-ui-loader",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",c="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",m="/dist/cdn",a=null;function p(e){return!e||e==="latest"?y:`${c}${e}${m}`}function d(e=u,i){return typeof document>"u"?Promise.resolve():a||(a=new Promise((n,o)=>{let l=`${i??p(e)}/roxy-ui.js`,t=document.getElementById(r);if(t){t.dataset.loaded==="true"?n():(t.addEventListener("load",()=>n()),t.addEventListener("error",()=>o(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=r,t.src=l,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",n()}),t.addEventListener("error",()=>o(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),a)}var h=f({name:"RoxyAlmanacDay",props:{data:{type:Object},mode:{type:String},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},submitUrl:{type:String},submitContext:{type:Object},locationUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},remember:{type:Boolean},attribution:{type:String},hideReadings:{type:Boolean},hideSections:{type:String}},setup(e){let i=g(null);return b(()=>{d().catch(n=>{i.value=n instanceof Error?n:new Error(String(n))})}),()=>{if(i.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${i.value.message}`);let n={};return e.data!==void 0&&(n[".data"]=e.data),e.mode!==void 0&&(n[".mode"]=e.mode),e.endpoint!==void 0&&(n[".endpoint"]=e.endpoint),e.method!==void 0&&(n[".method"]=e.method),e.publishableKey!==void 0&&(n[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(n[".baseUrl"]=e.baseUrl),e.submitUrl!==void 0&&(n[".submitUrl"]=e.submitUrl),e.submitContext!==void 0&&(n[".submitContext"]=e.submitContext),e.locationUrl!==void 0&&(n[".locationUrl"]=e.locationUrl),e.specUrl!==void 0&&(n[".specUrl"]=e.specUrl),e.lang!==void 0&&(n[".lang"]=e.lang),e.submitLabel!==void 0&&(n[".submitLabel"]=e.submitLabel),e.remember!==void 0&&(n[".remember"]=e.remember),e.attribution!==void 0&&(n[".attribution"]=e.attribution),e.hideReadings!==void 0&&(n[".hideReadings"]=e.hideReadings),e.hideSections!==void 0&&(n[".hideSections"]=e.hideSections),s("roxy-almanac-day",n)}}});export{h as RoxyAlmanacDay};
|
|
2
2
|
//# sourceMappingURL=almanac-day.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/almanac-day.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAlmanacDayResponse, GetMonthlyAlmanacResponse, LookupAuspiciousDaysResponse } from '../types/index.js';\n\nexport interface RoxyAlmanacDayProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAlmanacDayResponse | GetMonthlyAlmanacResponse | LookupAuspiciousDaysResponse;\n\t/** Which read the response is: one almanac day as a card, a whole month of them as rows, or the days a search returned for one activity. */\n\tmode?: 'day' | 'month' | 'auspicious';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAlmanacDay = defineComponent({\n\tname: 'RoxyAlmanacDay',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAlmanacDayProps['data']> },\n\t\tmode: { type: String as PropType<RoxyAlmanacDayProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyAlmanacDayProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAlmanacDayProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAlmanacDayProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAlmanacDayProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAlmanacDayProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAlmanacDayProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAlmanacDayProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAlmanacDayProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAlmanacDayProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAlmanacDayProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAlmanacDayProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAlmanacDayProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAlmanacDayProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAlmanacDayProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-almanac-day', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.35.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAlmanacDayResponse, GetMonthlyAlmanacResponse, LookupAuspiciousDaysResponse } from '../types/index.js';\n\nexport interface RoxyAlmanacDayProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAlmanacDayResponse | GetMonthlyAlmanacResponse | LookupAuspiciousDaysResponse;\n\t/** Which read the response is: one almanac day as a card, a whole month of them as rows, or the days a search returned for one activity. */\n\tmode?: 'day' | 'month' | 'auspicious';\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAlmanacDay = defineComponent({\n\tname: 'RoxyAlmanacDay',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAlmanacDayProps['data']> },\n\t\tmode: { type: String as PropType<RoxyAlmanacDayProps['mode']> },\n\t\tendpoint: { type: String as PropType<RoxyAlmanacDayProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAlmanacDayProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAlmanacDayProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAlmanacDayProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAlmanacDayProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAlmanacDayProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAlmanacDayProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAlmanacDayProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAlmanacDayProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAlmanacDayProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAlmanacDayProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAlmanacDayProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAlmanacDayProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAlmanacDayProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.mode !== undefined) elementProps['.mode'] = props.mode;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-almanac-day', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.37.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAlmanacDay", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as g,h as s,onMounted as p,ref as f}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as g,h as s,onMounted as p,ref as f}from"vue";var u="0.37.0",d="roxyapi-ui-loader",m="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",b="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",c="/dist/cdn",i=null;function y(e){return!e||e==="latest"?m:`${b}${e}${c}`}function a(e=u,r){return typeof document>"u"?Promise.resolve():i||(i=new Promise((n,o)=>{let l=`${r??y(e)}/roxy-ui.js`,t=document.getElementById(d);if(t){t.dataset.loaded==="true"?n():(t.addEventListener("load",()=>n()),t.addEventListener("error",()=>o(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=d,t.src=l,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",n()}),t.addEventListener("error",()=>o(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),i)}var R=g({name:"RoxyAngelNumberCard",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},submitUrl:{type:String},submitContext:{type:Object},locationUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},remember:{type:Boolean},attribution:{type:String},hideReadings:{type:Boolean},hideSections:{type:String}},setup(e){let r=f(null);return p(()=>{a().catch(n=>{r.value=n instanceof Error?n:new Error(String(n))})}),()=>{if(r.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${r.value.message}`);let n={};return e.data!==void 0&&(n[".data"]=e.data),e.endpoint!==void 0&&(n[".endpoint"]=e.endpoint),e.method!==void 0&&(n[".method"]=e.method),e.publishableKey!==void 0&&(n[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(n[".baseUrl"]=e.baseUrl),e.submitUrl!==void 0&&(n[".submitUrl"]=e.submitUrl),e.submitContext!==void 0&&(n[".submitContext"]=e.submitContext),e.locationUrl!==void 0&&(n[".locationUrl"]=e.locationUrl),e.specUrl!==void 0&&(n[".specUrl"]=e.specUrl),e.lang!==void 0&&(n[".lang"]=e.lang),e.submitLabel!==void 0&&(n[".submitLabel"]=e.submitLabel),e.remember!==void 0&&(n[".remember"]=e.remember),e.attribution!==void 0&&(n[".attribution"]=e.attribution),e.hideReadings!==void 0&&(n[".hideReadings"]=e.hideReadings),e.hideSections!==void 0&&(n[".hideSections"]=e.hideSections),s("roxy-angel-number-card",n)}}});export{R as RoxyAngelNumberCard};
|
|
2
2
|
//# sourceMappingURL=angel-number-card.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/angel-number-card.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAngelNumberResponse } from '../types/index.js';\n\nexport interface RoxyAngelNumberCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAngelNumberResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAngelNumberCard = defineComponent({\n\tname: 'RoxyAngelNumberCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAngelNumberCardProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyAngelNumberCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAngelNumberCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAngelNumberCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAngelNumberCardProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAngelNumberCardProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAngelNumberCardProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAngelNumberCardProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAngelNumberCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAngelNumberCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAngelNumberCardProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAngelNumberCardProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAngelNumberCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAngelNumberCardProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAngelNumberCardProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-angel-number-card', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.35.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { GetAngelNumberResponse } from '../types/index.js';\n\nexport interface RoxyAngelNumberCardProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: GetAngelNumberResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAngelNumberCard = defineComponent({\n\tname: 'RoxyAngelNumberCard',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAngelNumberCardProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyAngelNumberCardProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAngelNumberCardProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAngelNumberCardProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAngelNumberCardProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAngelNumberCardProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAngelNumberCardProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAngelNumberCardProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAngelNumberCardProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAngelNumberCardProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAngelNumberCardProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAngelNumberCardProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAngelNumberCardProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAngelNumberCardProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAngelNumberCardProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-angel-number-card', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.37.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAngelNumberCard", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as y,h as a,onMounted as g,ref as f}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as y,h as a,onMounted as g,ref as f}from"vue";var u="0.37.0",d="roxyapi-ui-loader",m="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",p="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",b="/dist/cdn",r=null;function c(e){return!e||e==="latest"?m:`${p}${e}${b}`}function s(e=u,o){return typeof document>"u"?Promise.resolve():r||(r=new Promise((n,i)=>{let l=`${o??c(e)}/roxy-ui.js`,t=document.getElementById(d);if(t){t.dataset.loaded==="true"?n():(t.addEventListener("load",()=>n()),t.addEventListener("error",()=>i(new Error("roxy-ui load failed"))));return}t=document.createElement("script"),t.id=d,t.src=l,t.async=!0,t.crossOrigin="anonymous",t.addEventListener("load",()=>{t.dataset.loaded="true",n()}),t.addEventListener("error",()=>i(new Error("roxy-ui load failed"))),document.head.appendChild(t)}),r)}var h=y({name:"RoxyAngelNumberLookup",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},submitUrl:{type:String},submitContext:{type:Object},locationUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},remember:{type:Boolean},attribution:{type:String},hideReadings:{type:Boolean},hideSections:{type:String}},setup(e){let o=f(null);return g(()=>{s().catch(n=>{o.value=n instanceof Error?n:new Error(String(n))})}),()=>{if(o.value)return a("div",{role:"alert"},`Roxy UI script load failed: ${o.value.message}`);let n={};return e.data!==void 0&&(n[".data"]=e.data),e.endpoint!==void 0&&(n[".endpoint"]=e.endpoint),e.method!==void 0&&(n[".method"]=e.method),e.publishableKey!==void 0&&(n[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(n[".baseUrl"]=e.baseUrl),e.submitUrl!==void 0&&(n[".submitUrl"]=e.submitUrl),e.submitContext!==void 0&&(n[".submitContext"]=e.submitContext),e.locationUrl!==void 0&&(n[".locationUrl"]=e.locationUrl),e.specUrl!==void 0&&(n[".specUrl"]=e.specUrl),e.lang!==void 0&&(n[".lang"]=e.lang),e.submitLabel!==void 0&&(n[".submitLabel"]=e.submitLabel),e.remember!==void 0&&(n[".remember"]=e.remember),e.attribution!==void 0&&(n[".attribution"]=e.attribution),e.hideReadings!==void 0&&(n[".hideReadings"]=e.hideReadings),e.hideSections!==void 0&&(n[".hideSections"]=e.hideSections),a("roxy-angel-number-lookup",n)}}});export{h as RoxyAngelNumberLookup};
|
|
2
2
|
//# sourceMappingURL=angel-number-lookup.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/components/angel-number-lookup.ts", "../../src/load-ui.ts"],
|
|
4
|
-
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AnalyzeNumberSequenceResponse } from '../types/index.js';\n\nexport interface RoxyAngelNumberLookupProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AnalyzeNumberSequenceResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAngelNumberLookup = defineComponent({\n\tname: 'RoxyAngelNumberLookup',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAngelNumberLookupProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyAngelNumberLookupProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAngelNumberLookupProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAngelNumberLookupProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAngelNumberLookupProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAngelNumberLookupProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAngelNumberLookupProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAngelNumberLookupProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAngelNumberLookupProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAngelNumberLookupProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAngelNumberLookupProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAngelNumberLookupProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAngelNumberLookupProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAngelNumberLookupProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAngelNumberLookupProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-angel-number-lookup', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.35.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
4
|
+
"sourcesContent": ["import { defineComponent, h, onMounted, type PropType, ref } from 'vue';\nimport { ensureScriptLoaded } from '../load-ui.js';\nimport type { AnalyzeNumberSequenceResponse } from '../types/index.js';\n\nexport interface RoxyAngelNumberLookupProps {\n\t/** Spec-derived response payload. Pass the raw RoxyAPI response. */\n\tdata?: AnalyzeNumberSequenceResponse;\n\t/** Endpoint path for built-in self-fetch (uncontrolled mode), e.g. \"astrology/natal-chart\". The component renders its own input form, fetches with the publishable key, and displays the result. Leave unset for controlled mode (pass `data`). */\n\tendpoint?: string;\n\t/** HTTP method for the self-fetch request. Defaults to POST. */\n\tmethod?: 'GET' | 'POST';\n\t/** Browser-safe publishable key (pk_) for self-fetch. A secret key is refused client-side and never sent. */\n\tpublishableKey?: string;\n\t/** Override the API origin for self-hosted or proxied deployments. Absolute, or relative to the page for a same-origin route. */\n\tbaseUrl?: string;\n\t/** Your own backend route, which holds the secret key. Self-fetch POSTs `{ path, method, body, query }` there instead of calling RoxyAPI directly and renders the JSON your route returns, so no key of any kind reaches the browser. */\n\tsubmitUrl?: string;\n\t/** An object of your own, sent to your submitUrl route as `context` beside the request, so a page can attach its own verification data to a proxied submission. Passed through untouched and never read by the component: what it holds is for your page and your route to agree on. Unset, nothing is added and the route receives the request exactly as before. Rides the submitUrl path only; a direct call sends what the endpoint declares. */\n\tsubmitContext?: Record<string, unknown>;\n\t/** Where the self-fetch form city search sends its request, absolute or relative to the page. The companion of submitUrl: the city search is a GET the form issues on its own while a visitor types, so a page that routes its API traffic through its own server names that route here as well. Unset, the search calls the public location endpoint. */\n\tlocationUrl?: string;\n\t/** Override the OpenAPI spec URL the self-fetch form introspects. */\n\tspecUrl?: string;\n\t/** Response language for self-fetch, forwarded to the API `lang` query parameter (en, tr, de, es, hi, pt, fr, ru). The form never shows a language field; the site owner sets it here. Defaults to English. */\n\tlang?: string;\n\t/** Override the self-fetch form submit-button label. Empty derives an outcome-first label from the endpoint (Get reading, Generate, Compare, Cast). */\n\tsubmitLabel?: string;\n\t/** Persist the last self-fetch form values in sessionStorage, keyed by endpoint, and prefill the form when the visitor returns. Off by default. */\n\tremember?: boolean;\n\t/** Render a small \"Spiritual data by RoxyAPI\" credit under a self-fetch result, linking back to RoxyAPI. Off by default; set any value to enable, or \"off\" to force it off. Never shown in controlled mode. */\n\tattribution?: string;\n\t/** Render the chart and the data and omit the written interpretation. Off by default. Use it when the page supplies its own words: the wheels, tables, grids, legends and numbers stay, and the interpretive prose is left out of the markup entirely. */\n\thideReadings?: boolean;\n\t/** Comma-separated list of `part` names to take off this component, for example \"patterns\" or \"patterns, legend\". Per element rather than per site, so the same component can drop a block on one page and keep it on another with no CSS. Sibling of hideReadings and a different tool: this hides a whole block whatever it contains, where hideReadings drops interpretive prose out of the markup. Names come from the `parts` array in components-catalog.json; a name the component does not carry hides nothing and is not an error. */\n\thideSections?: string;\n}\n\nexport const RoxyAngelNumberLookup = defineComponent({\n\tname: 'RoxyAngelNumberLookup',\n\tprops: {\n\t\tdata: { type: Object as PropType<RoxyAngelNumberLookupProps['data']> },\n\t\tendpoint: { type: String as PropType<RoxyAngelNumberLookupProps['endpoint']> },\n\t\tmethod: { type: String as PropType<RoxyAngelNumberLookupProps['method']> },\n\t\tpublishableKey: { type: String as PropType<RoxyAngelNumberLookupProps['publishableKey']> },\n\t\tbaseUrl: { type: String as PropType<RoxyAngelNumberLookupProps['baseUrl']> },\n\t\tsubmitUrl: { type: String as PropType<RoxyAngelNumberLookupProps['submitUrl']> },\n\t\tsubmitContext: { type: Object as PropType<RoxyAngelNumberLookupProps['submitContext']> },\n\t\tlocationUrl: { type: String as PropType<RoxyAngelNumberLookupProps['locationUrl']> },\n\t\tspecUrl: { type: String as PropType<RoxyAngelNumberLookupProps['specUrl']> },\n\t\tlang: { type: String as PropType<RoxyAngelNumberLookupProps['lang']> },\n\t\tsubmitLabel: { type: String as PropType<RoxyAngelNumberLookupProps['submitLabel']> },\n\t\tremember: { type: Boolean as PropType<RoxyAngelNumberLookupProps['remember']> },\n\t\tattribution: { type: String as PropType<RoxyAngelNumberLookupProps['attribution']> },\n\t\thideReadings: { type: Boolean as PropType<RoxyAngelNumberLookupProps['hideReadings']> },\n\t\thideSections: { type: String as PropType<RoxyAngelNumberLookupProps['hideSections']> },\n\t},\n\tsetup(props) {\n\t\tconst loadError = ref<Error | null>(null);\n\n\t\tonMounted(() => {\n\t\t\tensureScriptLoaded().catch((err: unknown) => {\n\t\t\t\tloadError.value = err instanceof Error ? err : new Error(String(err));\n\t\t\t});\n\t\t});\n\n\t\treturn () => {\n\t\t\tif (loadError.value) {\n\t\t\t\treturn h(\n\t\t\t\t\t'div',\n\t\t\t\t\t{ role: 'alert' },\n\t\t\t\t\t`Roxy UI script load failed: ${loadError.value.message}`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst elementProps: Record<string, unknown> = {};\n\t\t\tif (props.data !== undefined) elementProps['.data'] = props.data;\n\t\t\tif (props.endpoint !== undefined) elementProps['.endpoint'] = props.endpoint;\n\t\t\tif (props.method !== undefined) elementProps['.method'] = props.method;\n\t\t\tif (props.publishableKey !== undefined) elementProps['.publishableKey'] = props.publishableKey;\n\t\t\tif (props.baseUrl !== undefined) elementProps['.baseUrl'] = props.baseUrl;\n\t\t\tif (props.submitUrl !== undefined) elementProps['.submitUrl'] = props.submitUrl;\n\t\t\tif (props.submitContext !== undefined) elementProps['.submitContext'] = props.submitContext;\n\t\t\tif (props.locationUrl !== undefined) elementProps['.locationUrl'] = props.locationUrl;\n\t\t\tif (props.specUrl !== undefined) elementProps['.specUrl'] = props.specUrl;\n\t\t\tif (props.lang !== undefined) elementProps['.lang'] = props.lang;\n\t\t\tif (props.submitLabel !== undefined) elementProps['.submitLabel'] = props.submitLabel;\n\t\t\tif (props.remember !== undefined) elementProps['.remember'] = props.remember;\n\t\t\tif (props.attribution !== undefined) elementProps['.attribution'] = props.attribution;\n\t\t\tif (props.hideReadings !== undefined) elementProps['.hideReadings'] = props.hideReadings;\n\t\t\tif (props.hideSections !== undefined) elementProps['.hideSections'] = props.hideSections;\n\n\t\t\treturn h('roxy-angel-number-lookup', elementProps);\n\t\t};\n\t},\n});\n", "/**\n * Loads the matching component bundle on first mount. Idempotent across\n * many components on the same page. Skips on the server (no document) so\n * Nuxt and Vue server rendering work without a flash.\n *\n * {@link ensureLocaleLoaded} is the other half and is OPT-IN: it loads the label\n * catalogue for one language from the same release, so a non-English app calls\n * both. There is one catalogue, shipped by `@roxyapi/ui` and read by every\n * wrapper, so nothing is restated here.\n *\n * Defaults to the EXACT @roxyapi/ui release this wrapper was built against, so\n * `@roxyapi/ui-vue@x.y.z` always runs `@roxyapi/ui@x.y.z` and a lockfile actually\n * pins the runtime. It used to default to '@latest', which meant a pinned wrapper\n * silently picked up whatever the CDN was serving, and a new @roxyapi/ui release\n * changed the elements under every existing install with no lockfile change.\n *\n * Pass an explicit `version` to override, or 'latest' to opt back into floating.\n *\n * Pass `baseUrl` to serve the bundle from your own origin instead of the CDN, which is\n * what an air-gapped install or a strict Content-Security-Policy needs: copy\n * `node_modules/@roxyapi/ui/dist/cdn/` onto your host and call this once at app entry,\n * before any component mounts. The loader keeps a single shared promise, so the first\n * call wins and every component reuses it.\n */\n/** The @roxyapi/ui release this wrapper was generated against. The loader defaults to it, so the wrapper version in your lockfile is the runtime you actually get. */\nexport const ROXY_UI_VERSION = \"0.37.0\";\n\nconst SCRIPT_ID = 'roxyapi-ui-loader';\nconst CDN_BASE_LATEST = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn\";\nconst CDN_BASE_PREFIX = \"https://cdn.jsdelivr.net/npm/@roxyapi/ui@\";\nconst CDN_BASE_SUFFIX = \"/dist/cdn\";\n\nlet loaded: Promise<void> | null = null;\n\nfunction buildBase(version: string): string {\n\tif (!version || version === 'latest') return CDN_BASE_LATEST;\n\treturn `${CDN_BASE_PREFIX}${version}${CDN_BASE_SUFFIX}`;\n}\n\nexport function ensureScriptLoaded(\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tif (loaded) return loaded;\n\n\tloaded = new Promise<void>((resolve, reject) => {\n\t\tconst url = `${baseUrl ?? buildBase(version)}/roxy-ui.js`;\n\t\tlet existing = document.getElementById(SCRIPT_ID) as HTMLScriptElement | null;\n\t\tif (existing) {\n\t\t\tif (existing.dataset.loaded === 'true') {\n\t\t\t\tresolve();\n\t\t\t} else {\n\t\t\t\texisting.addEventListener('load', () => resolve());\n\t\t\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\texisting = document.createElement('script');\n\t\texisting.id = SCRIPT_ID;\n\t\texisting.src = url;\n\t\texisting.async = true;\n\t\texisting.crossOrigin = 'anonymous';\n\t\texisting.addEventListener('load', () => {\n\t\t\texisting!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\texisting.addEventListener('error', () => reject(new Error('roxy-ui load failed')));\n\t\tdocument.head.appendChild(existing);\n\t});\n\treturn loaded;\n}\n\n/** Every language a label catalogue ships for. English is absent on purpose: the catalogue key IS the English string, so an English page downloads nothing. */\nexport const ROXY_UI_LOCALES = [\"de\",\"es\",\"fr\",\"hi\",\"pt\",\"ru\",\"tr\",\"zh-Hans\",\"zh-Hant\"] as const;\n\nconst localesLoaded = new Map<string, Promise<void>>();\n\n/**\n * Load the label catalogue for one language, so the components write their own\n * headings, buttons, empty states and form labels in it.\n *\n * Call it once at app entry, beside `ensureScriptLoaded`. The components read the\n * language from the page (their own `lang` attribute, the nearest ancestor\n * carrying one, or `<html lang>`), so this call supplies the WORDS and the page\n * supplies the CHOICE. Loading a catalogue a page never asks for is harmless.\n *\n * `es-AR`, `es-MX` and `es-419` all resolve to the `es` catalogue, so pass the\n * page tag as it stands. English resolves to nothing at all and is not an error:\n * the catalogue is keyed by the English text, so an English page needs no payload.\n * A language outside `ROXY_UI_LOCALES` resolves the same way rather than appending\n * a script tag that 404s.\n *\n * `version` and `baseUrl` behave exactly as they do for {@link ensureScriptLoaded},\n * and passing the same `baseUrl` to both is what an air-gapped or strict-CSP host\n * needs: copy `node_modules/@roxyapi/ui/dist/cdn/` onto your own origin, which\n * carries `locales/` beside `roxy-ui.js`.\n *\n * @example\n * ```ts\n * import { ensureScriptLoaded, ensureLocaleLoaded } from '@roxyapi/ui-vue';\n *\n * ensureScriptLoaded();\n * ensureLocaleLoaded(document.documentElement.lang);\n * ```\n */\nexport function ensureLocaleLoaded(\n\tlang: string,\n\tversion: string = ROXY_UI_VERSION,\n\tbaseUrl?: string,\n): Promise<void> {\n\tif (typeof document === 'undefined') return Promise.resolve();\n\tconst base = (lang || '').toLowerCase().split('-')[0] ?? '';\n\tif (!(ROXY_UI_LOCALES as readonly string[]).includes(base)) {\n\t\treturn Promise.resolve();\n\t}\n\tconst existing = localesLoaded.get(base);\n\tif (existing) return existing;\n\n\tconst pending = new Promise<void>((resolve, reject) => {\n\t\tconst id = `${SCRIPT_ID}-locale-${base}`;\n\t\tlet el = document.getElementById(id) as HTMLScriptElement | null;\n\t\tif (el) {\n\t\t\tif (el.dataset.loaded === 'true') resolve();\n\t\t\telse {\n\t\t\t\tel.addEventListener('load', () => resolve());\n\t\t\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tel = document.createElement('script');\n\t\tel.id = id;\n\t\tel.src = `${baseUrl ?? buildBase(version)}/locales/${base}.js`;\n\t\tel.async = true;\n\t\tel.crossOrigin = 'anonymous';\n\t\tel.addEventListener('load', () => {\n\t\t\tel!.dataset.loaded = 'true';\n\t\t\tresolve();\n\t\t});\n\t\tel.addEventListener('error', () => reject(new Error(`roxy-ui locale ${base} load failed`)));\n\t\tdocument.head.appendChild(el);\n\t});\n\tlocalesLoaded.set(base, pending);\n\treturn pending;\n}\n\n// Default export retained for convenience; matches the named export.\nexport default ensureScriptLoaded;\n// Surfaces the embedded @roxyapi/ui version this build of @roxyapi/ui-vue\n// was generated against. Useful for diagnostics; not load-bearing.\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": ["defineComponent", "h", "onMounted", "ref", "ROXY_UI_VERSION", "SCRIPT_ID", "CDN_BASE_LATEST", "CDN_BASE_PREFIX", "CDN_BASE_SUFFIX", "loaded", "buildBase", "version", "ensureScriptLoaded", "baseUrl", "resolve", "reject", "url", "existing", "RoxyAngelNumberLookup", "defineComponent", "props", "loadError", "ref", "onMounted", "ensureScriptLoaded", "err", "h", "elementProps"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as P,h as s,onMounted as f,ref as b}from"vue";var u="0.
|
|
1
|
+
import{defineComponent as P,h as s,onMounted as f,ref as b}from"vue";var u="0.37.0",d="roxyapi-ui-loader",c="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/cdn",y="https://cdn.jsdelivr.net/npm/@roxyapi/ui@",m="/dist/cdn",i=null;function p(e){return!e||e==="latest"?c:`${y}${e}${m}`}function o(e=u,r){return typeof document>"u"?Promise.resolve():i||(i=new Promise((t,a)=>{let l=`${r??p(e)}/roxy-ui.js`,n=document.getElementById(d);if(n){n.dataset.loaded==="true"?t():(n.addEventListener("load",()=>t()),n.addEventListener("error",()=>a(new Error("roxy-ui load failed"))));return}n=document.createElement("script"),n.id=d,n.src=l,n.async=!0,n.crossOrigin="anonymous",n.addEventListener("load",()=>{n.dataset.loaded="true",t()}),n.addEventListener("error",()=>a(new Error("roxy-ui load failed"))),document.head.appendChild(n)}),i)}var R=P({name:"RoxyArudhaPadas",props:{data:{type:Object},endpoint:{type:String},method:{type:String},publishableKey:{type:String},baseUrl:{type:String},submitUrl:{type:String},submitContext:{type:Object},locationUrl:{type:String},specUrl:{type:String},lang:{type:String},submitLabel:{type:String},remember:{type:Boolean},attribution:{type:String},hideReadings:{type:Boolean},hideSections:{type:String}},setup(e){let r=b(null);return f(()=>{o().catch(t=>{r.value=t instanceof Error?t:new Error(String(t))})}),()=>{if(r.value)return s("div",{role:"alert"},`Roxy UI script load failed: ${r.value.message}`);let t={};return e.data!==void 0&&(t[".data"]=e.data),e.endpoint!==void 0&&(t[".endpoint"]=e.endpoint),e.method!==void 0&&(t[".method"]=e.method),e.publishableKey!==void 0&&(t[".publishableKey"]=e.publishableKey),e.baseUrl!==void 0&&(t[".baseUrl"]=e.baseUrl),e.submitUrl!==void 0&&(t[".submitUrl"]=e.submitUrl),e.submitContext!==void 0&&(t[".submitContext"]=e.submitContext),e.locationUrl!==void 0&&(t[".locationUrl"]=e.locationUrl),e.specUrl!==void 0&&(t[".specUrl"]=e.specUrl),e.lang!==void 0&&(t[".lang"]=e.lang),e.submitLabel!==void 0&&(t[".submitLabel"]=e.submitLabel),e.remember!==void 0&&(t[".remember"]=e.remember),e.attribution!==void 0&&(t[".attribution"]=e.attribution),e.hideReadings!==void 0&&(t[".hideReadings"]=e.hideReadings),e.hideSections!==void 0&&(t[".hideSections"]=e.hideSections),s("roxy-arudha-padas",t)}}});export{R as RoxyArudhaPadas};
|
|
2
2
|
//# sourceMappingURL=arudha-padas.js.map
|