Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: showInvisibles type #2037

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export interface IAceOptions {
vScrollBarAlwaysVisible?: boolean;
highlightGutterLine?: boolean;
animatedScroll?: boolean;
showInvisibles?: boolean;
showInvisibles?: string | boolean;
showPrintMargin?: boolean;
printMarginColumn?: number;
printMargin?: boolean | number;
Expand Down
286 changes: 143 additions & 143 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,175 +2,175 @@
// Project: https://github.com/securingsincity/react-ace
// Definitions by: Alberto Nicoletti <https://github.com/illbexyz>

import { Component, CSSProperties } from 'react'
import { Component, CSSProperties } from "react";

export interface Annotation {
row: number
column: number
type: string
text: string
row: number;
column: number;
type: string;
text: string;
}

export interface Marker {
startRow: number
startCol: number
endRow: number
endCol: number
className: string
type: string
startRow: number;
startCol: number;
endRow: number;
endCol: number;
className: string;
type: string;
}

export interface CommandBindKey {
win: string
mac: string
win: string;
mac: string;
}

export interface Command {
name: string
bindKey: CommandBindKey
exec(editor: any): void
name: string;
bindKey: CommandBindKey;
exec(editor: any): void;
}

export interface Selection {
getCursor(): Annotation;
getCursor(): Annotation;
}

/**
* See https://github.com/ajaxorg/ace/wiki/Configuring-Ace
*/
export interface AceOptions {
selectionStyle?: "line" | "text"
highlightActiveLine?: boolean
highlightSelectedWord?: boolean
readOnly?: boolean
cursorStyle?: "ace"|"slim"|"smooth"|"wide"
mergeUndoDeltas?: false | true | "always"
behavioursEnabled?: boolean
wrapBehavioursEnabled?: boolean
/** this is needed if editor is inside scrollable page */
autoScrollEditorIntoView?: boolean
hScrollBarAlwaysVisible?: boolean
vScrollBarAlwaysVisible?: boolean
highlightGutterLine?: boolean
animatedScroll?: boolean
showInvisibles?: boolean
showPrintMargin?: boolean
printMarginColumn?: number;
printMargin?: boolean | number;
fadeFoldWidgets?: boolean
showFoldWidgets?: boolean
showLineNumbers?: boolean
showGutter?: boolean
displayIndentGuides?: boolean
/** number or css font-size string */
fontSize?: number | string
/** css */
fontFamily?: string
maxLines?: number
minLines?: number
scrollPastEnd?: boolean
fixedWidthGutter?: boolean
/** path to a theme e.g "ace/theme/textmate" */
theme?: string
scrollSpeed?: number
dragDelay?: number
dragEnabled?: boolean
focusTimout?: number
tooltipFollowsMouse?: boolean
firstLineNumber?: number
overwrite?: boolean
newLineMode?: boolean
useWorker?: boolean
useSoftTabs?: boolean
tabSize?: number
wrap?: boolean
foldStyle?: "markbegin"|"markbeginend"|"manual"
/** path to a mode e.g "ace/mode/text" */
mode?: string
/** on by default */
enableMultiselect?: boolean
enableEmmet?: boolean
enableBasicAutocompletion?: boolean
enableLiveAutocompletion?: boolean
enableSnippets?: boolean
spellcheck?: boolean
useElasticTabstops?: boolean
selectionStyle?: "line" | "text";
highlightActiveLine?: boolean;
highlightSelectedWord?: boolean;
readOnly?: boolean;
cursorStyle?: "ace" | "slim" | "smooth" | "wide";
mergeUndoDeltas?: false | true | "always";
behavioursEnabled?: boolean;
wrapBehavioursEnabled?: boolean;
/** this is needed if editor is inside scrollable page */
autoScrollEditorIntoView?: boolean;
hScrollBarAlwaysVisible?: boolean;
vScrollBarAlwaysVisible?: boolean;
highlightGutterLine?: boolean;
animatedScroll?: boolean;
showInvisibles?: string | boolean;
showPrintMargin?: boolean;
printMarginColumn?: number;
printMargin?: boolean | number;
fadeFoldWidgets?: boolean;
showFoldWidgets?: boolean;
showLineNumbers?: boolean;
showGutter?: boolean;
displayIndentGuides?: boolean;
/** number or css font-size string */
fontSize?: number | string;
/** css */
fontFamily?: string;
maxLines?: number;
minLines?: number;
scrollPastEnd?: boolean;
fixedWidthGutter?: boolean;
/** path to a theme e.g "ace/theme/textmate" */
theme?: string;
scrollSpeed?: number;
dragDelay?: number;
dragEnabled?: boolean;
focusTimout?: number;
tooltipFollowsMouse?: boolean;
firstLineNumber?: number;
overwrite?: boolean;
newLineMode?: boolean;
useWorker?: boolean;
useSoftTabs?: boolean;
tabSize?: number;
wrap?: boolean;
foldStyle?: "markbegin" | "markbeginend" | "manual";
/** path to a mode e.g "ace/mode/text" */
mode?: string;
/** on by default */
enableMultiselect?: boolean;
enableEmmet?: boolean;
enableBasicAutocompletion?: boolean;
enableLiveAutocompletion?: boolean;
enableSnippets?: boolean;
spellcheck?: boolean;
useElasticTabstops?: boolean;
}

export interface EditorProps {
$blockScrolling?: number | boolean
$blockSelectEnabled?: boolean
$enableBlockSelect?: boolean
$enableMultiselect?: boolean
$highlightPending?: boolean
$highlightTagPending?: boolean
$multiselectOnSessionChange?: (...args: any[]) => any
$onAddRange?: (...args: any[]) => any
$onChangeAnnotation?: (...args: any[]) => any
$onChangeBackMarker?: (...args: any[]) => any
$onChangeBreakpoint?: (...args: any[]) => any
$onChangeFold?: (...args: any[]) => any
$onChangeFrontMarker?: (...args: any[]) => any
$onChangeMode?: (...args: any[]) => any
$onChangeTabSize?: (...args: any[]) => any
$onChangeWrapLimit?: (...args: any[]) => any
$onChangeWrapMode?: (...args: any[]) => any
$onCursorChange?: (...args: any[]) => any
$onDocumentChange?: (...args: any[]) => any
$onMultiSelect?: (...args: any[]) => any
$onRemoveRange?: (...args: any[]) => any
$onScrollLeftChange?: (...args: any[]) => any
$onScrollTopChange?: (...args: any[]) => any
$onSelectionChange?: (...args: any[]) => any
$onSingleSelect?: (...args: any[]) => any
$onTokenizerUpdate?: (...args: any[]) => any
$blockScrolling?: number | boolean;
$blockSelectEnabled?: boolean;
$enableBlockSelect?: boolean;
$enableMultiselect?: boolean;
$highlightPending?: boolean;
$highlightTagPending?: boolean;
$multiselectOnSessionChange?: (...args: any[]) => any;
$onAddRange?: (...args: any[]) => any;
$onChangeAnnotation?: (...args: any[]) => any;
$onChangeBackMarker?: (...args: any[]) => any;
$onChangeBreakpoint?: (...args: any[]) => any;
$onChangeFold?: (...args: any[]) => any;
$onChangeFrontMarker?: (...args: any[]) => any;
$onChangeMode?: (...args: any[]) => any;
$onChangeTabSize?: (...args: any[]) => any;
$onChangeWrapLimit?: (...args: any[]) => any;
$onChangeWrapMode?: (...args: any[]) => any;
$onCursorChange?: (...args: any[]) => any;
$onDocumentChange?: (...args: any[]) => any;
$onMultiSelect?: (...args: any[]) => any;
$onRemoveRange?: (...args: any[]) => any;
$onScrollLeftChange?: (...args: any[]) => any;
$onScrollTopChange?: (...args: any[]) => any;
$onSelectionChange?: (...args: any[]) => any;
$onSingleSelect?: (...args: any[]) => any;
$onTokenizerUpdate?: (...args: any[]) => any;
}

export interface AceEditorProps {
name?: string
/** For available modes see https://github.com/thlorenz/brace/tree/master/mode */
mode?: string
/** For available themes see https://github.com/thlorenz/brace/tree/master/theme */
theme?: string
height?: string
width?: string
className?: string
fontSize?: number
showGutter?: boolean
showPrintMargin?: boolean
highlightActiveLine?: boolean
focus?: boolean
cursorStart?: number
wrapEnabled?: boolean
readOnly?: boolean
minLines?: number
maxLines?: number
enableBasicAutocompletion?: boolean
enableLiveAutocompletion?: boolean
tabSize?: number
value?: string
defaultValue?: string
scrollMargin?: number[]
onLoad?: (editor: EditorProps) => void
onBeforeLoad?: (ace: any) => void
onChange?: (value: string, event?: any) => void
onInput?: (value: string, event?: any) => void
onSelectionChange?: (selectedText: string, event?: any) => void
onCopy?: (value: string) => void
onPaste?: (value: string) => void
onFocus?: (event: any) => void
onBlur?: (event: any) => void
onValidate?: (annotations: Array<Annotation>) => void
onScroll?: (editor: EditorProps) => void
onCursorChange?: (selection: Selection) => void;
editorProps?: EditorProps
setOptions?: AceOptions
keyboardHandler?: string
commands?: Array<Command>
annotations?: Array<Annotation>
markers?: Array<Marker>
style?: CSSProperties
debounceChangePeriod?: number
name?: string;
/** For available modes see https://github.com/thlorenz/brace/tree/master/mode */
mode?: string;
/** For available themes see https://github.com/thlorenz/brace/tree/master/theme */
theme?: string;
height?: string;
width?: string;
className?: string;
fontSize?: number;
showGutter?: boolean;
showPrintMargin?: boolean;
highlightActiveLine?: boolean;
focus?: boolean;
cursorStart?: number;
wrapEnabled?: boolean;
readOnly?: boolean;
minLines?: number;
maxLines?: number;
enableBasicAutocompletion?: boolean;
enableLiveAutocompletion?: boolean;
tabSize?: number;
value?: string;
defaultValue?: string;
scrollMargin?: number[];
onLoad?: (editor: EditorProps) => void;
onBeforeLoad?: (ace: any) => void;
onChange?: (value: string, event?: any) => void;
onInput?: (value: string, event?: any) => void;
onSelectionChange?: (selectedText: string, event?: any) => void;
onCopy?: (value: string) => void;
onPaste?: (value: string) => void;
onFocus?: (event: any) => void;
onBlur?: (event: any) => void;
onValidate?: (annotations: Array<Annotation>) => void;
onScroll?: (editor: EditorProps) => void;
onCursorChange?: (selection: Selection) => void;
editorProps?: EditorProps;
setOptions?: AceOptions;
keyboardHandler?: string;
commands?: Array<Command>;
annotations?: Array<Annotation>;
markers?: Array<Marker>;
style?: CSSProperties;
debounceChangePeriod?: number;
}

export default class AceEditor extends Component<AceEditorProps, {}> {}
Loading