@freegamestore/games 0.18.0 → 0.19.1
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 +51 -6
- package/dist/Confetti.d.ts +4 -6
- package/dist/Confetti.d.ts.map +1 -1
- package/dist/Confetti.js +16 -49
- package/dist/Confetti.js.map +1 -1
- 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.map +1 -1
- package/dist/GameConfirm.js +1 -7
- package/dist/GameConfirm.js.map +1 -1
- package/dist/GameModal.d.ts +2 -1
- 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 +2 -1
- 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 +3 -8
- package/dist/GameResultScreen.d.ts.map +1 -1
- package/dist/GameResultScreen.js +8 -140
- package/dist/GameResultScreen.js.map +1 -1
- 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.map +1 -1
- package/dist/GameTextSizeToggle.js +1 -16
- package/dist/GameTextSizeToggle.js.map +1 -1
- package/dist/GameThemeToggle.d.ts.map +1 -1
- package/dist/GameThemeToggle.js +1 -14
- package/dist/GameThemeToggle.js.map +1 -1
- 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 +3 -10
- package/dist/StartScreen.d.ts.map +1 -1
- package/dist/StartScreen.js +7 -136
- package/dist/StartScreen.js.map +1 -1
- package/dist/feel/ScorePopup.d.ts +0 -5
- package/dist/feel/ScorePopup.d.ts.map +1 -1
- package/dist/feel/ScorePopup.js +4 -20
- package/dist/feel/ScorePopup.js.map +1 -1
- package/dist/feel/index.d.ts +1 -1
- package/dist/feel/index.d.ts.map +1 -1
- package/dist/feel/index.js +1 -1
- package/dist/feel/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/theme.css +93 -0
- package/package.json +4 -3
package/dist/GameOverScreen.js
CHANGED
|
@@ -3,45 +3,11 @@ import { GameButton } from './GameButton.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Standard game-over overlay. Shows score, optional high score,
|
|
5
5
|
* play again button, and optional extra content.
|
|
6
|
-
* Renders as a centered overlay on top of the game board.
|
|
6
|
+
* Renders as a centered overlay on top of the game board. The text sits on a
|
|
7
|
+
* dark scrim, so it uses white rather than the page tokens.
|
|
7
8
|
*/
|
|
8
9
|
export function GameOverScreen({ score, highScore, onPlayAgain, children }) {
|
|
9
10
|
const isNewHigh = highScore !== undefined && score >= highScore && score > 0;
|
|
10
|
-
return (_jsx("div", {
|
|
11
|
-
position: 'absolute',
|
|
12
|
-
inset: 0,
|
|
13
|
-
zIndex: 800,
|
|
14
|
-
background: 'rgba(0,0,0,0.65)',
|
|
15
|
-
backdropFilter: 'blur(6px)',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
justifyContent: 'center',
|
|
19
|
-
padding: '1.5rem',
|
|
20
|
-
}, children: _jsxs("div", { style: {
|
|
21
|
-
textAlign: 'center',
|
|
22
|
-
maxWidth: 320,
|
|
23
|
-
width: '100%',
|
|
24
|
-
}, children: [_jsx("div", { style: {
|
|
25
|
-
fontSize: '0.75rem',
|
|
26
|
-
fontWeight: 700,
|
|
27
|
-
textTransform: 'uppercase',
|
|
28
|
-
letterSpacing: '0.1em',
|
|
29
|
-
color: 'rgba(255,255,255,0.6)',
|
|
30
|
-
marginBottom: '0.5rem',
|
|
31
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
32
|
-
}, children: "Game Over" }), _jsx("div", { style: {
|
|
33
|
-
fontSize: '3rem',
|
|
34
|
-
fontWeight: 800,
|
|
35
|
-
color: '#ffffff',
|
|
36
|
-
lineHeight: 1,
|
|
37
|
-
marginBottom: '0.25rem',
|
|
38
|
-
fontFamily: '"Fraunces", serif',
|
|
39
|
-
}, children: score.toLocaleString() }), highScore !== undefined && (_jsx("div", { style: {
|
|
40
|
-
fontSize: '0.8rem',
|
|
41
|
-
fontWeight: 600,
|
|
42
|
-
color: isNewHigh ? 'var(--accent, #10b981)' : 'rgba(255,255,255,0.5)',
|
|
43
|
-
marginBottom: '1rem',
|
|
44
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
45
|
-
}, children: isNewHigh ? 'New high score!' : `Best: ${highScore.toLocaleString()}` })), !highScore && _jsx("div", { style: { marginBottom: '1rem' } }), _jsx(GameButton, { onClick: onPlayAgain, variant: "primary", size: "lg", children: "Play Again" }), children && (_jsx("div", { style: { marginTop: '1rem', color: 'rgba(255,255,255,0.7)', fontSize: '0.85rem' }, children: children }))] }) }));
|
|
11
|
+
return (_jsx("div", { className: "absolute inset-0 z-[800] flex items-center justify-center bg-black/65 p-6 backdrop-blur-[6px]", children: _jsxs("div", { className: "w-full max-w-80 text-center", children: [_jsx("div", { className: "mb-2 text-xs font-bold uppercase tracking-widest text-white/60", children: "Game Over" }), _jsx("div", { className: "mb-1 font-display text-5xl font-extrabold leading-none text-white", children: score.toLocaleString() }), highScore !== undefined && (_jsx("div", { className: `mb-4 text-[0.8rem] font-semibold ${isNewHigh ? 'text-accent' : 'text-white/50'}`, children: isNewHigh ? 'New high score!' : `Best: ${highScore.toLocaleString()}` })), !highScore && _jsx("div", { className: "mb-4" }), _jsx(GameButton, { onClick: onPlayAgain, variant: "primary", size: "lg", children: "Play Again" }), children && _jsx("div", { className: "mt-4 text-[0.85rem] text-white/70", children: children })] }) }));
|
|
46
12
|
}
|
|
47
13
|
//# sourceMappingURL=GameOverScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameOverScreen.js","sourceRoot":"","sources":["../src/GameOverScreen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAa7C
|
|
1
|
+
{"version":3,"file":"GameOverScreen.js","sourceRoot":"","sources":["../src/GameOverScreen.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAa7C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAuB;IAC7F,MAAM,SAAS,GAAG,SAAS,KAAK,SAAS,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,GAAG,CAAC,CAAC;IAE7E,OAAO,CACL,cAAK,SAAS,EAAC,+FAA+F,YAC5G,eAAK,SAAS,EAAC,6BAA6B,aAC1C,cAAK,SAAS,EAAC,gEAAgE,0BAEzE,EAEN,cAAK,SAAS,EAAC,mEAAmE,YAC/E,KAAK,CAAC,cAAc,EAAE,GACnB,EAEL,SAAS,KAAK,SAAS,IAAI,CAC1B,cACE,SAAS,EAAE,oCAAoC,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAAE,YAE3F,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,SAAS,CAAC,cAAc,EAAE,EAAE,GAClE,CACP,EAEA,CAAC,SAAS,IAAI,cAAK,SAAS,EAAC,MAAM,GAAG,EAEvC,KAAC,UAAU,IAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,2BAEhD,EAEZ,QAAQ,IAAI,cAAK,SAAS,EAAC,mCAAmC,YAAE,QAAQ,GAAO,IAC5E,GACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -27,20 +27,15 @@ export interface GameResultScreenProps {
|
|
|
27
27
|
/** Extra content between the badge and the action, such as a leaderboard submit button. */
|
|
28
28
|
children?: ReactNode;
|
|
29
29
|
}
|
|
30
|
-
/**
|
|
31
|
-
* Styles for the result screen. Durations and easings come from the motion
|
|
32
|
-
* tokens. Everything stops under prefers-reduced-motion. Class names carry the
|
|
33
|
-
* `fgs-` prefix, so they cannot collide with a game's own styles.
|
|
34
|
-
*/
|
|
35
|
-
export declare const RESULT_SCREEN_CSS: string;
|
|
36
30
|
/**
|
|
37
31
|
* An animated result screen for a finished level or game. It is a modal dialog
|
|
38
32
|
* with a title, optional stats and badge, optional extra content, and one
|
|
39
33
|
* action. A win adds falling confetti. The action is focused when the screen
|
|
40
34
|
* opens, so keyboard and screen-reader users land on the next step.
|
|
41
35
|
*
|
|
42
|
-
* It covers the viewport.
|
|
43
|
-
*
|
|
36
|
+
* It covers the viewport. The card sits on an opaque `bg-panel` surface; only
|
|
37
|
+
* the scrim behind it is translucent. Motion is the `animate-fgs-*` utilities
|
|
38
|
+
* from the SDK's `theme.css`, and it stops under prefers-reduced-motion.
|
|
44
39
|
*/
|
|
45
40
|
export declare function GameResultScreen({ tone, eyebrow, title, message, stats, badge, action, children, }: GameResultScreenProps): React.JSX.Element;
|
|
46
41
|
//# sourceMappingURL=GameResultScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameResultScreen.d.ts","sourceRoot":"","sources":["../src/GameResultScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"GameResultScreen.d.ts","sourceRoot":"","sources":["../src/GameResultScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,WAAW,cAAc;IAC7B,8CAA8C;IAC9C,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,gGAAgG;IAChG,IAAI,EAAE,KAAK,GAAG,MAAM,CAAC;IACrB,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,KAAK,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IAClC,6DAA6D;IAC7D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+DAA+D;IAC/D,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAC/C,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAU,EACV,KAAK,EACL,MAAM,EACN,QAAQ,GACT,EAAE,qBAAqB,qBAqEvB"}
|
package/dist/GameResultScreen.js
CHANGED
|
@@ -2,156 +2,24 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useId, useRef } from 'react';
|
|
3
3
|
import { Confetti } from './Confetti.js';
|
|
4
4
|
import { GameButton } from './GameButton.js';
|
|
5
|
-
import { LIGHT_COLOURS, MOTION_TOKENS, SHAPE_TOKENS, TYPOGRAPHY_TOKENS } from './tokens.js';
|
|
6
|
-
/** A CSS variable with a fallback taken from the #209 light tokens, so the screen renders without GAME_TOKENS_CSS. */
|
|
7
|
-
const v = (name, fallback) => `var(--${name}, ${fallback})`;
|
|
8
|
-
/**
|
|
9
|
-
* Styles for the result screen. Durations and easings come from the motion
|
|
10
|
-
* tokens. Everything stops under prefers-reduced-motion. Class names carry the
|
|
11
|
-
* `fgs-` prefix, so they cannot collide with a game's own styles.
|
|
12
|
-
*/
|
|
13
|
-
export const RESULT_SCREEN_CSS = `
|
|
14
|
-
.fgs-result-overlay {
|
|
15
|
-
position: fixed;
|
|
16
|
-
inset: 0;
|
|
17
|
-
z-index: 800;
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: center;
|
|
20
|
-
justify-content: center;
|
|
21
|
-
padding: 1rem;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
background: color-mix(in srgb, ${v('paper', LIGHT_COLOURS.paper)} 72%, transparent);
|
|
24
|
-
backdrop-filter: blur(5px);
|
|
25
|
-
animation: fgs-result-fade ${v('motion-base', MOTION_TOKENS.base)} ease-out both;
|
|
26
|
-
}
|
|
27
|
-
.fgs-result-card {
|
|
28
|
-
position: relative;
|
|
29
|
-
z-index: 1;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
align-items: center;
|
|
33
|
-
gap: 0.5rem;
|
|
34
|
-
width: min(20rem, 100%);
|
|
35
|
-
padding: 1.25rem 1.1rem 1.1rem;
|
|
36
|
-
border-radius: ${v('radius', SHAPE_TOKENS.radius)};
|
|
37
|
-
text-align: center;
|
|
38
|
-
background: ${v('panel', LIGHT_COLOURS.panel)};
|
|
39
|
-
border: 1px solid ${v('line', LIGHT_COLOURS.line)};
|
|
40
|
-
box-shadow:
|
|
41
|
-
inset 0 1px 0 rgb(255 255 255 / 0.4),
|
|
42
|
-
0 1px 2px rgb(0 0 0 / 0.06),
|
|
43
|
-
0 22px 40px -20px rgb(0 0 0 / 0.45);
|
|
44
|
-
animation: fgs-result-enter ${v('motion-slow', MOTION_TOKENS.slow)} cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
|
|
45
|
-
}
|
|
46
|
-
.fgs-result-eyebrow {
|
|
47
|
-
margin: 0;
|
|
48
|
-
font-size: 0.72rem;
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
letter-spacing: 0.12em;
|
|
51
|
-
text-transform: uppercase;
|
|
52
|
-
color: ${v('muted', LIGHT_COLOURS.muted)};
|
|
53
|
-
}
|
|
54
|
-
.fgs-result-title {
|
|
55
|
-
margin: 0;
|
|
56
|
-
font-family: ${v('font-display', TYPOGRAPHY_TOKENS.fontDisplay)};
|
|
57
|
-
font-weight: 800;
|
|
58
|
-
font-optical-sizing: auto;
|
|
59
|
-
font-variation-settings: "opsz" 144;
|
|
60
|
-
font-size: ${v('text-title', TYPOGRAPHY_TOKENS.textTitle)};
|
|
61
|
-
line-height: 1;
|
|
62
|
-
letter-spacing: -0.02em;
|
|
63
|
-
color: ${v('ink', LIGHT_COLOURS.ink)};
|
|
64
|
-
text-wrap: balance;
|
|
65
|
-
animation: fgs-result-enter ${v('motion-slow', MOTION_TOKENS.slow)} cubic-bezier(0.2, 0.9, 0.3, 1.2) 120ms both;
|
|
66
|
-
}
|
|
67
|
-
.fgs-result-win .fgs-result-title {
|
|
68
|
-
color: ${v('accent-ink', LIGHT_COLOURS.accentInk)};
|
|
69
|
-
}
|
|
70
|
-
.fgs-result-message {
|
|
71
|
-
margin: 0;
|
|
72
|
-
font-size: 0.9rem;
|
|
73
|
-
color: ${v('muted', LIGHT_COLOURS.muted)};
|
|
74
|
-
}
|
|
75
|
-
.fgs-result-stats {
|
|
76
|
-
display: grid;
|
|
77
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
78
|
-
gap: 0.5rem;
|
|
79
|
-
width: 100%;
|
|
80
|
-
margin: 0.5rem 0 0;
|
|
81
|
-
}
|
|
82
|
-
.fgs-result-stat {
|
|
83
|
-
padding: 0.5rem 0.4rem;
|
|
84
|
-
border-radius: 0.75rem;
|
|
85
|
-
background: ${v('paper', LIGHT_COLOURS.paper)};
|
|
86
|
-
border: 1px solid ${v('line', LIGHT_COLOURS.line)};
|
|
87
|
-
box-shadow: inset 0 -2px 0 rgb(0 0 0 / 0.04);
|
|
88
|
-
animation: fgs-result-enter ${v('motion-base', MOTION_TOKENS.base)} ease-out both;
|
|
89
|
-
animation-delay: calc(260ms + var(--i, 0) * 70ms);
|
|
90
|
-
}
|
|
91
|
-
.fgs-result-stat:last-child:nth-child(odd) {
|
|
92
|
-
grid-column: 1 / -1;
|
|
93
|
-
}
|
|
94
|
-
.fgs-result-stat dt {
|
|
95
|
-
font-size: 0.68rem;
|
|
96
|
-
font-weight: 700;
|
|
97
|
-
letter-spacing: 0.08em;
|
|
98
|
-
text-transform: uppercase;
|
|
99
|
-
color: ${v('muted', LIGHT_COLOURS.muted)};
|
|
100
|
-
}
|
|
101
|
-
.fgs-result-stat dd {
|
|
102
|
-
margin: 0.15rem 0 0;
|
|
103
|
-
font-family: ${v('font-display', TYPOGRAPHY_TOKENS.fontDisplay)};
|
|
104
|
-
font-weight: 800;
|
|
105
|
-
font-size: ${v('text-stat', TYPOGRAPHY_TOKENS.textStat)};
|
|
106
|
-
color: ${v('ink', LIGHT_COLOURS.ink)};
|
|
107
|
-
font-variant-numeric: tabular-nums;
|
|
108
|
-
}
|
|
109
|
-
.fgs-result-badge {
|
|
110
|
-
margin: 0.25rem 0 0;
|
|
111
|
-
font-size: 0.85rem;
|
|
112
|
-
font-weight: 700;
|
|
113
|
-
color: ${v('accent-ink', LIGHT_COLOURS.accentInk)};
|
|
114
|
-
animation: fgs-result-enter ${v('motion-base', MOTION_TOKENS.base)} ease-out 560ms both;
|
|
115
|
-
}
|
|
116
|
-
.fgs-result-actions {
|
|
117
|
-
width: 100%;
|
|
118
|
-
margin-top: 0.5rem;
|
|
119
|
-
animation: fgs-result-enter ${v('motion-base', MOTION_TOKENS.base)} ease-out 480ms both;
|
|
120
|
-
}
|
|
121
|
-
@keyframes fgs-result-fade {
|
|
122
|
-
from { opacity: 0; }
|
|
123
|
-
to { opacity: 1; }
|
|
124
|
-
}
|
|
125
|
-
@keyframes fgs-result-enter {
|
|
126
|
-
from { opacity: 0; transform: translateY(10px); }
|
|
127
|
-
to { opacity: 1; transform: none; }
|
|
128
|
-
}
|
|
129
|
-
@media (prefers-reduced-motion: reduce) {
|
|
130
|
-
.fgs-result-overlay,
|
|
131
|
-
.fgs-result-card,
|
|
132
|
-
.fgs-result-title,
|
|
133
|
-
.fgs-result-stat,
|
|
134
|
-
.fgs-result-badge,
|
|
135
|
-
.fgs-result-actions {
|
|
136
|
-
animation: none;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
`;
|
|
140
5
|
/**
|
|
141
6
|
* An animated result screen for a finished level or game. It is a modal dialog
|
|
142
7
|
* with a title, optional stats and badge, optional extra content, and one
|
|
143
8
|
* action. A win adds falling confetti. The action is focused when the screen
|
|
144
9
|
* opens, so keyboard and screen-reader users land on the next step.
|
|
145
10
|
*
|
|
146
|
-
* It covers the viewport.
|
|
147
|
-
*
|
|
11
|
+
* It covers the viewport. The card sits on an opaque `bg-panel` surface; only
|
|
12
|
+
* the scrim behind it is translucent. Motion is the `animate-fgs-*` utilities
|
|
13
|
+
* from the SDK's `theme.css`, and it stops under prefers-reduced-motion.
|
|
148
14
|
*/
|
|
149
15
|
export function GameResultScreen({ tone, eyebrow, title, message, stats = [], badge, action, children, }) {
|
|
150
16
|
const titleId = useId();
|
|
151
|
-
const
|
|
17
|
+
const actionsRef = useRef(null);
|
|
152
18
|
useEffect(() => {
|
|
153
|
-
|
|
19
|
+
actionsRef.current?.querySelector('button')?.focus();
|
|
154
20
|
}, []);
|
|
155
|
-
return (_jsxs("div", { className:
|
|
21
|
+
return (_jsxs("div", { "data-fgs": "result", "data-tone": tone, className: "fixed inset-0 z-[800] flex animate-fgs-fade items-center justify-center overflow-hidden bg-paper/70 p-4 backdrop-blur-[5px] motion-reduce:animate-none", role: "dialog", "aria-modal": "true", "aria-labelledby": titleId, children: [tone === 'win' && _jsx(Confetti, {}), _jsxs("div", { className: "relative z-[1] flex w-[min(20rem,100%)] animate-fgs-enter flex-col items-center gap-2 rounded-fgs border border-line bg-panel px-[1.1rem] pb-[1.1rem] pt-5 text-center shadow-[inset_0_1px_0_rgb(255_255_255/0.4),0_1px_2px_rgb(0_0_0/0.06),0_22px_40px_-20px_rgb(0_0_0/0.45)] motion-reduce:animate-none", children: [eyebrow && (_jsx("p", { className: "m-0 text-[0.72rem] font-bold uppercase tracking-[0.12em] text-muted", children: eyebrow })), _jsx("h2", { id: titleId, className: `m-0 animate-fgs-enter-title text-balance font-display text-fgs-title font-extrabold leading-none tracking-[-0.02em] [font-optical-sizing:auto] [font-variation-settings:'opsz'_144] motion-reduce:animate-none ${tone === 'win' ? 'text-accent-ink' : 'text-ink'}`, children: title }), message && _jsx("p", { className: "m-0 text-[0.9rem] text-muted", children: message }), stats.length > 0 && (_jsx("dl", { className: "m-0 mt-2 grid w-full grid-cols-2 gap-2", children: stats.map((stat, i) => (_jsxs("div", { className: "animate-fgs-enter-stat rounded-xl border border-line bg-paper px-[0.4rem] py-2 shadow-[inset_0_-2px_0_rgb(0_0_0/0.04)] motion-reduce:animate-none last:odd:col-span-full",
|
|
22
|
+
// Dynamic: the entrance delay is staggered by the stat's index.
|
|
23
|
+
style: { '--i': i }, children: [_jsx("dt", { className: "text-[0.68rem] font-bold uppercase tracking-[0.08em] text-muted", children: stat.label }), _jsx("dd", { className: "m-0 mt-[0.15rem] font-display text-fgs-stat font-extrabold tabular-nums text-ink", children: stat.value })] }, stat.label))) })), badge ? (_jsx("div", { className: "m-0 mt-1 animate-fgs-enter-badge text-[0.85rem] font-bold text-accent-ink motion-reduce:animate-none", children: badge })) : null, children, _jsx("div", { ref: actionsRef, className: "mt-2 w-full animate-fgs-enter-actions motion-reduce:animate-none", children: _jsx(GameButton, { variant: "primary", size: "lg", block: true, onClick: action.onClick, children: action.label }) })] })] }));
|
|
156
24
|
}
|
|
157
25
|
//# sourceMappingURL=GameResultScreen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameResultScreen.js","sourceRoot":"","sources":["../src/GameResultScreen.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"GameResultScreen.js","sourceRoot":"","sources":["../src/GameResultScreen.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AA4B7C;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,IAAI,EACJ,OAAO,EACP,KAAK,EACL,OAAO,EACP,KAAK,GAAG,EAAE,EACV,KAAK,EACL,MAAM,EACN,QAAQ,GACc;IACtB,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,UAAU,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEhD,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,OAAO,EAAE,aAAa,CAAoB,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAC1E,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,2BACW,QAAQ,eACN,IAAI,EACf,SAAS,EAAC,wJAAwJ,EAClK,IAAI,EAAC,QAAQ,gBACF,MAAM,qBACA,OAAO,aAEvB,IAAI,KAAK,KAAK,IAAI,KAAC,QAAQ,KAAG,EAC/B,eAAK,SAAS,EAAC,2SAA2S,aACvT,OAAO,IAAI,CACV,YAAG,SAAS,EAAC,qEAAqE,YAC/E,OAAO,GACN,CACL,EACD,aACE,EAAE,EAAE,OAAO,EACX,SAAS,EAAE,kNACT,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,UACvC,EAAE,YAED,KAAK,GACH,EACJ,OAAO,IAAI,YAAG,SAAS,EAAC,8BAA8B,YAAE,OAAO,GAAK,EACpE,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,CACnB,aAAI,SAAS,EAAC,wCAAwC,YACnD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAEE,SAAS,EAAC,0KAA0K;4BACpL,gEAAgE;4BAChE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAyB,aAE1C,aAAI,SAAS,EAAC,iEAAiE,YAC5E,IAAI,CAAC,KAAK,GACR,EACL,aAAI,SAAS,EAAC,kFAAkF,YAC7F,IAAI,CAAC,KAAK,GACR,KAVA,IAAI,CAAC,KAAK,CAWX,CACP,CAAC,GACC,CACN,EACA,KAAK,CAAC,CAAC,CAAC,CACP,cAAK,SAAS,EAAC,sGAAsG,YAClH,KAAK,GACF,CACP,CAAC,CAAC,CAAC,IAAI,EACP,QAAQ,EACT,cACE,GAAG,EAAE,UAAU,EACf,SAAS,EAAC,kEAAkE,YAE5E,KAAC,UAAU,IAAC,OAAO,EAAC,SAAS,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,QAAC,OAAO,EAAE,MAAM,CAAC,OAAO,YAClE,MAAM,CAAC,KAAK,GACF,GACT,IACF,IACF,CACP,CAAC;AACJ,CAAC"}
|
package/dist/GameShell.d.ts
CHANGED
|
@@ -21,6 +21,9 @@ export interface GameShellProps {
|
|
|
21
21
|
* Why 100svh (small viewport units) and not 100vh: on iOS Safari, 100vh
|
|
22
22
|
* includes the URL bar's hidden area, which lets content overflow when
|
|
23
23
|
* the bar reveals. 100svh stays equal to the *visible* viewport.
|
|
24
|
+
*
|
|
25
|
+
* Styled with Tailwind utilities on the platform tokens (ADR-001): the game
|
|
26
|
+
* compiles them through `@source` on this package's `dist`.
|
|
24
27
|
*/
|
|
25
28
|
export declare function GameShell({ topbar, children }: GameShellProps): React.JSX.Element;
|
|
26
29
|
//# sourceMappingURL=GameShell.d.ts.map
|
package/dist/GameShell.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameShell.d.ts","sourceRoot":"","sources":["../src/GameShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED
|
|
1
|
+
{"version":3,"file":"GameShell.d.ts","sourceRoot":"","sources":["../src/GameShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,6DAA6D;IAC7D,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAYjF"}
|
package/dist/GameShell.js
CHANGED
|
@@ -12,50 +12,11 @@ import { SoundProvider } from './SoundContext.js';
|
|
|
12
12
|
* Why 100svh (small viewport units) and not 100vh: on iOS Safari, 100vh
|
|
13
13
|
* includes the URL bar's hidden area, which lets content overflow when
|
|
14
14
|
* the bar reveals. 100svh stays equal to the *visible* viewport.
|
|
15
|
+
*
|
|
16
|
+
* Styled with Tailwind utilities on the platform tokens (ADR-001): the game
|
|
17
|
+
* compiles them through `@source` on this package's `dist`.
|
|
15
18
|
*/
|
|
16
19
|
export function GameShell({ topbar, children }) {
|
|
17
|
-
return (_jsx(SoundProvider, { children: _jsxs("div", {
|
|
18
|
-
position: 'fixed',
|
|
19
|
-
inset: 0,
|
|
20
|
-
display: 'flex',
|
|
21
|
-
flexDirection: 'column',
|
|
22
|
-
background: 'var(--paper)',
|
|
23
|
-
color: 'var(--ink)',
|
|
24
|
-
overflow: 'hidden',
|
|
25
|
-
// 100svh handles iOS URL-bar height changes correctly.
|
|
26
|
-
height: '100svh',
|
|
27
|
-
width: '100vw',
|
|
28
|
-
// Games are touch-first — prevent text selection, long-press menus,
|
|
29
|
-
// and the 300ms tap delay that makes games feel sluggish.
|
|
30
|
-
WebkitUserSelect: 'none',
|
|
31
|
-
userSelect: 'none',
|
|
32
|
-
WebkitTouchCallout: 'none',
|
|
33
|
-
touchAction: 'manipulation',
|
|
34
|
-
}, children: [topbar !== undefined && (_jsx("div", { style: {
|
|
35
|
-
flexShrink: 0,
|
|
36
|
-
borderBottom: '1px solid var(--line, #e5e5e5)',
|
|
37
|
-
background: 'var(--panel, var(--paper))',
|
|
38
|
-
}, children: topbar })), _jsx("div", { style: {
|
|
39
|
-
flex: 1,
|
|
40
|
-
minHeight: 0,
|
|
41
|
-
minWidth: 0,
|
|
42
|
-
position: 'relative',
|
|
43
|
-
overflow: 'hidden',
|
|
44
|
-
}, children: children }), _jsx("div", { style: {
|
|
45
|
-
flexShrink: 0,
|
|
46
|
-
paddingBottom: 'env(safe-area-inset-bottom, 0px)',
|
|
47
|
-
background: 'var(--panel, var(--paper))',
|
|
48
|
-
borderTop: '1px solid var(--line, #e5e5e5)',
|
|
49
|
-
textAlign: 'center',
|
|
50
|
-
}, children: _jsx("a", { href: "https://freegamestore.online", target: "_blank", rel: "noopener noreferrer", style: {
|
|
51
|
-
display: 'block',
|
|
52
|
-
padding: '0.15rem 0',
|
|
53
|
-
fontSize: '0.55rem',
|
|
54
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
55
|
-
fontWeight: 600,
|
|
56
|
-
color: 'var(--muted, #999)',
|
|
57
|
-
textDecoration: 'none',
|
|
58
|
-
letterSpacing: '0.03em',
|
|
59
|
-
}, children: "freegamestore.online" }) })] }) }));
|
|
20
|
+
return (_jsx(SoundProvider, { children: _jsxs("div", { className: "fixed inset-0 box-border flex h-svh w-screen touch-manipulation select-none flex-col overflow-hidden bg-paper pb-[env(safe-area-inset-bottom,0px)] text-ink [-webkit-touch-callout:none]", children: [topbar !== undefined && (_jsx("div", { className: "shrink-0 border-b border-line bg-panel", children: topbar })), _jsx("div", { className: "relative min-h-0 min-w-0 flex-1 overflow-hidden", children: children })] }) }));
|
|
60
21
|
}
|
|
61
22
|
//# sourceMappingURL=GameShell.js.map
|
package/dist/GameShell.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameShell.js","sourceRoot":"","sources":["../src/GameShell.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAYlD
|
|
1
|
+
{"version":3,"file":"GameShell.js","sourceRoot":"","sources":["../src/GameShell.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAYlD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAkB;IAC5D,OAAO,CACL,KAAC,aAAa,cAEZ,eAAK,SAAS,EAAC,0LAA0L,aACtM,MAAM,KAAK,SAAS,IAAI,CACvB,cAAK,SAAS,EAAC,wCAAwC,YAAE,MAAM,GAAO,CACvE,EACD,cAAK,SAAS,EAAC,iDAAiD,YAAE,QAAQ,GAAO,IAC7E,GACQ,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameTextSizeToggle.d.ts","sourceRoot":"","sources":["../src/GameTextSizeToggle.tsx"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"GameTextSizeToggle.d.ts","sourceRoot":"","sources":["../src/GameTextSizeToggle.tsx"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,wBAAgB,kBAAkB,gCA2BjC"}
|
|
@@ -37,21 +37,6 @@ export function GameTextSizeToggle() {
|
|
|
37
37
|
setSize(next); // the effect applies it
|
|
38
38
|
}, [size]);
|
|
39
39
|
const label = size === 'lg' ? 'A+' : size === 'sm' ? 'A\u2212' : 'A';
|
|
40
|
-
return (_jsx("button", { onClick: cycle, "aria-label": `Text: ${size}`, title: `Text: ${size}`,
|
|
41
|
-
width: 28,
|
|
42
|
-
height: 28,
|
|
43
|
-
borderRadius: 8,
|
|
44
|
-
border: '1px solid var(--line, #e2e8f0)',
|
|
45
|
-
background: 'var(--panel, #ffffff)',
|
|
46
|
-
color: 'var(--ink, #1e293b)',
|
|
47
|
-
display: 'inline-flex',
|
|
48
|
-
alignItems: 'center',
|
|
49
|
-
justifyContent: 'center',
|
|
50
|
-
cursor: 'pointer',
|
|
51
|
-
padding: 0,
|
|
52
|
-
fontFamily: '"Manrope", system-ui, sans-serif',
|
|
53
|
-
fontSize: '0.7rem',
|
|
54
|
-
fontWeight: 700,
|
|
55
|
-
}, children: label }));
|
|
40
|
+
return (_jsx("button", { onClick: cycle, "aria-label": `Text: ${size}`, title: `Text: ${size}`, className: "inline-flex size-7 cursor-pointer items-center justify-center rounded-lg border border-line bg-panel p-0 text-ink text-[0.7rem] font-bold", children: label }));
|
|
56
41
|
}
|
|
57
42
|
//# sourceMappingURL=GameTextSizeToggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameTextSizeToggle.js","sourceRoot":"","sources":["../src/GameTextSizeToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAA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MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAO,OAAO,CAAC,CAAC;IAEhD,+EAA+E;IAC/E,qDAAqD;IACrD,SAAS,CAAC,GAAG,EAAE;QACb,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,MAAM,KAAK,GAAW,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,CAAE,CAAC;QAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,wBAAwB;IACzC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,MAAM,KAAK,GAAG,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;IAErE,OAAO,CACL,iBACE,OAAO,EAAE,KAAK,gBACF,SAAS,IAAI,EAAE,EAC3B,KAAK,EAAE,SAAS,IAAI,EAAE,EACtB,SAAS,EAAC,2IAA2I,YAEpJ,KAAK,GACC,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameThemeToggle.d.ts","sourceRoot":"","sources":["../src/GameThemeToggle.tsx"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"GameThemeToggle.d.ts","sourceRoot":"","sources":["../src/GameThemeToggle.tsx"],"names":[],"mappings":"AAiDA;;;GAGG;AACH,wBAAgB,eAAe,gCA2E9B"}
|
package/dist/GameThemeToggle.js
CHANGED
|
@@ -81,19 +81,6 @@ export function GameThemeToggle() {
|
|
|
81
81
|
const next = order[(order.indexOf(pref) + 1) % order.length];
|
|
82
82
|
setPref(next); // the effect applies it
|
|
83
83
|
}, [pref]);
|
|
84
|
-
return (_jsx("button", { onClick: cycle, "aria-label": `Theme: ${pref}`, title: `Theme: ${pref}`,
|
|
85
|
-
width: 28,
|
|
86
|
-
height: 28,
|
|
87
|
-
borderRadius: 8,
|
|
88
|
-
border: '1px solid var(--line, #e2e8f0)',
|
|
89
|
-
background: 'var(--panel, #ffffff)',
|
|
90
|
-
color: 'var(--ink, #1e293b)',
|
|
91
|
-
display: 'inline-flex',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
justifyContent: 'center',
|
|
94
|
-
cursor: 'pointer',
|
|
95
|
-
padding: 0,
|
|
96
|
-
fontFamily: 'inherit',
|
|
97
|
-
}, children: theme === 'dark' ? (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "12", cy: "12", r: "5" }), _jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), _jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), _jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), _jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), _jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), _jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), _jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), _jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] })) : (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) })) }));
|
|
84
|
+
return (_jsx("button", { onClick: cycle, "aria-label": `Theme: ${pref}`, title: `Theme: ${pref}`, className: "inline-flex size-7 cursor-pointer items-center justify-center rounded-lg border border-line bg-panel p-0 text-ink", children: theme === 'dark' ? (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "12", cy: "12", r: "5" }), _jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }), _jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }), _jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }), _jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }), _jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }), _jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }), _jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }), _jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })] })) : (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: _jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) })) }));
|
|
98
85
|
}
|
|
99
86
|
//# sourceMappingURL=GameThemeToggle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GameThemeToggle.js","sourceRoot":"","sources":["../src/GameThemeToggle.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,SAAS,GAAG,cAAc,CAAC;AAGjC,+EAA+E;AAC/E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,SAAS,aAAa;IACpB,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,QAAQ,CAAC;IACnD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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,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AASjC,MAAM,UAAU,WAAW,CAAC,EAC1B,SAAS,EAC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BAAoB,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"}
|
package/dist/StartScreen.d.ts
CHANGED
|
@@ -30,19 +30,12 @@ export interface StartScreenProps {
|
|
|
30
30
|
*/
|
|
31
31
|
howToPlay?: readonly StartScreenStep[];
|
|
32
32
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Styles for the start screen and its how-to-play list. The durations and
|
|
35
|
-
* easings come from the motion tokens, and everything stops under
|
|
36
|
-
* prefers-reduced-motion. Class names carry the `fgs-` prefix, so they cannot
|
|
37
|
-
* collide with a game's own styles.
|
|
38
|
-
*/
|
|
39
|
-
export declare const START_SCREEN_CSS: string;
|
|
40
33
|
/**
|
|
41
34
|
* A game's start screen: artwork, title, tagline, then Play and How to play.
|
|
42
|
-
* Motion is
|
|
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`.
|
|
43
37
|
*
|
|
44
|
-
*
|
|
45
|
-
* light values, so a game that loads GAME_TOKENS_CSS gets the full theme.
|
|
38
|
+
* Colours come from the platform tokens through the game's `@theme` mapping.
|
|
46
39
|
*/
|
|
47
40
|
export declare function StartScreen({ title, tagline, artwork, playLabel, onPlay, onHowToPlay, howToPlay, }: StartScreenProps): React.JSX.Element;
|
|
48
41
|
//# sourceMappingURL=StartScreen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartScreen.d.ts","sourceRoot":"","sources":["../src/StartScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
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"}
|