@simple-parlay/components 1.30.6-pre.6 → 1.30.6-pre.7
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/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +429 -457
- package/dist/react/components/CallGameCatalogue.d.ts +4 -0
- package/dist/react/components/CallPayoutTable.d.ts +6 -0
- package/dist/react/components/CallTicketBuilder.d.ts +3 -0
- package/dist/react/components/CorrelationChoicesSkeleton.d.ts +4 -0
- package/dist/react/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react/components/CorrelationPropPlaceholder.d.ts +8 -0
- package/dist/react/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react/components/DenseUi.d.ts +29 -0
- package/dist/react/components/GamePage.d.ts +1 -1
- package/dist/react/components/GameSelector.d.ts +1 -1
- package/dist/react/components/GameSetupPage.d.ts +1 -1
- package/dist/react/components/HowToPlayButton.d.ts +3 -1
- package/dist/react/components/PlaceEntryProvider.d.ts +30 -2
- package/dist/react/components/_primitives/index.d.ts +3 -1
- package/dist/react/game-library.d.ts +21 -0
- package/dist/react/index.d.ts +14 -10
- package/dist/react/index.js +1 -1
- package/dist/react/index.mjs +429 -457
- package/dist/react-native/components/CallGameCatalogue.d.ts +16 -0
- package/dist/react-native/components/CallPayoutTable.d.ts +6 -0
- package/dist/react-native/components/CallTicketBuilder.d.ts +31 -0
- package/dist/react-native/components/CorrelationChoicesSkeleton.d.ts +3 -0
- package/dist/react-native/components/CorrelationPricingDebug.d.ts +2 -0
- package/dist/react-native/components/CorrelationPropPlaceholder.d.ts +7 -0
- package/dist/react-native/components/DenseGameCatalogue.d.ts +2 -0
- package/dist/react-native/components/DenseUi.d.ts +58 -0
- package/dist/react-native/components/GamePage.d.ts +1 -1
- package/dist/react-native/components/GameSelector.d.ts +1 -1
- package/dist/react-native/components/GameSetupPage.d.ts +1 -1
- package/dist/react-native/components/HowToPlayButton.d.ts +3 -1
- package/dist/react-native/components/PlaceEntryProvider.d.ts +23 -2
- package/dist/react-native/components/_primitives/index.d.ts +3 -1
- package/dist/react-native/game-library.d.ts +21 -0
- package/dist/react-native/index.d.ts +14 -10
- package/dist/react-native/index.js +1 -1
- package/dist/react-native/index.mjs +438 -445
- package/dist/shared/api-client.d.ts +1 -0
- package/dist/shared/call-artwork.d.ts +2 -0
- package/dist/shared/call-presentation.d.ts +20 -0
- package/dist/shared/correlation-steering.d.ts +43 -0
- package/dist/shared/dense-ui.d.ts +52 -0
- package/dist/shared/game-library.d.ts +28 -0
- package/dist/shared/hooks.d.ts +4 -4
- package/dist/shared/selection-caps.d.ts +15 -3
- package/dist/shared/selection-variants.d.ts +3 -1
- package/dist/shared/types.d.ts +8 -0
- package/dist/shared/ui-variant.d.ts +12 -0
- package/dist/shared/use-call-payouts.d.ts +8 -0
- package/package.json +7 -2
- package/dist/react/utils/design.d.ts +0 -55
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Game, TopPayoutsResponse } from './types';
|
|
2
|
+
import { SafetyNetTicket } from './safety-net';
|
|
3
|
+
/** Short discovery copy describes the mechanic, never substitutes for the rules. */
|
|
4
|
+
export declare function callGameSummary(game: Game): string;
|
|
5
|
+
export declare function callDefaultCount(game: Game, counts: number[]): number;
|
|
6
|
+
export interface CallPayoutRow {
|
|
7
|
+
label: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
added?: number;
|
|
10
|
+
correct?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface CallPayoutView {
|
|
13
|
+
heading: string;
|
|
14
|
+
note: string;
|
|
15
|
+
rows: CallPayoutRow[];
|
|
16
|
+
}
|
|
17
|
+
export declare function callSafetyPayouts(ticket: SafetyNetTicket, modeLabel: string): CallPayoutView;
|
|
18
|
+
/** Outcome tables use the same pricing functions as setup and confirmation. */
|
|
19
|
+
export declare function callOutcomePayouts(game: Game, count: number, stake: number, expectedCorrect?: number): CallPayoutView | null;
|
|
20
|
+
export declare function callLegPayouts(game: Game, stake: number, payouts?: TopPayoutsResponse): CallPayoutView | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BladeApiClient } from './api-client';
|
|
2
|
+
import { Game, Proposition } from './types';
|
|
3
|
+
/** Explicit opt-in only: old payloads and ordinary games keep their current flow. */
|
|
4
|
+
export declare const usesCorrelationPricing: (game?: Game | null) => boolean;
|
|
5
|
+
export interface CorrelationQuote {
|
|
6
|
+
resultant_price: number;
|
|
7
|
+
equivalent_flips: number;
|
|
8
|
+
within: boolean;
|
|
9
|
+
verdict: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CorrelationSuggestions {
|
|
12
|
+
choices: {
|
|
13
|
+
id: number;
|
|
14
|
+
answers: Partial<Record<'yes' | 'no', CorrelationQuote>>;
|
|
15
|
+
}[];
|
|
16
|
+
card: CorrelationQuote | null;
|
|
17
|
+
can_submit: boolean;
|
|
18
|
+
target_count: number;
|
|
19
|
+
target_price: number;
|
|
20
|
+
target_price_range?: [number, number];
|
|
21
|
+
partial: boolean;
|
|
22
|
+
supported_counts?: number[];
|
|
23
|
+
propositions?: Proposition[];
|
|
24
|
+
}
|
|
25
|
+
export interface CorrelationRequest {
|
|
26
|
+
selections: Record<number, 'yes' | 'no'>;
|
|
27
|
+
candidate_ids: number[];
|
|
28
|
+
target_count: number;
|
|
29
|
+
rule_id?: number;
|
|
30
|
+
stake: number;
|
|
31
|
+
event_id?: string;
|
|
32
|
+
}
|
|
33
|
+
/** Port of the correlation branch's debounced, request-stamped provider hook. */
|
|
34
|
+
export declare function useCorrelationSteering(client: BladeApiClient | null, gameId: number | null, request: CorrelationRequest): {
|
|
35
|
+
data: CorrelationSuggestions | null;
|
|
36
|
+
displayPropositions: Proposition[] | null;
|
|
37
|
+
loading: boolean;
|
|
38
|
+
error: string | null;
|
|
39
|
+
answers: Map<number, Partial<Record<"yes" | "no", CorrelationQuote>>>;
|
|
40
|
+
retry: () => void;
|
|
41
|
+
};
|
|
42
|
+
/** Developer diagnostics use the correlation quote, never the payout multiplier. */
|
|
43
|
+
export declare function correlationDebugText(correlation: Pick<ReturnType<typeof useCorrelationSteering>, 'loading' | 'error' | 'data'>, targetCount: number): string;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Game, TopPayoutsResponse } from './types';
|
|
3
|
+
import { BladeTheme } from './themes';
|
|
4
|
+
import { CallPayoutView } from './call-presentation';
|
|
5
|
+
export interface CallGameCatalogueProps {
|
|
6
|
+
games: Game[];
|
|
7
|
+
selectedGame: Game | null;
|
|
8
|
+
theme: BladeTheme;
|
|
9
|
+
onPlay: (game: Game, count: number) => void;
|
|
10
|
+
maxPayouts?: Record<number, TopPayoutsResponse>;
|
|
11
|
+
quickPickLoading?: boolean;
|
|
12
|
+
tierFilter?: React.ReactNode;
|
|
13
|
+
showTier?: boolean;
|
|
14
|
+
showCategory?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface CallTicketBuilderProps {
|
|
17
|
+
game: Game;
|
|
18
|
+
theme: BladeTheme;
|
|
19
|
+
legs: number;
|
|
20
|
+
legOptions: number[];
|
|
21
|
+
onLegs: (n: number) => void;
|
|
22
|
+
stake: number;
|
|
23
|
+
onStake: (n: number) => void;
|
|
24
|
+
stakes?: number[];
|
|
25
|
+
minStake?: number;
|
|
26
|
+
maxStake?: number | null;
|
|
27
|
+
modes?: {
|
|
28
|
+
id: string;
|
|
29
|
+
label: string;
|
|
30
|
+
detail: string;
|
|
31
|
+
}[];
|
|
32
|
+
modeId?: string;
|
|
33
|
+
onMode?: (id: string) => void;
|
|
34
|
+
expectedCorrect?: number;
|
|
35
|
+
ruleId?: number | null;
|
|
36
|
+
view: CallPayoutView;
|
|
37
|
+
valid?: boolean;
|
|
38
|
+
onPick: () => void;
|
|
39
|
+
onQuickPick: () => void;
|
|
40
|
+
onBack?: () => void;
|
|
41
|
+
}
|
|
42
|
+
export interface DenseTicketActionsProps {
|
|
43
|
+
count: number;
|
|
44
|
+
target: number;
|
|
45
|
+
minimum: number;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
label: string;
|
|
48
|
+
view: CallPayoutView | null;
|
|
49
|
+
payoutText: string;
|
|
50
|
+
onNext: () => void;
|
|
51
|
+
hideButtons?: boolean;
|
|
52
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { Game } from './types';
|
|
3
|
+
import { YesNoLabels } from './utils';
|
|
4
|
+
import { GameFlow } from './game-flow';
|
|
5
|
+
export interface GameSetupProps<Entry> {
|
|
6
|
+
entry: Entry;
|
|
7
|
+
yesNoLabels: YesNoLabels;
|
|
8
|
+
onPickYourOwn?: () => void;
|
|
9
|
+
onQuickPick?: () => void;
|
|
10
|
+
onBack?: () => void;
|
|
11
|
+
hideTitle?: boolean;
|
|
12
|
+
backLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** An implementation for API game records, not a replacement for API data. */
|
|
16
|
+
export interface GameDefinition<Entry> {
|
|
17
|
+
readonly id: string;
|
|
18
|
+
readonly matches: (game: Game) => boolean;
|
|
19
|
+
readonly flow: GameFlow;
|
|
20
|
+
readonly Setup?: ComponentType<GameSetupProps<Entry>>;
|
|
21
|
+
}
|
|
22
|
+
export type GameLibrary<Entry> = readonly GameDefinition<Entry>[];
|
|
23
|
+
export declare const EMPTY_GAME_LIBRARY: readonly never[];
|
|
24
|
+
export declare const BASE_GAME_IDS: readonly ["perfect-pick", "h2h", "safety-net"];
|
|
25
|
+
export declare function getBaseGameId(game: Game): typeof BASE_GAME_IDS[number] | undefined;
|
|
26
|
+
export declare function findLibraryGame<Entry>(game: Game | null | undefined, library: GameLibrary<Entry>): GameDefinition<Entry> | undefined;
|
|
27
|
+
export declare function supportsGame<Entry>(game: Game, library: GameLibrary<Entry>): boolean;
|
|
28
|
+
export declare function resolveGameFlow<Entry>(game: Game | null | undefined, library: GameLibrary<Entry>): GameFlow;
|
package/dist/shared/hooks.d.ts
CHANGED
|
@@ -7,11 +7,11 @@ export declare function useGames(apiClient: BladeApiClient, params?: {
|
|
|
7
7
|
}, options?: {
|
|
8
8
|
skip?: boolean;
|
|
9
9
|
}): {
|
|
10
|
-
games: Game[];
|
|
11
|
-
howToPlayMarkdown: string | null;
|
|
12
10
|
loading: boolean;
|
|
13
11
|
error: string | null;
|
|
14
12
|
refetch: () => Promise<void>;
|
|
13
|
+
games: Game[];
|
|
14
|
+
howToPlayMarkdown: string | null;
|
|
15
15
|
};
|
|
16
16
|
export declare function usePropositions(apiClient: BladeApiClient, params?: {
|
|
17
17
|
event_id?: string;
|
|
@@ -20,18 +20,18 @@ export declare function usePropositions(apiClient: BladeApiClient, params?: {
|
|
|
20
20
|
}, options?: {
|
|
21
21
|
skip?: boolean;
|
|
22
22
|
}): {
|
|
23
|
-
propositions: Proposition[];
|
|
24
23
|
loading: boolean;
|
|
25
24
|
error: string | null;
|
|
26
25
|
refetch: () => Promise<void>;
|
|
26
|
+
propositions: Proposition[];
|
|
27
27
|
};
|
|
28
28
|
export declare function useSports(apiClient: BladeApiClient, options?: {
|
|
29
29
|
skip?: boolean;
|
|
30
30
|
}): {
|
|
31
|
-
sports: import('./types').SportSummary[];
|
|
32
31
|
loading: boolean;
|
|
33
32
|
error: string | null;
|
|
34
33
|
refetch: () => Promise<void>;
|
|
34
|
+
sports: import('./types').SportSummary[];
|
|
35
35
|
};
|
|
36
36
|
export declare function useGameEntries(apiClient: BladeApiClient, params?: {
|
|
37
37
|
user_id?: string | number;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import { Proposition } from './types';
|
|
1
|
+
import { Game, Proposition } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Which games ration the slots at all.
|
|
4
|
+
*
|
|
5
|
+
* Only Cross Game SGM: it is the product that invites several legs off one
|
|
6
|
+
* fixture, so it is the only one that has to hold them to one apiece. Same
|
|
7
|
+
* Game is already confined to a single fixture and priced for it, and every
|
|
8
|
+
* other game leaves the slots alone — nothing greyed, no slot chips drawn.
|
|
9
|
+
*
|
|
10
|
+
* No game means no caps, so a caller that forgets to pass one shows no
|
|
11
|
+
* limitation rather than an unexplained one.
|
|
12
|
+
*/
|
|
13
|
+
export declare function selectionCapsApply(game?: Game | null): boolean;
|
|
2
14
|
export type MarketFamily = 'totals' | 'spread' | 'player';
|
|
3
15
|
export declare const MARKET_FAMILIES: MarketFamily[];
|
|
4
16
|
export declare const MARKET_CAPS: Record<MarketFamily, number>;
|
|
@@ -47,9 +59,9 @@ export interface SelectionCaps {
|
|
|
47
59
|
* or tick a chip comes off the returned object, so web and native ask the same
|
|
48
60
|
* question and get the same answer.
|
|
49
61
|
*/
|
|
50
|
-
export declare function buildSelectionCaps(propositions: readonly Proposition[], selections: Record<number, 'yes' | 'no'>, componentById?: ReadonlyMap<number, Proposition> | null): SelectionCaps;
|
|
62
|
+
export declare function buildSelectionCaps(propositions: readonly Proposition[], selections: Record<number, 'yes' | 'no'>, componentById?: ReadonlyMap<number, Proposition> | null, game?: Game | null): SelectionCaps;
|
|
51
63
|
/**
|
|
52
64
|
* Quick pick's pool, thinned to what a player could have picked by hand — one
|
|
53
65
|
* slot per family per fixture, in the order it is handed (already shuffled).
|
|
54
66
|
*/
|
|
55
|
-
export declare function takeWithinCaps(pool: readonly Proposition[], count: number, componentById?: ReadonlyMap<number, Proposition> | null): Proposition[];
|
|
67
|
+
export declare function takeWithinCaps(pool: readonly Proposition[], count: number, componentById?: ReadonlyMap<number, Proposition> | null, game?: Game | null): Proposition[];
|
|
@@ -8,7 +8,7 @@ import { Proposition } from './types';
|
|
|
8
8
|
* the default list draws, so date/market filters, composites, jerseys and the
|
|
9
9
|
* leg cap behave identically whichever one is on screen.
|
|
10
10
|
*/
|
|
11
|
-
export type SelectionVariant = 'split' | 'split-inline' | 'compact';
|
|
11
|
+
export type SelectionVariant = 'split' | 'split-inline' | 'call' | 'playboard' | 'matchbook' | 'game-deck' | 'compact';
|
|
12
12
|
export declare const SELECTION_VARIANTS: SelectionVariant[];
|
|
13
13
|
/** One fixture (or race) and every question asked about it. */
|
|
14
14
|
export interface SelectionEvent {
|
|
@@ -38,6 +38,8 @@ export declare function formatFixtureTime(date: Date): string;
|
|
|
38
38
|
* Australian club name (`South Sydney Rabbitohs` → `RAB`).
|
|
39
39
|
*/
|
|
40
40
|
export declare function teamCode(team: string | null | undefined): string;
|
|
41
|
+
/** `HAW v ADE` — a chip-sized fixture label; races and team-less groups keep their title. */
|
|
42
|
+
export declare function fixtureShortLabel(event: SelectionEvent): string;
|
|
41
43
|
/**
|
|
42
44
|
* Fixtures in kick-off order, split into day blocks; undated ones trail.
|
|
43
45
|
*
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UiVariant } from './ui-variant';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { SelectionVariant } from './selection-variants';
|
|
3
4
|
import { BladeTheme, BladeThemeSet, ColorScheme } from './themes';
|
|
@@ -83,6 +84,7 @@ export interface Game {
|
|
|
83
84
|
/** Boolean alias for APIs that expose selection scope as a flag. */
|
|
84
85
|
require_same_event?: boolean;
|
|
85
86
|
require_distinct_events?: boolean;
|
|
87
|
+
sgm_mode?: 'off' | 'any' | 'limited';
|
|
86
88
|
allocations?: GameAllocation[];
|
|
87
89
|
rule_expression?: string | RuleExpressionObject | null;
|
|
88
90
|
min_bet?: number | null;
|
|
@@ -186,6 +188,8 @@ export interface GameEntry {
|
|
|
186
188
|
selections?: Record<number, 'yes' | 'no'>;
|
|
187
189
|
pending: boolean;
|
|
188
190
|
winning?: number;
|
|
191
|
+
/** Raw API field for the payout; normalised into `winning` by the client. */
|
|
192
|
+
win_amount?: number;
|
|
189
193
|
expected_correct?: number;
|
|
190
194
|
bet_amount?: number;
|
|
191
195
|
stake?: number;
|
|
@@ -270,6 +274,7 @@ export interface PlaceEntryFlowProps {
|
|
|
270
274
|
* Proposition layout for every selection screen in the flow. Omit for the
|
|
271
275
|
* packaged matchup list, which stays the default.
|
|
272
276
|
*/
|
|
277
|
+
uiVariant?: UiVariant;
|
|
273
278
|
selectionVariant?: SelectionVariant;
|
|
274
279
|
/** Drop the per-fixture swipe deck offered by the variant layouts. @default false */
|
|
275
280
|
disableEventSwipe?: boolean;
|
|
@@ -286,6 +291,7 @@ export interface PlaceEntryFlowProps {
|
|
|
286
291
|
howToPlayMarkdown?: string | null;
|
|
287
292
|
}
|
|
288
293
|
export interface GameSelectorProps {
|
|
294
|
+
uiVariant?: UiVariant;
|
|
289
295
|
games: Game[];
|
|
290
296
|
selectedGame: Game | null;
|
|
291
297
|
onSelectGame: (game: Game) => void;
|
|
@@ -303,6 +309,8 @@ export interface GameSelectorProps {
|
|
|
303
309
|
/** Called when a proposition count option is picked (can be used to auto-advance) */
|
|
304
310
|
onPropositionCountSelected?: () => void;
|
|
305
311
|
onQuickPickGame?: (game: Game, count: number) => void;
|
|
312
|
+
/** Show quick-pick tiles while their required selection pool is loading. */
|
|
313
|
+
quickPickLoading?: boolean;
|
|
306
314
|
/** Max payout data per game ID (from /max-payout endpoint) */
|
|
307
315
|
maxPayouts?: Record<number, TopPayoutsResponse>;
|
|
308
316
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BladeTheme } from './themes';
|
|
2
|
+
/** Presentation only. Omit to preserve the original component library UI. */
|
|
3
|
+
export type DenseUiVariant = 'playboard' | 'matchbook' | 'game-deck';
|
|
4
|
+
export type UiVariant = 'default' | 'call' | DenseUiVariant;
|
|
5
|
+
export declare const UI_VARIANTS: readonly UiVariant[];
|
|
6
|
+
export declare const UI_VARIANT_LABELS: Record<UiVariant, string>;
|
|
7
|
+
export declare function isDenseUiVariant(value: unknown): value is DenseUiVariant;
|
|
8
|
+
export declare function parseUiVariant(value: unknown): UiVariant;
|
|
9
|
+
/** Defaults only: a host's explicit theme continues to take precedence. */
|
|
10
|
+
export declare function uiVariantTheme(variant: UiVariant): BladeTheme | undefined;
|
|
11
|
+
export declare const UiVariantContext: import('react').Context<UiVariant>;
|
|
12
|
+
export declare function useUiVariant(): UiVariant;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Game, EntryPreviewRequest, EntryPreviewResponse } from './types';
|
|
2
|
+
import { CallPayoutView } from './call-presentation';
|
|
3
|
+
export type PreviewCallPayouts = (gameId: number, request: EntryPreviewRequest) => Promise<EntryPreviewResponse>;
|
|
4
|
+
/** Reuse the review endpoint: configured estimates never overwrite a live quote. */
|
|
5
|
+
export declare function useCallPayouts(preview: PreviewCallPayouts | undefined, game: Game | null, count: number, stake: number, expectedCorrect: number, ruleId: number | null | undefined, fallback: CallPayoutView | null): {
|
|
6
|
+
view: CallPayoutView | null;
|
|
7
|
+
estimated: boolean;
|
|
8
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simple-parlay/components",
|
|
3
|
-
"version": "1.30.6-pre.
|
|
3
|
+
"version": "1.30.6-pre.7",
|
|
4
4
|
"description": "UI components, hooks, and utilities for React and React Native",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,11 @@
|
|
|
50
50
|
"dev:expo": "npm run start --prefix dev-expo",
|
|
51
51
|
"prepublishOnly": "npm run build",
|
|
52
52
|
"generate:how-to-play-logo": "node scripts/embed-how-to-play-logo.mjs",
|
|
53
|
-
"generate:game-icons": "node scripts/embed-game-icons.mjs"
|
|
53
|
+
"generate:game-icons": "node scripts/embed-game-icons.mjs",
|
|
54
|
+
"build:games": "node scripts/build-games.mjs",
|
|
55
|
+
"pack:games": "npm pack ./packages/games",
|
|
56
|
+
"publish:games": "npm publish ./packages/games",
|
|
57
|
+
"test:games-package": "node scripts/check-games-package.mjs"
|
|
54
58
|
},
|
|
55
59
|
"keywords": [
|
|
56
60
|
"components",
|
|
@@ -91,6 +95,7 @@
|
|
|
91
95
|
"msw": "^2.12.10",
|
|
92
96
|
"react": "^18.2.0",
|
|
93
97
|
"react-dom": "^18.2.0",
|
|
98
|
+
"react-native": "^0.86.2",
|
|
94
99
|
"react-native-svg": "^15.15.4",
|
|
95
100
|
"react-native-web": "^0.21.2",
|
|
96
101
|
"terser": "^5.46.1",
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { BladeTheme } from '../../shared/themes';
|
|
3
|
-
export declare const trackedCaps: CSSProperties;
|
|
4
|
-
export declare const trackedCapsTight: CSSProperties;
|
|
5
|
-
export declare const tabularNums: CSSProperties;
|
|
6
|
-
export declare const displayFigure: CSSProperties;
|
|
7
|
-
/** Single-pixel hairline rule — used for separators between glass rows. */
|
|
8
|
-
export declare function hairline(color: string): string;
|
|
9
|
-
/**
|
|
10
|
-
* Spatial OS elevation. These are luminous, layered shadows: an inset top
|
|
11
|
-
* highlight that mimics a Vision-Pro-style glass edge plus a soft ambient
|
|
12
|
-
* drop. Use 'high' for floating popovers, 'med' for cards, 'low' for rows.
|
|
13
|
-
*/
|
|
14
|
-
export declare function softShadow(intensity?: 'low' | 'med' | 'high'): string;
|
|
15
|
-
/** Smooth, slow-curve easing used everywhere — feels like inertial spatial OS. */
|
|
16
|
-
export declare const EASE = "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
17
|
-
/** Compose a hover lift transform consistent across the system. */
|
|
18
|
-
export declare const liftHover: CSSProperties;
|
|
19
|
-
/** Resolve a theme's display font with a guaranteed sans fallback. */
|
|
20
|
-
export declare function displayFont(theme: BladeTheme): string;
|
|
21
|
-
/** Resolve a theme's mono font with a guaranteed monospaced fallback. */
|
|
22
|
-
export declare function monoFont(theme: BladeTheme): string;
|
|
23
|
-
/** Mix a CSS color with the page background to soft-tint a hue. */
|
|
24
|
-
export declare function tint(color: string, alphaHex?: string): string;
|
|
25
|
-
/** Tiny dot + tracked caps label — used as a section eyebrow. */
|
|
26
|
-
export declare const eyebrowStyle: (color: string) => CSSProperties;
|
|
27
|
-
/**
|
|
28
|
-
* Returns the inline style fragment used for a glass card surface.
|
|
29
|
-
* In light scheme the glass sits on top of a luminous backdrop and stays
|
|
30
|
-
* mostly opaque; in dark scheme it leans translucent with heavy blur.
|
|
31
|
-
*/
|
|
32
|
-
export declare function glassCard(theme: BladeTheme, elevation?: 'low' | 'med' | 'high'): CSSProperties;
|
|
33
|
-
/** Construct the conic accent gradient used for halo rings, multiplier badges, etc. */
|
|
34
|
-
export declare function accentGradient(theme: BladeTheme, mode?: 'linear' | 'conic'): string;
|
|
35
|
-
/** A soft radial wash anchored to the top-right — used inside hero cards. */
|
|
36
|
-
export declare function ambientWash(theme: BladeTheme, opacity?: number): string;
|
|
37
|
-
/** Hex/rgba color with explicit alpha — handles `#RRGGBB`, `rgb()`, `rgba()`. */
|
|
38
|
-
export declare function withAlpha(color: string, alpha: number): string;
|
|
39
|
-
/**
|
|
40
|
-
* Primary CTA — a solid bright pill on dark schemes, near-black on light.
|
|
41
|
-
* Used for "Continue", "Place entry", "Select game" etc.
|
|
42
|
-
*/
|
|
43
|
-
export declare function primaryButton(theme: BladeTheme, opts?: {
|
|
44
|
-
compact?: boolean;
|
|
45
|
-
disabled?: boolean;
|
|
46
|
-
}): CSSProperties;
|
|
47
|
-
/** Glass / ghost button used for "Back", "Cancel", secondary affordances. */
|
|
48
|
-
export declare function ghostButton(theme: BladeTheme, opts?: {
|
|
49
|
-
compact?: boolean;
|
|
50
|
-
}): CSSProperties;
|
|
51
|
-
/**
|
|
52
|
-
* Token-level animation keyframes injected once by the dev shell.
|
|
53
|
-
* Components reference these by name (no per-component <style> blocks).
|
|
54
|
-
*/
|
|
55
|
-
export declare const GLOBAL_KEYFRAMES = "\n@keyframes glass-rise {\n from { opacity: 0; transform: translateY(14px) scale(0.985); filter: blur(8px); }\n to { opacity: 1; transform: none; filter: none; }\n}\n@keyframes glass-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n@keyframes halo-rotate {\n to { transform: rotate(360deg); }\n}\n@keyframes pulse-soft {\n 0%, 100% { opacity: 0.55; }\n 50% { opacity: 1; }\n}\n@keyframes drift-1 {\n 0%, 100% { transform: translate3d(0, 0, 0) scale(1); }\n 50% { transform: translate3d(40px, -30px, 0) scale(1.08); }\n}\n@keyframes drift-2 {\n 0%, 100% { transform: translate3d(0, 0, 0) scale(1); }\n 50% { transform: translate3d(-30px, 40px, 0) scale(1.12); }\n}\n@keyframes drift-3 {\n 0%, 100% { transform: translate3d(0, 0, 0) scale(1); }\n 50% { transform: translate3d(20px, 20px, 0) scale(0.94); }\n}\n@keyframes ticker {\n from { transform: translateX(0); }\n to { transform: translateX(-50%); }\n}\n@keyframes sweep {\n 0% { transform: translateX(-110%); }\n 60% { transform: translateX(110%); }\n 100% { transform: translateX(110%); }\n}\n@property --angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }\n";
|