UNPKG

fumadocs-core

Version:

The React.js library for building a documentation website

15 lines (14 loc) • 574 B
"use client"; import { useShiki as useShiki$1 } from "./shiki/react.js"; import { defaultShikiFactory } from "./shiki/full.js"; import { i as applyDefaultThemes } from "../shiki-DL5DIaX-.js"; // src/highlight/client.ts /** * get highlighted results, should be used with React Suspense API. * * note: results are cached with (lang, code) as keys, if this is not the desired behaviour, pass a `deps` instead. */ function useShiki(code, options, deps) { return useShiki$1(() => defaultShikiFactory.getOrInit(), code, applyDefaultThemes(options), deps); } export { useShiki };