UNPKG

prism-react-editor

Version:

Lightweight, extensible code editor component for React apps

40 lines (39 loc) 1.69 kB
"use client"; import { jsx } from "react/jsx-runtime"; import { useDefaultCommands, useEditHistory } from "./extensions/commands.js"; import { useCursorPosition } from "./extensions/cursor.js"; import { IndentGuides } from "./extensions/guides.js"; import { useBracketMatcher } from "./extensions/match-brackets/index.js"; import { useHighlightBracketPairs } from "./extensions/match-brackets/highlight.js"; import { useTagMatcher, useHighlightMatchingTags } from "./extensions/match-tags.js"; import { a as useSearchWidget, b as useHighlightSelectionMatches, d as useShowInvisibles } from "./invisibles-C1HUPmS1.js"; import { useReadOnlyCodeFolding, markdownFolding, blockCommentFolding, tagFolding, bracketFolding } from "./extensions/folding/index.js"; import { useCopyButton } from "./extensions/copy-button/index.js"; const BasicSetup = ({ editor }) => { useBracketMatcher(editor); useHighlightBracketPairs(editor); useTagMatcher(editor); useHighlightMatchingTags(editor); useDefaultCommands(editor); useEditHistory(editor); useSearchWidget(editor); useHighlightSelectionMatches(editor); useShowInvisibles(editor); useCursorPosition(editor); return /* @__PURE__ */ jsx(IndentGuides, { editor }); }; const ReadOnlySetup = ({ editor }) => { useBracketMatcher(editor); useHighlightBracketPairs(editor); useTagMatcher(editor); useHighlightMatchingTags(editor); useHighlightSelectionMatches(editor); useCopyButton(editor); useReadOnlyCodeFolding(editor, bracketFolding, tagFolding, blockCommentFolding, markdownFolding); return /* @__PURE__ */ jsx(IndentGuides, { editor }); }; export { BasicSetup, ReadOnlySetup }; //# sourceMappingURL=setups.js.map