Skip to content

Commit 35d30fb

Browse files
merging data table styling
2 parents 35df361 + a24d366 commit 35d30fb

Some content is hidden

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

48 files changed

+752
-931
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ ASALocalRun/
480480
.mfractor/
481481

482482
# DMG File
483-
React-Proto.dmg
483+
reactype.dmg
484484
installers/
485485

486486
# End of https://www.gitignore.io/api/node,linux,macos,windows,visualstudio,yarn

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ ASALocalRun/
477477
.mfractor/
478478

479479
# DMG File
480-
React-Proto.dmg
480+
reactype.dmg
481481
installers/
482482
assets/
483483
.git/

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
# ReacType
21

2+
<p align="center">
3+
<img width="50" src="https://github.com/team-reactype/ReacType/blob/master/src/public/icons/png/256x256.png?raw=true">
4+
<h1 align="center">ReacType </h1>
5+
</p>
36

47
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/team-reactype/ReacType/pulls)
58
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
@@ -8,7 +11,9 @@
811

912
**ReacType** allows the user to _visualize_ their application architecture dynamically, employing a _canvas display_, an _application tree_, and a _component code preview_. The user can create components and load _instances_ of these components, as well as nested HTML elements, onto the canvas. This architecture can then be _exported_ as TypeScript application files to be used as a starter template for any repository.
1013

