From dfd77e5c5d6cce1832be175a9c5fd80f2cfd19de Mon Sep 17 00:00:00 2001 From: James Hrisho Date: Tue, 10 Apr 2018 09:05:20 +0200 Subject: [PATCH] Up version to 6.0.0 --- CHANGELOG.md | 12 +++- README.md | 2 + example/diff.js | 2 +- example/index.js | 134 +++++++++++++++++++------------------- example/split.js | 166 +++++++++++++++++++++++------------------------ package.json | 2 +- src/index.js | 4 +- 7 files changed, 168 insertions(+), 154 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a74e983a..37c0c49d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,17 @@ ## Future Release - TBD * Fully move to TypeScript interally -* Publish typings for the split editor +* Publish typings for the split and diff editor + +## 6.0.0 + +* Adds Diff editor + +## 5.10.0 + +* Upgraded many build dependencies +* Split editor adds UndoManager + ## 5.9.0 * First value resets undo manager. Closes #339 and #223 diff --git a/README.md b/README.md index 0d43b398..01c6f83e 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ Checkout the `example` directory for a working example using webpack. [Split View Editor](https://github.com/securingsincity/react-ace/blob/master/docs/Split.md) +[Diff Editor](https://github.com/securingsincity/react-ace/blob/master/docs/Diff.md) + [How to add modes, themes and keyboard handlers](https://github.com/securingsincity/react-ace/blob/master/docs/Modes.md) [Frequently Asked Questions](https://github.com/securingsincity/react-ace/blob/master/docs/FAQ.md) diff --git a/example/diff.js b/example/diff.js index 74647274..e18db92d 100644 --- a/example/diff.js +++ b/example/diff.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { render } from 'react-dom'; -import DiffEditor from '../src/diff.js'; +import {diff as DiffEditor} from '../src/index.js'; import 'brace/mode/jsx'; import 'brace/ext/searchbox'; diff --git a/example/index.js b/example/index.js index d166f857..9b56c514 100644 --- a/example/index.js +++ b/example/index.js @@ -50,7 +50,7 @@ import 'brace/ext/searchbox'; const defaultValue = `function onLoad(editor) { - console.log(\"i\'ve loaded\"); + console.log("i've loaded"); }`; class App extends Component { onLoad() { @@ -122,42 +122,42 @@ class App extends Component { return (
-
- +

+ + + +

+
-
- +

+ + +

+
-
- +

+ + +

+

-
+

-
+

-
+

-
+

-
+

Editor

-
-
+ mode={this.state.mode} + theme={this.state.theme} + name="blah2" + onLoad={this.onLoad} + onChange={this.onChange} + onSelectionChange={this.onSelectionChange} + onCursorChange={this.onCursorChange} + onValidate={this.onValidate} + value={this.state.value} + fontSize={this.state.fontSize} + showPrintMargin={this.state.showPrintMargin} + showGutter={this.state.showGutter} + highlightActiveLine={this.state.highlightActiveLine} + setOptions={{ + enableBasicAutocompletion: this.state.enableBasicAutocompletion, + enableLiveAutocompletion: this.state.enableLiveAutocompletion, + enableSnippets: this.state.enableSnippets, + showLineNumbers: this.state.showLineNumbers, + tabSize: 2, + }}/> +
+

Code

` - } /> + } /> +
-
); } } render( - , + , document.getElementById('example') ); diff --git a/example/split.js b/example/split.js index 5f4ef89f..fb4d0d53 100644 --- a/example/split.js +++ b/example/split.js @@ -51,7 +51,7 @@ import 'brace/ext/language_tools'; const defaultValue = [ `function onLoad(editor) { - console.log(\"i\'ve loaded\"); + console.log("i've loaded"); }`, 'const secondInput = "me i am the second input";' ]; @@ -70,7 +70,7 @@ class App extends Component { console.log('select-change', newValue); console.log('select-change-event', event); } - + onCursorChange(newValue, event) { console.log('cursor-change', newValue); console.log('cursor-change-event', event); @@ -135,66 +135,66 @@ class App extends Component { return (
-
- +

+ + + +

+
-
- +

+ + +

+
-
- +

+ + +

+
-
- +

+ + +

+
-
- +

+ + +

+

-
+

-
+

-
+

-
+

-
+

Editor

+ mode={this.state.mode} + orientation={this.state.orientation} + splits={this.state.splits} + theme={this.state.theme} + name="blah2" + onLoad={this.onLoad} + onChange={this.onChange} + onSelectionChange={this.onSelectionChange} + fontSize={this.state.fontSize} + height="1000px" + width="1000px" + showPrintMargin={this.state.showPrintMargin} + showGutter={this.state.showGutter} + highlightActiveLine={this.state.highlightActiveLine} + value={this.state.value} + setOptions={{ + displayIndentGuides: false, + enableBasicAutocompletion: this.state.enableBasicAutocompletion, + enableLiveAutocompletion: this.state.enableLiveAutocompletion, + enableSnippets: this.state.enableSnippets, + showLineNumbers: this.state.showLineNumbers, + tabSize: 2, + }}/> +
-
); } } render( - , + , document.getElementById('example') ); \ No newline at end of file diff --git a/package.json b/package.json index 6f664dff..93b3f503 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-ace", - "version": "5.10.0", + "version": "6.0.0", "description": "A react component for Ace Editor", "main": "lib/index.js", "types": "types.d.ts", diff --git a/src/index.js b/src/index.js index ea258c88..e56f8505 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,8 @@ import ace from './ace.js' import split from './split.js'; +import diff from './diff.js'; export { - split + split, + diff } export default ace \ No newline at end of file