fix(insights): peek panel rend correctement le contenu TipTap
Some checks failed
CI / Deploy production (on server) (push) Has been cancelled
CI / Lint, Unit Tests & Build (push) Has been cancelled

Avant: prose prose-sm générique → titres/images/tables/callouts/toggles cassés
Maintenant: prose-lg + editor-body + 20+ overrides CSS pour:
- h1/h2/h3 tailles serif comme l'éditeur
- listes, blockquotes, code blocks, pre
- images arrondies + max-width
- tables avec borders
- callouts (data-callout-type)
- toggles (data-type=toggle-block)
- math (data-math)
- hr separators
This commit is contained in:
Antigravity
2026-07-04 23:13:29 +00:00
parent a2d8d90e3d
commit c8bed7f138
2 changed files with 23 additions and 3 deletions

View File

@@ -1,8 +1,8 @@
{
"version": 1,
"lastRunAtMs": 1783196565768,
"turnsSinceLastRun": 0,
"turnsSinceLastRun": 3,
"lastTranscriptMtimeMs": 1783196565691.0437,
"lastProcessedGenerationId": "568a0443-fffa-4861-8651-2264944e9cc3",
"lastProcessedGenerationId": "d7e4c90f-1f03-4437-a235-3553b9f9cb09",
"trialStartedAtMs": null
}

View File

@@ -934,7 +934,27 @@ export default function InsightsPage() {
{peekNote.content ? (
<div
dir="auto"
className="prose prose-sm dark:prose-invert max-w-none text-ink dark:text-dark-ink [&_a]:text-blue-600 [&_blockquote]:border-l-blue-400"
className="editor-body prose prose-lg dark:prose-invert max-w-none leading-relaxed text-ink dark:text-dark-ink
[&_h1]:text-2xl [&_h1]:font-serif [&_h1]:font-semibold [&_h1]:mt-8 [&_h1]:mb-4
[&_h2]:text-xl [&_h2]:font-serif [&_h2]:font-semibold [&_h2]:mt-6 [&_h2]:mb-3
[&_h3]:text-lg [&_h3]:font-semibold [&_h3]:mt-5 [&_h3]:mb-2
[&_p]:my-3 [&_p]:leading-relaxed
[&_ul]:list-disc [&_ul]:ps-6 [&_ul]:my-3
[&_ol]:list-decimal [&_ol]:ps-6 [&_ol]:my-3
[&_li]:my-1
[&_blockquote]:border-l-4 [&_blockquote]:border-brand-accent [&_blockquote]:ps-4 [&_blockquote]:italic [&_blockquote]:text-muted-foreground [&_blockquote]:my-4
[&_pre]:bg-zinc-100 [&_pre]:dark:bg-zinc-900 [&_pre]:p-4 [&_pre]:rounded-lg [&_pre]:overflow-x-auto [&_pre]:text-sm [&_pre]:my-4
[&_code]:bg-zinc-100 [&_code]:dark:bg-zinc-800 [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-sm [&_code]:font-mono
[&_a]:text-blue-600 [&_a]:underline
[&_img]:rounded-lg [&_img]:max-w-full [&_img]:my-4
[&_table]:w-full [&_table]:my-4 [&_table]:border-collapse
[&_th]:border [&_th]:border-border [&_th]:p-2 [&_th]:bg-muted [&_th]:font-semibold [&_th]:text-left
[&_td]:border [&_td]:border-border [&_td]:p-2
[&_hr]:border-border [&_hr]:my-6
[&_[data-callout-type]]:p-4 [&_[data-callout-type]]:rounded-lg [&_[data-callout-type]]:my-4
[&_div[data-type='toggle-block']]:my-3
[&_div[data-type='toggle-block']_details]:rounded-lg [&_div[data-type='toggle-block']_details]:border [&_div[data-type='toggle-block']_details]:border-border
[&_[data-math]]:my-4 [&_[data-math]]:text-center"
dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(peekNote.content) }}
/>
) : (