import type { PropValidators, CodeEditorTheme, OtherHTMLAttributes } from '@instructure/shared-types'; import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'; import type { EditorConfiguration } from 'codemirror'; import type { WithDeterministicIdProps } from '@instructure/ui-react-utils'; type CodeEditorOwnProps = { /** * The label text that screen readers will read when this component gets * focus. */ label: string; /** * The language to use. When not given, this will default to the first * language that was loaded. */ language?: 'sh' | 'js' | 'json' | 'javascript' | 'jsx' | 'shell' | 'css' | 'html' | 'markdown' | 'yaml' | 'yml' | 'bash'; /** * This disables editing of the editor content by the user. * If the special option "nocursor" is given (instead of simply true), * focusing of the editor is also disallowed. */ readOnly?: boolean | 'nocursor'; /** * Called when the value of the component changes. */ onChange?: (value: string) => void; /** * Options that are passed to the underlying Codemirror instance. See * https://codemirror.net/doc/manual.html#config */ options?: EditorConfiguration; /** * Sets minor visual styles (border radius & top/bottom margin) */ attachment?: 'bottom' | 'top'; /** * The selected value (when controlled via the `onChange` prop) */ value?: string; }; type PropKeys = keyof CodeEditorOwnProps; type AllowedPropKeys = Readonly>; type CodeEditorProps = CodeEditorOwnProps & WithStyleProps & OtherHTMLAttributes & WithDeterministicIdProps; type CodeEditorStyle = ComponentStyle<'codeEditor' | 'globalStyles'>; declare const propTypes: PropValidators; declare const allowedProps: AllowedPropKeys; export type { CodeEditorProps, CodeEditorStyle }; export { propTypes, allowedProps }; //# sourceMappingURL=props.d.ts.map