11-
Download for [MacOS](), [Windows](), [Linux]().
14+
Download for [MacOS](https://github.com/team-reactype/ReacType/releases/tag/Mac.Version.1.0), [Windows](https://github.com/team-reactype/ReacType/releases/tag/PC.Version.1.0), [Linux](https://github.com/team-reactype/ReacType/releases/tag/Linux.Version.1.0).
15+
16+
![Image of ReacType Application](https://i.imgur.com/2sefnAk.jpg)
1217

1318
### How to use
1419

@@ -19,10 +24,12 @@
1924
- The bottom panel allows the user to toggle between 4 different views: a tree diagram of the application, a preview of the exportable code, a form to enter component props, and a form to add HTML attributes.
2025
- **_Props_** can be added to each component within its tab on bottom panel. Enter in a _key-value pair_, select its data _type_ and press the bottom 'ADD PROP'.
2126
- **_HTML Element Attributes_** of class name and ID can be added to each HTML element after an HTML element has been rendered to the canvas.
22-
- To **_delete_** a _child_ or instance from the canvas, select the desired instance and either press the _delete_ key or click the 'DELETE CHILD' button.
27+
- To **_delete_** a _child_ or instance from the canvas, select the desired instance and either press the _delete_ key.
2328
- To **_delete_** a _component_, click the 'DELETE' button of the desired component in the left panel.
2429
- To _start over_, select the blue 'CLEAR WORKSPACE' button in the left panel. This will **clear the entire application**.
2530

31+
![Image of ReacType Application 2](https://i.imgur.com/OCJ8nnw.png)
32+
2633
### To Export Files
2734

2835
- Once finished setting up the application template, press the green 'EXPORT PROJECT' button at the bottom of the left panel and choose between two options to export your files:

electron-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ linux:
77
target:
88
- AppImage
99
- deb
10-
maintainer: test@gmail.com
10+
maintainer: spincycle01@yahoo.com
1111
mac:
1212
category: public.app-category.developer-tools
1313
target: dmg

main.js

Lines changed: 79 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
const {
2-
app,
3-
BrowserWindow,
4-
Menu,
5-
shell,
6-
dialog,
7-
ipcMain
8-
} = require("electron");
1+
const path = require('path');
2+
3+
const { app, BrowserWindow, Menu, shell, dialog, ipcMain } = require('electron');
94

105
// Uncomment below for hot reloading during development
11-
require("electron-reload")(__dirname);
6+
// require('electron-reload')(__dirname);
127

138
// const isDev = true;
14-
const isDev =
15-
process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
9+
const isDev = process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test';
1610

1711
// Keep a global reference of the window object, if you don't, the window will
1812
// be closed automatically when the JavaScript object is garbage collected.
@@ -22,76 +16,77 @@ let mainWindow;
2216
function openFile() {
2317
// Opens file dialog looking for markdown
2418
const files = dialog.showOpenDialog(mainWindow, {
25-
properties: ["openFile"],
19+
properties: ['openFile'],
2620
filters: [
2721
{
28-
name: "Images",
29-
extensions: ["jpeg", "jpg", "png", "gif", "pdf"]
30-
}
31-
]
22+
name: 'Images',
23+
extensions: ['jpeg', 'jpg', 'png', 'gif', 'pdf'],
24+
},
25+
],
3226
});
3327

3428
// if no files
3529
if (!files) return;
3630
const file = files[0];
3731

3832
// Send fileContent to renderer
39-
mainWindow.webContents.send("new-file", file);
33+
mainWindow.webContents.send('new-file', file);
4034
}
4135

4236
// Choose directory
43-
ipcMain.on("choose_app_dir", event => {
37+
ipcMain.on('choose_app_dir', event => {
4438
const directory = dialog.showOpenDialog(mainWindow, {
45-
properties: ["openDirectory"],
46-
buttonLabel: "Export"
39+
properties: ['openDirectory'],
40+
buttonLabel: 'Export',
4741
});
4842

4943
if (!directory) return;
50-
event.sender.send("app_dir_selected", directory[0]);
44+
event.sender.send('app_dir_selected', directory[0]);
5145
});
5246

53-
ipcMain.on("view_app_dir", (event, appDir) => {
47+
ipcMain.on('view_app_dir', (event, appDir) => {
5448
shell.openItem(appDir);
5549
});
5650

5751
// Update file
58-
ipcMain.on("update-file", () => {
52+
ipcMain.on('update-file', () => {
5953
openFile();
6054
});
6155

6256
const createWindow = () => {
6357
// Create the browser window.
6458
// eslint-disable-next-line
65-
const { width, height } = require("electron").screen.getPrimaryDisplay().size;
59+
const { width, height } = require('electron').screen.getPrimaryDisplay().size;
6660
mainWindow = new BrowserWindow({
6761
width,
6862
height,
6963
webPreferences: {
7064
zoomFactor: 0.7,
71-
"node-Integration": false
65+
'node-Integration': false,
7266
},
73-
show: false
67+
show: false,
68+
icon: path.join(__dirname, '/src/public/icons/mac/icon.icns'),
7469
});
7570

7671
// and load the index.html of the app.
7772
mainWindow.loadURL(`file://${__dirname}/build/index.html`);
7873
// load page once window is loaded
79-
mainWindow.once("ready-to-show", () => {
74+
mainWindow.once('ready-to-show', () => {
8075
mainWindow.show();
8176
});
8277

8378
const template = [
8479
{
85-
label: "File",
80+
label: 'File',
8681
submenu: [
8782
{
88-
label: "Open File",
89-
accelerator: process.platform === "darwin" ? "Cmd+O" : "Ctrl+Shift+O",
83+
label: 'Open File',
84+
accelerator: process.platform === 'darwin' ? 'Cmd+O' : 'Ctrl+Shift+O',
9085
click() {
9186
openFile();
92-
}
93-
}
94-
]
87+
},
88+
},
89+
],
9590
},
9691
// {
9792
// label: 'Edit',
@@ -108,90 +103,89 @@ const createWindow = () => {
108103
// ],
109104
// },
110105
{
111-
label: "View",
106+
label: 'View',
112107
submenu: [
113-
{ role: "reload" },
114-
{ role: "forcereload" },
115-
{ type: "separator" },
116-
{ role: "resetzoom" },
117-
{ role: "zoomin" },
118-
{ role: "zoomout" },
119-
{ type: "separator" },
120-
{ role: "togglefullscreen" }
121-
]
108+
{ role: 'reload' },
109+
{ role: 'forcereload' },
110+
{ type: 'separator' },
111+
{ role: 'resetzoom' },
112+
{ role: 'zoomin' },
113+
{ role: 'zoomout' },
114+
{ type: 'separator' },
115+
{ role: 'togglefullscreen' },
116+
],
122117
},
123118
{
124-
role: "window",
125-
submenu: [{ role: "minimize" }, { role: "close" }]
119+
role: 'window',
120+
submenu: [{ role: 'minimize' }, { role: 'close' }],
126121
},
127122
{
128-
role: "help",
123+
role: 'help',
129124
submenu: [
130125
{
131-
label: "Learn More",
126+
label: 'Learn More',
132127
click() {
133-
shell.openExternal("https://electronjs.org");
134-
}
135-
}
136-
]
128+
shell.openExternal('https://electronjs.org');
129+
},
130+
},
131+
],
137132
},
138133
{
139-
label: "Developer",
134+
label: 'Developer',
140135
submenu: [
141136
{
142-
label: "Toggle Developer Tools",
143-
accelerator:
144-
process.platform === "darwin" ? "Alt+Command+I" : "Ctrl+Shift+I",
137+
label: 'Toggle Developer Tools',
138+
accelerator: process.platform === 'darwin' ? 'Alt+Command+I' : 'Ctrl+Shift+I',
145139
click() {
146140
mainWindow.webContents.toggleDevTools();
147-
}
148-
}
149-
]
150-
}
141+
},
142+
},
143+
],
144+
},
151145
];
152146

