Skip to content

Commit d42c165

Browse files
committed
merging with latest pull
2 parents 3b36251 + e252682 commit d42c165

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1767
-1451
lines changed

main.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ const {
66
Menu,
77
shell,
88
dialog,
9-
ipcMain
9+
ipcMain,
10+
globalShortcut
1011
} = require('electron');
1112

1213
// Uncomment below for hot reloading during development
@@ -41,6 +42,10 @@ function openFile() {
4142
mainWindow.webContents.send('new-file', file);
4243
}
4344

45+
function escape() {
46+
mainWindow.webContents.send('escape');
47+
}
48+
4449
//functions to replace the default behavior of undo and redo
4550
function undo() {
4651
mainWindow.webContents.send('undo');
@@ -262,6 +267,9 @@ app.on('ready', () => {
262267
} else {
263268
createWindow();
264269
}
270+
globalShortcut.register('Escape', () => {
271+
escape();
272+
})
265273
});
266274

267275
// Quit when all windows are closed.

package.json

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,21 @@
9292
"dependencies": {
9393
"@material-ui/core": "^4.2.1",
9494
"@material-ui/icons": "^4.0.1",
95-
"@material-ui/styles": "^4.9.0",
95+
"@material-ui/styles": "^4.9.6",
9696
"@types/prettier": "^1.19.0",
97+
"@types/prismjs": "^1.16.0",
9798
"@types/react": "^16.8.14",
9899
"@types/react-dom": "^16.8.4",
99100
"@types/react-redux": "^7.0.8",
100101
"@types/react-syntax-highlighter": "^11.0.4",
102+
"ace-builds": "^1.4.8",
101103
"autoprefixer": "^9.0.1",
102104
"babel-polyfill": "^6.26.0",
103105
"classnames": "^2.2.6",
104106
"cli-spinner": "^0.2.8",
105107
"commander": "^2.17.1",
106108
"concurrently": "^5.1.0",
109+
"csstype": "^2.6.9",
107110
"d3": "^5.9.2",
108111
"electron-reload": "^1.4.0",
109112
"enzyme": "^3.4.1",
@@ -112,13 +115,16 @@
112115
"lodash.throttle": "^4.1.1",
113116
"material-table": "^1.25.2",
114117
"prettier": "^1.19.1",
118+
"prismjs": "^1.19.0",
115119
"prop-types": "^15.6.2",
116120
"react": "^16.13.0",
121+
"react-ace": "^8.1.0",
117122
"react-d3-tree": "^1.12.3",
118123
"react-dom": "^16.4.1",
119124
"react-draggable": "^3.0.5",
120125
"react-konva": "^16.12.0-0",
121126
"react-redux": "^5.0.7",
127+
"react-simple-code-editor": "^0.11.0",
122128
"react-sortable-tree": "^2.2.0",
123129
"react-syntax-highlighter": "^10.2.1",
124130
"redux": "^4.0.0",
@@ -129,7 +135,6 @@
129135
},
130136
"devDependencies": {
131137
"@babel/preset-typescript": "^7.3.3",
132-
"@material-ui/styles": "^4.9.6",
133138
"awesome-typescript-loader": "^5.2.1",
134139
"babel-core": "^6.26.3",
135140
"babel-eslint": "^8.2.6",
@@ -141,7 +146,7 @@
141146
"concurrently": "^5.1.0",
142147
"copy-webpack-plugin": "^4.5.2",
143148
"cross-env": "^5.2.1",
144-
"css-loader": "^0.28.11",
149+
"css-loader": "^2.1.1",
145150
"electron": "^2.0.7",
146151
"electron-builder": "^20.44.4",
147152
"electron-devtools-installer": "^2.2.4",

src/actionTypes/index.ts

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,39 @@
1-
export const LOAD_INIT_DATA: string = 'LOAD_INIT_DATA';
2-
export const ADD_COMPONENT: string = 'ADD_COMPONENT';
31
export const ADD_CHILD: string = 'ADD_CHILD';
4-
export const DELETE_CHILD: string = 'DELETE_CHILD';
5-
export const UPDATE_COMPONENT: string = 'UPDATE_COMPONENT';
6-
export const DELETE_COMPONENT: string = 'DELETE_COMPONENT';
7-
export const CHANGE_FOCUS_COMPONENT: string = 'CHANGE_FOCUS_COMPONENT';
2+
export const ADD_COMPONENT: string = 'ADD_COMPONENT';
3+
export const ADD_PROP: string = 'ADD_PROP';
84
export const CHANGE_COMPONENT_FOCUS_CHILD: string = 'CHANGE_COMPONENT_FOCUS_CHILD';
95
export const CHANGE_FOCUS_CHILD: string = 'CHANGE_FOCUS_CHILD';
10-
export const UPDATE_CHILDREN: string = 'UPDATE_CHILDREN';
11-
export const REASSIGN_PARENT: string = 'REASSIGN_PARENT';
12-
export const SET_SELECTABLE_PARENTS: string = 'SET_SELECTABLE_PARENTS';
6+
export const CHANGE_FOCUS_COMPONENT: string = 'CHANGE_FOCUS_COMPONENT';
7+
export const CHANGE_IMAGE_PATH: string = 'CHANGE_IMAGE_PATH';
8+
export const CHANGE_IMAGE_SOURCE: string = 'CHANGE_IMAGE_SOURCE';
9+
export const CHANGE_TUTORIAL: string = 'CHANGE_TUTORIAL';
10+
export const CREATE_APPLICATION: string = 'CREATE_APPLICATION';
11+
export const CREATE_APPLICATION_ERROR: string = 'CREATE_APPLICATION_ERROR';
12+
export const CREATE_APPLICATION_SUCCESS: string = 'CREATE_APPLICATION_SUCCESS';
13+
export const DELETE_ALL_DATA: string = 'DELETE_ALL_DATA';
14+
export const DELETE_CHILD: string = 'DELETE_CHILD';
15+
export const DELETE_COMPONENT: string = 'DELETE_COMPONENT';
16+
export const DELETE_IMAGE: string = 'DELETE_IMAGE';
17+
export const DELETE_PROP: string = 'DELETE_PROP';
18+
export const EDIT_COMPONENT: string = 'EDIT_COMPONENT';
19+
export const EDIT_MODE: string = 'EDIT_MODE';
1320
export const EXPORT_FILES: string = 'EXPORT_FILES';
14-
export const EXPORT_FILES_SUCCESS: string = 'EXPORT_FILES_SUCCESS';
1521
export const EXPORT_FILES_ERROR: string = 'EXPORT_FILES_ERROR';
22+
export const EXPORT_FILES_SUCCESS: string = 'EXPORT_FILES_SUCCESS';
1623
export const HANDLE_CLOSE: string = 'HANDLE_CLOSE';
1724
export const HANDLE_TRANSFORM: string = 'HANDLE_TRANSFORM';
18-
export const CREATE_APPLICATION: string = 'CREATE_APPLICATION';
19-
export const CREATE_APPLICATION_SUCCESS: string = 'CREATE_APPLICATION_SUCCESS';
20-
export const CREATE_APPLICATION_ERROR: string = 'CREATE_APPLICATION_ERROR';
25+
export const LOAD_INIT_DATA: string = 'LOAD_INIT_DATA';
2126
export const MOVE_TO_BOTTOM: string = 'MOVE_TO_BOTTOM';
2227
export const MOVE_TO_TOP: string = 'MOVE_TO_TOP';
2328
export const OPEN_EXPANSION_PANEL: string = 'OPEN_EXPANSION_PANEL';
24-
export const DELETE_PROP: string = 'DELETE_PROP';
25-
export const ADD_PROP: string = 'ADD_PROP';
26-
export const DELETE_ALL_DATA: string = 'DELETE_ALL_DATA';
27-
export const CHANGE_IMAGE_PATH: string = 'CHANGE_IMAGE_PATH';
28-
export const UPDATE_HTML_ATTR: string = 'UPDATE_HTML_ATTR';
29-
export const UPDATE_CHILDREN_SORT: string = 'UPDATE_CHILDREN_SORT';
30-
export const CHANGE_IMAGE_SOURCE: string = 'CHANGE_IMAGE_SOURCE';
31-
export const DELETE_IMAGE: string = 'DELETE_IMAGE';
32-
export const TOGGLE_STATE: string = 'TOGGLE_STATE';
29+
export const REASSIGN_PARENT: string = 'REASSIGN_PARENT';
30+
export const REDO: string = 'REDO';
31+
export const SET_SELECTABLE_PARENTS: string = 'SET_SELECTABLE_PARENTS';
3332
export const TOGGLE_CLASS: string = 'TOGGLE_CLASS';
34-
export const CHANGE_TUTORIAL: string = 'CHANGE_TUTORIAL';
33+
export const TOGGLE_STATE: string = 'TOGGLE_STATE';
3534
export const UNDO: string = 'UNDO';
36-
export const REDO: string = 'REDO';
35+
export const UPDATE_COMPONENT: string = 'UPDATE_COMPONENT';
36+
export const UPDATE_CHILDREN: string = 'UPDATE_CHILDREN';
37+
export const UPDATE_CHILDREN_SORT: string = 'UPDATE_CHILDREN_SORT';
38+
export const UPDATE_CODE: string = 'UPDATE_CODE';
39+
export const UPDATE_HTML_ATTR: string = 'UPDATE_HTML_ATTR';

0 commit comments

Comments
 (0)