/* * Standalone Vite-served fixture for the file-pane markdown Source | * Preview Playwright smoke. Mounts the same toggle + MarkdownRenderer * path as `file.tsx` without the HAPI auth / git / socket stack. */ import React from 'react' import ReactDOM from 'react-dom/client' import '../src/index.css' import { I18nProvider } from '../src/lib/i18n-context' import { MarkdownRenderer } from '../src/components/MarkdownRenderer' import { getInitialMarkdownPreviewMode, persistMarkdownPreviewMode, type MarkdownPreviewMode, } from '../src/lib/file-markdown-preview' import { useTranslation } from '../src/lib/use-translation' const SAMPLE_MARKDOWN = `# Teams and channels | Channel | Purpose | | --- | --- | | general | Day-to-day coordination | | incidents | Outage response | \`\`\`ts export const ok = true \`\`\` > Preview uses the same markdown pipeline as chat. ` function FileMarkdownPreviewFixture() { const { t } = useTranslation() const [mode, setMode] = React.useState(() => getInitialMarkdownPreviewMode()) const showSource = mode === 'source' const setMarkdownPreviewMode = (next: MarkdownPreviewMode) => { setMode(next) persistMarkdownPreviewMode(next) } return (
{showSource ? (
                    {SAMPLE_MARKDOWN}
                
) : (
)}
) } const rootEl = document.getElementById('root') if (rootEl) { ReactDOM.createRoot(rootEl).render( ) }