@roxyapi/ui 0.18.3 → 0.18.5
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 +109 -109
- package/dist/cdn/components/dasha-timeline.js +1 -1
- package/dist/cdn/components/dasha-timeline.js.map +2 -2
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +1 -1
- package/dist/cdn/components/tarot-spread.js +2 -2
- package/dist/cdn/components/tarot-spread.js.map +3 -3
- package/dist/cdn/roxy-ui.js +7 -7
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/components/dasha-timeline.d.ts.map +1 -1
- package/dist/components/dasha-timeline.js +1 -1
- package/dist/components/dasha-timeline.js.map +2 -2
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +1 -1
- package/dist/components/tarot-spread.d.ts +0 -4
- package/dist/components/tarot-spread.d.ts.map +1 -1
- package/dist/components/tarot-spread.js +1 -1
- package/dist/components/tarot-spread.js.map +3 -3
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +3 -3
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/dasha-timeline.ts +6 -1
- package/src/components/tarot-spread.ts +18 -4
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROXY_UI_VERSION = "0.18.
|
|
1
|
+
export declare const ROXY_UI_VERSION = "0.18.5";
|
|
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.18.
|
|
3
|
+
"version": "0.18.5",
|
|
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",
|
|
@@ -270,7 +270,12 @@ export class RoxyDashaTimeline extends RoxyDataElement<DashaData> {
|
|
|
270
270
|
...(readings.length
|
|
271
271
|
? [{ id: 'readings' as const, label: `Readings (${readings.length})` }]
|
|
272
272
|
: []),
|
|
273
|
-
|
|
273
|
+
// "Chart details", never "Chart": this panel is the sidereal frame the
|
|
274
|
+
// dates came from, not a wheel. A reader who clicks a tab labelled Chart
|
|
275
|
+
// expects to see one drawn.
|
|
276
|
+
...(frame.length
|
|
277
|
+
? [{ id: 'frame' as const, label: 'Chart details' }]
|
|
278
|
+
: []),
|
|
274
279
|
];
|
|
275
280
|
// A tab that no longer exists (data changed under a selection) must not
|
|
276
281
|
// blank the card, so fall back to the first.
|
|
@@ -27,6 +27,11 @@ type TarotSpreadData =
|
|
|
27
27
|
* Tarot spread card. Renders /tarot/spreads/{three-card,celtic-cross,love},
|
|
28
28
|
* /tarot/yes-no, /tarot/draw responses.
|
|
29
29
|
*/
|
|
30
|
+
/** "three card" -> "Three card". Spread names arrive lowercase from both the API and the attribute, and a heading should not. */
|
|
31
|
+
function titleCase(v: string): string {
|
|
32
|
+
return v ? v.charAt(0).toUpperCase() + v.slice(1) : v;
|
|
33
|
+
}
|
|
34
|
+
|
|
30
35
|
@customElement('roxy-tarot-spread')
|
|
31
36
|
export class RoxyTarotSpread extends RoxyDataElement<TarotSpreadData> {
|
|
32
37
|
static styles = [
|
|
@@ -203,10 +208,19 @@ export class RoxyTarotSpread extends RoxyDataElement<TarotSpreadData> {
|
|
|
203
208
|
const answer = isYesNo ? (d as CastYesNoResponse).answer : undefined;
|
|
204
209
|
const strength = isYesNo ? (d as CastYesNoResponse).strength : undefined;
|
|
205
210
|
const verdictCard = isYesNo ? (d as CastYesNoResponse).card : undefined;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
// Title from the RESPONSE SHAPE first, the attribute only as a last resort.
|
|
212
|
+
// The API sends `spread: null` on several casts, and a host that cannot set
|
|
213
|
+
// attributes (the WordPress plugin maps an operationId to a bare tag) always
|
|
214
|
+
// falls through to the property default, so a yes or no reading was headed
|
|
215
|
+
// "three card". Reading the shape means the heading is right either way.
|
|
216
|
+
const spreadLabel = isYesNo
|
|
217
|
+
? 'Yes or no'
|
|
218
|
+
: isDrawn
|
|
219
|
+
? 'Card draw'
|
|
220
|
+
: titleCase(
|
|
221
|
+
('spread' in d ? (d as CastThreeCardResponse).spread : '') ||
|
|
222
|
+
this.spread.replace(/-/g, ' '),
|
|
223
|
+
);
|
|
210
224
|
const question =
|
|
211
225
|
'question' in d ? (d as CastThreeCardResponse).question : undefined;
|
|
212
226
|
const summary =
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/sync-version.ts. Do not edit.
|
|
2
|
-
export const ROXY_UI_VERSION = '0.18.
|
|
2
|
+
export const ROXY_UI_VERSION = '0.18.5';
|