No description
Find a file
2022-10-03 14:24:26 +02:00
.vscode Merged PR 196: Implement Vertical orientation + Upgrade Heroicons to 2.0 2022-09-28 16:07:56 +00:00
docs Revert "md: Replace tsx by ts for highlightjs support" 2022-09-23 18:16:37 +02:00
public Merged PR 194: Added option to disable any API call 2022-09-23 15:59:42 +00:00
src Fix mobile view left single sidebar + Fix Bar wrong icon toggled 2022-10-03 14:24:26 +02:00
test-server Fix node-http tests 2022-10-02 16:34:22 +02:00
.drone.yml drone: fix using npm ci 2022-08-17 15:55:38 +02:00
.env.development Merged PR 185: Implement Messages 2022-09-16 10:03:41 +00:00
.env.production Merged PR 185: Implement Messages 2022-09-16 10:03:41 +00:00
.env.test Add app test 2022-09-21 16:33:31 +02:00
.eslintrc.cjs Merged PR 171: Refactor the multiple context menus into a single component + Fix eslint 2022-08-29 15:03:47 +00:00
.gitattributes Merged PR 167: Add Flex and fix bugs (read desc) 2022-08-25 13:28:32 +00:00
.gitignore Change css class on sidebar and symbols 2022-09-09 10:33:14 +02:00
azure-pipelines.yml Rename artifact to svg-layout-designer 2022-09-22 09:57:16 +02:00
index.html Merged PR 189: Simplify usage of SmartComponent 2022-09-21 09:24:14 +00:00
package-lock.json Change css class for sidebar and symbols 2022-09-09 08:40:01 +02:00
package.json Merged PR 196: Implement Vertical orientation + Upgrade Heroicons to 2.0 2022-09-28 16:07:56 +00:00
pnpm-lock.yaml Merged PR 196: Implement Vertical orientation + Upgrade Heroicons to 2.0 2022-09-28 16:07:56 +00:00
postcss.config.cjs Initialise project with Vite, React, SCSS, Tailwind, ESLint 2022-07-30 11:38:17 +02:00
README.md Added more documentation 2022-09-22 17:45:35 +02:00
tailwind.config.cjs Implement SmartMenuiserie API + added bun test-server 2022-07-30 19:56:41 +02:00
tsconfig.json Fix build version of the project because of web workers 2022-08-17 17:47:16 +02:00
tsconfig.node.json Initialise project with Vite, React, SCSS, Tailwind, ESLint 2022-07-30 11:38:17 +02:00
vite.config.ts Fix symbol behavior not imposing its position when anchor is enabled 2022-08-31 11:32:19 +02:00
vitest.config.ts Added API tests + added vitest.config.ts + added fallback of window.fetch with xmlhttprequest 2022-08-03 16:03:39 +02:00

SVG Layout Designer React

Build Status

Build Status

Build Status

An svg layout designer.

Getting Started

Requierements :

  • NodeJS
  • npm
  • Chrome > 98
  • pnpm (optional but recommanded unless you prefer having a huge node_modules directory)
  • git-lfs (in order to clone the documentation)

Developping

Run npm ci

Run npm run dev

Deploy

Run npm ci

Run npm run build

Run the tests

Run npm ci

Run npm test

API

You can preload a state by setting the state URL parameter with a url address to a state.json file.

Example: http://localhost:4000/?state=http://localhost:5000/state.json

Testing the external API

This program fetch the data structure from others applications, allowing it to assemble them later.

With NodeJS

node run ./test-server/node-http.js

The web server will be running at http://localhost:5000

Copy .env.development to the file .env.development.local and change the url to whatever you want to use.

With bun.sh

Install bun

Inside test-server folder, run :

bun run http.js

The web server will be running at http://localhost:5000

Copy .env.development to the file .env.development.local and change the url to whatever you want to use.

Recommanded tools

Setup debugging with chrome

Inside .vscode/settings.json, set the following :

{
  // Use IntelliSense to learn about possible attributes.
  // Hover to view descriptions of existing attributes.
  // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome against localhost",
      "url": "http://localhost:5173",
      "webRoot": "${workspaceFolder}",
    }
  ]
}

Change the url to the dev server url. Set the runtimeExecutable to your favorite chromium browser.

Generate definition files for SmartModeler

Pre-requisite: typescript, python3

Go to the src/dts directory and run the following command

tsc --project tsconfig.dts.json

Then, run python3 (or py on Windows) on generate_dts.py:

python3 generate_dts.py SVGLD svgld.d.ts

A definition will be generated as svgld.d.ts with the namespace SVGLD.