diff --git a/apps/desktop/layer/renderer/package.json b/apps/desktop/layer/renderer/package.json index d7139ef74..c9431ab8e 100644 --- a/apps/desktop/layer/renderer/package.json +++ b/apps/desktop/layer/renderer/package.json @@ -92,12 +92,14 @@ "react-i18next": "15.6.0", "react-intersection-observer": "9.16.0", "react-ios-pwa-prompt": "2.0.6", + "react-markdown": "10.1.0", "react-qr-code": "2.0.18", "react-resizable-layout": "npm:@innei/react-resizable-layout@0.7.3-fork.1", "react-router": "7.6.3", "react-selecto": "1.26.3", "react-shadow": "20.6.0", "react-zoom-pan-pinch": "3.7.0", + "rehype-raw": "7.0.0", "shiki": "3.7.0", "sonner": "2.0.6", "tinykeys": "3.0.0", diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIChatMessage.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIChatMessage.tsx index c8e84a2dd..bbc974402 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIChatMessage.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIChatMessage.tsx @@ -1,13 +1,12 @@ import { createDefaultLexicalEditor } from "@follow/components/ui/lexical-rich-editor/editor.js" import { stopPropagation, thenable } from "@follow/utils" -import type { UIDataTypes, UIMessage } from "ai" import type { LexicalEditor } from "lexical" import { m } from "motion/react" import * as React from "react" import { toast } from "sonner" import { copyToClipboard } from "~/lib/clipboard" -import type { BizUIMessage, BizUIMetadata, BizUITools } from "~/modules/ai-chat/store/types" +import type { BizUIMessage } from "~/modules/ai-chat/store/types" import { MentionPlugin } from "../../editor" import type { RichTextPart } from "../../types/ChatSession" @@ -27,7 +26,7 @@ interface AIChatMessageProps { } // Utility function for converting message to markdown -const useMessageMarkdownFormat = (message: UIMessage) => { +const useMessageMarkdownFormat = (message: BizUIMessage) => { return React.useCallback(() => { let content = "" for (const part of message.parts) { diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.v2.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.v2.tsx index 9f171c2f1..d2b98e7a7 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.v2.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMarkdownMessage.v2.tsx @@ -1,115 +1,27 @@ -import type { LinkProps } from "@follow/components/ui/link/LinkWithTooltip.js" -import { parseMarkdown } from "@follow/components/utils/parse-markdown.js" -import { cn, isBizId } from "@follow/utils" -import { createElement, isValidElement, memo, useMemo } from "react" +import { cn } from "@follow/utils" +import { memo } from "react" -import { MemoizedShikiCode } from "~/components/ui/code-highlighter" -import { MarkdownLink } from "~/components/ui/markdown/renderers/MarkdownLink" -import { usePeekModal } from "~/hooks/biz/usePeekModal" +import { MarkdownAnimateText } from "./animated/AnimatedMarkdown" +import { parseIncompleteMarkdown } from "./parse-incomplete-markdown" export const AIMarkdownStreamingMessage = memo( - ({ text, className: classNameProp }: { text: string; className?: string }) => { + ({ + text, + className: classNameProp, + isStreaming, + }: { + text: string + className?: string + isStreaming?: boolean + }) => { const className = `prose max-w-full dark:prose-invert text-sm prose-h1:text-2xl prose-h2:text-xl prose-h3:text-lg prose-h4:text-base prose-h5:text-base prose-h6:text-sm prose-li:list-disc prose-li:marker:text-accent prose-hr:border-border prose-hr:mx-8` - const parsedContent = useMemo(() => baseAIMarkdownParser(text), [text]) - - return
{parsedContent}
+ return ( +
+ +
+ ) }, ) - -const RelatedEntryLink = (props: LinkProps) => { - const { href, children } = props - const entryId = isBizId(href) ? href : null - - const peekModal = usePeekModal() - if (!entryId) { - return - } - return ( - - ) -} - -function baseAIMarkdownParser(content: string) { - return parseMarkdown(content, { - components: { - pre: ({ children }) => { - const props = isValidElement(children) && "props" in children && children.props - - if (props) { - const { className, children } = props as any - - if (className && className.includes("language-") && typeof children === "string") { - const language = className.replace("language-", "") - const code = children - - return - } - } - - return
{children}
- }, - a: ({ node, ...props }) => { - return createElement(RelatedEntryLink, { ...props } as any) - }, - table: ({ children, ref, node, ...props }) => { - return ( -
- - {children} -
-
- ) - }, - thead: ({ children, ref, node, ...props }) => { - return ( - - {children} - - ) - }, - th: ({ children, ref, node, ...props }) => { - return ( - - {children} - - ) - }, - tbody: ({ children, ref, node, ...props }) => { - return ( - - {children} - - ) - }, - tr: ({ children, ref, node, ...props }) => { - return ( - - {children} - - ) - }, - td: ({ children, ref, node, ...props }) => { - return ( - - {children} - - ) - }, - }, - }).content -} diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMessageParts.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMessageParts.tsx index 808caa93b..90a2ab79a 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMessageParts.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/AIMessageParts.tsx @@ -12,6 +12,7 @@ import type { BizUIMessage, } from "~/modules/ai-chat/store/types" +import { useChatStatus } from "../../store/hooks" import { AIDisplayAnalyticsPart, AIDisplayEntriesPart, @@ -31,12 +32,34 @@ interface AIMessagePartsProps { } export const AIMessageParts: React.FC = React.memo(({ message }) => { + const [shouldStreamingAnimation, setShouldStreamingAnimation] = React.useState(false) + const chatStatus = useChatStatus() + + React.useEffect(() => { + // Delay 2s to set shouldStreamingAnimation + const timerId = setTimeout(() => { + setShouldStreamingAnimation(true) + }, 2000) + return () => clearTimeout(timerId) + }, []) + + const shouldMessageAnimation = React.useMemo(() => { + return chatStatus === "streaming" && shouldStreamingAnimation + }, [chatStatus, shouldStreamingAnimation]) + return message.parts.map((part, index) => { const partKey = `${message.id}-${index}` switch (part.type) { case "text": { - return + return ( + + ) } case "reasoning": { diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/AnimatedMarkdown.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/AnimatedMarkdown.tsx new file mode 100644 index 000000000..81ade95ba --- /dev/null +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/AnimatedMarkdown.tsx @@ -0,0 +1,202 @@ +/** + * @see https://github.com/Ephibbs/flowtoken/blob/main/src/components/AnimatedMarkdown.tsx + */ +import "./styles.css" + +import type { LinkProps } from "@follow/components/ui/link/LinkWithTooltip.js" +import { isBizId } from "@follow/utils" +import * as React from "react" +import type { Components } from "react-markdown" +import ReactMarkdown from "react-markdown" +import rehypeRaw from "rehype-raw" +import remarkGfm from "remark-gfm" + +import { MemoizedShikiCode } from "~/components/ui/code-highlighter" +import { MarkdownLink } from "~/components/ui/markdown/renderers" +import { usePeekModal } from "~/hooks/biz/usePeekModal" + +import { ANIMATION_STYLE as ANIMATION_STYLE_DEFAULT, DEFAULT_ANIMATION } from "./constants" +import { TokenizedText } from "./TokenizedText" + +interface MarkdownAnimateTextProps { + content: string + isStreaming?: boolean +} + +const emptyObject = {} + +export const MarkdownAnimateText: React.FC = ({ + content, + isStreaming, +}) => { + const ANIMATION_STYLE = isStreaming ? ANIMATION_STYLE_DEFAULT : emptyObject + + const animateText: (text: string | Array) => React.ReactNode = React.useCallback( + (text: string | Array) => { + if (!isStreaming) return text + text = Array.isArray(text) ? text : [text] + let keyCounter = 0 + const processText: (input: any, keyPrefix?: string) => React.ReactNode = ( + input: any, + keyPrefix = "item", + ) => { + if (Array.isArray(input)) { + // Process each element in the array + return input.map((element, index) => ( + + {processText(element, `${keyPrefix}-${index}`)} + + )) + } else if (typeof input === "string") { + return + } else { + // Return non-string, non-element inputs unchanged (null, undefined, etc.) + return ( + + {input} + + ) + } + } + + return processText(text) + }, + [isStreaming], + ) + + // Memoize components object to avoid redefining components unnecessarily + const components: Components = React.useMemo( + () => ({ + pre: ({ children }) => { + const props = React.isValidElement(children) && "props" in children && children.props + + if (props) { + const { className, children } = props as any + + if (className && className.includes("language-") && typeof children === "string") { + const language = className.replace("language-", "") + const code = children + + return + } + } + + return
{children}
+ }, + a: ({ node, ...props }) => { + return React.createElement(RelatedEntryLink, { ...props } as any) + }, + + text: ({ node, ...props }: any) => {animateText(props.children)}, + h1: ({ node, ...props }: any) =>

{animateText(props.children)}

, + h2: ({ node, ...props }: any) =>

{animateText(props.children)}

, + h3: ({ node, ...props }: any) =>

{animateText(props.children)}

, + h4: ({ node, ...props }: any) =>

{animateText(props.children)}

, + h5: ({ node, ...props }: any) =>
{animateText(props.children)}
, + h6: ({ node, ...props }: any) =>
{animateText(props.children)}
, + p: ({ node, ...props }: any) =>

{animateText(props.children)}

, + li: ({ node, ...props }: any) => ( +
  • + {animateText(props.children)} +
  • + ), + + strong: ({ node, ...props }: any) => ( + {animateText(props.children)} + ), + em: ({ node, ...props }: any) => {animateText(props.children)}, + + hr: ({ node, ...props }: any) => ( +
    + ), + + table: ({ children, ref, node, ...props }) => { + return ( +
    + + {children} +
    +
    + ) + }, + thead: ({ children, ref, node, ...props }) => { + return ( + + {children} + + ) + }, + th: ({ children, ref, node, ...props }) => { + return ( + + {children} + + ) + }, + tbody: ({ children, ref, node, ...props }) => { + return ( + + {children} + + ) + }, + tr: ({ children, ref, node, ...props }) => { + return ( + + {animateText(children as any)} + + ) + }, + td: ({ children, ref, node, ...props }) => { + return ( + + {animateText(children as any)} + + ) + }, + }), + [ANIMATION_STYLE, animateText], + ) + + return ( + + {content} + + ) +} + +const RelatedEntryLink = (props: LinkProps) => { + const { href, children } = props + const entryId = isBizId(href) ? href : null + + const peekModal = usePeekModal() + if (!entryId) { + return + } + return ( + + ) +} diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/TokenizedText.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/TokenizedText.tsx new file mode 100644 index 000000000..2c877597a --- /dev/null +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/TokenizedText.tsx @@ -0,0 +1,110 @@ +/** + * @see https://github.com/Ephibbs/flowtoken/blob/main/src/components/SplitText.tsx + */ +import type { ReactElement } from "react" +import * as React from "react" +import { useEffect, useRef } from "react" + +import { ANIMATION_STYLE } from "./constants" + +interface TokenWithSource { + text: string + source: number +} +// Helper function to check if token is a TokenWithSource type +const isTokenWithSource = (token: TokenType): token is TokenWithSource => { + return token !== null && typeof token === "object" && "text" in token && "source" in token +} +type TokenType = string | TokenWithSource | ReactElement + +export const TokenizedText = ({ input }: { input: React.ReactNode }) => { + // Track previous input to detect changes + const prevInputRef = useRef("") + // Track tokens with their source for proper keying in diff mode + const tokensWithSources = useRef([]) + + // For detecting and handling duplicated content + const fullTextRef = useRef("") + + const tokens = React.useMemo(() => { + if (React.isValidElement(input)) return [input] + + if (typeof input !== "string") return null + + // If this is the first render or we've gone backward, reset everything + if (!prevInputRef.current || input.length < prevInputRef.current.length) { + tokensWithSources.current = [] + fullTextRef.current = "" + } + + // Only process input if it's different from previous + if (input !== prevInputRef.current) { + // Find the true unique content by comparing with our tracked full text + // This handles cases where the input contains duplicates + + // First check if we're just seeing the same content repeated + if (input.includes(fullTextRef.current)) { + const uniqueNewContent = input.slice(fullTextRef.current.length) + + // Only add if there's actual new content + if (uniqueNewContent.length > 0) { + tokensWithSources.current.push({ + text: uniqueNewContent, + source: tokensWithSources.current.length, + }) + + // Update our full text tracking + fullTextRef.current = input + } + } else { + // Handle case when input completely changes + // Just take the whole thing as a new token + tokensWithSources.current = [ + { + text: input, + source: 0, + }, + ] + fullTextRef.current = input + } + } + + // Return the tokensWithSources directly + return tokensWithSources.current + }, [input]) + + // Update previous input after processing + useEffect(() => { + if (typeof input === "string") { + prevInputRef.current = input + } + }, [input]) + + return ( + <> + {tokens?.map((token, index) => { + // Determine the key and text based on token type + let key = index + let text = "" + + if (isTokenWithSource(token)) { + key = token.source + text = token.text + } else if (typeof token === "string") { + key = index + text = token + } else if (React.isValidElement(token)) { + key = index + text = "" + return React.cloneElement(token, { key }) + } + + return ( + + {text} + + ) + })} + + ) +} diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/constants.ts b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/constants.ts new file mode 100644 index 000000000..e4c3bcf16 --- /dev/null +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/constants.ts @@ -0,0 +1,4 @@ +export const DEFAULT_ANIMATION = "ft-typeIn 0.5s ease-in-out" +export const ANIMATION_STYLE = { + animation: DEFAULT_ANIMATION, +} diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/styles.css b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/styles.css new file mode 100644 index 000000000..cd5ea6b44 --- /dev/null +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/message/animated/styles.css @@ -0,0 +1,10 @@ +@keyframes ft-typeIn { + from { + /* transform: translateY(2px); + opacity: 0; */ + } + to { + /* transform: translateY(0%); + opacity: 1; */ + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f612cb49..5c35d47bf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -691,6 +691,9 @@ importers: react-ios-pwa-prompt: specifier: 2.0.6 version: 2.0.6(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + react-markdown: + specifier: 10.1.0 + version: 10.1.0(@types/react@19.1.8)(react@19.0.0) react-qr-code: specifier: 2.0.18 version: 2.0.18(react@19.0.0) @@ -709,6 +712,9 @@ importers: react-zoom-pan-pinch: specifier: 3.7.0 version: 3.7.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + rehype-raw: + specifier: 7.0.0 + version: 7.0.0 shiki: specifier: 3.7.0 version: 3.7.0 @@ -10358,6 +10364,9 @@ packages: hast-util-phrasing@3.0.1: resolution: {integrity: sha512-6h60VfI3uBQUxHqTyMymMZnEbNl1XmEGtOxxKYL7stY2o601COo62AWAYBQR9lZbYXYSBoxag8UpPRXK+9fqSQ==} + hast-util-raw@9.1.0: + resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} + hast-util-sanitize@5.0.2: resolution: {integrity: sha512-3yTWghByc50aGS7JlGhk61SPenfE/p1oaFeNwkOOyrscaOkMGrcW9+Cy/QAIOBpZxP1yqDIzFMR0+Np0i0+usg==} @@ -10373,6 +10382,9 @@ packages: hast-util-to-mdast@10.1.2: resolution: {integrity: sha512-FiCRI7NmOvM4y+f5w32jPRzcxDIz+PUqDwEqn1A+1q2cdp3B8Gx7aVrXORdOKjMNDQsD1ogOr896+0jJHW1EFQ==} + hast-util-to-parse5@8.0.0: + resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} + hast-util-to-string@3.0.1: resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==} @@ -10439,6 +10451,9 @@ packages: html-parse-stringify@3.0.1: resolution: {integrity: sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==} + html-url-attributes@3.0.1: + resolution: {integrity: sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ==} + html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} @@ -13116,6 +13131,9 @@ packages: prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + property-information@6.5.0: + resolution: {integrity: sha512-PgTgs/BlvHxOu8QuEN7wi5A0OmXaBcHpmCSTehcs6Uuu9IkDIEo13Hy7n898RHfrQ49vKCoGeWZSaAK01nwVig==} + property-information@7.1.0: resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} @@ -13328,6 +13346,12 @@ packages: react-is@18.3.1: resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + react-markdown@10.1.0: + resolution: {integrity: sha512-qKxVopLT/TyA6BX3Ue5NwabOsAzm0Q7kAPwq6L+wWDwisYs7R8vZ0nRXqq6rkueboxpkjvLGU9fWifiX/ZZFxQ==} + peerDependencies: + '@types/react': '>=18' + react: 19.0.0 + react-merge-refs@2.1.1: resolution: {integrity: sha512-jLQXJ/URln51zskhgppGJ2ub7b2WFKGq3cl3NYKtlHoTG+dN2q7EzWrn3hN3EgPsTMvpR9tpq5ijdp7YwFZkag==} @@ -13739,6 +13763,9 @@ packages: rehype-parse@9.0.1: resolution: {integrity: sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==} + rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + rehype-sanitize@6.0.0: resolution: {integrity: sha512-CsnhKNsyI8Tub6L4sm5ZFsme4puGfc6pYylvXo1AeqaGbjOYyzNv3qZPwvs0oMJ39eryyeOdmxwUIo94IpEhqg==} @@ -26826,6 +26853,22 @@ snapshots: hast-util-is-body-ok-link: 3.0.1 hast-util-is-element: 3.0.0 + hast-util-raw@9.1.0: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + '@ungap/structured-clone': 1.3.0 + hast-util-from-parse5: 8.0.3 + hast-util-to-parse5: 8.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.0 + parse5: 7.3.0 + unist-util-position: 5.0.0 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + hast-util-sanitize@5.0.2: dependencies: '@types/hast': 3.0.4 @@ -26901,6 +26944,16 @@ snapshots: unist-util-position: 5.0.0 unist-util-visit: 5.0.0 + hast-util-to-parse5@8.0.0: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 6.5.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + hast-util-to-string@3.0.1: dependencies: '@types/hast': 3.0.4 @@ -26984,6 +27037,8 @@ snapshots: dependencies: void-elements: 3.1.0 + html-url-attributes@3.0.1: {} + html-void-elements@3.0.0: {} htmlparser2@10.0.0: @@ -29887,6 +29942,8 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + property-information@6.5.0: {} + property-information@7.1.0: {} protobufjs@7.4.0: @@ -30106,6 +30163,24 @@ snapshots: react-is@18.3.1: {} + react-markdown@10.1.0(@types/react@19.1.8)(react@19.0.0): + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/react': 19.1.8 + devlop: 1.1.0 + hast-util-to-jsx-runtime: 2.3.6 + html-url-attributes: 3.0.1 + mdast-util-to-hast: 13.2.0 + react: 19.0.0 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + unified: 11.0.5 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + react-merge-refs@2.1.1: {} react-native-awesome-slider@2.9.0(react-native-gesture-handler@2.26.0(react-native@0.79.1(@babel/core@7.28.0)(@types/react@19.1.8)(bufferutil@4.0.9)(react@19.0.0))(react@19.0.0))(react-native-reanimated@3.19.0(@babel/core@7.28.0)(react-native@0.79.1(@babel/core@7.28.0)(@types/react@19.1.8)(bufferutil@4.0.9)(react@19.0.0))(react@19.0.0))(react-native@0.79.1(@babel/core@7.28.0)(@types/react@19.1.8)(bufferutil@4.0.9)(react@19.0.0))(react@19.0.0): @@ -30621,6 +30696,12 @@ snapshots: hast-util-from-html: 2.0.3 unified: 11.0.5 + rehype-raw@7.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-raw: 9.1.0 + vfile: 6.0.3 + rehype-sanitize@6.0.0: dependencies: '@types/hast': 3.0.4