@roxyapi/ui 0.42.1 → 0.43.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/components-catalog.json +151 -151
- package/dist/cdn/components/endpoint-form.js +3 -3
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/locales/de.js +1 -1
- package/dist/cdn/locales/de.js.map +2 -2
- package/dist/cdn/locales/fr.js +1 -1
- package/dist/cdn/locales/fr.js.map +2 -2
- package/dist/cdn/locales/pt.js +1 -1
- package/dist/cdn/locales/pt.js.map +1 -1
- package/dist/cdn/roxy-ui.js +18 -18
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/components/endpoint-form.d.ts +1 -1
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +3 -3
- package/dist/index.cjs +19 -19
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +19 -19
- package/dist/index.js.map +3 -3
- package/dist/locales/de.js +1 -1
- package/dist/locales/de.js.map +2 -2
- package/dist/locales/fr.js +1 -1
- package/dist/locales/fr.js.map +2 -2
- package/dist/locales/pt.js +1 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/schemas/get--vedic-astrology-kp-ayanamsa.json +1 -1
- package/dist/schemas/post--astrology-arabic-lots.json +1 -1
- package/dist/schemas/post--astrology-aspect-patterns.json +1 -1
- package/dist/schemas/post--astrology-asteroids.json +1 -1
- package/dist/schemas/post--astrology-astrocartography.json +1 -1
- package/dist/schemas/post--astrology-compatibility-score.json +1 -1
- package/dist/schemas/post--astrology-composite-chart.json +1 -1
- package/dist/schemas/post--astrology-fixed-stars.json +1 -1
- package/dist/schemas/post--astrology-lilith.json +1 -1
- package/dist/schemas/post--astrology-local-space.json +1 -1
- package/dist/schemas/post--astrology-natal-chart.json +1 -1
- package/dist/schemas/post--astrology-profections.json +1 -1
- package/dist/schemas/post--astrology-progressions.json +1 -1
- package/dist/schemas/post--astrology-relocation-chart.json +1 -1
- package/dist/schemas/post--astrology-solar-arc.json +1 -1
- package/dist/schemas/post--astrology-synastry.json +1 -1
- package/dist/schemas/post--astrology-transit-aspects.json +1 -1
- package/dist/schemas/post--chinese-astrology-bazi-annual-forecast.json +1 -1
- package/dist/schemas/post--chinese-astrology-bazi-chart.json +1 -1
- package/dist/schemas/post--chinese-astrology-bazi-compatibility.json +1 -1
- package/dist/schemas/post--chinese-astrology-bazi-day-master.json +1 -1
- package/dist/schemas/post--chinese-astrology-bazi-luck-pillars.json +1 -1
- package/dist/schemas/post--forecast-digest.json +1 -1
- package/dist/schemas/post--forecast-significant-dates.json +1 -1
- package/dist/schemas/post--forecast-solar-return.json +1 -1
- package/dist/schemas/post--forecast-timeline.json +1 -1
- package/dist/schemas/post--forecast-transits.json +1 -1
- package/dist/schemas/post--human-design-bodygraph.json +1 -1
- package/dist/schemas/post--human-design-centers.json +1 -1
- package/dist/schemas/post--human-design-channels.json +1 -1
- package/dist/schemas/post--human-design-connection.json +1 -1
- package/dist/schemas/post--human-design-gates.json +1 -1
- package/dist/schemas/post--human-design-profile.json +1 -1
- package/dist/schemas/post--human-design-transit.json +1 -1
- package/dist/schemas/post--human-design-type.json +1 -1
- package/dist/schemas/post--human-design-variables.json +1 -1
- package/dist/schemas/post--kabbalah-birth-profile.json +1 -1
- package/dist/schemas/post--numerology-compatibility.json +1 -1
- package/dist/schemas/post--vastu-timing-griha-pravesh.json +1 -1
- package/dist/schemas/post--vedic-astrology-arudha.json +1 -1
- package/dist/schemas/post--vedic-astrology-ashtakavarga.json +1 -1
- package/dist/schemas/post--vedic-astrology-bhav-chalit.json +1 -1
- package/dist/schemas/post--vedic-astrology-bhava-bala.json +1 -1
- package/dist/schemas/post--vedic-astrology-birth-chart.json +1 -1
- package/dist/schemas/post--vedic-astrology-chara-karakas.json +1 -1
- package/dist/schemas/post--vedic-astrology-compatibility.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-current.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-major.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha-sookshma.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha-pratyantardasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha-antardasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-dasha-sub-mahadasha.json +1 -1
- package/dist/schemas/post--vedic-astrology-divisional-chart.json +1 -1
- package/dist/schemas/post--vedic-astrology-dosha-kalsarpa.json +1 -1
- package/dist/schemas/post--vedic-astrology-dosha-manglik.json +1 -1
- package/dist/schemas/post--vedic-astrology-dosha-sadhesati.json +1 -1
- package/dist/schemas/post--vedic-astrology-navamsa.json +1 -1
- package/dist/schemas/post--vedic-astrology-planetary-positions.json +1 -1
- package/dist/schemas/post--vedic-astrology-shadbala.json +1 -1
- package/dist/schemas/post--vedic-astrology-upagraha.json +1 -1
- package/dist/schemas/post--vedic-astrology-yoga-detect.json +1 -1
- package/dist/styles/themes/practitioner.css +5 -5
- package/dist/types/types.gen.d.ts +88 -88
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/endpoint-form.ts +21 -9
- package/src/locales/field-labels/de.ts +1 -1
- package/src/locales/field-labels/fr.ts +1 -1
- package/src/locales/field-labels/pt.ts +1 -1
- package/src/styles/themes/practitioner.css +5 -5
- package/src/types/types.gen.ts +88 -88
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROXY_UI_VERSION = "0.
|
|
1
|
+
export declare const ROXY_UI_VERSION = "0.43.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roxyapi/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.0",
|
|
4
4
|
"description": "Web components for the RoxyAPI catalog. Drop-in charts, tables, cards, forms for astrology, tarot, numerology, biorhythm, I Ching, crystals, dreams, angel numbers, and more. One key, beautiful in 30 minutes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -113,7 +113,7 @@ function parseArrayValue(raw: string): unknown {
|
|
|
113
113
|
* @remarks
|
|
114
114
|
* Schema resolution order: an explicit `spec-url` fetches that full spec and digests it (unchanged, the demo path); otherwise the form tries a small version-pinned per-operation slice from the CDN, and on any miss falls back to fetching the production spec. Each input kind is chosen purely from the parameter shape (see {@link ../utils/field-schema.ts}), so a new endpoint gets a working, on-brand form with no per-endpoint code.
|
|
115
115
|
*
|
|
116
|
-
* The visitor-facing `lang` parameter is never rendered: a site owner sets the element `lang` attribute, and the form routes it to the query string on submit. Optional parameters collapse under one Advanced disclosure; a form whose only required field is an enum submits on selection.
|
|
116
|
+
* The visitor-facing `lang` parameter is never rendered: a site owner sets the element `lang` attribute, and the form routes it to the query string on submit. Optional parameters collapse under one Advanced disclosure behind the required ones; when nothing is required, every group and every undefaulted parameter renders in the open and only the defaulted ones collapse, so a request the schema can only describe as one of two optional shapes still shows its inputs. A form whose only required field is an enum submits on selection.
|
|
117
117
|
*
|
|
118
118
|
* **Two languages are in play here and they are different answers.** {@link RoxyLocalizedElement.effectiveLang} is the DISPLAY tag, region included, and it is what every `t()` call and the city search read. {@link RoxyEndpointForm.requestLang} is the WIRE value, region stripped and unsupported languages omitted, and it is what reaches `?lang=`. Swapping them is silent in both directions: the request one demotes every regional visitor, and the display one is a 400.
|
|
119
119
|
*
|
|
@@ -1081,12 +1081,24 @@ export class RoxyEndpointForm extends RoxyLocalizedElement {
|
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
1083
|
const flat = this.fields.filter((f) => !f.group && this.isRendered(f));
|
|
1084
|
-
const flatReq = flat.filter((f) => f.required);
|
|
1085
|
-
const flatOpt = flat.filter((f) => !f.required);
|
|
1086
1084
|
const named = this.groupKeys().filter((g): g is string => g !== undefined);
|
|
1087
1085
|
const reqGroups = named.filter((g) => this.groupIsRequired(g));
|
|
1088
|
-
|
|
1089
|
-
|
|
1086
|
+
// The disclosure keeps secondary inputs behind the primary ones. With nothing required
|
|
1087
|
+
// there is no primary input, so it would hide the only way to fill the form (an either-or
|
|
1088
|
+
// the schema cannot state: a name and date OR the three numbers). Then every group and
|
|
1089
|
+
// every undefaulted field is primary, and only the fields the API fills in itself stay
|
|
1090
|
+
// behind it.
|
|
1091
|
+
const hasPrimary =
|
|
1092
|
+
flat.some((f) => f.required) ||
|
|
1093
|
+
reqGroups.length > 0 ||
|
|
1094
|
+
this.groupHasLocation(undefined);
|
|
1095
|
+
const isOpen = (f: FieldDef) =>
|
|
1096
|
+
hasPrimary ? f.required : f.default === undefined;
|
|
1097
|
+
const openFields = flat.filter(isOpen);
|
|
1098
|
+
const tuckedFields = flat.filter((f) => !isOpen(f));
|
|
1099
|
+
const openGroups = hasPrimary ? reqGroups : named;
|
|
1100
|
+
const tuckedGroups = named.filter((g) => !openGroups.includes(g));
|
|
1101
|
+
const hasAdvanced = tuckedFields.length > 0 || tuckedGroups.length > 0;
|
|
1090
1102
|
|
|
1091
1103
|
return html`<form @submit=${this.onSubmit}>
|
|
1092
1104
|
<h2 part="title" class="title">${this.formTitle}</h2>
|
|
@@ -1098,15 +1110,15 @@ export class RoxyEndpointForm extends RoxyLocalizedElement {
|
|
|
1098
1110
|
</div>`
|
|
1099
1111
|
: nothing
|
|
1100
1112
|
}
|
|
1101
|
-
<div class="fields">${
|
|
1113
|
+
<div class="fields">${openFields.map((f) => this.renderField(f))}</div>
|
|
1102
1114
|
${this.groupHasLocation(undefined) ? this.locationBlock(undefined) : nothing}
|
|
1103
|
-
${
|
|
1115
|
+
${openGroups.map((g) => this.groupCard(g))}
|
|
1104
1116
|
${
|
|
1105
1117
|
hasAdvanced
|
|
1106
1118
|
? html`<details part="advanced" class="advanced">
|
|
1107
1119
|
<summary>${this.t('Advanced')}${chevron()}</summary>
|
|
1108
|
-
<div class="fields">${
|
|
1109
|
-
${
|
|
1120
|
+
<div class="fields">${tuckedFields.map((f) => this.renderField(f))}</div>
|
|
1121
|
+
${tuckedGroups.map((g) => this.groupCard(g))}
|
|
1110
1122
|
</details>`
|
|
1111
1123
|
: nothing
|
|
1112
1124
|
}
|
|
@@ -142,7 +142,7 @@ registerFieldLabels('de', {
|
|
|
142
142
|
rituZodiac: 'Tierkreis der Jahreszeitengrenzen',
|
|
143
143
|
road: 'Straßenseite',
|
|
144
144
|
rooms: 'Räume',
|
|
145
|
-
rulingPlanets: '
|
|
145
|
+
rulingPlanets: 'Herrscherplaneten',
|
|
146
146
|
scheme: 'Karaka-Schema',
|
|
147
147
|
secondName: 'Zweiter Name',
|
|
148
148
|
secondNameHebrew: 'Zweiter Name auf Hebräisch',
|
|
@@ -142,7 +142,7 @@ registerFieldLabels('fr', {
|
|
|
142
142
|
rituZodiac: 'Zodiaque des limites de saison',
|
|
143
143
|
road: 'Côté de la route',
|
|
144
144
|
rooms: 'Pièces',
|
|
145
|
-
rulingPlanets: 'Planètes
|
|
145
|
+
rulingPlanets: 'Planètes maîtresses',
|
|
146
146
|
scheme: 'Schéma de karakas',
|
|
147
147
|
secondName: 'Second nom',
|
|
148
148
|
secondNameHebrew: 'Second nom en hébreu',
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
font-style: normal;
|
|
28
28
|
font-weight: 400 600;
|
|
29
29
|
font-display: swap;
|
|
30
|
-
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.
|
|
30
|
+
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.43.0/dist/styles/fonts/fraunces/fraunces-latin.woff2")
|
|
31
31
|
format("woff2");
|
|
32
32
|
unicode-range:
|
|
33
33
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
font-style: normal;
|
|
39
39
|
font-weight: 400 600;
|
|
40
40
|
font-display: swap;
|
|
41
|
-
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.
|
|
41
|
+
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.43.0/dist/styles/fonts/fraunces/fraunces-latin-ext.woff2")
|
|
42
42
|
format("woff2");
|
|
43
43
|
unicode-range:
|
|
44
44
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
font-style: normal;
|
|
50
50
|
font-weight: 400 600;
|
|
51
51
|
font-display: swap;
|
|
52
|
-
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.
|
|
52
|
+
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.43.0/dist/styles/fonts/jost/jost-latin.woff2")
|
|
53
53
|
format("woff2");
|
|
54
54
|
unicode-range:
|
|
55
55
|
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
font-style: normal;
|
|
61
61
|
font-weight: 400 600;
|
|
62
62
|
font-display: swap;
|
|
63
|
-
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.
|
|
63
|
+
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.43.0/dist/styles/fonts/jost/jost-latin-ext.woff2")
|
|
64
64
|
format("woff2");
|
|
65
65
|
unicode-range:
|
|
66
66
|
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
font-style: normal;
|
|
72
72
|
font-weight: 400 600;
|
|
73
73
|
font-display: swap;
|
|
74
|
-
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.
|
|
74
|
+
src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.43.0/dist/styles/fonts/jost/jost-cyrillic.woff2")
|
|
75
75
|
format("woff2");
|
|
76
76
|
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
77
77
|
}
|