diff --git a/lerna.json b/lerna.json new file mode 100644 index 00000000..dabb023c --- /dev/null +++ b/lerna.json @@ -0,0 +1,8 @@ +{ + "packages": [ + "packages/*" + ], + "version": "1.0.0", + "npmClient": "yarn", + "useWorkspaces": true +} diff --git a/package.json b/package.json index 1de73120..d5919fdd 100644 --- a/package.json +++ b/package.json @@ -1,57 +1,17 @@ { - "name": "wisemapping-react", - "version": "0.1.4", - "dependencies": { - "@testing-library/jest-dom": "^5.11.6", - "@testing-library/react": "^11.2.2", - "@testing-library/user-event": "^12.2.2", - "axios": "^0.21.0", - "cors": "^2.8.5", - "joi": "^17.3.0", - "react": "^17.0.1", - "react-dom": "^17.0.1", - "react-google-recaptcha": "^2.1.0", - "react-intl": "^5.10.5", - "react-router-dom": "^5.2.0", - "react-scripts": "4.0.1", - "web-vitals": "^0.2.4" - }, - "scripts": { - "start": "react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject", - "extract": "formatjs extract", - "compile": "formatjs compile" - }, - "author": { - "name": "Paulo Veiga", - "login.email": "pveiga@wisemapping.com" - }, - "contributors": [ - "Ezequiel Bergamaschi" - ], - "eslintConfig": { - "extends": [ - "react-app", - "react-app/jest" - ] - }, - "browserslist": { - "production": [ - ">0.2%", - "not dead", - "not op_mini all" - ], - "development": [ - "last 1 chrome version", - "last 1 firefox version", - "last 1 safari version" - ] - }, - "homepage": "http://localhost:8080/react", - "license": "https://wisemapping.atlassian.net/wiki/spaces/WS/pages/524357/WiseMapping+Public+License+Version+1.0+WPL", - "devDependencies": { - "@formatjs/cli": "^2.13.14" - } + "name": "wisemapping-react", + "scripts": { + "bootstrap": "lerna bootstrap", + "build": "lerna run build", + "clean": "lerna clean && rm -rf node_modules", + "lint": "lerna run lint", + "test": "lerna run test" + }, + "private": true, + "devDependencies": { + "lerna": "^3.16.4" + }, + "workspaces": [ + "packages/*" + ] } diff --git a/packages/editor/index.html b/packages/editor/index.html new file mode 100644 index 00000000..453c01d8 --- /dev/null +++ b/packages/editor/index.html @@ -0,0 +1,13 @@ + + + + + + Wisemapping + + + + +
+ + diff --git a/packages/editor/package.json b/packages/editor/package.json new file mode 100644 index 00000000..bed76ce5 --- /dev/null +++ b/packages/editor/package.json @@ -0,0 +1,30 @@ +{ + "name": "@wisemapping/editor", + "version": "1.0.0", + "main": "src/index.tsx", + "scripts": { + "lint": "eslint src" + }, + "repository": "http://www.wisemapping.com", + "author": "Paulo Veiga , Ezequiel Bergamaschi ", + "license": "MIT", + "private": false, + "devDependencies": { + "@types/react": "^17.0.0", + "@types/react-dom": "^17.0.0", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", + "eslint": "^7.14.0", + "eslint-plugin-react": "^7.21.5", + "eslint-plugin-react-hooks": "^4.2.0", + "ts-loader": "^8.0.11", + "ts-node": "^9.0.0", + "typescript": "^4.1.2" + }, + "dependencies": { + "@types/styled-components": "^5.1.4", + "react": "^17.0.1", + "react-dom": "^17.0.1", + "styled-components": "^5.2.1" + } +} diff --git a/packages/editor/src/components/canvas/index.tsx b/packages/editor/src/components/canvas/index.tsx new file mode 100644 index 00000000..d6b06f40 --- /dev/null +++ b/packages/editor/src/components/canvas/index.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { StyledCanvas } from './styled'; + +const Canvas = () => ( + canvas +); + +export default Canvas; diff --git a/packages/editor/src/components/canvas/styled.ts b/packages/editor/src/components/canvas/styled.ts new file mode 100644 index 00000000..7cc7eb85 --- /dev/null +++ b/packages/editor/src/components/canvas/styled.ts @@ -0,0 +1,8 @@ +import styled from 'styled-components'; + +export const StyledCanvas = styled.div` + height: 100% + width: 100%; + flex: 1; + +`; diff --git a/packages/editor/src/components/footer/index.tsx b/packages/editor/src/components/footer/index.tsx new file mode 100644 index 00000000..765db58d --- /dev/null +++ b/packages/editor/src/components/footer/index.tsx @@ -0,0 +1,8 @@ +import React from 'react'; +import { StyledFooter } from './styled'; + +const Footer = () => ( + footer +); + +export default Footer; diff --git a/packages/editor/src/components/footer/styled.ts b/packages/editor/src/components/footer/styled.ts new file mode 100644 index 00000000..fd557520 --- /dev/null +++ b/packages/editor/src/components/footer/styled.ts @@ -0,0 +1,8 @@ +import styled from 'styled-components'; +import { times } from '../../size'; + +export const StyledFooter = styled.div` + height: ${times(10)}; + width: 100%; + border: 1px solid black; +`; diff --git a/packages/editor/src/components/frame/index.tsx b/packages/editor/src/components/frame/index.tsx new file mode 100644 index 00000000..1f8a8974 --- /dev/null +++ b/packages/editor/src/components/frame/index.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import Footer from '../footer'; +import TopBar from '../top-bar'; +import Canvas from '../canvas'; +import { StyledFrame } from './styled'; + +const Frame = () => ( + + + +