Files
Antigravity 80ccc1f6de
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 7m14s
CI / Deploy production (on server) (push) Successful in 1m25s
feat: dashboard Second Brain, essai 7 jours et vérification e-mail
Rendre le dashboard actionnable (inbox, peek, carte mentale), aligner la facturation sur l’essai 7 jours, et bloquer le login e-mail tant que l’adresse n’est pas confirmée.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 07:19:36 +00:00

95 lines
1.6 KiB
TypeScript

/** Interactive Page schema v1 — caps & allowlists (spec Kimi / AttnRes). */
export const INTERACTIVE_PAGE_SCHEMA_VERSION = 1 as const
export const INTERACTIVE_PAGE_CAPS = {
maxSections: 8,
maxBlocksPerSection: 12,
maxDemosPerPage: 5,
maxSimsPerPage: 3,
maxOverviewCards: 4,
minOverviewCards: 3,
maxStatsItems: 5,
minStatsItems: 2,
maxJsonBytes: 128 * 1024,
} as const
export const SIM_CAPS = {
maxParams: 4,
maxComputed: 6,
maxExprChars: 200,
} as const
export const PAGE_BLOCK_TYPES = [
'prose',
'formula',
'callout',
'demo',
'chart',
'stats',
'table',
'image',
'sim',
'steps',
] as const
export const STEPS_CAPS = {
minSteps: 2,
maxSteps: 12,
} as const
export const CALLOUT_KINDS = [
'definition',
'warning',
'tip',
'note',
] as const
/**
* Human / locale strings — may contain hex in prose; skipped by color scan.
* Must stay in sync with validate + translate strip.
*/
export const PAGE_HUMAN_STRING_KEYS = [
// page-level
'lang',
'kicker',
'title',
'subtitle',
'meta',
'lead',
'badge',
'body',
'footer',
// blocks
'md',
'tex',
'caption',
'alt',
'value',
'label',
'columns',
'rows',
// sim blocks
'symbol',
'expr',
'intro',
'xLabel',
'yLabel',
// steps blocks
'rule',
// inherited from demos (speak etc. scanned via demo validator)
'speak',
'text',
'disclaimer',
'rowLabels',
'colLabels',
] as const
export type PageHumanStringKey = (typeof PAGE_HUMAN_STRING_KEYS)[number]
const PAGE_HUMAN_SET = new Set<string>(PAGE_HUMAN_STRING_KEYS)
export function isPageHumanStringKey(key: string): boolean {
return PAGE_HUMAN_SET.has(key)
}