codemirror-editor-vue3
Advanced tools
Comparing version 1.1.0-beta8 to 1.1.0-beta9
@@ -1,24 +0,3 @@ | ||
import { | ||
Ref, | ||
Component, | ||
PropType, | ||
SetupContext, | ||
ComponentInternalInstance, | ||
EmitsOptions, | ||
WatchStopHandle, | ||
} from "vue"; | ||
import { Editor, EditorConfiguration } from "codemirror"; | ||
export type { | ||
Editor, | ||
EditorConfiguration, | ||
Ref, | ||
Component, | ||
PropType, | ||
SetupContext, | ||
ComponentInternalInstance, | ||
EmitsOptions, | ||
WatchStopHandle, | ||
}; | ||
declare var Codemirror: any; | ||
@@ -53,9 +32,2 @@ export default Codemirror; | ||
export interface ComponentsEvts { | ||
"update:value": (value: string) => value; | ||
change: (value: string, cm: Editor) => { value; cm }; | ||
input: (value: string) => value; | ||
ready: (cm: Editor) => cm; | ||
[key: string]: any; | ||
} | ||
declare module "codemirror"; |
@@ -1,3 +0,13 @@ | ||
import { ComponentsEvts } from '../..codemirror-editor-vue3'; | ||
import { Editor } from "codemirror"; | ||
export declare type CMEvents = "changes" | "scroll" | "beforeChange" | "cursorActivity" | "keyHandled" | "inputRead" | "electricInput" | "beforeSelectionChange" | "viewportChange" | "swapDoc" | "gutterClick" | "gutterContextMenu" | "focus" | "blur" | "refresh" | "optionChange" | "scrollCursorIntoView" | "update"; | ||
interface ComponentsEvts { | ||
"update:value": (value: string) => string; | ||
change: (value: string, cm: Editor) => { | ||
value: string; | ||
cm: Editor; | ||
}; | ||
input: (value: string) => string; | ||
ready: (cm: Editor) => Editor; | ||
[key: string]: any; | ||
} | ||
export declare const componentsEvts: ComponentsEvts; | ||
@@ -19,1 +29,2 @@ export declare const cmEvts: string[]; | ||
}; | ||
export {}; |
@@ -1,2 +0,4 @@ | ||
import type { Editor, CmProps, ComponentInternalInstance, Ref } from '../..codemirror-editor-vue3'; | ||
import type { CmProps } from '../..codemirror-editor-vue3'; | ||
import type { Editor } from "codemirror"; | ||
import type { ComponentInternalInstance, Ref } from "vue"; | ||
declare type UseEventsParams = { | ||
@@ -3,0 +5,0 @@ props: CmProps; |
@@ -1,2 +0,4 @@ | ||
import { CmProps, Ref, Editor } from '../..codemirror-editor-vue3'; | ||
import { CmProps } from '../..codemirror-editor-vue3'; | ||
import type { Ref } from "vue"; | ||
import type { Editor } from "codemirror"; | ||
export declare type UseViewControlParams = { | ||
@@ -14,4 +16,4 @@ props: CmProps; | ||
destroy: () => void; | ||
containerHeight: Ref<Nullable<string>>; | ||
containerHeight: any; | ||
reviseStyle: () => void; | ||
}; |
@@ -1,638 +0,2 @@ | ||
import type { Ref, PropType, Editor, EditorConfiguration } from '..codemirror-editor-vue3'; | ||
import _CodeMirror from "codemirror"; | ||
declare const _default: import("vue").DefineComponent<{ | ||
value: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
marker: { | ||
type: PropType<() => HTMLElement>; | ||
default: () => null; | ||
}; | ||
unseenLines: { | ||
type: PropType<any[]>; | ||
default: () => never[]; | ||
}; | ||
name: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
placeholder: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
merge: { | ||
type: PropType<boolean>; | ||
default: boolean; | ||
}; | ||
options: { | ||
type: PropType<EditorConfiguration>; | ||
default: () => { | ||
mode: string; | ||
theme: string; | ||
lineNumbers: boolean; | ||
smartIndent: boolean; | ||
indentUnit: number; | ||
foldGutter: boolean; | ||
matchBrackets: boolean; | ||
autoCloseBrackets: boolean; | ||
styleActiveLine: boolean; | ||
}; | ||
}; | ||
globalOptions: { | ||
type: PropType<EditorConfiguration>; | ||
default: () => { | ||
mode: string; | ||
theme: string; | ||
lineNumbers: boolean; | ||
smartIndent: boolean; | ||
indentUnit: number; | ||
foldGutter: boolean; | ||
matchBrackets: boolean; | ||
autoCloseBrackets: boolean; | ||
styleActiveLine: boolean; | ||
}; | ||
}; | ||
border: { | ||
type: PropType<boolean>; | ||
default: boolean; | ||
}; | ||
width: { | ||
type: PropType<string | number>; | ||
default: null; | ||
}; | ||
height: { | ||
type: PropType<string | number>; | ||
default: null; | ||
}; | ||
KeepCursorInEnd: { | ||
type: PropType<boolean>; | ||
default: boolean; | ||
}; | ||
}, { | ||
presetModeName: Ref<"Default" | "Merge" | "FcLog">; | ||
cmOptions: Ref<{ | ||
value?: string | { | ||
getEditor: () => Editor | null; | ||
copy: (copyHistory: boolean) => _CodeMirror.Doc; | ||
on: <T extends keyof _CodeMirror.DocEventMap>(eventName: T, handler: _CodeMirror.DocEventMap[T]) => void; | ||
off: <T_1 extends keyof _CodeMirror.DocEventMap>(eventName: T_1, handler: _CodeMirror.DocEventMap[T_1]) => void; | ||
modeOption: string | { | ||
highlightNonStandardPropertyKeywords?: boolean | undefined; | ||
version?: 2 | 3 | undefined; | ||
singleLineStringErrors?: boolean | undefined; | ||
hangingIndent?: number | undefined; | ||
singleOperators?: unknown; | ||
singleDelimiters?: unknown; | ||
doubleOperators?: unknown; | ||
doubleDelimiters?: unknown; | ||
tripleDelimiters?: unknown; | ||
identifiers?: unknown; | ||
extra_keywords?: string[] | undefined; | ||
extra_builtins?: string[] | undefined; | ||
useCPP?: boolean | undefined; | ||
base?: string | undefined; | ||
tags?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
json?: boolean | undefined; | ||
jsonld?: boolean | undefined; | ||
typescript?: boolean | undefined; | ||
trackScope?: boolean | undefined; | ||
statementIndent?: boolean | undefined; | ||
wordCharacters?: unknown; | ||
highlightFormatting?: boolean | undefined; | ||
maxBlockquoteDepth?: boolean | undefined; | ||
xml?: boolean | undefined; | ||
fencedCodeBlockHighlighting?: boolean | undefined; | ||
fencedCodeBlockDefaultMode?: string | undefined; | ||
tokenTypeOverrides?: unknown; | ||
allowAtxHeaderWithoutSpace?: boolean | undefined; | ||
gitHubSpice?: boolean | undefined; | ||
taskLists?: boolean | undefined; | ||
strikethrough?: boolean | undefined; | ||
emoji?: boolean | undefined; | ||
leftDelimiter?: string | undefined; | ||
rightDelimiter?: string | undefined; | ||
baseMode?: string | undefined; | ||
inMathMode?: boolean | undefined; | ||
noIndentKeywords?: unknown; | ||
atoms?: unknown; | ||
hooks?: unknown; | ||
multiLineStrings?: boolean | undefined; | ||
htmlMode?: boolean | undefined; | ||
matchClosing?: boolean | undefined; | ||
alignCDATA?: boolean | undefined; | ||
name: string; | ||
}; | ||
getValue: (seperator?: string | undefined) => string; | ||
setValue: (content: string) => void; | ||
getRange: (from: _CodeMirror.Position, to: _CodeMirror.Position, seperator?: string | undefined) => string; | ||
replaceRange: (replacement: string | string[], from: _CodeMirror.Position, to?: _CodeMirror.Position | undefined, origin?: string | undefined) => void; | ||
getLine: (n: number) => string; | ||
setLine: (n: number, text: string) => void; | ||
removeLine: (n: number) => void; | ||
lineCount: () => number; | ||
firstLine: () => number; | ||
lastLine: () => number; | ||
getLineHandle: (num: number) => _CodeMirror.LineHandle; | ||
getLineNumber: (handle: _CodeMirror.LineHandle) => number | null; | ||
eachLine: { | ||
(f: (line: _CodeMirror.LineHandle) => void): void; | ||
(start: number, end: number, f: (line: _CodeMirror.LineHandle) => void): void; | ||
}; | ||
markClean: () => void; | ||
changeGeneration: (closeEvent?: boolean | undefined) => number; | ||
isClean: (generation?: number | undefined) => boolean; | ||
getSelection: () => string; | ||
getSelections: (lineSep?: string | undefined) => string[]; | ||
replaceSelection: (replacement: string, collapse?: string | undefined) => void; | ||
replaceSelections: (replacements: string[], collapse?: string | undefined) => void; | ||
getCursor: (start?: string | undefined) => _CodeMirror.Position; | ||
listSelections: () => _CodeMirror.Range[]; | ||
somethingSelected: () => boolean; | ||
setCursor: (pos: number | _CodeMirror.Position, ch?: number | undefined, options?: { | ||
bias?: number | undefined; | ||
origin?: string | undefined; | ||
scroll?: boolean | undefined; | ||
} | undefined) => void; | ||
setSelection: (anchor: _CodeMirror.Position, head?: _CodeMirror.Position | undefined, options?: { | ||
bias?: number | undefined; | ||
origin?: string | undefined; | ||
scroll?: boolean | undefined; | ||
} | undefined) => void; | ||
setSelections: (ranges: { | ||
anchor: _CodeMirror.Position; | ||
head: _CodeMirror.Position; | ||
}[], primary?: number | undefined, options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
addSelection: (anchor: _CodeMirror.Position, head?: _CodeMirror.Position | undefined) => void; | ||
extendSelection: (from: _CodeMirror.Position, to?: _CodeMirror.Position | undefined, options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
extendSelections: (heads: _CodeMirror.Position[], options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
extendSelectionsBy: (f: (range: _CodeMirror.Range) => _CodeMirror.Position) => void; | ||
setExtending: (value: boolean) => void; | ||
getExtending: () => boolean; | ||
linkedDoc: (options: { | ||
sharedHist?: boolean | undefined; | ||
from?: number | undefined; | ||
to?: number | undefined; | ||
mode?: string | _CodeMirror.ModeSpec<_CodeMirror.ModeSpecOptions> | undefined; | ||
}) => _CodeMirror.Doc; | ||
unlinkDoc: (doc: _CodeMirror.Doc) => void; | ||
iterLinkedDocs: (fn: (doc: _CodeMirror.Doc, sharedHist: boolean) => void) => void; | ||
undo: () => void; | ||
redo: () => void; | ||
undoSelection: () => void; | ||
redoSelection: () => void; | ||
historySize: () => { | ||
undo: number; | ||
redo: number; | ||
}; | ||
clearHistory: () => void; | ||
getHistory: () => any; | ||
setHistory: (history: any) => void; | ||
markText: (from: _CodeMirror.Position, to: _CodeMirror.Position, options?: _CodeMirror.TextMarkerOptions | undefined) => _CodeMirror.TextMarker<_CodeMirror.MarkerRange>; | ||
setBookmark: (pos: _CodeMirror.Position, options?: { | ||
widget?: HTMLElement | undefined; | ||
insertLeft?: boolean | undefined; | ||
shared?: boolean | undefined; | ||
handleMouseEvents?: boolean | undefined; | ||
} | undefined) => _CodeMirror.TextMarker<_CodeMirror.Position>; | ||
findMarks: (from: _CodeMirror.Position, to: _CodeMirror.Position) => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
findMarksAt: (pos: _CodeMirror.Position) => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
getAllMarks: () => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
addLineWidget: (line: any, node: HTMLElement, options?: _CodeMirror.LineWidgetOptions | undefined) => _CodeMirror.LineWidget; | ||
removeLineWidget: (widget: _CodeMirror.LineWidget) => void; | ||
getMode: () => _CodeMirror.Mode<unknown>; | ||
lineSeparator: () => string; | ||
posFromIndex: (index: number) => _CodeMirror.Position; | ||
indexFromPos: (object: _CodeMirror.Position) => number; | ||
state: any; | ||
} | undefined; | ||
mode?: string | { | ||
highlightNonStandardPropertyKeywords?: boolean | undefined; | ||
version?: 2 | 3 | undefined; | ||
singleLineStringErrors?: boolean | undefined; | ||
hangingIndent?: number | undefined; | ||
singleOperators?: unknown; | ||
singleDelimiters?: unknown; | ||
doubleOperators?: unknown; | ||
doubleDelimiters?: unknown; | ||
tripleDelimiters?: unknown; | ||
identifiers?: unknown; | ||
extra_keywords?: string[] | undefined; | ||
extra_builtins?: string[] | undefined; | ||
useCPP?: boolean | undefined; | ||
base?: string | undefined; | ||
tags?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
json?: boolean | undefined; | ||
jsonld?: boolean | undefined; | ||
typescript?: boolean | undefined; | ||
trackScope?: boolean | undefined; | ||
statementIndent?: boolean | undefined; | ||
wordCharacters?: unknown; | ||
highlightFormatting?: boolean | undefined; | ||
maxBlockquoteDepth?: boolean | undefined; | ||
xml?: boolean | undefined; | ||
fencedCodeBlockHighlighting?: boolean | undefined; | ||
fencedCodeBlockDefaultMode?: string | undefined; | ||
tokenTypeOverrides?: unknown; | ||
allowAtxHeaderWithoutSpace?: boolean | undefined; | ||
gitHubSpice?: boolean | undefined; | ||
taskLists?: boolean | undefined; | ||
strikethrough?: boolean | undefined; | ||
emoji?: boolean | undefined; | ||
leftDelimiter?: string | undefined; | ||
rightDelimiter?: string | undefined; | ||
baseMode?: string | undefined; | ||
inMathMode?: boolean | undefined; | ||
noIndentKeywords?: unknown; | ||
atoms?: unknown; | ||
hooks?: unknown; | ||
multiLineStrings?: boolean | undefined; | ||
htmlMode?: boolean | undefined; | ||
matchClosing?: boolean | undefined; | ||
alignCDATA?: boolean | undefined; | ||
name: string; | ||
} | undefined; | ||
lineSeparator?: string | null | undefined; | ||
theme?: string | undefined; | ||
indentUnit?: number | undefined; | ||
smartIndent?: boolean | undefined; | ||
tabSize?: number | undefined; | ||
indentWithTabs?: boolean | undefined; | ||
electricChars?: boolean | undefined; | ||
specialChars?: { | ||
exec: (string: string) => RegExpExecArray | null; | ||
test: (string: string) => boolean; | ||
readonly source: string; | ||
readonly global: boolean; | ||
readonly ignoreCase: boolean; | ||
readonly multiline: boolean; | ||
lastIndex: number; | ||
compile: (pattern: string, flags?: string | undefined) => RegExp; | ||
readonly flags: string; | ||
readonly sticky: boolean; | ||
readonly unicode: boolean; | ||
readonly dotAll: boolean; | ||
[Symbol.match]: (string: string) => RegExpMatchArray | null; | ||
[Symbol.replace]: { | ||
(string: string, replaceValue: string): string; | ||
(string: string, replacer: (substring: string, ...args: any[]) => string): string; | ||
}; | ||
[Symbol.search]: (string: string) => number; | ||
[Symbol.split]: (string: string, limit?: number | undefined) => string[]; | ||
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>; | ||
} | undefined; | ||
specialCharPlaceholder?: ((char: string) => HTMLElement) | undefined; | ||
direction?: "ltr" | "rtl" | undefined; | ||
rtlMoveVisually?: boolean | undefined; | ||
keyMap?: string | undefined; | ||
extraKeys?: string | { | ||
[x: string]: string | false | ((instance: Editor) => void | { | ||
toString(): "CodeMirror.PASS"; | ||
}); | ||
} | undefined; | ||
configureMouse?: ((cm: Editor, repeat: "single" | "double" | "triple", event: Event) => _CodeMirror.MouseSelectionConfiguration) | undefined; | ||
lineWrapping?: boolean | undefined; | ||
lineNumbers?: boolean | undefined; | ||
firstLineNumber?: number | undefined; | ||
lineNumberFormatter?: ((line: number) => string) | undefined; | ||
gutters?: (string | { | ||
className: string; | ||
style?: string | undefined; | ||
})[] | undefined; | ||
fixedGutter?: boolean | undefined; | ||
scrollbarStyle?: keyof _CodeMirror.ScrollbarModels | undefined; | ||
coverGutterNextToScrollbar?: boolean | undefined; | ||
inputStyle?: _CodeMirror.InputStyle | undefined; | ||
readOnly?: boolean | "nocursor" | undefined; | ||
screenReaderLabel?: string | undefined; | ||
showCursorWhenSelecting?: boolean | undefined; | ||
lineWiseCopyCut?: boolean | undefined; | ||
pasteLinesPerSelection?: boolean | undefined; | ||
selectionsMayTouch?: boolean | undefined; | ||
undoDepth?: number | undefined; | ||
historyEventDelay?: number | undefined; | ||
tabindex?: number | undefined; | ||
autofocus?: boolean | undefined; | ||
phrases?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
dragDrop?: boolean | undefined; | ||
allowDropFileTypes?: string[] | null | undefined; | ||
onDragEvent?: ((instance: Editor, event: DragEvent) => boolean) | undefined; | ||
onKeyEvent?: ((instance: Editor, event: KeyboardEvent) => boolean) | undefined; | ||
cursorBlinkRate?: number | undefined; | ||
cursorScrollMargin?: number | undefined; | ||
cursorHeight?: number | undefined; | ||
resetSelectionOnContextMenu?: boolean | undefined; | ||
workTime?: number | undefined; | ||
workDelay?: number | undefined; | ||
pollInterval?: number | undefined; | ||
flattenSpans?: boolean | undefined; | ||
addModeClass?: boolean | undefined; | ||
maxHighlightLength?: number | undefined; | ||
viewportMargin?: number | undefined; | ||
spellcheck?: boolean | undefined; | ||
autocorrect?: boolean | undefined; | ||
autocapitalize?: boolean | undefined; | ||
}>; | ||
cminstance: Ref<{ | ||
hasFocus: () => boolean; | ||
findPosH: (start: _CodeMirror.Position, amount: number, unit: string, visually: boolean) => { | ||
line: number; | ||
ch: number; | ||
hitSide?: boolean | undefined; | ||
}; | ||
findPosV: (start: _CodeMirror.Position, amount: number, unit: string) => { | ||
line: number; | ||
ch: number; | ||
hitSide?: boolean | undefined; | ||
}; | ||
findWordAt: (pos: _CodeMirror.Position) => _CodeMirror.Range; | ||
setOption: <K extends keyof EditorConfiguration>(option: K, value: EditorConfiguration[K]) => void; | ||
getOption: <K_1 extends keyof EditorConfiguration>(option: K_1) => EditorConfiguration[K_1]; | ||
addKeyMap: (map: string | _CodeMirror.KeyMap, bottom?: boolean | undefined) => void; | ||
removeKeyMap: (map: string | _CodeMirror.KeyMap) => void; | ||
addOverlay: (mode: any, options?: { | ||
opaque?: boolean | undefined; | ||
priority?: number | undefined; | ||
} | undefined) => void; | ||
removeOverlay: (mode: any) => void; | ||
getDoc: () => _CodeMirror.Doc; | ||
swapDoc: (doc: _CodeMirror.Doc) => _CodeMirror.Doc; | ||
getValue: (seperator?: string | undefined) => string; | ||
setValue: (content: string) => void; | ||
getCursor: (start?: string | undefined) => _CodeMirror.Position; | ||
setCursor: (pos: number | _CodeMirror.Position, ch?: number | undefined, options?: { | ||
bias?: number | undefined; | ||
origin?: string | undefined; | ||
scroll?: boolean | undefined; | ||
} | undefined) => void; | ||
setGutterMarker: (line: any, gutterID: string, value: HTMLElement | null) => _CodeMirror.LineHandle; | ||
clearGutter: (gutterID: string) => void; | ||
addLineClass: (line: any, where: string, _class_: string) => _CodeMirror.LineHandle; | ||
removeLineClass: (line: any, where: string, class_?: string | undefined) => _CodeMirror.LineHandle; | ||
lineAtHeight: (height: number, mode?: _CodeMirror.CoordsMode | undefined) => number; | ||
heightAtLine: (line: any, mode?: _CodeMirror.CoordsMode | undefined, includeWidgets?: boolean | undefined) => number; | ||
lineInfo: (line: any) => { | ||
line: any; | ||
handle: any; | ||
text: string; | ||
gutterMarkers: any; | ||
textClass: string; | ||
bgClass: string; | ||
wrapClass: string; | ||
widgets: any; | ||
}; | ||
addWidget: (pos: _CodeMirror.Position, node: HTMLElement, scrollIntoView: boolean) => void; | ||
addLineWidget: (line: any, node: HTMLElement, options?: _CodeMirror.LineWidgetOptions | undefined) => _CodeMirror.LineWidget; | ||
setSize: (width: any, height: any) => void; | ||
scrollTo: (x?: number | null | undefined, y?: number | null | undefined) => void; | ||
getScrollInfo: () => _CodeMirror.ScrollInfo; | ||
scrollIntoView: (pos: _CodeMirror.Position | { | ||
line: number; | ||
ch: number; | ||
} | { | ||
left: number; | ||
top: number; | ||
right: number; | ||
bottom: number; | ||
} | { | ||
from: _CodeMirror.Position; | ||
to: _CodeMirror.Position; | ||
} | null, margin?: number | undefined) => void; | ||
cursorCoords: (where?: boolean | _CodeMirror.Position | null | undefined, mode?: _CodeMirror.CoordsMode | undefined) => { | ||
left: number; | ||
top: number; | ||
bottom: number; | ||
}; | ||
charCoords: (pos: _CodeMirror.Position, mode?: _CodeMirror.CoordsMode | undefined) => { | ||
left: number; | ||
right: number; | ||
top: number; | ||
bottom: number; | ||
}; | ||
coordsChar: (object: { | ||
left: number; | ||
top: number; | ||
}, mode?: _CodeMirror.CoordsMode | undefined) => _CodeMirror.Position; | ||
defaultTextHeight: () => number; | ||
defaultCharWidth: () => number; | ||
getViewport: () => { | ||
from: number; | ||
to: number; | ||
}; | ||
refresh: () => void; | ||
getModeAt: (pos: _CodeMirror.Position) => _CodeMirror.Mode<unknown>; | ||
getTokenAt: (pos: _CodeMirror.Position, precise?: boolean | undefined) => _CodeMirror.Token; | ||
getTokenTypeAt: (pos: _CodeMirror.Position) => string; | ||
getLineTokens: (line: number, precise?: boolean | undefined) => _CodeMirror.Token[]; | ||
getStateAfter: (line?: number | undefined) => any; | ||
operation: <T_2>(fn: () => T_2) => T_2; | ||
startOperation: () => void; | ||
endOperation: () => void; | ||
indentLine: (line: number, dir?: string | undefined) => void; | ||
indentSelection: (how: string) => void; | ||
isReadOnly: () => boolean; | ||
toggleOverwrite: (value?: boolean | undefined) => void; | ||
execCommand: (name: string) => void; | ||
focus: () => void; | ||
phrase: (text: string) => unknown; | ||
getInputField: () => HTMLTextAreaElement; | ||
getWrapperElement: () => HTMLElement; | ||
getScrollerElement: () => HTMLElement; | ||
getGutterElement: () => HTMLElement; | ||
on: { | ||
<T_3 extends keyof _CodeMirror.EditorEventMap>(eventName: T_3, handler: _CodeMirror.EditorEventMap[T_3]): void; | ||
<K_2 extends "mousedown" | "dblclick" | "touchstart" | "contextmenu" | "keydown" | "keypress" | "keyup" | "dragstart" | "dragenter" | "dragover" | "dragleave" | "drop">(eventName: K_2, handler: (instance: Editor, event: GlobalEventHandlersEventMap[K_2]) => void): void; | ||
<K_3 extends "copy" | "cut" | "paste">(eventName: K_3, handler: (instance: Editor, event: DocumentAndElementEventHandlersEventMap[K_3]) => void): void; | ||
}; | ||
off: { | ||
<T_4 extends keyof _CodeMirror.EditorEventMap>(eventName: T_4, handler: _CodeMirror.EditorEventMap[T_4]): void; | ||
<K_4 extends "mousedown" | "dblclick" | "touchstart" | "contextmenu" | "keydown" | "keypress" | "keyup" | "dragstart" | "dragenter" | "dragover" | "dragleave" | "drop">(eventName: K_4, handler: (instance: Editor, event: GlobalEventHandlersEventMap[K_4]) => void): void; | ||
<K_5 extends "copy" | "cut" | "paste">(eventName: K_5, handler: (instance: Editor, event: DocumentAndElementEventHandlersEventMap[K_5]) => void): void; | ||
}; | ||
state: any; | ||
modeOption: string | { | ||
highlightNonStandardPropertyKeywords?: boolean | undefined; | ||
version?: 2 | 3 | undefined; | ||
singleLineStringErrors?: boolean | undefined; | ||
hangingIndent?: number | undefined; | ||
singleOperators?: unknown; | ||
singleDelimiters?: unknown; | ||
doubleOperators?: unknown; | ||
doubleDelimiters?: unknown; | ||
tripleDelimiters?: unknown; | ||
identifiers?: unknown; | ||
extra_keywords?: string[] | undefined; | ||
extra_builtins?: string[] | undefined; | ||
useCPP?: boolean | undefined; | ||
base?: string | undefined; | ||
tags?: { | ||
[x: string]: unknown; | ||
} | undefined; | ||
json?: boolean | undefined; | ||
jsonld?: boolean | undefined; | ||
typescript?: boolean | undefined; | ||
trackScope?: boolean | undefined; | ||
statementIndent?: boolean | undefined; | ||
wordCharacters?: unknown; | ||
highlightFormatting?: boolean | undefined; | ||
maxBlockquoteDepth?: boolean | undefined; | ||
xml?: boolean | undefined; | ||
fencedCodeBlockHighlighting?: boolean | undefined; | ||
fencedCodeBlockDefaultMode?: string | undefined; | ||
tokenTypeOverrides?: unknown; | ||
allowAtxHeaderWithoutSpace?: boolean | undefined; | ||
gitHubSpice?: boolean | undefined; | ||
taskLists?: boolean | undefined; | ||
strikethrough?: boolean | undefined; | ||
emoji?: boolean | undefined; | ||
leftDelimiter?: string | undefined; | ||
rightDelimiter?: string | undefined; | ||
baseMode?: string | undefined; | ||
inMathMode?: boolean | undefined; | ||
noIndentKeywords?: unknown; | ||
atoms?: unknown; | ||
hooks?: unknown; | ||
multiLineStrings?: boolean | undefined; | ||
htmlMode?: boolean | undefined; | ||
matchClosing?: boolean | undefined; | ||
alignCDATA?: boolean | undefined; | ||
name: string; | ||
}; | ||
getRange: (from: _CodeMirror.Position, to: _CodeMirror.Position, seperator?: string | undefined) => string; | ||
replaceRange: (replacement: string | string[], from: _CodeMirror.Position, to?: _CodeMirror.Position | undefined, origin?: string | undefined) => void; | ||
getLine: (n: number) => string; | ||
setLine: (n: number, text: string) => void; | ||
removeLine: (n: number) => void; | ||
lineCount: () => number; | ||
firstLine: () => number; | ||
lastLine: () => number; | ||
getLineHandle: (num: number) => _CodeMirror.LineHandle; | ||
getLineNumber: (handle: _CodeMirror.LineHandle) => number | null; | ||
eachLine: { | ||
(f: (line: _CodeMirror.LineHandle) => void): void; | ||
(start: number, end: number, f: (line: _CodeMirror.LineHandle) => void): void; | ||
}; | ||
markClean: () => void; | ||
changeGeneration: (closeEvent?: boolean | undefined) => number; | ||
isClean: (generation?: number | undefined) => boolean; | ||
getSelection: () => string; | ||
getSelections: (lineSep?: string | undefined) => string[]; | ||
replaceSelection: (replacement: string, collapse?: string | undefined) => void; | ||
replaceSelections: (replacements: string[], collapse?: string | undefined) => void; | ||
listSelections: () => _CodeMirror.Range[]; | ||
somethingSelected: () => boolean; | ||
setSelection: (anchor: _CodeMirror.Position, head?: _CodeMirror.Position | undefined, options?: { | ||
bias?: number | undefined; | ||
origin?: string | undefined; | ||
scroll?: boolean | undefined; | ||
} | undefined) => void; | ||
setSelections: (ranges: { | ||
anchor: _CodeMirror.Position; | ||
head: _CodeMirror.Position; | ||
}[], primary?: number | undefined, options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
addSelection: (anchor: _CodeMirror.Position, head?: _CodeMirror.Position | undefined) => void; | ||
extendSelection: (from: _CodeMirror.Position, to?: _CodeMirror.Position | undefined, options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
extendSelections: (heads: _CodeMirror.Position[], options?: _CodeMirror.SelectionOptions | undefined) => void; | ||
extendSelectionsBy: (f: (range: _CodeMirror.Range) => _CodeMirror.Position) => void; | ||
setExtending: (value: boolean) => void; | ||
getExtending: () => boolean; | ||
linkedDoc: (options: { | ||
sharedHist?: boolean | undefined; | ||
from?: number | undefined; | ||
to?: number | undefined; | ||
mode?: string | _CodeMirror.ModeSpec<_CodeMirror.ModeSpecOptions> | undefined; | ||
}) => _CodeMirror.Doc; | ||
unlinkDoc: (doc: _CodeMirror.Doc) => void; | ||
iterLinkedDocs: (fn: (doc: _CodeMirror.Doc, sharedHist: boolean) => void) => void; | ||
undo: () => void; | ||
redo: () => void; | ||
undoSelection: () => void; | ||
redoSelection: () => void; | ||
historySize: () => { | ||
undo: number; | ||
redo: number; | ||
}; | ||
clearHistory: () => void; | ||
getHistory: () => any; | ||
setHistory: (history: any) => void; | ||
markText: (from: _CodeMirror.Position, to: _CodeMirror.Position, options?: _CodeMirror.TextMarkerOptions | undefined) => _CodeMirror.TextMarker<_CodeMirror.MarkerRange>; | ||
setBookmark: (pos: _CodeMirror.Position, options?: { | ||
widget?: HTMLElement | undefined; | ||
insertLeft?: boolean | undefined; | ||
shared?: boolean | undefined; | ||
handleMouseEvents?: boolean | undefined; | ||
} | undefined) => _CodeMirror.TextMarker<_CodeMirror.Position>; | ||
findMarks: (from: _CodeMirror.Position, to: _CodeMirror.Position) => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
findMarksAt: (pos: _CodeMirror.Position) => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
getAllMarks: () => _CodeMirror.TextMarker<_CodeMirror.Position | _CodeMirror.MarkerRange>[]; | ||
removeLineWidget: (widget: _CodeMirror.LineWidget) => void; | ||
getMode: () => _CodeMirror.Mode<unknown>; | ||
lineSeparator: () => string; | ||
posFromIndex: (index: number) => _CodeMirror.Position; | ||
indexFromPos: (object: _CodeMirror.Position) => number; | ||
} | null>; | ||
content: Ref<string>; | ||
ready: (cm: Editor) => void; | ||
resize: (width?: string | number, height?: string | number) => void; | ||
refresh: () => void; | ||
containerHeight: Ref<Nullable<string>>; | ||
instanceName: string | undefined; | ||
presetRef: Ref<null>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { | ||
[x: string]: any; | ||
"update:value": (value: string) => value; | ||
change: (value: string, cm: Editor) => { | ||
value: any; | ||
cm: any; | ||
}; | ||
input: (value: string) => value; | ||
ready: (cm: Editor) => cm; | ||
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
value?: unknown; | ||
marker?: unknown; | ||
unseenLines?: unknown; | ||
name?: unknown; | ||
placeholder?: unknown; | ||
merge?: unknown; | ||
options?: unknown; | ||
globalOptions?: unknown; | ||
border?: unknown; | ||
width?: unknown; | ||
height?: unknown; | ||
KeepCursorInEnd?: unknown; | ||
} & { | ||
name: string; | ||
value: string; | ||
options: EditorConfiguration; | ||
placeholder: string; | ||
marker: () => HTMLElement; | ||
unseenLines: any[]; | ||
merge: boolean; | ||
globalOptions: EditorConfiguration; | ||
border: boolean; | ||
width: string | number; | ||
height: string | number; | ||
KeepCursorInEnd: boolean; | ||
} & {}> & { | ||
[x: string & `on${string}`]: ((...args: any[]) => any) | ((...args: unknown[]) => any) | undefined; | ||
}, { | ||
name: string; | ||
value: string; | ||
options: EditorConfiguration; | ||
placeholder: string; | ||
marker: () => HTMLElement; | ||
unseenLines: any[]; | ||
merge: boolean; | ||
globalOptions: EditorConfiguration; | ||
border: boolean; | ||
width: string | number; | ||
height: string | number; | ||
KeepCursorInEnd: boolean; | ||
}>; | ||
declare const _default: any; | ||
export default _default; |
@@ -1,58 +0,2 @@ | ||
import type { PropType, Editor, EditorConfiguration } from '../../..codemirror-editor-vue3'; | ||
declare const _default: import("vue").DefineComponent<{ | ||
name: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
value: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
content: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
options: { | ||
type: PropType<EditorConfiguration>; | ||
default: () => {}; | ||
}; | ||
cminstance: { | ||
type: PropType<Nullable<Editor>>; | ||
default: () => null; | ||
}; | ||
placeholder: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
}, { | ||
textarea: import("@vue/reactivity").Ref<any>; | ||
initialize: () => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { | ||
ready: (instance: Editor) => Nullable<Editor>; | ||
"update:cminstance": (instance: Editor) => Nullable<Editor>; | ||
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
name?: unknown; | ||
value?: unknown; | ||
content?: unknown; | ||
options?: unknown; | ||
cminstance?: unknown; | ||
placeholder?: unknown; | ||
} & { | ||
name: string; | ||
value: string; | ||
content: string; | ||
options: EditorConfiguration; | ||
cminstance: Nullable<Editor>; | ||
placeholder: string; | ||
} & {}> & { | ||
onReady?: ((instance: Editor) => any) | undefined; | ||
"onUpdate:cminstance"?: ((instance: Editor) => any) | undefined; | ||
}, { | ||
name: string; | ||
value: string; | ||
content: string; | ||
options: EditorConfiguration; | ||
cminstance: Nullable<Editor>; | ||
placeholder: string; | ||
}>; | ||
declare const _default: any; | ||
export default _default; |
@@ -1,48 +0,2 @@ | ||
import type { PropType, Editor } from '../../..codemirror-editor-vue3'; | ||
declare const _default: import("vue").DefineComponent<{ | ||
value: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
name: { | ||
type: PropType<string>; | ||
default: string; | ||
}; | ||
options: { | ||
type: ObjectConstructor; | ||
default: () => {}; | ||
}; | ||
cminstance: { | ||
type: PropType<Nullable<Editor>>; | ||
default: () => {}; | ||
}; | ||
placeholder: { | ||
type: StringConstructor; | ||
default: string; | ||
}; | ||
}, { | ||
initialize: () => void; | ||
textarea: import("@vue/reactivity").Ref<any>; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:cminstance" | "ready")[], "ready" | "update:cminstance", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
value?: unknown; | ||
name?: unknown; | ||
options?: unknown; | ||
cminstance?: unknown; | ||
placeholder?: unknown; | ||
} & { | ||
name: string; | ||
value: string; | ||
options: Record<string, any>; | ||
cminstance: Nullable<Editor>; | ||
placeholder: string; | ||
} & {}> & { | ||
onReady?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:cminstance"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
name: string; | ||
value: string; | ||
options: Record<string, any>; | ||
cminstance: Nullable<Editor>; | ||
placeholder: string; | ||
}>; | ||
declare const _default: any; | ||
export default _default; |
@@ -1,2 +0,3 @@ | ||
import type { PropType, Editor, EditorConfiguration } from '../../..codemirror-editor-vue3'; | ||
import type { Editor, EditorConfiguration } from "codemirror"; | ||
import type { PropType } from "vue"; | ||
declare const _default: import("vue").DefineComponent<{ | ||
@@ -13,3 +14,3 @@ options: { | ||
initialize: () => void; | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:cminstance" | "ready")[], "ready" | "update:cminstance", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:cminstance" | "ready")[], "update:cminstance" | "ready", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{ | ||
options?: unknown; | ||
@@ -21,4 +22,4 @@ cminstance?: unknown; | ||
} & {}> & { | ||
"onUpdate:cminstance"?: ((...args: any[]) => any) | undefined; | ||
onReady?: ((...args: any[]) => any) | undefined; | ||
"onUpdate:cminstance"?: ((...args: any[]) => any) | undefined; | ||
}, { | ||
@@ -25,0 +26,0 @@ options: EditorConfiguration; |
{ | ||
"name": "codemirror-editor-vue3", | ||
"description": "CodeMirror component for Vue3", | ||
"version": "1.1.0-beta8", | ||
"version": "1.1.0-beta9", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "files": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
48866
973