153-
if (process.platform === "darwin") {
147+
if (process.platform === 'darwin') {
154148
template.unshift({
155149
label: app.getName(),
156150
submenu: [
157-
{ role: "about" },
158-
{ type: "separator" },
159-
{ role: "services", submenu: [] },
160-
{ type: "separator" },
161-
{ role: "hide" },
162-
{ role: "hideothers" },
163-
{ role: "unhide" },
164-
{ type: "separator" },
165-
{ role: "quit" }
166-
]
151+
{ role: 'about' },
152+
{ type: 'separator' },
153+
{ role: 'services', submenu: [] },
154+
{ type: 'separator' },
155+
{ role: 'hide' },
156+
{ role: 'hideothers' },
157+
{ role: 'unhide' },
158+
{ type: 'separator' },
159+
{ role: 'quit' },
160+
],
167161
});
168162

169163
// Edit menu
170164
template[2].submenu.push(
171165
{
172-
type: "separator"
166+
type: 'separator',
173167
},
174168
{
175-
label: "Speech",
176-
submenu: [{ role: "startspeaking" }, { role: "stopspeaking" }]
177-
}
169+
label: 'Speech',
170+
submenu: [{ role: 'startspeaking' }, { role: 'stopspeaking' }],
171+
},
178172
);
179173

180174
// Window menu
181175
template[4].submenu = [
182-
{ role: "close" },
183-
{ role: "minimize" },
184-
{ role: "zoom" },
185-
{ type: "separator" },
186-
{ role: "front" }
176+
{ role: 'close' },
177+
{ role: 'minimize' },
178+
{ role: 'zoom' },
179+
{ type: 'separator' },
180+
{ role: 'front' },
187181
];
188182
}
189183

190184
const menu = Menu.buildFromTemplate(template);
191185
Menu.setApplicationMenu(menu);
192186

193187
// Emitted when the window is closed.
194-
mainWindow.on("closed", () => {
188+
mainWindow.on('closed', () => {
195189
// Dereference the window object, usually you would store windows
196190
// in an array if your app supports multi windows, this is the time
197191
// when you should delete the corresponding element.
@@ -202,13 +196,9 @@ const createWindow = () => {
202196
// This method will be called when Electron has finished
203197
// initialization and is ready to create browser windows.
204198
// Some APIs can only be used after this event occurs.
205-
app.on("ready", () => {
199+
app.on('ready', () => {
206200
if (isDev) {
207-
const {
208-
default: installExtension,
209-
REACT_DEVELOPER_TOOLS,
210-
REDUX_DEVTOOLS
211-
} = require("electron-devtools-installer");
201+
const { default: installExtension, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS } = require('electron-devtools-installer');
212202

213203
installExtension([REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS])
214204
.then(() => {
@@ -221,15 +211,15 @@ app.on("ready", () => {
221211
});
222212

223213
// Quit when all windows are closed.
224-
app.on("window-all-closed", () => {
214+
app.on('window-all-closed', () => {
225215
// On OS X it is common for applications and their menu bar
226216
// to stay active until the user quits explicitly with Cmd + Q
227-
if (process.platform !== "darwin") {
217+
if (process.platform !== 'darwin') {
228218
app.quit();
229219
}
230220
});
231221

232-
app.on("activate", () => {
222+
app.on('activate', () => {
233223
// On OS X it's common to re-create a window in the app when the
234224
// dock icon is clicked and there are no other windows open.
235225
if (mainWindow === null) {

0 commit comments

Comments
 (0)