Full Configuration Reference
ts
MindtrainingPlatform.init('mindtraining', {
showBackNavigation: boolean, // default: true
showMobileGameHeader: boolean, // default: true
showOtherGames: boolean, // default: true
// ── Viewer ────────────────────────────────────────────────────────────────
viewer: {
userId: string | null, // your user's ID
loggedIn: boolean, // default: false
subscribed: boolean, // default: false
},
// ── UI ────────────────────────────────────────────────────────────────────
ui: {
colorScheme: 'light' | 'dark' | 'system', // default: 'light'
mode: 'web' | 'app', // default: 'web'
actions: {
shouldShowAccessPaywall: (context: {
action?: 'login' | 'subscribe',
mode: 'web' | 'app',
surface?: 'today' | 'archive' | 'statistics',
reason?: 'login_required' | 'subscription_required' | 'host_rule' | 'variant_locked',
limit?: 'meterLimit' | 'levelLimit',
gameType?: string,
variant?: string,
}) => boolean,
openLogin: () => void,
openRegister: () => void,
openSubscribe: () => void,
openUrl: (url: string) => void,
share: (payload: { url?: string, title?: string }) => void,
},
},
// ── Access ────────────────────────────────────────────────────────────────
access: {
games: {
[gameType]: {
default: {
playToday: boolean, // default: true
playArchive: boolean, // default: true
viewStatistics: boolean, // default: true
saveState: boolean, // default: true
blockedReason: 'login_required'
| 'subscription_required'
| 'host_rule'
| 'variant_locked',
blockedReasons: {
default?: BlockedReason,
today?: BlockedReason,
archive?: BlockedReason,
statistics?: BlockedReason,
},
meterLimit: {
maxStarts: number, // max game starts allowed
intervalDays: number, // rolling window in days
},
levelLimit: {
maxLevel: number, // max difficulty level allowed
},
},
variants: {
[variantId]: AccessPolicy, // same shape as default
},
},
},
},
})Public SDK API
ts
type MindtrainingPlatformApi = {
init: (
containerOrConfig?: string | Element | PlatformInitConfig,
config?: PlatformInitConfig
) => void
updateConfig: (config?: Partial<PlatformInitConfig>) => PlatformInitConfig
navigateHome: () => boolean
}navigateHome() returns true when the mounted SDK router handled the request, and false when the SDK is not mounted yet.
ui.colorScheme
ui.colorScheme selects the color palette on sites with color scheme support enabled. Supported sites include Entrenamentes and Le Monde.
'light'(default): forces the light palette.'dark': forces the dark palette.'system': follows the device preference throughprefers-color-schemeand responds to changes while the platform is mounted.
See UI actions for color scheme behavior and runtime examples.
Navigation interception
All sites inherit the optional ui.actions.navigate callback. It receives a serializable request before SDK navigation. It works in both web and app modes. Navigation interception.