No description
Find a file
2022-11-02 12:49:44 +01:00
.vscode Merged PR 211: Add csharp classes to SVGLayoutDesigner and add tests 2022-10-10 09:28:47 +00:00
csharp/SVGLDLibs Fix PointModel and SymbolModel 2022-10-20 17:29:56 +02:00
docs Update SmartComponent.md 2022-10-17 17:04:25 +02:00
public Merged PR 216: Deprecate parent from IContainerModel for FindContainerById 2022-10-17 16:01:06 +00:00
src Fix depth dimension bottom position 2022-11-02 12:23:45 +01:00
test-server Add shortcut description to right click + add Suppr shortcut + Fix next selection after deletion 2022-10-04 16:51:24 +02:00
.drone.yml Merged PR 211: Add csharp classes to SVGLayoutDesigner and add tests 2022-10-10 09:28:47 +00:00
.env.development Revert "Move settings to public/svgld-settings.js" 2022-10-12 18:08:35 +02:00
.env.production Revert "Move settings to public/svgld-settings.js" 2022-10-12 18:08:35 +02:00
.env.test Revert "Move settings to public/svgld-settings.js" 2022-10-12 18:08:35 +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 Add pptx to lfs 2022-11-02 12:49:44 +01:00
.gitignore Remove sln from gitignore 2022-10-12 16:03:39 +02:00
azure-pipelines.yml Merged PR 212: Optimize FindChildrenById from O(n) to O(1) 2022-10-12 09:39:54 +00:00
index.html Revert "Move settings to public/svgld-settings.js" 2022-10-12 18:08:35 +02:00
package-lock.json Add @react-hook/size and use it to have a dynamic resizable list + update packages 2022-10-03 17:49:43 +02:00
package.json Fix svg-layout-designer.ts after history update + Update SVGLD.dts + add command to package.json 2022-10-13 17:40:43 +02:00
pnpm-lock.yaml Add @react-hook/size and use it to have a dynamic resizable list + update packages 2022-10-03 17:49:43 +02:00
postcss.config.cjs Initialise project with Vite, React, SCSS, Tailwind, ESLint 2022-07-30 11:38:17 +02:00
README.md Updated README.md 2022-10-10 09:37:53 +00:00
tailwind.config.cjs Implement SmartMenuiserie API + added bun test-server 2022-07-30 19:56:41 +02:00
tsconfig.json Revert "Move settings to public/svgld-settings.js" 2022-10-12 18:08:35 +02:00
tsconfig.node.json Initialise project with Vite, React, SCSS, Tailwind, ESLint 2022-07-30 11:38:17 +02:00
vite.config.ts Vite: Change base directory to './' 2022-10-17 17:03:51 +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

An svg layout designer.

Getting Started

Requirements :

  • node >= 16.x (>= 17.x to run vitest tests)
  • npm
  • pnpm (optional) reduce node_modules folder size by using symlinks
  • git-lfs (in order to clone the documentation)
  • dotnet (optional) used for api test

Recommanded tools for developers

Develop

Run npm i

Run npm run dev

Deploy

Run npm i

Run npm run build

Run the tests

Run npm i

Run npm test

Or run npm test:full to also test the C# API

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.

node run ./test-server/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.

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

Prerequisites: typescript, python3

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

npx tsc --project tsconfig.dts.json

Or if installed globally

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.