import * as shopify from "@shopify/lang-jsonc"; import CodeMirror from "@uiw/react-codemirror"; import { BookCopy, CircleX } from "lucide-react"; import Merge from "react-codemirror-merge"; import { ErrorBoundary } from "react-error-boundary"; import { headplaneTheme } from "./theme"; interface EditorProps { isDisabled?: boolean; value: string; onChange: (value: string) => void; } export function Editor(props: EditorProps) { return (

Failed to load the editor.

} > props.onChange(value)} readOnly={props.isDisabled} theme={headplaneTheme} value={props.value} /> ); } interface DifferProps { left: string; right: string; } export function Differ(props: DifferProps) { return (
{props.left === props.right ? (

No changes

) : (

Failed to load the editor.

} >
)} ); }