@oddsmith/ui 1.0.7 → 1.1.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/README.md +2 -6
- 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 +21 -11
- package/dist/index.js +228 -215
- package/dist/index.js.map +1 -1
- package/dist/sections/table-section/table-section.d.ts +3 -2
- package/dist/sections/table-section/table-section.host.d.ts +1 -1
- package/dist/sections/table-section/types/events.d.ts +6 -1
- package/dist/store/casino.store.d.ts +10 -4
- package/dist/types/data.d.ts +19 -17
- package/dist/types/host.d.ts +3 -3
- package/dist/types/index.d.ts +2 -2
- package/dist/types/public.d.ts +2 -2
- package/dist/utils/data-resolve.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Deploy a fully brandable casino leaderboard, ready to match your brand. Your data, our UI.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Create as many custom leaderboards that you need.
|
|
8
|
-
|
|
9
|
-
**Time to a live board: 1 day**
|
|
5
|
+
There is no Oddsmith backend to connect. You push your data into the component.
|
|
10
6
|
|
|
11
7
|
Try it: [oddsmith.io](https://oddsmith.io)
|
|
12
8
|
|
|
13
|
-
[
|
|
9
|
+
Docs: [Engineer setup](https://app.notion.com/p/1-Engineer-Setup-3cb437e762d680b5829af8bd55593840)
|
|
@@ -3,8 +3,8 @@ export default {
|
|
|
3
3
|
hero: {
|
|
4
4
|
title: "Midnight Millions",
|
|
5
5
|
description: "Climb the board before the timer hits zero.",
|
|
6
|
-
startsAt: "2026-08-
|
|
7
|
-
endsAt: "2026-
|
|
6
|
+
startsAt: "2026-08-23T14:15:31.035Z",
|
|
7
|
+
endsAt: "2026-09-03T04:15:31.035Z",
|
|
8
8
|
prizePool: 128450
|
|
9
9
|
},
|
|
10
10
|
currency: "USD",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ResolvedLeaderboardData } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Hardcoded campaign used when the host omits `.data`, and as the mix
|
|
4
4
|
* fallback for omitted keys on a partial bag.
|
|
5
5
|
*
|
|
6
6
|
* Clocks are computed at call time so a mounted instance with no `.data` stays live.
|
|
7
7
|
*/
|
|
8
|
-
export declare function buildDefaultData(now?: number):
|
|
8
|
+
export declare function buildDefaultData(now?: number): ResolvedLeaderboardData;
|
|
@@ -1,43 +1,53 @@
|
|
|
1
1
|
import { LitElement, nothing, PropertyValues } from 'lit';
|
|
2
2
|
import { LitTemplate } from '../.shared/lib/lit/template.js';
|
|
3
|
-
import {
|
|
3
|
+
import { LeaderboardData, LeaderboardHostProps, LeaderboardLabels, LeaderboardTheme, SectionId } from '../types';
|
|
4
4
|
import { CasinoStore } from '../store';
|
|
5
5
|
import { OsLeaderboardCasinoHost } from './os-leaderboard-casino.host.js';
|
|
6
6
|
/**
|
|
7
7
|
* Free-tier casino leaderboard.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Pass {@link LeaderboardHostProps} to the constructor, then {@link mount}
|
|
10
|
+
* into a host node. Layout is built-in ({@link DEFAULT_LAYOUT}). Omit
|
|
11
|
+
* `.labels` / `.theme` / `.data` for the hardcoded campaign, English
|
|
12
|
+
* labels, and glam theme. Call {@link destroy} when the page goes away.
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
|
-
* const board = new OsLeaderboardCasino();
|
|
16
|
-
* board.setProps({ labels, theme, data });
|
|
15
|
+
* const board = new OsLeaderboardCasino({ labels, theme, data });
|
|
17
16
|
* board.mount(document.getElementById('app')!);
|
|
17
|
+
* board.destroy();
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export declare class OsLeaderboardCasino extends LitElement implements OsLeaderboardCasinoHost {
|
|
21
21
|
static styles: import('lit').CSSResult[];
|
|
22
22
|
labels: LeaderboardLabels | null;
|
|
23
23
|
theme: Partial<LeaderboardTheme> | null;
|
|
24
|
-
data:
|
|
24
|
+
data: LeaderboardData | null;
|
|
25
25
|
/**
|
|
26
26
|
* Oddsmith demo surfaces only. Rolls an expired countdown forward
|
|
27
27
|
* if the campaign was still live at hydrate. Operator embeds omit this.
|
|
28
28
|
*/
|
|
29
29
|
demo: boolean;
|
|
30
30
|
private now;
|
|
31
|
+
private hostListeners;
|
|
31
32
|
private readonly bootstrap;
|
|
32
33
|
private ready;
|
|
34
|
+
private destroyed;
|
|
33
35
|
private clock?;
|
|
36
|
+
constructor(props?: LeaderboardHostProps);
|
|
34
37
|
get store(): CasinoStore;
|
|
35
|
-
/**
|
|
36
|
-
|
|
38
|
+
/** ContextProvider registers on the host during field init — list must exist first. */
|
|
39
|
+
private trackedListeners;
|
|
37
40
|
/** Append this instance into `host`. Props stay on the instance. */
|
|
38
41
|
mount(host: ParentNode): this;
|
|
39
|
-
/** Remove this instance from the document. */
|
|
42
|
+
/** Remove this instance from the document. Listeners stay until {@link destroy}. */
|
|
40
43
|
unmount(): this;
|
|
44
|
+
/**
|
|
45
|
+
* Tear down for good: strip instance event listeners and remove from the
|
|
46
|
+
* document. Do not reuse. Drop your host reference after this.
|
|
47
|
+
*/
|
|
48
|
+
destroy(): void;
|
|
49
|
+
addEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | AddEventListenerOptions): void;
|
|
50
|
+
removeEventListener(type: string, listener: EventListenerOrEventListenerObject | null, options?: boolean | EventListenerOptions): void;
|
|
41
51
|
connectedCallback(): void;
|
|
42
52
|
protected willUpdate(changed: PropertyValues<this>): void;
|
|
43
53
|
private load;
|