diff --git a/embark-ui/package-lock.json b/embark-ui/package-lock.json index 744ff594..b57f63d0 100644 --- a/embark-ui/package-lock.json +++ b/embark-ui/package-lock.json @@ -18,6 +18,11 @@ "negotiator": "0.6.1" } }, + "ace-mode-solidity": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ace-mode-solidity/-/ace-mode-solidity-0.1.0.tgz", + "integrity": "sha512-vLhygG5B0ImeDd/+L3vAB3aD3wQ5OE/+AYUD6dyOmvBc2G40K5mO/Lp7li+d04xpzO1LP82bQKN1N/I35K/wgg==" + }, "acorn": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", @@ -1440,6 +1445,11 @@ } } }, + "brace": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/brace/-/brace-0.11.1.tgz", + "integrity": "sha1-SJb8ydVE7vRfS7dmDbMg07N5/lg=" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2686,6 +2696,11 @@ "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, + "diff-match-patch": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.1.tgz", + "integrity": "sha512-A0QEhr4PxGUMEtKxd6X+JLnOTFd3BfIPSDpsc4dMvj+CbSaErDwTpoTo/nFJDMSrjxLW4BiNq+FbNisAAHhWeQ==" + }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", @@ -6501,6 +6516,16 @@ "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" + }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=" + }, "lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -8831,6 +8856,18 @@ "prop-types": "^15.6.0" } }, + "react-ace": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/react-ace/-/react-ace-6.1.4.tgz", + "integrity": "sha512-a8/lAsy2bfi7Ho+3Kaj8hBPR+PEiCTG9xFG9LIjCJrv5WQFYFpeFTiPWA96M3t+LgIDFFltwfVTwD2pmdAVOxQ==", + "requires": { + "brace": "^0.11.0", + "diff-match-patch": "^1.0.0", + "lodash.get": "^4.4.2", + "lodash.isequal": "^4.1.1", + "prop-types": "^15.5.8" + } + }, "react-dev-utils": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-5.0.1.tgz", diff --git a/embark-ui/package.json b/embark-ui/package.json index 27d4e9ee..6fc98aba 100644 --- a/embark-ui/package.json +++ b/embark-ui/package.json @@ -3,12 +3,14 @@ "version": "0.1.0", "private": true, "dependencies": { + "ace-mode-solidity": "^0.1.0", "axios": "^0.18.0", "classnames": "^2.2.6", "connected-react-router": "^4.3.0", "history": "^4.7.2", "prop-types": "^15.6.2", "react": "^16.4.1", + "react-ace": "^6.1.4", "react-dom": "^16.4.1", "react-redux": "^5.0.7", "react-router-dom": "^4.3.1", diff --git a/embark-ui/public/index.html b/embark-ui/public/index.html index b4e9f3a8..db40ed7b 100644 --- a/embark-ui/public/index.html +++ b/embark-ui/public/index.html @@ -1,9 +1,9 @@
- - - + + + - - diff --git a/embark-ui/src/components/Fiddle.js b/embark-ui/src/components/Fiddle.js index b364b416..8fd989af 100644 --- a/embark-ui/src/components/Fiddle.js +++ b/embark-ui/src/components/Fiddle.js @@ -1,5 +1,10 @@ import React from 'react'; -import MonacoEditor from 'react-monaco-editor'; +import AceEditor from 'react-ace'; + +import 'brace/mode/javascript'; + +import 'brace/theme/tomorrow_night_blue'; +import 'ace-mode-solidity/build/remix-ide/mode-solidity'; const Fiddle = ({code, options, editorDidMount, onChange}) => { options = options || { @@ -9,15 +14,13 @@ const Fiddle = ({code, options, editorDidMount, onChange}) => {Play around with contract code and deploy against your running node.
-