@oddsmith/ui 1.0.6 → 1.0.8
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/README.md +7 -5
- package/dist/assets/config/data.js +2 -2
- package/dist/constants/default-data.d.ts +2 -2
- package/dist/container/os-leaderboard-casino.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/store/casino.store.d.ts +4 -4
- package/dist/types/data.d.ts +19 -17
- package/dist/types/host.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/public.d.ts +1 -1
- package/dist/utils/data-resolve.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvedLeaderboardData, LeaderboardStatus, HeroView, PrizeView, StatsView, GamesView, ClimbView, TableView, MarqueeView, EventsBannerView, FooterView, LegalsView } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Data-only store for a single board instance.
|
|
4
4
|
* Bootstrap hydrates once; sections pull view slices via getters.
|
|
5
5
|
*
|
|
6
|
-
* Views are projected from {@link
|
|
6
|
+
* Views are projected from {@link ResolvedLeaderboardData} only — no demo/fallback fill-in.
|
|
7
7
|
* Image URLs are copied from host data as-is.
|
|
8
8
|
*/
|
|
9
9
|
export declare class CasinoStore {
|
|
@@ -11,11 +11,11 @@ export declare class CasinoStore {
|
|
|
11
11
|
private demo;
|
|
12
12
|
/** Demo countdown roll — only if the campaign was not already over at hydrate. */
|
|
13
13
|
private demoRollClock;
|
|
14
|
-
hydrate(data:
|
|
14
|
+
hydrate(data: ResolvedLeaderboardData, demo?: boolean): void;
|
|
15
15
|
clear(): void;
|
|
16
16
|
isReady(): boolean;
|
|
17
17
|
isDemo(): boolean;
|
|
18
|
-
getData():
|
|
18
|
+
getData(): ResolvedLeaderboardData;
|
|
19
19
|
/**
|
|
20
20
|
* Derived from data.hero startsAt / endsAt / cancelled.
|
|
21
21
|
* Demo boards that loaded already finished stay finished.
|
package/dist/types/data.d.ts
CHANGED
|
@@ -15,26 +15,11 @@ export type { PlayerData } from '../sections/table-section/types/data.js';
|
|
|
15
15
|
export type { MarqueeItemData, MarqueeData, } from '../sections/marquee-section/types/data.js';
|
|
16
16
|
export type { EventItemData, EventsData, } from '../sections/events-banner/types/data.js';
|
|
17
17
|
export type { ExternalLegalLink, InternalLegalLink, LegalLinkData, LegalsData, } from '../sections/legals-section/types/data.js';
|
|
18
|
-
/** Resolved campaign. The store always sees this shape after mix. */
|
|
19
|
-
export type LeaderboardData = {
|
|
20
|
-
hero: HeroData;
|
|
21
|
-
/** ISO 4217 (e.g. `USD`). Applies to every money amount. */
|
|
22
|
-
currency: string;
|
|
23
|
-
/** BCP 47 tag (e.g. `en-US`). Drives all date and number formatting. */
|
|
24
|
-
locale: string;
|
|
25
|
-
games?: GameData[];
|
|
26
|
-
prizes?: PrizeData[];
|
|
27
|
-
players?: PlayerData[];
|
|
28
|
-
stats?: StatsData;
|
|
29
|
-
marquee?: MarqueeData;
|
|
30
|
-
events?: EventsData;
|
|
31
|
-
legals?: LegalsData;
|
|
32
|
-
};
|
|
33
18
|
/**
|
|
34
|
-
* Host `.data`
|
|
19
|
+
* Host `.data` (`LeaderboardHostProps.data`).
|
|
35
20
|
* Mix rule: omit key → default. null → unmount. [] → empty copy. Keys mix. Arrays replace (no row merge).
|
|
36
21
|
*/
|
|
37
|
-
export type
|
|
22
|
+
export type LeaderboardData = {
|
|
38
23
|
hero?: Partial<HeroData>;
|
|
39
24
|
currency?: string;
|
|
40
25
|
locale?: string;
|
|
@@ -47,3 +32,20 @@ export type LeaderboardDataInput = {
|
|
|
47
32
|
events?: Partial<EventsData> | null;
|
|
48
33
|
legals?: Partial<LegalsData> | null;
|
|
49
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* Campaign after mix. Store / producer only — not on the public package entry.
|
|
37
|
+
*/
|
|
38
|
+
export type ResolvedLeaderboardData = {
|
|
39
|
+
hero: HeroData;
|
|
40
|
+
/** ISO 4217 (e.g. `USD`). Applies to every money amount. */
|
|
41
|
+
currency: string;
|
|
42
|
+
/** BCP 47 tag (e.g. `en-US`). Drives all date and number formatting. */
|
|
43
|
+
locale: string;
|
|
44
|
+
games?: GameData[];
|
|
45
|
+
prizes?: PrizeData[];
|
|
46
|
+
players?: PlayerData[];
|
|
47
|
+
stats?: StatsData;
|
|
48
|
+
marquee?: MarqueeData;
|
|
49
|
+
events?: EventsData;
|
|
50
|
+
legals?: LegalsData;
|
|
51
|
+
};
|
package/dist/types/host.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LeaderboardLabels } from './labels.js';
|
|
2
2
|
import { LeaderboardTheme } from './theme.js';
|
|
3
|
-
import {
|
|
3
|
+
import { LeaderboardData } from './data.js';
|
|
4
4
|
/**
|
|
5
5
|
* Host input — the only props the public TypeScript contract accepts.
|
|
6
6
|
*
|
|
@@ -20,5 +20,5 @@ export interface LeaderboardHostProps {
|
|
|
20
20
|
/** Omit → DEFAULT_THEME. Set → per-key mix; invalid CSS falls back. */
|
|
21
21
|
theme?: Partial<LeaderboardTheme>;
|
|
22
22
|
/** Omit → hardcoded campaign. Set → per-key mix onto that campaign. */
|
|
23
|
-
data?:
|
|
23
|
+
data?: LeaderboardData;
|
|
24
24
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { SectionId, CasinoSectionConfig } from './config.js';
|
|
|
6
6
|
export type { LeaderboardLabels, StatusLabels, CtaLabels, } from './labels.js';
|
|
7
7
|
export type { LeaderboardTheme } from './theme.js';
|
|
8
8
|
export type { LeaderboardStatus } from './status.js';
|
|
9
|
-
export type { LeaderboardData,
|
|
9
|
+
export type { LeaderboardData, ResolvedLeaderboardData, HeroData, PrizeData, StatsData, GameData, PlayerData, MarqueeItemData, MarqueeData, EventItemData, EventsData, ExternalLegalLink, InternalLegalLink, LegalLinkData, LegalsData, } from './data.js';
|
|
10
10
|
export type { LeaderboardHostProps } from './host.js';
|
|
11
11
|
export type { MarqueeItem, MarqueeView } from '../sections/marquee-section/types/view.js';
|
|
12
12
|
export type { MarqueeLabels } from '../sections/marquee-section/types/labels.js';
|
package/dist/types/public.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type { TableLabels } from '../sections/table-section/types/labels.js';
|
|
|
14
14
|
export type { MarqueeLabels } from '../sections/marquee-section/types/labels.js';
|
|
15
15
|
export type { EventsLabels } from '../sections/events-banner/types/labels.js';
|
|
16
16
|
export type { LegalsLabels } from '../sections/legals-section/types/labels.js';
|
|
17
|
-
export type { LeaderboardData,
|
|
17
|
+
export type { LeaderboardData, HeroData, PrizeData, StatsData, GameData, PlayerData, MarqueeItemData, MarqueeData, EventItemData, EventsData, ExternalLegalLink, InternalLegalLink, LegalLinkData, LegalsData, } from './data.js';
|
|
18
18
|
export { PrizeEvents } from '../sections/prize-section/types/events.js';
|
|
19
19
|
export type { PrizeClickDetail } from '../sections/prize-section/types/events.js';
|
|
20
20
|
export { TableEvents } from '../sections/table-section/types/events.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LeaderboardData,
|
|
1
|
+
import { LeaderboardData, ResolvedLeaderboardData } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Mix a partial host `.data` onto a hardcoded campaign.
|
|
4
4
|
* Mix rule: omit key → default. null → unmount. [] → empty copy. Keys mix. Arrays replace (no row merge).
|
|
5
5
|
*/
|
|
6
|
-
export declare function resolveLeaderboardData(input?:
|
|
6
|
+
export declare function resolveLeaderboardData(input?: LeaderboardData | null, logPrefix?: string, fallback?: ResolvedLeaderboardData): ResolvedLeaderboardData;
|