diff --git a/.babelrc b/.babelrc
index 7c36681..12d4069 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,11 +1,15 @@
{
"presets": [
- "env",
+ [
+ "env",
+ {
+ "modules": false
+ }
+ ],
"react",
- "stage-1"
+ "stage-0"
],
"plugins": [
- "react-hot-loader/babel",
"transform-es2015-modules-commonjs"
]
-}
+}
\ No newline at end of file
diff --git a/.eslintrc.json b/.eslintrc.json
index 2289d9e..6921d95 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -11,8 +11,9 @@
"sourceType": "module"
},
"plugins": [
- "import",
- "react",
+ "import",
+ "react",
+ "jest",
"jsx-a11y",
"babel"
],
@@ -20,7 +21,8 @@
"env": {
"browser": true,
"node": true,
- "es6": true
+ "es6": true,
+ "jest": true
},
"rules": {
"class-methods-use-this": "off"
diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..6260ba7
--- /dev/null
+++ b/.github/CODE_OF_CONDUCT.md
@@ -0,0 +1,80 @@
+# REACT PROTO CODE OF CONDUCT 1.0
+
+### Introduction
+
+>Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open
+source project. In return, we ensure to reciprocate that respect in addressing your issue, assessing changes, and helping you
+finalize your pull requests. If you are new here also checkout our [Contribution Guidelines](CONTRIBUTING.md)
+
+### Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as
+contributors and maintainers pledge to making participation in our project and
+our community a harassment-free experience for everyone, regardless of age, body
+size, disability, ethnicity, gender identity and expression, level of experience,
+nationality, personal appearance, race, religion, or sexual identity and
+orientation.
+
+### Our Standards
+
+Examples of behavior that contributes to creating a positive environment
+include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or
+advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic
+ address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a
+ professional setting
+
+### Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable
+behavior and are expected to take appropriate and fair corrective action in
+response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, wiki edits, issues, and other contributions
+that are not aligned to this Code of Conduct, or to ban temporarily or
+permanently any contributor for other behaviors that they deem inappropriate,
+threatening, offensive, or harmful.
+
+### Scope
+
+This Code of Conduct applies both within project spaces and in public spaces
+when an individual is representing the project or its community. Examples of
+representing a project or community include using an official project e-mail
+address, posting via an official social media account, or acting as an appointed
+representative at an online or offline event. Representation of a project may be
+further defined and clarified by project maintainers.
+
+### Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be
+reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
+complaints will be reviewed and investigated and will result in a response that
+is deemed necessary and appropriate to the circumstances. The project team is
+obligated to maintain confidentiality with regard to the reporter of an incident.
+Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good
+faith may face temporary or permanent repercussions as determined by other
+members of the project's leadership.
+
+### Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
+available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
\ No newline at end of file
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
new file mode 100644
index 0000000..ee892b6
--- /dev/null
+++ b/.github/CONTRIBUTING.md
@@ -0,0 +1,76 @@
+# React-Proto Contributing Guide 1.0
+
+> First off, thank you for considering making a contribution to [React Proto](https://github.com/React-Proto/react-proto).
+It's people like you that inspire our commitment to open-source.
+
+The goal of this document is to create a contribution process that:
+
+* Encourages new contributions.
+* Encourages contributors to remain involved.
+* Creates a transparent decision making process that makes it clear how contributors can be involved in decision making.
+
+## Vocabulary
+
+* A **Contributor** is any individual creating or commenting on an issue or pull request.
+* A **Committer** is a subset of contributors who have been given write access to the repository.
+
+# Logging Issues
+
+Log an issue for any question or problem you might have. When in doubt, log an issue, and
+any additional policies about what to include will be provided in the responses. The only
+exception is security dislosures which should be sent privately.
+
+Committers may direct you to another repository, ask for additional clarifications, and
+add appropriate metadata before the issue is addressed.
+
+Please be courteous and respectful. Every participant is expected to follow the
+project's Code of Conduct.
+
+Keep an open mind! Improving documentation, bug triaging, or writing tutorials are all examples of helpful contributions that
+mean less work for you.
+
+# Contributions
+
+### Ground Rules
+
+> Responsibilities
+> * Ensure cross-platform compatibility for every change that's accepted. Windows, Mac, Debian & Ubuntu Linux.
+> * Ensure that code that goes into core meets all requirements and pass tests.
+> * Create issues for any major changes and enhancements that you wish to make. Discuss things transparently and get community
+feedback.
+> * Keep feature versions as small as possible, preferably one new feature per version.
+> * Be welcoming to newcomers and encourage diverse new contributors from all backgrounds. Check our [CODE OF
+CONDUCT](CODE_OF_CONDUCT.md)
+
+
+
+
+
+Any change to resources in this repository must be through pull requests. This applies to all changes
+to documentation, code, binary files, etc. Even long term committers and Project Maintainers must use
+pull requests.
+
+No pull request can be merged without being reviewed.
+
+For non-trivial contributions, pull requests should sit for at least 36 hours to ensure that
+contributors in other timezones have time to review. Consideration should also be given to
+weekends and other holiday periods to ensure active committers all have reasonable time to
+become involved in the discussion and review process if they wish.
+
+The default for each contribution is that it is accepted once no committer has an objection.
+During review committers may also request that a specific contributor who is most versed in a
+particular area gives a "LGTM" before the PR can be merged. There is no additional "sign off"
+process for contributions to land. Once all issues brought by committers are addressed it can
+be landed by any committer.
+
+In the case of an objection being raised in a pull request by another committer, all involved
+committers should seek to arrive at a consensus by way of addressing concerns being expressed
+by discussion, compromise on the proposed change, or withdrawal of the proposed change.
+
+If a contribution is controversial and committers cannot agree about how to get it to land
+or if it should land then it should be escalated to any of the Project Maintainers,
+[@refinedblessing](https://github.com/refinedblessing) , [@erikguntner](https://github.com/erikguntner) ,
+[brianwtaylor](https://github.com/brianwtaylor).
+Project Maintainers should regularly discuss pending contributions in order to find a resolution. It is expected that only a
+small minority of issues be brought to the Project Maintainers for resolution and that discussion and compromise among
+committers be the default resolution mechanism.
diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
new file mode 100644
index 0000000..c4a861e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,52 @@
+---
+name: "\U0001F41BBug report"
+about: Something isn't working right
+---
+
+### React-Prot Version: x.x.x
+
+
+
+### Details
+
+
+
+### Expected Behavior
+
+
+
+### Actual Behavior
+
+
+
+### Possible Fix
+
+
+
+Additional Info
+
+### Your Environment
+
+
+
+- Environment name and version (e.g. Windows 10, node.js 5.4):
+- Operating System and version (Mac or Linux):
+- Useful link to screenshot or any other information:
+
+### Steps to Reproduce
+
+
+
+
+
+1. first...
+2.
+3.
+4.
+
+### Stack Trace
+
+
+
+
+
+[React-Proto](https://react-proto.github.io/react-proto/) is a React application prototyping tool for developers and designers.
+
+React-Proto allows the user to visualize/setup their application architecture upfront and eject this architecture as application files either into a previous project or a new create-react-app project or a starter template from any repository.
+
+Download for [MacOS](https://github.com/React-Proto/react-proto/releases/download/v1.0.0/React-Proto-1.0.0.dmg), [Windows](https://github.com/React-Proto/react-proto/releases/download/v1.0.0/React-Proto.Web.Setup.1.0.0.exe), [Linux](https://github.com/React-Proto/react-proto/releases/download/v1.0.0/react-proto_1.0.0_amd64.deb).
+* Mac users only: for now you might need to go to your security settings to allow the app run on your system as we do not have an Apple license yet.
+
+If you find any issues, [file issue](https://github.com/React-Proto/react-proto/issues)
+
+## How To Use
+
+- Application can be run from cli using ```react-proto``` command or by clicking on the application icon.
+
+- To start a new project, either import a mockup or start with a blank stage.
+
+- Add components you would like to create using the input, then drag the component frame into place and resize accordingly.
+
+
+
+- While building, you can use the icons in the toolbar to zoom, toggle draggability of the stage, update or remove an image, collapse the left container, and export your files.
+
+- For each component you have the ability to define whether your component will have state, the color of the frame component, and the ability to apply a parent component.
+
+- If you place a container around other components and can no longer access them, you can use the layer buttons in the corresponding dropdown menu to change layer order down or up.
+
+
+
+- In the right container, the props tab allows you to define props in key value pairs, as well as the necessary prop type.
+
+- Once you are finished, you can use the export button in the toolbar to choose from three options of how to export your files:
+ 1. Import your files into an existing project. Just choose the path where you would like to create your components folder.
+ 2. Use create-react-app to start a new project (the project will be under the "proto_app").
+ 3. Clone your favorite Github repo to start a project with your favorite starter files.
+
+
+
+- Lastly, start building!
+
+## Authors
+
+[Blessing E Ebowe](https://www.linkedin.com/in/blessingebowe/) [@refinedblessing](https://github.com/refinedblessing)
+
+[Brian Taylor](https://www.linkedin.com/in/brianwtaylor/) [@brianwtaylor](https://github.com/brianwtaylor)
+
+[Erik Guntner](https://www.linkedin.com/in/erik-guntner-9aa324b9/) [@erikguntner](https://github.com/erikguntner)
+
+## Running Your Own Version
+
+- **Fork** and **Clone** Repository.
+
+- Open project directory
+
+``` bash
+cd react-proto
+```
+
+- Install dependencies
+
+``` bash
+yarn install
+```
+
+- Run application
+
+``` bash
+yarn start
+```
+
+- For development experience...
``` bash
-# Install dependencies
-npm install
+yarn dev
+```
+
+- and on another terminal
+
+``` bash
+yarn electron
+```
+
+## Linting
+
+``` bash
+yarn linter
+```
+
+## Testing
+
+```bash
+yarn test
+```
+
+## Built With
+
+- [React](https://reactjs.org/) - Framework for building user interaces.
+- [Redux](https://redux.js.org/) - Predictable state container for JavaScript apps.
+- [Electron](https://electronjs.org/) - Cross-platform desktop apps with HTML, CSS and JS.
+- [KonvaJS](https://konvajs.github.io/) - HTML5 2d canvas library for desktop and mobile applications.
+- [React-Sortable-Tree](https://github.com/frontend-collective/react-sortable-tree#options) - Drag-and-drop sortable component for nested data and hierarchies.
-# Build files
-npm run build
+## Acknowledgments
-# Run application with electron
-npm run electron
+### Logo Design
-# Run application on browser
-npm run dev_server
+[Clariz Mariano](www.clarizmariano.com) [@havengoer](https://github.com/havengoer)
-# Clear build folder
-npm run clear_build
+[Joe Thel](https://www.linkedin.com/in/joe-thel/) [@fakemonster](https://github.com/fakemonster)
-# Run Linter
-npm run linter
-# For development environment with electron....
-npm run start
+## License
-# on another terminal
-npm run electron
-```
\ No newline at end of file
+This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/React-Proto/react-proto/blob/master/LICENSE.md) file for details.
diff --git a/__mocks__/electron.js b/__mocks__/electron.js
new file mode 100644
index 0000000..fb0dee4
--- /dev/null
+++ b/__mocks__/electron.js
@@ -0,0 +1,6 @@
+
+const ipcRenderer = {
+ on: jest.fn(),
+};
+
+export default ipcRenderer;
diff --git a/assets/dragging.gif b/assets/dragging.gif
new file mode 100644
index 0000000..42b7d49
Binary files /dev/null and b/assets/dragging.gif differ
diff --git a/assets/export.gif b/assets/export.gif
new file mode 100644
index 0000000..d840cc1
Binary files /dev/null and b/assets/export.gif differ
diff --git a/assets/hierarchy.gif b/assets/hierarchy.gif
new file mode 100644
index 0000000..a7b8f07
Binary files /dev/null and b/assets/hierarchy.gif differ
diff --git a/docs/assets/proto-logo.png b/docs/assets/proto-logo.png
new file mode 100644
index 0000000..f9871a5
Binary files /dev/null and b/docs/assets/proto-logo.png differ
diff --git a/docs/assets/react-proto-logo.png b/docs/assets/react-proto-logo.png
new file mode 100644
index 0000000..0f56749
Binary files /dev/null and b/docs/assets/react-proto-logo.png differ
diff --git a/docs/index.html b/docs/index.html
index ca52f07..d704a68 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -15,20 +15,17 @@