import {
  createShikiHighlighterComponent,
  isInlineCode,
  rehypeInlineCodeProperty,
  useShikiHighlighter
} from "./chunk-S5E5K22S.js";

// src/bundles/core.ts
function validateCoreHighlighter(highlighter) {
  if (!highlighter) {
    throw new Error(
      "react-shiki/core requires a custom highlighter. Use createHighlighterCore() from react-shiki or switch to react-shiki for plug-and-play usage."
    );
  }
  return highlighter;
}

// src/core.ts
import { createHighlighterCore } from "shiki/core";
import { createOnigurumaEngine } from "shiki/engine/oniguruma";
import {
  createJavaScriptRegexEngine,
  createJavaScriptRawEngine
} from "shiki/engine/javascript";
var useShikiHighlighter2 = (code, lang, themeInput, options = {}) => {
  const highlighter = validateCoreHighlighter(options.highlighter);
  return useShikiHighlighter(
    code,
    lang,
    themeInput,
    {
      ...options,
      highlighter
    },
    async () => highlighter
  );
};
var ShikiHighlighter = createShikiHighlighterComponent(
  useShikiHighlighter2
);
var core_default = ShikiHighlighter;
export {
  ShikiHighlighter,
  createHighlighterCore,
  createJavaScriptRawEngine,
  createJavaScriptRegexEngine,
  createOnigurumaEngine,
  core_default as default,
  isInlineCode,
  rehypeInlineCodeProperty,
  useShikiHighlighter2 as useShikiHighlighter
};
//# sourceMappingURL=core.js.map