Skip to content
Open
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ typings/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"editor.codeActionsOnSave": {
"source.fixAll": true
"source.fixAll": "explicit"
}
}
5 changes: 0 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"workspaces": [
"packages/*"
],
"husky": {
"hooks": {
"pre-commit": "eslint packages/"
}
},
"scripts": {
"bootstrap": "lerna bootstrap --use-workspaces",
"example": "yarn workspace example serve",
Expand Down
1 change: 0 additions & 1 deletion packages/vue-prism-editor/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.log
.DS_Store
node_modules
dist
70 changes: 70 additions & 0 deletions packages/vue-prism-editor/dist/Editor.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import Vue from 'vue';
import './styles.css';
export interface EditorProps {
lineNumbers: boolean;
autoStyleLineNumbers: boolean;
readonly: boolean;
value: string;
highlight: () => string;
tabSize: number;
insertSpaces: boolean;
ignoreTabKey: boolean;
placeholder: string;
}
export interface Record {
value: string;
selectionStart: number;
selectionEnd: number;
}
export interface History {
stack: Array<Record & {
timestamp: number;
}>;
offset: number;
}
interface AutocompleteEntry {
text: string;
overlap: number;
label?: string;
}
export declare const PrismEditor: import("vue/types/vue").ExtendedVue<Vue, {
capture: boolean;
history: History;
lineNumbersHeight: string;
codeData: string;
autocompleteOpen: boolean;
autocompleteIndex: number;
autocompleteData: AutocompleteEntry[];
}, {
updateAutocompleteData(): Promise<void>;
acceptAutocomplete(event: Event, option?: number | undefined): void;
setLineNumbersHeight(): void;
styleLineNumbers(): void;
_recordCurrentState(): void;
_getLines(text: string, position: number): Array<string>;
_recordStateIfChange(): void;
_applyEdits(record: Record): void;
_recordChange(record: Record, overwrite?: boolean): void;
_updateInput(record: Record): void;
handleChange(e: KeyboardEvent): void;
_undoEdit(): void;
_redoEdit(): void;
handleKeyDown(e: KeyboardEvent): void;
}, {
isEmpty: boolean;
content: string;
lineNumbersCount: number;
cursorOffset: number[];
}, {
lineNumbers: boolean;
autoStyleLineNumbers: boolean;
readonly: boolean;
value: string;
highlight: Function;
tabSize: number;
insertSpaces: boolean;
ignoreTabKey: boolean;
placeholder: string;
autocomplete: Function;
}>;
export {};
1 change: 1 addition & 0 deletions packages/vue-prism-editor/dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './Editor';
8 changes: 8 additions & 0 deletions packages/vue-prism-editor/dist/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

'use strict'

if (process.env.NODE_ENV === 'production') {
module.exports = require('./prismeditor.cjs.production.min.js')
} else {
module.exports = require('./prismeditor.cjs.development.js')
}
Loading