@freegamestore/games 0.16.0 → 0.19.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 +106 -8
- package/TOKENS.md +132 -0
- package/dist/Confetti.d.ts +18 -0
- package/dist/Confetti.d.ts.map +1 -0
- package/dist/Confetti.js +43 -0
- package/dist/Confetti.js.map +1 -0
- package/dist/GameAuth.d.ts.map +1 -1
- package/dist/GameAuth.js +5 -87
- package/dist/GameAuth.js.map +1 -1
- package/dist/GameButton.d.ts +2 -1
- package/dist/GameButton.d.ts.map +1 -1
- package/dist/GameButton.js +16 -67
- package/dist/GameButton.js.map +1 -1
- package/dist/GameConfirm.d.ts +1 -1
- package/dist/GameConfirm.d.ts.map +1 -1
- package/dist/GameConfirm.js +1 -7
- package/dist/GameConfirm.js.map +1 -1
- package/dist/GameModal.d.ts +3 -2
- package/dist/GameModal.d.ts.map +1 -1
- package/dist/GameModal.js +3 -40
- package/dist/GameModal.js.map +1 -1
- package/dist/GameOverScreen.d.ts +3 -2
- package/dist/GameOverScreen.d.ts.map +1 -1
- package/dist/GameOverScreen.js +3 -37
- package/dist/GameOverScreen.js.map +1 -1
- package/dist/GameResultScreen.d.ts +41 -0
- package/dist/GameResultScreen.d.ts.map +1 -0
- package/dist/GameResultScreen.js +25 -0
- package/dist/GameResultScreen.js.map +1 -0
- package/dist/GameShell.d.ts +3 -0
- package/dist/GameShell.d.ts.map +1 -1
- package/dist/GameShell.js +4 -43
- package/dist/GameShell.js.map +1 -1
- package/dist/GameTextSizeToggle.d.ts +1 -1
- package/dist/GameTextSizeToggle.d.ts.map +1 -1
- package/dist/GameTextSizeToggle.js +1 -16
- package/dist/GameTextSizeToggle.js.map +1 -1
- package/dist/GameThemeToggle.d.ts +1 -1
- package/dist/GameThemeToggle.d.ts.map +1 -1
- package/dist/GameThemeToggle.js +44 -21
- package/dist/GameThemeToggle.js.map +1 -1
- package/dist/GameTopbar.d.ts +12 -7
- package/dist/GameTopbar.d.ts.map +1 -1
- package/dist/GameTopbar.js +54 -188
- package/dist/GameTopbar.js.map +1 -1
- package/dist/GameTopbar.module.css +201 -0
- package/dist/Leaderboard.d.ts.map +1 -1
- package/dist/Leaderboard.js +2 -5
- package/dist/Leaderboard.js.map +1 -1
- package/dist/StartScreen.d.ts +41 -0
- package/dist/StartScreen.d.ts.map +1 -0
- package/dist/StartScreen.js +30 -0
- package/dist/StartScreen.js.map +1 -0
- package/dist/feel/ScorePopup.d.ts +20 -0
- package/dist/feel/ScorePopup.d.ts.map +1 -0
- package/dist/feel/ScorePopup.js +51 -0
- package/dist/feel/ScorePopup.js.map +1 -0
- package/dist/feel/easing.d.ts +14 -0
- package/dist/feel/easing.d.ts.map +1 -0
- package/dist/feel/easing.js +12 -0
- package/dist/feel/easing.js.map +1 -0
- package/dist/feel/haptics.d.ts +19 -0
- package/dist/feel/haptics.d.ts.map +1 -0
- package/dist/feel/haptics.js +24 -0
- package/dist/feel/haptics.js.map +1 -0
- package/dist/feel/index.d.ts +17 -0
- package/dist/feel/index.d.ts.map +1 -0
- package/dist/feel/index.js +17 -0
- package/dist/feel/index.js.map +1 -0
- package/dist/feel/particles.d.ts +46 -0
- package/dist/feel/particles.d.ts.map +1 -0
- package/dist/feel/particles.js +61 -0
- package/dist/feel/particles.js.map +1 -0
- package/dist/feel/reducedMotion.d.ts +6 -0
- package/dist/feel/reducedMotion.d.ts.map +1 -0
- package/dist/feel/reducedMotion.js +10 -0
- package/dist/feel/reducedMotion.js.map +1 -0
- package/dist/feel/shake.d.ts +6 -0
- package/dist/feel/shake.d.ts.map +1 -0
- package/dist/feel/shake.js +17 -0
- package/dist/feel/shake.js.map +1 -0
- package/dist/feel/tween.d.ts +9 -0
- package/dist/feel/tween.d.ts.map +1 -0
- package/dist/feel/tween.js +15 -0
- package/dist/feel/tween.js.map +1 -0
- package/dist/feel/useHaptics.d.ts +12 -0
- package/dist/feel/useHaptics.d.ts.map +1 -0
- package/dist/feel/useHaptics.js +16 -0
- package/dist/feel/useHaptics.js.map +1 -0
- package/dist/feel/useParticles.d.ts +18 -0
- package/dist/feel/useParticles.d.ts.map +1 -0
- package/dist/feel/useParticles.js +79 -0
- package/dist/feel/useParticles.js.map +1 -0
- package/dist/feel/useShake.d.ts +14 -0
- package/dist/feel/useShake.d.ts.map +1 -0
- package/dist/feel/useShake.js +17 -0
- package/dist/feel/useShake.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/theme.css +93 -0
- package/dist/tokens.d.ts +112 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +106 -0
- package/dist/tokens.js.map +1 -0
- package/dist/useGameSounds.d.ts.map +1 -1
- package/dist/useGameSounds.js +37 -15
- package/dist/useGameSounds.js.map +1 -1
- package/dist/useLeaderboard.d.ts +8 -1
- package/dist/useLeaderboard.d.ts.map +1 -1
- package/dist/useLeaderboard.js +21 -11
- package/dist/useLeaderboard.js.map +1 -1
- package/package.json +23 -7
package/dist/GameTopbar.js
CHANGED
|
@@ -1,113 +1,41 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useState } from 'react';
|
|
2
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
3
|
+
import styles from './GameTopbar.module.css';
|
|
3
4
|
import { useSound } from './SoundContext.js';
|
|
5
|
+
/**
|
|
6
|
+
* Shared icon button for topbar controls. All buttons in the topbar (catalog,
|
|
7
|
+
* rules, play/pause, restart, about, sound, close) use this consistent sizing
|
|
8
|
+
* and behaviour. The `data-fgs-tb-btn` attribute is kept on every control so
|
|
9
|
+
* games that already target it keep working.
|
|
10
|
+
*/
|
|
11
|
+
const TopbarIconButton = forwardRef(function TopbarIconButton({ onClick, href, target, rel, tone = 'muted', ariaLabel, ariaPressed, children }, ref) {
|
|
12
|
+
const className = `${styles.button} ${toneClass(tone)}`;
|
|
13
|
+
if (href) {
|
|
14
|
+
return (_jsx("a", { "data-fgs-tb-btn": true, href: href, target: target, rel: rel, className: `${className} ${styles.link}`, "aria-label": ariaLabel, children: children }));
|
|
15
|
+
}
|
|
16
|
+
return (_jsx("button", { ref: ref, "data-fgs-tb-btn": true, onClick: onClick, className: className, "aria-label": ariaLabel, "aria-pressed": ariaPressed, children: children }));
|
|
17
|
+
});
|
|
18
|
+
function toneClass(tone) {
|
|
19
|
+
if (tone === 'ink')
|
|
20
|
+
return styles.toneInk ?? '';
|
|
21
|
+
if (tone === 'accent')
|
|
22
|
+
return styles.toneAccent ?? '';
|
|
23
|
+
return styles.toneMuted ?? '';
|
|
24
|
+
}
|
|
4
25
|
/**
|
|
5
26
|
* The single allowed topbar shape for FreeGameStore games. Brand
|
|
6
|
-
* consistency: same font, same paddings, same
|
|
27
|
+
* consistency: same font, same paddings, same colour tokens, same stat
|
|
7
28
|
* layout across every game on the storefront.
|
|
8
29
|
*
|
|
9
30
|
* Use inside <GameShell topbar={<GameTopbar … />}>.
|
|
10
31
|
*/
|
|
11
|
-
export function GameTopbar({ title, score, stats, actions, rules, about, onPlayPause, paused, onRestart, }) {
|
|
32
|
+
export function GameTopbar({ title, score, showScore = false, stats, actions, rules, about, onPlayPause, paused, onRestart, }) {
|
|
12
33
|
const [showRules, setShowRules] = useState(false);
|
|
13
34
|
const [showAbout, setShowAbout] = useState(false);
|
|
14
35
|
const sound = useSound();
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
? [{ label: 'Score', value: score, accent: true }]
|
|
19
|
-
: [];
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsx("style", { children: TOPBAR_BUTTON_CSS }), _jsxs("div", { style: {
|
|
21
|
-
display: 'flex',
|
|
22
|
-
alignItems: 'center',
|
|
23
|
-
justifyContent: 'space-between',
|
|
24
|
-
gap: '0.75rem',
|
|
25
|
-
padding: '0.25rem 0.75rem',
|
|
26
|
-
height: '2rem',
|
|
27
|
-
}, children: [_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '0.25rem', minWidth: 0 }, children: [_jsx("a", { "data-fgs-tb-btn": true, href: "https://freegamestore.online", target: "_blank", rel: "noopener noreferrer", style: {
|
|
28
|
-
background: 'none',
|
|
29
|
-
border: 'none',
|
|
30
|
-
cursor: 'pointer',
|
|
31
|
-
padding: 0,
|
|
32
|
-
minWidth: '2.75rem',
|
|
33
|
-
minHeight: '2.75rem',
|
|
34
|
-
display: 'flex',
|
|
35
|
-
alignItems: 'center',
|
|
36
|
-
justifyContent: 'center',
|
|
37
|
-
color: 'var(--muted, #999)',
|
|
38
|
-
WebkitTapHighlightColor: 'transparent',
|
|
39
|
-
textDecoration: 'none',
|
|
40
|
-
}, "aria-label": "Browse all games", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("rect", { x: "2", y: "2", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "9", y: "2", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "2", y: "9", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "9", y: "9", width: "5", height: "5", rx: "1" })] }) }), rules !== undefined && (_jsx("button", { "data-fgs-tb-btn": true, onClick: () => setShowRules(true), style: {
|
|
41
|
-
background: 'none',
|
|
42
|
-
border: 'none',
|
|
43
|
-
cursor: 'pointer',
|
|
44
|
-
padding: 0,
|
|
45
|
-
minWidth: '2.75rem',
|
|
46
|
-
minHeight: '2.75rem',
|
|
47
|
-
display: 'flex',
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
justifyContent: 'center',
|
|
50
|
-
color: 'var(--muted, #999)',
|
|
51
|
-
lineHeight: 1,
|
|
52
|
-
WebkitTapHighlightColor: 'transparent',
|
|
53
|
-
}, "aria-label": "Game rules", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.5" }), _jsx("path", { d: "M8 11.5v0M8 5v4" })] }) })), title !== undefined && (_jsx("span", { style: {
|
|
54
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
55
|
-
fontWeight: 600,
|
|
56
|
-
fontSize: '0.8rem',
|
|
57
|
-
letterSpacing: '-0.01em',
|
|
58
|
-
whiteSpace: 'nowrap',
|
|
59
|
-
overflow: 'hidden',
|
|
60
|
-
textOverflow: 'ellipsis',
|
|
61
|
-
}, children: title }))] }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: '0.75rem' }, children: [resolvedStats.map((s) => (_jsx(Stat, { stat: s }, s.label))), onPlayPause !== undefined && (_jsx("button", { "data-fgs-tb-btn": true, onClick: onPlayPause, style: {
|
|
62
|
-
background: 'none',
|
|
63
|
-
border: 'none',
|
|
64
|
-
cursor: 'pointer',
|
|
65
|
-
padding: 0,
|
|
66
|
-
minWidth: '2.75rem',
|
|
67
|
-
minHeight: '2.75rem',
|
|
68
|
-
display: 'flex',
|
|
69
|
-
alignItems: 'center',
|
|
70
|
-
justifyContent: 'center',
|
|
71
|
-
color: 'var(--ink, #f0f0f0)',
|
|
72
|
-
WebkitTapHighlightColor: 'transparent',
|
|
73
|
-
}, "aria-label": "Pause", "aria-pressed": paused === true, children: paused ? (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: _jsx("path", { d: "M4 2l10 6-10 6V2z" }) })) : (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: [_jsx("rect", { x: "2", y: "2", width: "4", height: "12", rx: "1" }), _jsx("rect", { x: "10", y: "2", width: "4", height: "12", rx: "1" })] })) })), onRestart !== undefined && (_jsx("button", { "data-fgs-tb-btn": true, onClick: onRestart, style: {
|
|
74
|
-
background: 'none',
|
|
75
|
-
border: 'none',
|
|
76
|
-
cursor: 'pointer',
|
|
77
|
-
padding: 0,
|
|
78
|
-
minWidth: '2.75rem',
|
|
79
|
-
minHeight: '2.75rem',
|
|
80
|
-
display: 'flex',
|
|
81
|
-
alignItems: 'center',
|
|
82
|
-
justifyContent: 'center',
|
|
83
|
-
color: 'var(--muted, #999)',
|
|
84
|
-
WebkitTapHighlightColor: 'transparent',
|
|
85
|
-
}, "aria-label": "Restart", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M2 8a6 6 0 0111.5-2.5" }), _jsx("path", { d: "M14 8a6 6 0 01-11.5 2.5" }), _jsx("path", { d: "M14 2v3.5h-3.5" }), _jsx("path", { d: "M2 14v-3.5h3.5" })] }) })), _jsx("button", { "data-fgs-tb-btn": true, onClick: () => setShowAbout(true), style: {
|
|
86
|
-
background: 'none',
|
|
87
|
-
border: 'none',
|
|
88
|
-
cursor: 'pointer',
|
|
89
|
-
padding: 0,
|
|
90
|
-
minWidth: '2.75rem',
|
|
91
|
-
minHeight: '2.75rem',
|
|
92
|
-
display: 'flex',
|
|
93
|
-
alignItems: 'center',
|
|
94
|
-
justifyContent: 'center',
|
|
95
|
-
color: 'var(--muted, #999)',
|
|
96
|
-
lineHeight: 1,
|
|
97
|
-
WebkitTapHighlightColor: 'transparent',
|
|
98
|
-
}, "aria-label": "About this game", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.5" }), _jsx("path", { d: "M8 7.25v3.5" }), _jsx("path", { d: "M8 5.15v0" })] }) }), _jsx("button", { "data-fgs-tb-btn": true, onClick: sound.toggle, style: {
|
|
99
|
-
background: 'none',
|
|
100
|
-
border: 'none',
|
|
101
|
-
cursor: 'pointer',
|
|
102
|
-
padding: 0,
|
|
103
|
-
minWidth: '2.75rem',
|
|
104
|
-
minHeight: '2.75rem',
|
|
105
|
-
display: 'flex',
|
|
106
|
-
alignItems: 'center',
|
|
107
|
-
justifyContent: 'center',
|
|
108
|
-
color: sound.muted ? 'var(--muted, #999)' : 'var(--accent, #10b981)',
|
|
109
|
-
WebkitTapHighlightColor: 'transparent',
|
|
110
|
-
}, "aria-label": "Mute", "aria-pressed": sound.muted, children: sound.muted ? (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M8 2L4 5.5H1.5v5H4L8 14V2z" }), _jsx("path", { d: "M12 5.5l4 5M16 5.5l-4 5" })] })) : (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M8 2L4 5.5H1.5v5H4L8 14V2z" }), _jsx("path", { d: "M11.5 5a4.5 4.5 0 010 6" }), _jsx("path", { d: "M13.5 3a7.5 7.5 0 010 10" })] })) }), actions !== undefined && (_jsx("div", { style: { display: 'flex', gap: '0.4rem', alignItems: 'center' }, children: actions }))] })] }), showRules && rules !== undefined && (_jsx(RulesOverlay, { onClose: () => setShowRules(false), children: rules })), showAbout && (_jsx(AboutOverlay, { title: title, extra: about, onClose: () => setShowAbout(false) }))] }));
|
|
36
|
+
const scorePill = showScore && score !== undefined ? [{ label: 'Score', value: score, accent: true }] : [];
|
|
37
|
+
const resolvedStats = [...scorePill, ...(stats ?? [])];
|
|
38
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: styles.bar, children: [_jsxs("div", { className: styles.group, children: [_jsx(TopbarIconButton, { href: "https://freegamestore.online", target: "_blank", rel: "noopener noreferrer", ariaLabel: "Browse all games", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("rect", { x: "2", y: "2", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "9", y: "2", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "2", y: "9", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "9", y: "9", width: "5", height: "5", rx: "1" })] }) }), rules !== undefined && (_jsx(TopbarIconButton, { onClick: () => setShowRules(true), ariaLabel: "Game rules", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.5" }), _jsx("path", { d: "M8 11.5v0M8 5v4" })] }) })), title !== undefined && _jsx("span", { className: styles.title, children: title })] }), _jsxs("div", { className: `${styles.group} ${styles.groupEnd}`, children: [resolvedStats.map((s) => (_jsx(Stat, { stat: s }, s.label))), onPlayPause !== undefined && (_jsx(TopbarIconButton, { onClick: onPlayPause, tone: "ink", ariaLabel: "Pause", ariaPressed: paused === true, children: paused ? (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: _jsx("path", { d: "M4 2l10 6-10 6V2z" }) })) : (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "currentColor", children: [_jsx("rect", { x: "2", y: "2", width: "4", height: "12", rx: "1" }), _jsx("rect", { x: "10", y: "2", width: "4", height: "12", rx: "1" })] })) })), onRestart !== undefined && (_jsx(TopbarIconButton, { onClick: onRestart, ariaLabel: "Restart", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M2 8a6 6 0 0111.5-2.5" }), _jsx("path", { d: "M14 8a6 6 0 01-11.5 2.5" }), _jsx("path", { d: "M14 2v3.5h-3.5" }), _jsx("path", { d: "M2 14v-3.5h3.5" })] }) })), _jsx(TopbarIconButton, { onClick: () => setShowAbout(true), ariaLabel: "About this game", children: _jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "8", cy: "8", r: "6.5" }), _jsx("path", { d: "M8 7.25v3.5" }), _jsx("path", { d: "M8 5.15v0" })] }) }), _jsx(TopbarIconButton, { onClick: sound.toggle, tone: sound.muted ? 'muted' : 'accent', ariaLabel: "Mute", ariaPressed: sound.muted, children: sound.muted ? (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M8 2L4 5.5H1.5v5H4L8 14V2z" }), _jsx("path", { d: "M12 5.5l4 5M16 5.5l-4 5" })] })) : (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("path", { d: "M8 2L4 5.5H1.5v5H4L8 14V2z" }), _jsx("path", { d: "M11.5 5a4.5 4.5 0 010 6" }), _jsx("path", { d: "M13.5 3a7.5 7.5 0 010 10" })] })) }), actions !== undefined && _jsx("div", { className: styles.actions, children: actions })] })] }), showRules && rules !== undefined && (_jsx(RulesOverlay, { onClose: () => setShowRules(false), children: rules })), showAbout && (_jsx(AboutOverlay, { title: title, extra: about, onClose: () => setShowAbout(false) }))] }));
|
|
111
39
|
}
|
|
112
40
|
/** Compact "3 hours ago" style relative time — no dependency, no locale data. */
|
|
113
41
|
function relativeTime(iso) {
|
|
@@ -149,7 +77,7 @@ function AboutOverlay({ title, extra, onClose, }) {
|
|
|
149
77
|
useEffect(() => {
|
|
150
78
|
let cancelled = false;
|
|
151
79
|
fetch('/version.json', { cache: 'no-cache' })
|
|
152
|
-
.then((r) =>
|
|
80
|
+
.then((r) => r.ok ? r.json() : Promise.reject(new Error(String(r.status))))
|
|
153
81
|
.then((d) => {
|
|
154
82
|
if (!cancelled)
|
|
155
83
|
setInfo(d);
|
|
@@ -167,97 +95,35 @@ function AboutOverlay({ title, extra, onClose, }) {
|
|
|
167
95
|
}, []);
|
|
168
96
|
const version = (info?.version ?? '').slice(0, 7);
|
|
169
97
|
const deployedAt = info?.deployedAt;
|
|
170
|
-
return (_jsxs(RulesOverlay, { title: "About", onClose: onClose, children: [title !== undefined &&
|
|
171
|
-
fontFamily: '"Fraunces", Georgia, serif',
|
|
172
|
-
fontWeight: 700,
|
|
173
|
-
fontSize: '1.5rem',
|
|
174
|
-
margin: '0 0 0.75rem',
|
|
175
|
-
}, children: title })), extra !== undefined && _jsx("div", { style: { marginBottom: '1rem' }, children: extra }), _jsxs("dl", { style: { margin: 0, display: 'grid', gridTemplateColumns: 'auto 1fr', gap: '0.35rem 1rem', fontSize: '0.85rem' }, children: [_jsx("dt", { style: { color: 'var(--muted, #999)' }, children: "Version" }), _jsx("dd", { style: { margin: 0, fontVariantNumeric: 'tabular-nums' }, children: version ? (_jsx("code", { style: { fontFamily: 'monospace' }, children: version })) : loaded ? ('development build') : ('…') }), deployedAt && (_jsxs(_Fragment, { children: [_jsx("dt", { style: { color: 'var(--muted, #999)' }, children: "Deployed" }), _jsx("dd", { style: { margin: 0 }, title: new Date(deployedAt).toLocaleString(), children: relativeTime(deployedAt) })] }))] }), _jsxs("p", { style: { marginTop: '1.25rem', fontSize: '0.8rem', color: 'var(--muted, #999)' }, children: ["A free game on", ' ', _jsx("a", { href: "https://freegamestore.online", target: "_blank", rel: "noopener noreferrer", style: { color: 'var(--accent, #10b981)', textDecoration: 'none' }, children: "FreeGameStore" }), "."] })] }));
|
|
98
|
+
return (_jsxs(RulesOverlay, { title: "About", onClose: onClose, children: [title !== undefined && _jsx("h1", { className: styles.aboutHeading, children: title }), extra !== undefined && _jsx("div", { className: styles.aboutExtra, children: extra }), _jsxs("dl", { className: styles.aboutGrid, children: [_jsx("dt", { children: "Version" }), _jsx("dd", { children: version ? (_jsx("code", { className: styles.code, children: version })) : loaded ? ('development build') : ('…') }), deployedAt && (_jsxs(_Fragment, { children: [_jsx("dt", { children: "Deployed" }), _jsx("dd", { title: new Date(deployedAt).toLocaleString(), children: relativeTime(deployedAt) })] }))] }), _jsxs("p", { className: styles.aboutNote, children: ["A free game on", ' ', _jsx("a", { href: "https://freegamestore.online", target: "_blank", rel: "noopener noreferrer", className: styles.aboutLink, children: "FreeGameStore" }), "."] })] }));
|
|
176
99
|
}
|
|
177
100
|
function RulesOverlay({ children, title = 'How to Play', onClose, }) {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
color: 'var(--muted, #999)',
|
|
203
|
-
fontSize: '1.2rem',
|
|
204
|
-
minWidth: '2.75rem',
|
|
205
|
-
minHeight: '2.75rem',
|
|
206
|
-
display: 'flex',
|
|
207
|
-
alignItems: 'center',
|
|
208
|
-
justifyContent: 'center',
|
|
209
|
-
WebkitTapHighlightColor: 'transparent',
|
|
210
|
-
}, "aria-label": "Close", children: "\u00D7" })] }), _jsx("div", { style: {
|
|
211
|
-
flex: 1,
|
|
212
|
-
overflowY: 'auto',
|
|
213
|
-
padding: '1rem',
|
|
214
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
215
|
-
fontSize: '0.9rem',
|
|
216
|
-
lineHeight: 1.6,
|
|
217
|
-
}, children: children })] }));
|
|
101
|
+
const overlayRef = useRef(null);
|
|
102
|
+
const closeButtonRef = useRef(null);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
// Focus the close button when the overlay opens for keyboard accessibility
|
|
105
|
+
closeButtonRef.current?.focus();
|
|
106
|
+
// Handle Escape key to close the overlay, and prevent other keys from
|
|
107
|
+
// reaching game key handlers (which would continue game input while playing)
|
|
108
|
+
const handleKeyDown = (e) => {
|
|
109
|
+
if (e.key === 'Escape') {
|
|
110
|
+
e.preventDefault();
|
|
111
|
+
onClose();
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
// Prevent any other key events from reaching the game
|
|
115
|
+
e.preventDefault();
|
|
116
|
+
e.stopPropagation();
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
document.addEventListener('keydown', handleKeyDown, true);
|
|
120
|
+
return () => {
|
|
121
|
+
document.removeEventListener('keydown', handleKeyDown, true);
|
|
122
|
+
};
|
|
123
|
+
}, [onClose]);
|
|
124
|
+
return (_jsxs("div", { ref: overlayRef, role: "dialog", "aria-modal": "true", "aria-label": title, className: styles.overlay, children: [_jsxs("div", { className: styles.overlayHeader, children: [_jsx("span", { className: styles.overlayTitle, children: title }), _jsx(TopbarIconButton, { ref: closeButtonRef, onClick: onClose, ariaLabel: "Close", children: "\u00D7" })] }), _jsx("div", { className: styles.overlayBody, children: children })] }));
|
|
218
125
|
}
|
|
219
126
|
function Stat({ stat }) {
|
|
220
|
-
return (_jsxs("div", {
|
|
221
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
222
|
-
fontWeight: 800,
|
|
223
|
-
fontSize: '0.85rem',
|
|
224
|
-
color: stat.accent === true ? 'var(--accent)' : 'var(--ink)',
|
|
225
|
-
fontVariantNumeric: 'tabular-nums',
|
|
226
|
-
lineHeight: 1,
|
|
227
|
-
}, children: stat.value }), _jsx("div", { style: {
|
|
228
|
-
// Was 0.5rem (~8px) — too small to read in sunlight or for
|
|
229
|
-
// anyone with even mild low vision. 0.65rem (~10.4px) keeps
|
|
230
|
-
// the visual hierarchy (value still dominates at 0.85rem)
|
|
231
|
-
// while staying legible.
|
|
232
|
-
fontSize: '0.65rem',
|
|
233
|
-
fontWeight: 700,
|
|
234
|
-
textTransform: 'uppercase',
|
|
235
|
-
letterSpacing: '0.06em',
|
|
236
|
-
color: 'var(--muted)',
|
|
237
|
-
lineHeight: 1,
|
|
238
|
-
}, children: stat.label })] }));
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* Pseudo-state styling for every topbar button + link. Tagged via
|
|
242
|
-
* `data-fgs-tb-btn`. Keep this small and predictable — the topbar is
|
|
243
|
-
* brand surface, not a creative palette.
|
|
244
|
-
*
|
|
245
|
-
* :active — opacity dip so taps feel anchored on touch devices that
|
|
246
|
-
* otherwise give no feedback (we already disable the
|
|
247
|
-
* default tap-highlight via WebkitTapHighlightColor).
|
|
248
|
-
*
|
|
249
|
-
* :focus-visible — accent outline so keyboard users see where focus
|
|
250
|
-
* is. -2px outline-offset draws inside the button's
|
|
251
|
-
* 2.75rem touch target so the ring doesn't bleed
|
|
252
|
-
* into adjacent controls.
|
|
253
|
-
*/
|
|
254
|
-
const TOPBAR_BUTTON_CSS = `
|
|
255
|
-
[data-fgs-tb-btn] { transition: opacity 80ms ease; }
|
|
256
|
-
[data-fgs-tb-btn]:active { opacity: 0.55; }
|
|
257
|
-
[data-fgs-tb-btn]:focus-visible {
|
|
258
|
-
outline: 2px solid var(--accent, #10b981);
|
|
259
|
-
outline-offset: -2px;
|
|
260
|
-
border-radius: 0.4rem;
|
|
127
|
+
return (_jsxs("div", { className: styles.stat, children: [_jsx("div", { className: `${styles.statValue} ${stat.accent === true ? styles.statAccent : ''}`, children: stat.value }), _jsx("div", { className: styles.statLabel, children: stat.label })] }));
|
|
261
128
|
}
|
|
262
|
-
`;
|
|
263
129
|
//# sourceMappingURL=GameTopbar.js.map
|
package/dist/GameTopbar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameTopbar.js","sourceRoot":"","sources":["../src/GameTopbar.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,Q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SAAS,EAAE,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,YACnF,IAAI,CAAC,KAAK,GACP,EACN,cAAK,SAAS,EAAE,MAAM,CAAC,SAAS,YAAG,IAAI,CAAC,KAAK,GAAO,IAChD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* GameTopbar styles. Each rule that used to be an inline style now lives here,
|
|
3
|
+
* so the topbar is styled in one place. Colours and the motion timing read the
|
|
4
|
+
* design tokens (TOKENS.md), each with a fallback, so the bar still renders
|
|
5
|
+
* when a game does not load GAME_TOKENS_CSS.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.bar {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
gap: 0.75rem;
|
|
13
|
+
padding: 0.25rem 0.75rem;
|
|
14
|
+
height: 2rem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.group {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 0.25rem;
|
|
21
|
+
min-width: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.groupEnd {
|
|
25
|
+
gap: 0.75rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.actions {
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: 0.4rem;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.title {
|
|
35
|
+
font-family: var(--font-body, "Manrope", system-ui, sans-serif);
|
|
36
|
+
font-weight: 600;
|
|
37
|
+
font-size: 0.8rem;
|
|
38
|
+
letter-spacing: -0.01em;
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Icon buttons and the catalog link. Every control in the topbar uses this. */
|
|
45
|
+
.button {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
min-width: 2.75rem;
|
|
50
|
+
min-height: 2.75rem;
|
|
51
|
+
padding: 0;
|
|
52
|
+
background: none;
|
|
53
|
+
border: none;
|
|
54
|
+
cursor: pointer;
|
|
55
|
+
color: var(--muted, #999);
|
|
56
|
+
-webkit-tap-highlight-color: transparent;
|
|
57
|
+
transition: opacity var(--motion-duration, 80ms) var(--motion-easing, ease-out);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.link {
|
|
61
|
+
text-decoration: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Tones: the play/pause icon is ink, the sound icon is accent when sound is on */
|
|
65
|
+
.toneMuted {
|
|
66
|
+
color: var(--muted, #999);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.toneInk {
|
|
70
|
+
color: var(--ink, #f0f0f0);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.toneAccent {
|
|
74
|
+
color: var(--accent, #10b981);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* A tap dips the control slightly, so it feels anchored on touch screens */
|
|
78
|
+
.button:active {
|
|
79
|
+
opacity: 0.55;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.button:focus-visible {
|
|
83
|
+
outline: 2px solid var(--accent, #10b981);
|
|
84
|
+
outline-offset: -2px;
|
|
85
|
+
border-radius: 0.4rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Score and stat values */
|
|
89
|
+
.stat {
|
|
90
|
+
text-align: right;
|
|
91
|
+
line-height: 1.05;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.statValue {
|
|
95
|
+
font-family: var(--font-body, "Manrope", system-ui, sans-serif);
|
|
96
|
+
font-weight: 800;
|
|
97
|
+
font-size: 0.85rem;
|
|
98
|
+
color: var(--ink);
|
|
99
|
+
font-variant-numeric: tabular-nums;
|
|
100
|
+
line-height: 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.statAccent {
|
|
104
|
+
color: var(--accent);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/* Label under a stat. 0.65rem keeps it legible in sunlight and for low vision. */
|
|
108
|
+
.statLabel {
|
|
109
|
+
font-size: 0.65rem;
|
|
110
|
+
font-weight: 700;
|
|
111
|
+
text-transform: uppercase;
|
|
112
|
+
letter-spacing: 0.06em;
|
|
113
|
+
color: var(--muted);
|
|
114
|
+
line-height: 1;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* Rules and About overlays: a full-screen panel with a header and a scrolling body */
|
|
118
|
+
.overlay {
|
|
119
|
+
position: fixed;
|
|
120
|
+
inset: 0;
|
|
121
|
+
z-index: 9999;
|
|
122
|
+
display: flex;
|
|
123
|
+
flex-direction: column;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
background: var(--paper, #0f0f0f);
|
|
126
|
+
color: var(--ink, #f0f0f0);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.overlayHeader {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
justify-content: space-between;
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
padding: 0.5rem 0.75rem;
|
|
135
|
+
border-bottom: 1px solid var(--line, #2a2a2a);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.overlayTitle {
|
|
139
|
+
font-family: var(--font-body, "Manrope", system-ui, sans-serif);
|
|
140
|
+
font-weight: 700;
|
|
141
|
+
font-size: 0.9rem;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.overlayBody {
|
|
145
|
+
flex: 1;
|
|
146
|
+
overflow-y: auto;
|
|
147
|
+
padding: 1rem;
|
|
148
|
+
font-family: var(--font-body, "Manrope", system-ui, sans-serif);
|
|
149
|
+
font-size: 0.9rem;
|
|
150
|
+
line-height: 1.6;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* About panel */
|
|
154
|
+
.aboutHeading {
|
|
155
|
+
margin: 0 0 0.75rem;
|
|
156
|
+
font-family: var(--font-display, "Fraunces", Georgia, serif);
|
|
157
|
+
font-weight: 700;
|
|
158
|
+
font-size: 1.5rem;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.aboutExtra {
|
|
162
|
+
margin-bottom: 1rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.aboutGrid {
|
|
166
|
+
display: grid;
|
|
167
|
+
grid-template-columns: auto 1fr;
|
|
168
|
+
gap: 0.35rem 1rem;
|
|
169
|
+
margin: 0;
|
|
170
|
+
font-size: 0.85rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.aboutGrid dt {
|
|
174
|
+
color: var(--muted, #999);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.aboutGrid dd {
|
|
178
|
+
margin: 0;
|
|
179
|
+
font-variant-numeric: tabular-nums;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.code {
|
|
183
|
+
font-family: monospace;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.aboutNote {
|
|
187
|
+
margin-top: 1.25rem;
|
|
188
|
+
font-size: 0.8rem;
|
|
189
|
+
color: var(--muted, #999);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.aboutLink {
|
|
193
|
+
color: var(--accent, #10b981);
|
|
194
|
+
text-decoration: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media (prefers-reduced-motion: reduce) {
|
|
198
|
+
.button {
|
|
199
|
+
transition: none;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Leaderboard.d.ts","sourceRoot":"","sources":["../src/Leaderboard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,YAAY,EACZ,OAAO,GACR,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Leaderboard.d.ts","sourceRoot":"","sources":["../src/Leaderboard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,YAAY,EAAE,gBAAgB,EAAE,CAAC;IACjC,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,YAAY,EACZ,OAAO,GACR,EAAE,gBAAgB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CA+CtC"}
|
package/dist/Leaderboard.js
CHANGED
|
@@ -4,11 +4,8 @@ export function Leaderboard({ topScores, recentScores, loading, }) {
|
|
|
4
4
|
const [tab, setTab] = useState('top');
|
|
5
5
|
const scores = tab === 'top' ? topScores : recentScores;
|
|
6
6
|
if (loading) {
|
|
7
|
-
return
|
|
7
|
+
return _jsx("div", { className: "px-4 py-3 text-xs text-muted", children: "Loading scores..." });
|
|
8
8
|
}
|
|
9
|
-
return (_jsxs("div", { className: "flex flex-col gap-2 px-4 py-3", children: [_jsx("div", { className: "flex gap-1", children: ['top', 'recent'].map((t) => (_jsx("button", { onClick: () => setTab(t), className:
|
|
10
|
-
background: tab === t ? 'var(--accent)' : 'transparent',
|
|
11
|
-
color: tab === t ? '#fff' : 'var(--muted)',
|
|
12
|
-
}, children: t === 'top' ? 'Top' : 'Recent' }, t))) }), scores.length === 0 ? (_jsx("div", { className: "text-xs", style: { color: 'var(--muted)' }, children: "No scores yet. Be the first!" })) : (_jsx("div", { className: "flex flex-col gap-1", children: scores.map((entry, i) => (_jsxs("div", { className: "flex items-center justify-between text-xs py-1", style: { borderBottom: '1px solid var(--line)' }, children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "w-5 text-right font-semibold", style: { color: i < 3 ? 'var(--accent)' : 'var(--muted)' }, children: i + 1 }), _jsx("span", { className: "truncate max-w-[8rem]", children: entry.player_name })] }), _jsx("span", { className: "font-bold", style: { fontFamily: 'Fraunces, serif' }, children: entry.score.toLocaleString() })] }, `${entry.player_name}-${entry.score}-${i}`))) }))] }));
|
|
9
|
+
return (_jsxs("div", { className: "flex flex-col gap-2 px-4 py-3", children: [_jsx("div", { className: "flex gap-1", children: ['top', 'recent'].map((t) => (_jsx("button", { onClick: () => setTab(t), className: `rounded-lg px-3 py-1 text-xs font-semibold ${tab === t ? 'bg-accent text-white' : 'bg-transparent text-muted'}`, children: t === 'top' ? 'Top' : 'Recent' }, t))) }), scores.length === 0 ? (_jsx("div", { className: "text-xs text-muted", children: "No scores yet. Be the first!" })) : (_jsx("div", { className: "flex flex-col gap-1", children: scores.map((entry, i) => (_jsxs("div", { className: "flex items-center justify-between border-b border-line py-1 text-xs", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: `w-5 text-right font-semibold ${i < 3 ? 'text-accent' : 'text-muted'}`, children: i + 1 }), _jsx("span", { className: "max-w-[8rem] truncate", children: entry.player_name })] }), _jsx("span", { className: "font-display font-bold", children: entry.score.toLocaleString() })] }, `${entry.player_name}-${entry.score}-${i}`))) }))] }));
|
|
13
10
|
}
|
|
14
11
|
//# sourceMappingURL=Leaderboard.js.map
|
package/dist/Leaderboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Leaderboard.js","sourceRoot":"","sources":["../src/Leaderboard.tsx"],"names":[],"mappings":";AAAA,OAAO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,GACE,EACL,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACrB,cAAK,SAAS,EAAC,oBAAoB,6CAAmC,CACvE,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,qBAAqB,YACjC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CACxB,eAEE,SAAS,EAAC,qEAAqE,aAE/E,eAAK,SAAS,EAAC,yBAAyB,aACtC,eACE,SAAS,EAAE,gCAAgC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EAAE,YAEhF,CAAC,GAAG,CAAC,GACD,EACP,eAAM,SAAS,EAAC,uBAAuB,YAAE,KAAK,CAAC,WAAW,GAAQ,IAC9D,EACN,eAAM,SAAS,EAAC,wBAAwB,YAAE,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,GAAQ,KAXzE,GAAG,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,KAAK,IAAI,CAAC,EAAE,CAY3C,CACP,CAAC,GACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type * as React from 'react';
|
|
2
|
+
export interface StartScreenStep {
|
|
3
|
+
/** Short name of the step, shown in bold. */
|
|
4
|
+
heading: string;
|
|
5
|
+
/** One or two sentences of explanation. */
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
export interface StartScreenProps {
|
|
9
|
+
/** The game's display name, set large in the display face. */
|
|
10
|
+
title: string;
|
|
11
|
+
/** One line under the title. */
|
|
12
|
+
tagline?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Decorative art above the title, such as a mosaic or a logo. It is hidden
|
|
15
|
+
* from assistive technology, because the title already names the game.
|
|
16
|
+
*/
|
|
17
|
+
artwork?: React.ReactNode;
|
|
18
|
+
/** Label for the main button. Default "Play". */
|
|
19
|
+
playLabel?: string;
|
|
20
|
+
/** Called when the player taps Play. */
|
|
21
|
+
onPlay: () => void;
|
|
22
|
+
/**
|
|
23
|
+
* Called when the player taps How to play. Use this when the game shows its
|
|
24
|
+
* own rules screen. When it is omitted, `howToPlay` steps open the SDK's overlay.
|
|
25
|
+
*/
|
|
26
|
+
onHowToPlay?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Numbered steps for the built-in How to play overlay. Used only when
|
|
29
|
+
* `onHowToPlay` is not given. Omit both to hide the button.
|
|
30
|
+
*/
|
|
31
|
+
howToPlay?: readonly StartScreenStep[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A game's start screen: artwork, title, tagline, then Play and How to play.
|
|
35
|
+
* Motion is the `animate-fgs-*` utilities from the SDK's `theme.css`, and it
|
|
36
|
+
* stops under prefers-reduced-motion. The card sits on an opaque `bg-panel`.
|
|
37
|
+
*
|
|
38
|
+
* Colours come from the platform tokens through the game's `@theme` mapping.
|
|
39
|
+
*/
|
|
40
|
+
export declare function StartScreen({ title, tagline, artwork, playLabel, onPlay, onHowToPlay, howToPlay, }: StartScreenProps): React.JSX.Element;
|
|
41
|
+
//# sourceMappingURL=StartScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StartScreen.d.ts","sourceRoot":"","sources":["../src/StartScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAKpC,MAAM,WAAW,eAAe;IAC9B,6CAA6C;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;CACxC;AA6BD;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAkB,EAClB,MAAM,EACN,WAAW,EACX,SAAS,GACV,EAAE,gBAAgB,qBAqDlB"}
|