diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f0f6ad1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Satvik Ramaprasad + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 9234081d..682eb35a 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,28 @@ -# GSoC'22 Project - [WIP]VueJS Simulator +# CircuitVerse Frontend Vue -## New Frontend Framework for Simulator UI. -- [Phase-1 Report](https://blog.circuitverse.org/posts/devjitchoudhury_gsoc22_phase1_report/) -- [Phase-2 Report](https://blog.circuitverse.org/posts/devjitchoudhury_gsoc22_phase2_report/) +## Installation +To set up the project on your local machine, follow these steps: -### Project Goals - -1. Replacing JqueryUI with a modern frontend framework. -2. Decoupling the Simulator from backend -3. Dividing into Components -4. State Management -5. Refactoring CSS -6. Internationalization using Vue-i18n +1. Clone the repository to your local machine using the following command: +``` +git clone https://github.com/CircuitVerse/cv-frontend-vue.git +``` +2. Navigate to the project directory: +``` +cd cv-frontend-vue +``` +3. Install the project dependencies: +``` +npm install +``` +4. Start the development server: +``` +npm run dev +``` - -### To Dos - -1. **Vue Project Integration** into the Main Repository or finding a way for the simulators in two different repositories to work in sync. -2. **API Integration and Testing** -3. **Embed Feature** - Discuss and implement the embeding of circuits feature. -4. **Internationalization of Simulator** - Internationalization is already set up using Vue-i18n but progressive work needs to be done on it. -5. **Refactoring of Styles** - Refactor the global stylesheet to local stylesheets for individual components. There is also a scope of removing SASS using modern CSS features. -6. Few components - Verilog Module, Quick-Button, Testbench, and Timing-Diagram are yet to be converted to Vue. -7. With the removal of jQuery-UI, there is also a scope of removing the use of jQuery from the project. +## To Dos - +1. **Creating the mobile version of the vue simulator** +2. **Testing and bug fixing** +3. **Typescript integration & style Refactoring** +4. **Creating the desktop application** +5. **Removing JQuery** diff --git a/package-lock.json b/package-lock.json index b676f2aa..d1e3d229 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.0.0", "hasInstallScript": true, "dependencies": { - "@fortawesome/fontawesome-free": "^5.15.4", + "@fortawesome/fontawesome-free": "^6.5.1", "@mdi/font": "5.9.55", "@tiptap/core": "^2.0.3", "@tiptap/extension-character-count": "^2.0.3", @@ -25,6 +25,7 @@ "dom-to-image": "^2.6.0", "driver.js": "^0.9.8", "esbuild": "^0.14.45", + "interactjs": "^1.10.17", "jquery": "^3.6.0", "pinia": "^2.0.14", "vue": "^3.2.25", @@ -906,9 +907,9 @@ } }, "node_modules/@fortawesome/fontawesome-free": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", - "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz", + "integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==", "hasInstallScript": true, "engines": { "node": ">=6" @@ -934,6 +935,11 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "node_modules/@interactjs/types": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@interactjs/types/-/types-1.10.17.tgz", + "integrity": "sha512-X2JpoM7xUw0p9Me0tMaI0HNfcF/Hd07ZZlzpnpEMpGerUZOLoyeThrV9P+CrBHxZrluWJrigJbcdqXliFd0YMA==" + }, "node_modules/@intlify/bundle-utils": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-2.2.2.tgz", @@ -4144,6 +4150,14 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "node_modules/interactjs": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/interactjs/-/interactjs-1.10.17.tgz", + "integrity": "sha512-grjHJgnWkCoQLmAlk2yalNd1r0ztUhXLJNVjSOfWn1wfNNgU2tx1cDEkro9WYerDNC9UG3MZTeD4O6zOM5gbIA==", + "dependencies": { + "@interactjs/types": "1.10.17" + } + }, "node_modules/interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", @@ -7587,9 +7601,9 @@ } }, "@fortawesome/fontawesome-free": { - "version": "5.15.4", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.15.4.tgz", - "integrity": "sha512-eYm8vijH/hpzr/6/1CJ/V/Eb1xQFW2nnUKArb3z+yUWv7HTwj6M7SP957oMjfZjAHU6qpoNc2wQvIxBLWYa/Jg==" + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.5.1.tgz", + "integrity": "sha512-CNy5vSwN3fsUStPRLX7fUYojyuzoEMSXPl7zSLJ8TgtRfjv24LOnOWKT2zYwaHZCJGkdyRnTmstR0P+Ah503Gw==" }, "@humanwhocodes/config-array": { "version": "0.9.5", @@ -7608,6 +7622,11 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, + "@interactjs/types": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/@interactjs/types/-/types-1.10.17.tgz", + "integrity": "sha512-X2JpoM7xUw0p9Me0tMaI0HNfcF/Hd07ZZlzpnpEMpGerUZOLoyeThrV9P+CrBHxZrluWJrigJbcdqXliFd0YMA==" + }, "@intlify/bundle-utils": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@intlify/bundle-utils/-/bundle-utils-2.2.2.tgz", @@ -9936,6 +9955,14 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "interactjs": { + "version": "1.10.17", + "resolved": "https://registry.npmjs.org/interactjs/-/interactjs-1.10.17.tgz", + "integrity": "sha512-grjHJgnWkCoQLmAlk2yalNd1r0ztUhXLJNVjSOfWn1wfNNgU2tx1cDEkro9WYerDNC9UG3MZTeD4O6zOM5gbIA==", + "requires": { + "@interactjs/types": "1.10.17" + } + }, "interpret": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", diff --git a/package.json b/package.json index 103bb91e..9b96c8e3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "postinstall": "husky install" }, "dependencies": { - "@fortawesome/fontawesome-free": "^5.15.4", + "@fortawesome/fontawesome-free": "^6.5.1", "@mdi/font": "5.9.55", "@tiptap/core": "^2.0.3", "@tiptap/extension-character-count": "^2.0.3", @@ -28,6 +28,7 @@ "dom-to-image": "^2.6.0", "driver.js": "^0.9.8", "esbuild": "^0.14.45", + "interactjs": "^1.10.17", "jquery": "^3.6.0", "pinia": "^2.0.14", "vue": "^3.2.25", diff --git a/src/assets/constants/Panels/TimingDiagramPanel/buttons.json b/src/assets/constants/Panels/TimingDiagramPanel/buttons.json new file mode 100644 index 00000000..357a00fa --- /dev/null +++ b/src/assets/constants/Panels/TimingDiagramPanel/buttons.json @@ -0,0 +1,79 @@ +[ + { + "title": "Decrease Size", + "icon": "fa-chevron-left", + "class": "timing-diagram-smaller", + "type": "primary", + "click": "smaller" + }, + { + "title": "Increase Size", + "icon": "fa-chevron-right", + "class": "timing-diagram-larger", + "type": "primary", + "click": "larger" + }, + { + "title": "Decrease Height", + "icon": "fa-chevron-up", + "class": "timing-diagram-small-height", + "type": "primary", + "click": "smallHeight" + }, + { + "title": "Increase Height", + "icon": "fa-chevron-down", + "class": "timing-diagram-large-height", + "type": "primary", + "click": "largeHeight" + }, + { + "title": "Download As Image", + "icon": "fa-download", + "class": "timing-diagram-download", + "type": "primary", + "click": "download" + }, + { + "title": "Reset Timing Diagram", + "icon": "fa-undo", + "class": "timing-diagram-reset", + "type": "tertiary", + "click": "reset" + }, + { + "title": "Autocalibrate Cycle Units", + "icon": "fa-magic", + "class": "timing-diagram-calibrate", + "type": "tertiary", + "click": "calibrate" + }, + { + "title": "Zoom In", + "icon": "fa-search-plus", + "class": "timing-diagram-zoom-in", + "type": "primary", + "click": "zoomIn" + }, + { + "title": "Zoom Out", + "icon": "fa-search-minus", + "class": "timing-diagram-zoom-out", + "type": "primary", + "click": "zoomOut" + }, + { + "title": "Resume auto-scroll", + "icon": "fa-play", + "class": "timing-diagram-resume", + "type": "primary", + "click": "resume" + }, + { + "title": "Pause auto-scroll", + "icon": "fa-pause", + "class": "timing-diagram-pause", + "type": "primary", + "click": "pause" + } +] diff --git a/src/assets/constants/Panels/VerilogEditorPanel/THEMES.json b/src/assets/constants/Panels/VerilogEditorPanel/THEMES.json new file mode 100644 index 00000000..4319f822 --- /dev/null +++ b/src/assets/constants/Panels/VerilogEditorPanel/THEMES.json @@ -0,0 +1,24 @@ +[ + { + "label": "Light Themes", + "options": [ + { "value": "default" }, + { "value": "solarized" }, + { "value": "elegant" }, + { "value": "neat" }, + { "value": "idea" }, + { "value": "neo" } + ] + }, + { + "label": "Dark Themes", + "options": [ + { "value": "blackboard" }, + { "value": "cobalt" }, + { "value": "night" }, + { "value": "the-matrix" }, + { "value": "midnight" }, + { "value": "monokai" } + ] + } +] diff --git a/src/components/DialogBox/BooleanTable.vue b/src/components/DialogBox/BooleanTable.vue index 925ccc6e..f31f67bf 100644 --- a/src/components/DialogBox/BooleanTable.vue +++ b/src/components/DialogBox/BooleanTable.vue @@ -1,6 +1,6 @@ - + + + + diff --git a/src/components/DialogBox/HexBinDec.vue b/src/components/DialogBox/HexBinDec.vue index 5fc55df9..86c89f4e 100644 --- a/src/components/DialogBox/HexBinDec.vue +++ b/src/components/DialogBox/HexBinDec.vue @@ -5,7 +5,7 @@ > -

Hex-Bin-Dec Convertor

+

Hex-Bin-Dec Converter

mdi-close
- +


@@ -42,95 +42,178 @@
+ + + +

Hex-Bin-Dec Converter

+ + mdi-close + +
+ +
+ +

+
+
+ + + Reset + + +
+
- - diff --git a/src/components/DialogBox/InsertSubcircuit.vue b/src/components/DialogBox/InsertSubcircuit.vue index 3500640b..f2c1b1a6 100644 --- a/src/components/DialogBox/InsertSubcircuit.vue +++ b/src/components/DialogBox/InsertSubcircuit.vue @@ -26,10 +26,7 @@ :key="scopeId" >