import { nanoid } from "nanoid" import type { FC, PropsWithChildren, ReactNode } from "react" import { createContext, createElement, memo, useContext, useLayoutEffect, useMemo, useState, } from "react" import root from "react-shadow" import { useUISettingKey } from "~/atoms/settings/ui" import { useReduceMotion } from "~/hooks/biz/useReduceMotion" import { useIsDark } from "~/hooks/common" const ShadowDOMContext = createContext(false) const MemoedDangerousHTMLStyle: FC< { children: string } & React.DetailedHTMLProps, HTMLStyleElement> & Record > = memo(({ children, ...rest }) => (