@@ -11,7 +11,6 @@ import hardenReactMarkdownImport from 'harden-react-markdown';
1111import { components as defaultComponents } from './lib/components' ;
1212import { parseMarkdownIntoBlocks } from './lib/parse-blocks' ;
1313import { parseIncompleteMarkdown } from './lib/parse-incomplete-markdown' ;
14- import { Mermaid } from './lib/mermaid' ;
1514import { cn } from './lib/utils' ;
1615
1716type HardenReactMarkdownProps = Options & {
@@ -22,6 +21,7 @@ type HardenReactMarkdownProps = Options & {
2221
2322// Handle both ESM and CJS imports
2423const hardenReactMarkdown =
24+ // biome-ignore lint/suspicious/noExplicitAny: "this is needed."
2525 ( hardenReactMarkdownImport as any ) . default || hardenReactMarkdownImport ;
2626
2727// Create a hardened version of ReactMarkdown
@@ -31,10 +31,13 @@ const HardenedMarkdown: ReturnType<typeof hardenReactMarkdown> =
3131export type StreamdownProps = HardenReactMarkdownProps & {
3232 parseIncompleteMarkdown ?: boolean ;
3333 className ?: string ;
34- shikiTheme ?: BundledTheme ;
34+ shikiTheme ?: [ BundledTheme , BundledTheme ] ;
3535} ;
3636
37- export const ShikiThemeContext = createContext < BundledTheme > ( 'github-light' ) ;
37+ export const ShikiThemeContext = createContext < [ BundledTheme , BundledTheme ] > ( [
38+ 'github-light' as BundledTheme ,
39+ 'github-dark' as BundledTheme ,
40+ ] ) ;
3841
3942type BlockProps = HardenReactMarkdownProps & {
4043 content : string ;
@@ -69,7 +72,7 @@ export const Streamdown = memo(
6972 rehypePlugins,
7073 remarkPlugins,
7174 className,
72- shikiTheme = 'github-light' ,
75+ shikiTheme = [ 'github-light' , 'github-dark' ] ,
7376 ...props
7477 } : StreamdownProps ) => {
7578 // Parse the children to remove incomplete markdown tokens if enabled
@@ -109,7 +112,3 @@ export const Streamdown = memo(
109112 prevProps . shikiTheme === nextProps . shikiTheme
110113) ;
111114Streamdown . displayName = 'Streamdown' ;
112-
113- export { Mermaid } ;
114- export { CodeBlock , CodeBlockCopyButton , CodeBlockRenderButton } from './lib/code-block' ;
115- export default Streamdown ;
0 commit comments