Spaces:
Sleeping
Sleeping
Upload 213 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .dockerignore +3 -0
- .editorconfig +13 -0
- .eslintignore +1 -0
- .eslintrc.json +42 -0
- .gitattributes +35 -35
- .gitignore +42 -0
- .prettierignore +5 -0
- .prettierrc +3 -0
- CFPAGE-DEPLOY.md +48 -0
- CHANGELOG.md +399 -0
- Dockerfile +19 -0
- LICENSE +21 -0
- README.md +10 -10
- README_en.md +142 -0
- SECURITY.md +7 -0
- apps/web-e2e/.eslintrc.json +22 -0
- apps/web-e2e/playwright.config.ts +69 -0
- apps/web-e2e/project.json +9 -0
- apps/web-e2e/src/example.spec.ts +9 -0
- apps/web-e2e/tsconfig.json +19 -0
- apps/web/.eslintrc.json +18 -0
- apps/web/index.html +79 -0
- apps/web/jest.config.ts +11 -0
- apps/web/project.json +9 -0
- apps/web/public/_headers +9 -0
- apps/web/public/_redirects +2 -0
- apps/web/public/favicon.ico +0 -0
- apps/web/public/logo/logo_drawnix_h.svg +1 -0
- apps/web/public/logo/logo_drawnix_h_dark.svg +1 -0
- apps/web/public/robots.txt +13 -0
- apps/web/public/sitemap.xml +29 -0
- apps/web/src/app/app.module.scss +1 -0
- apps/web/src/app/app.spec.tsx +10 -0
- apps/web/src/app/app.tsx +85 -0
- apps/web/src/assets/.gitkeep +0 -0
- apps/web/src/main.tsx +13 -0
- apps/web/src/styles.scss +29 -0
- apps/web/tsconfig.app.json +23 -0
- apps/web/tsconfig.json +21 -0
- apps/web/tsconfig.spec.json +25 -0
- apps/web/vite.config.ts +35 -0
- jest.config.ts +5 -0
- jest.preset.js +3 -0
- nx.json +84 -0
- package-lock.json +0 -0
- package.json +90 -0
- packages/drawnix/.babelrc +12 -0
- packages/drawnix/.eslintrc.json +18 -0
- packages/drawnix/README.md +7 -0
- packages/drawnix/jest.config.ts +11 -0
.dockerignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.nx
|
| 2 |
+
.dist
|
| 3 |
+
.node_modules
|
.editorconfig
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Editor configuration, see http://editorconfig.org
|
| 2 |
+
root = true
|
| 3 |
+
|
| 4 |
+
[*]
|
| 5 |
+
charset = utf-8
|
| 6 |
+
indent_style = space
|
| 7 |
+
indent_size = 2
|
| 8 |
+
insert_final_newline = true
|
| 9 |
+
trim_trailing_whitespace = true
|
| 10 |
+
|
| 11 |
+
[*.md]
|
| 12 |
+
max_line_length = off
|
| 13 |
+
trim_trailing_whitespace = false
|
.eslintignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
node_modules
|
.eslintrc.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"root": true,
|
| 3 |
+
"ignorePatterns": ["**/*"],
|
| 4 |
+
"plugins": ["@nx"],
|
| 5 |
+
"overrides": [
|
| 6 |
+
{
|
| 7 |
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
| 8 |
+
"rules": {
|
| 9 |
+
"@nx/enforce-module-boundaries": [
|
| 10 |
+
"error",
|
| 11 |
+
{
|
| 12 |
+
"enforceBuildableLibDependency": true,
|
| 13 |
+
"allow": [],
|
| 14 |
+
"depConstraints": [
|
| 15 |
+
{
|
| 16 |
+
"sourceTag": "*",
|
| 17 |
+
"onlyDependOnLibsWithTags": ["*"]
|
| 18 |
+
}
|
| 19 |
+
]
|
| 20 |
+
}
|
| 21 |
+
]
|
| 22 |
+
}
|
| 23 |
+
},
|
| 24 |
+
{
|
| 25 |
+
"files": ["*.ts", "*.tsx"],
|
| 26 |
+
"extends": ["plugin:@nx/typescript"],
|
| 27 |
+
"rules": {}
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"files": ["*.js", "*.jsx"],
|
| 31 |
+
"extends": ["plugin:@nx/javascript"],
|
| 32 |
+
"rules": {}
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
|
| 36 |
+
"env": {
|
| 37 |
+
"jest": true
|
| 38 |
+
},
|
| 39 |
+
"rules": {}
|
| 40 |
+
}
|
| 41 |
+
]
|
| 42 |
+
}
|
.gitattributes
CHANGED
|
@@ -1,35 +1,35 @@
|
|
| 1 |
-
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
-
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
-
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
| 2 |
+
|
| 3 |
+
# compiled output
|
| 4 |
+
dist
|
| 5 |
+
tmp
|
| 6 |
+
/out-tsc
|
| 7 |
+
|
| 8 |
+
# dependencies
|
| 9 |
+
node_modules
|
| 10 |
+
|
| 11 |
+
# IDEs and editors
|
| 12 |
+
/.idea
|
| 13 |
+
.project
|
| 14 |
+
.classpath
|
| 15 |
+
.c9/
|
| 16 |
+
*.launch
|
| 17 |
+
.settings/
|
| 18 |
+
*.sublime-workspace
|
| 19 |
+
|
| 20 |
+
# IDE - VSCode
|
| 21 |
+
.vscode/*
|
| 22 |
+
!.vscode/settings.json
|
| 23 |
+
!.vscode/tasks.json
|
| 24 |
+
!.vscode/launch.json
|
| 25 |
+
!.vscode/extensions.json
|
| 26 |
+
|
| 27 |
+
# misc
|
| 28 |
+
/.sass-cache
|
| 29 |
+
/connect.lock
|
| 30 |
+
/coverage
|
| 31 |
+
/libpeerconnection.log
|
| 32 |
+
npm-debug.log
|
| 33 |
+
yarn-error.log
|
| 34 |
+
testem.log
|
| 35 |
+
/typings
|
| 36 |
+
|
| 37 |
+
# System Files
|
| 38 |
+
.DS_Store
|
| 39 |
+
Thumbs.db
|
| 40 |
+
|
| 41 |
+
.nx/cache
|
| 42 |
+
.nx/workspace-data
|
.prettierignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Add files here to ignore them from prettier formatting
|
| 2 |
+
/dist
|
| 3 |
+
/coverage
|
| 4 |
+
/.nx/cache
|
| 5 |
+
/.nx/workspace-data
|
.prettierrc
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"singleQuote": true
|
| 3 |
+
}
|
CFPAGE-DEPLOY.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
##
|
| 2 |
+
|
| 3 |
+
### 1. 打开 Cloudflare Pages
|
| 4 |
+
访问:https://dash.cloudflare.com/pages
|
| 5 |
+
|
| 6 |
+
### 2. 创建项目
|
| 7 |
+
- 点击 **"Create a project"**
|
| 8 |
+
- 选择 **"Connect to Git"**
|
| 9 |
+
- 选择您的 GitHub 仓库
|
| 10 |
+
|
| 11 |
+
### 3. 配置构建设置
|
| 12 |
+
在可视化界面中填写:
|
| 13 |
+
|
| 14 |
+
```
|
| 15 |
+
Framework preset: None
|
| 16 |
+
Build command: npm run build:web
|
| 17 |
+
Build output directory: dist/apps/web
|
| 18 |
+
Root directory: (留空)
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
在 **Environment variables** 部分添加:
|
| 22 |
+
```
|
| 23 |
+
NODE_VERSION = 20
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
### 4. 点击 "Save and Deploy"
|
| 27 |
+
就这么简单!
|
| 28 |
+
|
| 29 |
+
## 项目已包含的配置文件
|
| 30 |
+
|
| 31 |
+
- `apps/web/public/_redirects` - SPA 路由支持
|
| 32 |
+
- `apps/web/public/_headers` - 基本缓存配置
|
| 33 |
+
- `package.json` 中的 `build:web` 脚本
|
| 34 |
+
|
| 35 |
+
## 部署后检查
|
| 36 |
+
|
| 37 |
+
1. 访问分配的 `.pages.dev` 域名
|
| 38 |
+
2. 确认网站正常运行
|
| 39 |
+
3. 测试页面刷新是否正常(SPA 路由)
|
| 40 |
+
|
| 41 |
+
## 自定义域名(可选)
|
| 42 |
+
|
| 43 |
+
部署成功后,在 Cloudflare Pages 项目中:
|
| 44 |
+
1. 点击 **"Custom domains"**
|
| 45 |
+
2. 添加您的域名
|
| 46 |
+
3. 按提示配置 DNS
|
| 47 |
+
|
| 48 |
+
就是这么简单!无需复杂的配置文件。
|
CHANGELOG.md
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## 0.3.0 (2025-09-13)
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
### 🚀 Features
|
| 5 |
+
|
| 6 |
+
- **arrow:** support set arrow mark ([#258](https://github.com/plait-board/drawnix/pull/258))
|
| 7 |
+
- **eraser:** implement eraser feature ([#221](https://github.com/plait-board/drawnix/pull/221))
|
| 8 |
+
- **eraser:** adding i18n for eraser ([427a730](https://github.com/plait-board/drawnix/commit/427a730))
|
| 9 |
+
- **eraser:** Improving all the eraser feature mentioned in #247 ([#249](https://github.com/plait-board/drawnix/pull/249), [#247](https://github.com/plait-board/drawnix/issues/247))
|
| 10 |
+
- **eraser:** drawing erasing trail animation effect ([#295](https://github.com/plait-board/drawnix/pull/295))
|
| 11 |
+
- **i18n:** added i18n tool for multi-Language support ([#232](https://github.com/plait-board/drawnix/pull/232))
|
| 12 |
+
- **i18n:** adding i18n for clean confirm ([7bdf543](https://github.com/plait-board/drawnix/commit/7bdf543))
|
| 13 |
+
- **i18n:** refactor the structure of i18n, adding with-common getI18n for plait objects, complete the translation of zh,en,ru ([#276](https://github.com/plait-board/drawnix/pull/276))
|
| 14 |
+
- **i18n:** add Arabic language ([#280](https://github.com/plait-board/drawnix/pull/280))
|
| 15 |
+
- **popup-toolbar:** add stroke select state, add stroke type text ([#272](https://github.com/plait-board/drawnix/pull/272))
|
| 16 |
+
|
| 17 |
+
### 🩹 Fixes
|
| 18 |
+
|
| 19 |
+
- fix dockerfile build logic ([#201](https://github.com/plait-board/drawnix/pull/201))
|
| 20 |
+
- **cursor:** set mind element css to always be inherit ([#260](https://github.com/plait-board/drawnix/pull/260))
|
| 21 |
+
- **freehand&i18n:** fix i18n of freehand toolbar and make secondary toolbar always exist while using freehand element ([#255](https://github.com/plait-board/drawnix/pull/255))
|
| 22 |
+
- **frontend:** comment addDebugLog to prevent potential XSS security issue ([#269](https://github.com/plait-board/drawnix/pull/269))
|
| 23 |
+
- **hotkey:** prevent switch arrow creation mode when mod+a #195 ([#200](https://github.com/plait-board/drawnix/pull/200), [#195](https://github.com/plait-board/drawnix/issues/195))
|
| 24 |
+
- **hotkey:** prevent enter arrow creation mode when press a and there are some selected elements ([#205](https://github.com/plait-board/drawnix/pull/205))
|
| 25 |
+
- **hotkey:** Prevent Arc browser undo on Cmd+Z in Drawnix ([#254](https://github.com/plait-board/drawnix/pull/254))
|
| 26 |
+
- **hotkey:** skip creation hotkey when use press special key and the among of alt, meta and ctrl ([#262](https://github.com/plait-board/drawnix/pull/262))
|
| 27 |
+
- **menu:** Adding margin for the menu components ([c9ecd09](https://github.com/plait-board/drawnix/commit/c9ecd09))
|
| 28 |
+
- **menu:** fix hotkey instruction for every OS ([#274](https://github.com/plait-board/drawnix/pull/274))
|
| 29 |
+
- **mind:** bump plait into 0.84.0 to fix text can not show completely mentioned in #208 ([#261](https://github.com/plait-board/drawnix/pull/261), [#208](https://github.com/plait-board/drawnix/issues/208))
|
| 30 |
+
- **toolbar:** fix issue mentioned in #290 ([#291](https://github.com/plait-board/drawnix/pull/291), [#290](https://github.com/plait-board/drawnix/issues/290))
|
| 31 |
+
- **tutorial:** fix tutorial instruction issues and update styles ([#289](https://github.com/plait-board/drawnix/pull/289))
|
| 32 |
+
|
| 33 |
+
### ❤️ Thank You
|
| 34 |
+
|
| 35 |
+
- Andy Lu (Lu, Yu-An) @NaoCoding
|
| 36 |
+
- coderwei @coderwei99
|
| 37 |
+
- MalikAli @MalikAliQassem
|
| 38 |
+
- Peter Chen
|
| 39 |
+
- pubuzhixing8 @pubuzhixing8
|
| 40 |
+
- Six
|
| 41 |
+
- vishwak @PATTASWAMY-VISHWAK-YASASHREE
|
| 42 |
+
|
| 43 |
+
## 0.2.1 (2025-08-06)
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
### 🩹 Fixes
|
| 47 |
+
|
| 48 |
+
- **hotkey:** assign t as hotkey to create text element ([#192](https://github.com/plait-board/drawnix/pull/192))
|
| 49 |
+
|
| 50 |
+
### ❤️ Thank You
|
| 51 |
+
|
| 52 |
+
- pubuzhixing8 @pubuzhixing8
|
| 53 |
+
|
| 54 |
+
## 0.2.0 (2025-08-06)
|
| 55 |
+
|
| 56 |
+
This was a version bump only, there were no code changes.
|
| 57 |
+
|
| 58 |
+
## 0.1.4 (2025-08-06)
|
| 59 |
+
|
| 60 |
+
This was a version bump only, there were no code changes.
|
| 61 |
+
|
| 62 |
+
## 0.1.3 (2025-08-06)
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
### 🩹 Fixes
|
| 66 |
+
|
| 67 |
+
- **hotkey:** prevent hotkey when type normally ([#189](https://github.com/plait-board/drawnix/pull/189))
|
| 68 |
+
|
| 69 |
+
### ❤️ Thank You
|
| 70 |
+
|
| 71 |
+
- pubuzhixing8 @pubuzhixing8
|
| 72 |
+
|
| 73 |
+
## 0.1.2 (2025-08-06)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
### 🚀 Features
|
| 77 |
+
|
| 78 |
+
- **creation:** support creation mode hotkey #183 ([#185](https://github.com/plait-board/drawnix/pull/185), [#183](https://github.com/plait-board/drawnix/issues/183))
|
| 79 |
+
- **mind:** bump plait into 0.82.0 to improve the experience of mind ([f904594](https://github.com/plait-board/drawnix/commit/f904594))
|
| 80 |
+
- **viewer:** support image which in mind node view #125 ([#125](https://github.com/plait-board/drawnix/issues/125))
|
| 81 |
+
|
| 82 |
+
### ❤️ Thank You
|
| 83 |
+
|
| 84 |
+
- pubuzhixing8 @pubuzhixing8
|
| 85 |
+
|
| 86 |
+
## 0.1.1 (2025-07-10)
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
### 🩹 Fixes
|
| 90 |
+
|
| 91 |
+
- **text:** resolve text can not auto break line #173 #169 ([#173](https://github.com/plait-board/drawnix/issues/173), [#169](https://github.com/plait-board/drawnix/issues/169))
|
| 92 |
+
|
| 93 |
+
### ❤️ Thank You
|
| 94 |
+
|
| 95 |
+
- pubuzhixing8 @pubuzhixing8
|
| 96 |
+
|
| 97 |
+
## 0.1.0 (2025-07-02)
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
### 🚀 Features
|
| 101 |
+
|
| 102 |
+
- import styles ([ecfe3cd](https://github.com/plait-board/drawnix/commit/ecfe3cd))
|
| 103 |
+
- add script and update ci ([147c028](https://github.com/plait-board/drawnix/commit/147c028))
|
| 104 |
+
- bump plait into 0.62.0-next.7 ([7ab4003](https://github.com/plait-board/drawnix/commit/7ab4003))
|
| 105 |
+
- add main menu ([#14](https://github.com/plait-board/drawnix/pull/14))
|
| 106 |
+
- improve active-toolbar ([fd19725](https://github.com/plait-board/drawnix/commit/fd19725))
|
| 107 |
+
- rename active-toolbar to popup-toolbar and modify tool-button ([aa06c7e](https://github.com/plait-board/drawnix/commit/aa06c7e))
|
| 108 |
+
- support opacity for color property ([#16](https://github.com/plait-board/drawnix/pull/16))
|
| 109 |
+
- support local storage ([9c0e652](https://github.com/plait-board/drawnix/commit/9c0e652))
|
| 110 |
+
- add product_showcase bump plait into 0.69.0 ([61fe571](https://github.com/plait-board/drawnix/commit/61fe571))
|
| 111 |
+
- add sitemap ([3b9d9a3](https://github.com/plait-board/drawnix/commit/3b9d9a3))
|
| 112 |
+
- improve pinch zoom ([#77](https://github.com/plait-board/drawnix/pull/77))
|
| 113 |
+
- bump plait into 0.76.0 and handle break changes ([#90](https://github.com/plait-board/drawnix/pull/90))
|
| 114 |
+
- improve README ([9e0190d](https://github.com/plait-board/drawnix/commit/9e0190d))
|
| 115 |
+
- add dependencies for packages ([6d89b32](https://github.com/plait-board/drawnix/commit/6d89b32))
|
| 116 |
+
- init dialog and mermaid-to-dialog ([6ff70b9](https://github.com/plait-board/drawnix/commit/6ff70b9))
|
| 117 |
+
- support save as json from hotkey ([120dffa](https://github.com/plait-board/drawnix/commit/120dffa))
|
| 118 |
+
- support sub menu and export jpg ([#132](https://github.com/plait-board/drawnix/pull/132))
|
| 119 |
+
- improve link popup state ([#147](https://github.com/plait-board/drawnix/pull/147))
|
| 120 |
+
- improve seo ([#148](https://github.com/plait-board/drawnix/pull/148))
|
| 121 |
+
- **active-toolbar:** add active toolbar ([7e737a2](https://github.com/plait-board/drawnix/commit/7e737a2))
|
| 122 |
+
- **active-toolbar:** support font color property ([4b2d964](https://github.com/plait-board/drawnix/commit/4b2d964))
|
| 123 |
+
- **app:** use localforage to storage main board content #122 ([#122](https://github.com/plait-board/drawnix/issues/122))
|
| 124 |
+
- **app-toolbar:** support undo/redo operation ([50f8831](https://github.com/plait-board/drawnix/commit/50f8831))
|
| 125 |
+
- **app-toolbar:** add trash and duplicate in app-toolbar ([#28](https://github.com/plait-board/drawnix/pull/28))
|
| 126 |
+
- **clean-board:** complete clean board ([#124](https://github.com/plait-board/drawnix/pull/124))
|
| 127 |
+
- **clean-confirm:** autoFocus ok button ([582172a](https://github.com/plait-board/drawnix/commit/582172a))
|
| 128 |
+
- **color-picker:** support merge operations for update opacity #4 ([#45](https://github.com/plait-board/drawnix/pull/45), [#4](https://github.com/plait-board/drawnix/issues/4))
|
| 129 |
+
- **component:** improve the onXXXChange feature for drawnix component #79 ([#79](https://github.com/plait-board/drawnix/issues/79))
|
| 130 |
+
- **component:** add afterInit to expose board instance ([23d91dc](https://github.com/plait-board/drawnix/commit/23d91dc))
|
| 131 |
+
- **component:** support update value from drawnix component outside ([#103](https://github.com/plait-board/drawnix/pull/103))
|
| 132 |
+
- **component:** fit viewport after children updated ([#104](https://github.com/plait-board/drawnix/pull/104))
|
| 133 |
+
- **creation-toolbar:** support long-press triggers drag selection an… ([#78](https://github.com/plait-board/drawnix/pull/78))
|
| 134 |
+
- **creation-toolbar:** remove default action when click shape and arrow icon in creation toolbar improve tool-button ([a46c2df](https://github.com/plait-board/drawnix/commit/a46c2df))
|
| 135 |
+
- **draw:** bump plait into 0.75.0-next.0 and support fine-grained selection ([#69](https://github.com/plait-board/drawnix/pull/69))
|
| 136 |
+
- **draw-toolbar:** add draw toolbar ([#9](https://github.com/plait-board/drawnix/pull/9))
|
| 137 |
+
- **draw-toolbar:** add shape and arrow panel for draw-toolbar #10 ([#12](https://github.com/plait-board/drawnix/pull/12), [#10](https://github.com/plait-board/drawnix/issues/10))
|
| 138 |
+
- **drawnix:** init drawnix package ([397d865](https://github.com/plait-board/drawnix/commit/397d865))
|
| 139 |
+
- **drawnix:** export utils ([#105](https://github.com/plait-board/drawnix/pull/105))
|
| 140 |
+
- **drawnix-board:** initialize drawnix board ([117e5a8](https://github.com/plait-board/drawnix/commit/117e5a8))
|
| 141 |
+
- **fill:** split fill color and fill opacity setting ([#53](https://github.com/plait-board/drawnix/pull/53))
|
| 142 |
+
- **flowchart:** add terminal shape element ([#80](https://github.com/plait-board/drawnix/pull/80))
|
| 143 |
+
- **freehand:** initialize freehand #2 ([#2](https://github.com/plait-board/drawnix/issues/2))
|
| 144 |
+
- **freehand:** apply gaussianSmooth to freehand curve ([#47](https://github.com/plait-board/drawnix/pull/47))
|
| 145 |
+
- **freehand:** update stroke width to 2 and optimize freehand end points ([#50](https://github.com/plait-board/drawnix/pull/50))
|
| 146 |
+
- **freehand:** improve freehand experience ([#51](https://github.com/plait-board/drawnix/pull/51))
|
| 147 |
+
- **freehand:** add FreehandSmoother to optimize freehand curve ([#62](https://github.com/plait-board/drawnix/pull/62))
|
| 148 |
+
- **freehand:** optimize freehand curve by stylus features ([#63](https://github.com/plait-board/drawnix/pull/63))
|
| 149 |
+
- **freehand:** freehand support theme ([b7c7965](https://github.com/plait-board/drawnix/commit/b7c7965))
|
| 150 |
+
- **freehand:** support closed freehand and add popup for freehand ([#68](https://github.com/plait-board/drawnix/pull/68))
|
| 151 |
+
- **freehand:** bump plait into 0.75.0-next.9 and resolve freehand unexpected resize-handle after moving freehand elements ([#84](https://github.com/plait-board/drawnix/pull/84))
|
| 152 |
+
- **hotkey:** support export png hotkey ([#30](https://github.com/plait-board/drawnix/pull/30))
|
| 153 |
+
- **image:** support free image element and support insert image at m… ([#95](https://github.com/plait-board/drawnix/pull/95))
|
| 154 |
+
- **image:** should hide popup toolbar when selected element include image ([#96](https://github.com/plait-board/drawnix/pull/96))
|
| 155 |
+
- **image:** support drag image to board to add image as draw element or mind node image ([#144](https://github.com/plait-board/drawnix/pull/144))
|
| 156 |
+
- **link:** improve link popup ([eba06e2](https://github.com/plait-board/drawnix/commit/eba06e2))
|
| 157 |
+
- **markdown-to-drawnix:** support markdown to drawnix mind map #134 ([#135](https://github.com/plait-board/drawnix/pull/135), [#134](https://github.com/plait-board/drawnix/issues/134))
|
| 158 |
+
- **menu:** support export to json file ([d0d6ca5](https://github.com/plait-board/drawnix/commit/d0d6ca5))
|
| 159 |
+
- **menu:** support load file action ([758aa6d](https://github.com/plait-board/drawnix/commit/758aa6d))
|
| 160 |
+
- **mermaid:** improve mermaid-to-drawnix ([a928ba1](https://github.com/plait-board/drawnix/commit/a928ba1))
|
| 161 |
+
- **mobile:** adapt mobile device ([7c0742f](https://github.com/plait-board/drawnix/commit/7c0742f))
|
| 162 |
+
- **pencil-mode:** add pencil mode and add drawnix context ([#76](https://github.com/plait-board/drawnix/pull/76))
|
| 163 |
+
- **pinch-zoom:** support pinch zoom for touch device ([#60](https://github.com/plait-board/drawnix/pull/60))
|
| 164 |
+
- **pinch-zoom:** improve pinch zoom functionality and support hand moving ([#75](https://github.com/plait-board/drawnix/pull/75))
|
| 165 |
+
- **popover:** add reusable popover and replace radix popover ([d30388a](https://github.com/plait-board/drawnix/commit/d30388a))
|
| 166 |
+
- **popup:** display icon when color is complete opacity ([#42](https://github.com/plait-board/drawnix/pull/42))
|
| 167 |
+
- **popup-toolbar:** support set branch color remove color property when select transparent #17 ([#17](https://github.com/plait-board/drawnix/issues/17))
|
| 168 |
+
- **popup-toolbar:** bump plait into 0.71.0 and mind node link stroke and node stroke support dashed/dotted style #22 ([#22](https://github.com/plait-board/drawnix/issues/22))
|
| 169 |
+
- **property:** support stroke style setting ([463c92a](https://github.com/plait-board/drawnix/commit/463c92a))
|
| 170 |
+
- **size-slider:** improve size-slider component ([780be9d](https://github.com/plait-board/drawnix/commit/780be9d))
|
| 171 |
+
- **text:** support soft break ([#39](https://github.com/plait-board/drawnix/pull/39))
|
| 172 |
+
- **text:** support update text from outside ([#58](https://github.com/plait-board/drawnix/pull/58))
|
| 173 |
+
- **text:** support insertSoftBreak for text #136 ([#136](https://github.com/plait-board/drawnix/issues/136))
|
| 174 |
+
- **theme-toolbar:** add theme selection toolbar for customizable themes ([dca0e33](https://github.com/plait-board/drawnix/commit/dca0e33))
|
| 175 |
+
- **toolbar:** support zoom toolbar ([76ef5d9](https://github.com/plait-board/drawnix/commit/76ef5d9))
|
| 176 |
+
- **web:** seo ([84cde4b](https://github.com/plait-board/drawnix/commit/84cde4b))
|
| 177 |
+
- **web:** add cloud.umami.is to track views ([#64](https://github.com/plait-board/drawnix/pull/64))
|
| 178 |
+
- **web:** modify initialize-data for adding freehand data ([#65](https://github.com/plait-board/drawnix/pull/65))
|
| 179 |
+
- **web:** add debug console ([#83](https://github.com/plait-board/drawnix/pull/83))
|
| 180 |
+
- **wrapper:** add wrapper component and context hook ([#6](https://github.com/plait-board/drawnix/pull/6))
|
| 181 |
+
- **zoom-toolbar:** support zoom menu ([cc6a6b8](https://github.com/plait-board/drawnix/commit/cc6a6b8))
|
| 182 |
+
|
| 183 |
+
### 🩹 Fixes
|
| 184 |
+
|
| 185 |
+
- remove theme-toolbar font-weight style ([#67](https://github.com/plait-board/drawnix/pull/67))
|
| 186 |
+
- revert package lock ([1aa9d42](https://github.com/plait-board/drawnix/commit/1aa9d42))
|
| 187 |
+
- fix pub issue ([156abcb](https://github.com/plait-board/drawnix/commit/156abcb))
|
| 188 |
+
- improve libs build ([9ddb6d9](https://github.com/plait-board/drawnix/commit/9ddb6d9))
|
| 189 |
+
- **app-toolbar:** correct app-toolbar style ([#106](https://github.com/plait-board/drawnix/pull/106))
|
| 190 |
+
- **arrow-line:** optimize the popup toolbar position when selected element is arrow line ([#70](https://github.com/plait-board/drawnix/pull/70))
|
| 191 |
+
- **board:** resolve mobile scrolling issue when resize or moving ([8fdca8e](https://github.com/plait-board/drawnix/commit/8fdca8e))
|
| 192 |
+
- **board:** bump plait into 0.69.1 deselect when text editing end refactor popup toolbar placement ([aef6d23](https://github.com/plait-board/drawnix/commit/aef6d23))
|
| 193 |
+
- **board:** use updateViewBox to fix board wobbles when dragging or resizing ([#94](https://github.com/plait-board/drawnix/pull/94))
|
| 194 |
+
- **color-picker:** support display 0 opacity ([#48](https://github.com/plait-board/drawnix/pull/48))
|
| 195 |
+
- **core:** bump plait into 0.79.1 to fix with-hand issue when press space key #141 ([#149](https://github.com/plait-board/drawnix/pull/149), [#141](https://github.com/plait-board/drawnix/issues/141))
|
| 196 |
+
- **creation-toolbar:** use pointerUp set basic pointer cause onChange do not fire on mobile bind pointermove/pointerup to viewportContainerRef to implement dnd on mobile #20 ([#20](https://github.com/plait-board/drawnix/issues/20))
|
| 197 |
+
- **creation-toolbar:** move out toolbar from board to avoid fired pointer down event when operating ([ddb6092](https://github.com/plait-board/drawnix/commit/ddb6092))
|
| 198 |
+
- **font-color:** fix color can not be assigned when current color is empty ([#55](https://github.com/plait-board/drawnix/pull/55))
|
| 199 |
+
- **freehand:** fix freehand creation issue(caused by throttleRAF) ([#40](https://github.com/plait-board/drawnix/pull/40))
|
| 200 |
+
- **mermaid:** bump mermaid-to-drawnix to 0.0.2 to fix text display issue ([33878d0](https://github.com/plait-board/drawnix/commit/33878d0))
|
| 201 |
+
- **mermaid-to-drawnix:** support group for insertToBoard ([e2f5056](https://github.com/plait-board/drawnix/commit/e2f5056))
|
| 202 |
+
- **mind:** remove branchColor property setting ([#46](https://github.com/plait-board/drawnix/pull/46))
|
| 203 |
+
- **property:** prevent set fill color opacity when color is none ([#56](https://github.com/plait-board/drawnix/pull/56))
|
| 204 |
+
- **react-board:** resolve text should not display in safari ([19fc20f](https://github.com/plait-board/drawnix/commit/19fc20f))
|
| 205 |
+
- **react-board:** support fit viewport after browser window resized ([96f4a0e](https://github.com/plait-board/drawnix/commit/96f4a0e))
|
| 206 |
+
- **size-slider:** correct size slider click handle can not fire ([#57](https://github.com/plait-board/drawnix/pull/57))
|
| 207 |
+
- **text:** fix composition input and abc input trembly issue ([#15](https://github.com/plait-board/drawnix/pull/15))
|
| 208 |
+
- **text:** resolve with-text build error ([#41](https://github.com/plait-board/drawnix/pull/41))
|
| 209 |
+
- **text:** fix text can not editing ([#52](https://github.com/plait-board/drawnix/pull/52))
|
| 210 |
+
- **text:** fix text can not display correctly on windows 10 chrome env #99 ([#100](https://github.com/plait-board/drawnix/pull/100), [#99](https://github.com/plait-board/drawnix/issues/99))
|
| 211 |
+
- **text:** allow scroll to show all text ([#156](https://github.com/plait-board/drawnix/pull/156))
|
| 212 |
+
- **text:** set whiteSpace: pre to avoid \n is ineffectual ([#165](https://github.com/plait-board/drawnix/pull/165))
|
| 213 |
+
- **use-board-event:** fix board event timing ([0d4a8f1](https://github.com/plait-board/drawnix/commit/0d4a8f1))
|
| 214 |
+
|
| 215 |
+
### ❤️ Thank You
|
| 216 |
+
|
| 217 |
+
- pubuzhixing8 @pubuzhixing8
|
| 218 |
+
|
| 219 |
+
## 0.0.4 (2025-04-15)
|
| 220 |
+
|
| 221 |
+
|
| 222 |
+
### 🚀 Features
|
| 223 |
+
|
| 224 |
+
- ci: a tiny docker image (#127) ([#122](https://github.com/plait-board/drawnix/pull/127))
|
| 225 |
+
- support save as json from hotkey ([120dffa](https://github.com/plait-board/drawnix/commit/120dffa))
|
| 226 |
+
- **app:** use localforage to storage main board content #122 ([#122](https://github.com/plait-board/drawnix/issues/122))
|
| 227 |
+
- **clean-board:** complete clean board ([#124](https://github.com/plait-board/drawnix/pull/124))
|
| 228 |
+
|
| 229 |
+
### 🩹 Fixes
|
| 230 |
+
|
| 231 |
+
- **react-board:** support fit viewport after browser window resized ([96f4a0e](https://github.com/plait-board/drawnix/commit/96f4a0e))
|
| 232 |
+
|
| 233 |
+
### ❤️ Thank You
|
| 234 |
+
|
| 235 |
+
- lurenyang418 @lurenyang418
|
| 236 |
+
- whyour @whyour
|
| 237 |
+
- pubuzhixing8 @pubuzhixing8
|
| 238 |
+
|
| 239 |
+
## 0.0.4-3 (2025-03-25)
|
| 240 |
+
|
| 241 |
+
|
| 242 |
+
### 🩹 Fixes
|
| 243 |
+
|
| 244 |
+
- improve libs build ([9ddb6d9](https://github.com/plait-board/drawnix/commit/9ddb6d9))
|
| 245 |
+
- **mermaid:** bump mermaid-to-drawnix to 0.0.2 to fix text display issue ([33878d0](https://github.com/plait-board/drawnix/commit/33878d0))
|
| 246 |
+
|
| 247 |
+
### ❤️ Thank You
|
| 248 |
+
|
| 249 |
+
- pubuzhixing8
|
| 250 |
+
|
| 251 |
+
## 0.0.4-2 (2025-03-19)
|
| 252 |
+
|
| 253 |
+
|
| 254 |
+
### 🚀 Features
|
| 255 |
+
|
| 256 |
+
- init dialog and mermaid-to-dialog ([6ff70b9](https://github.com/plait-board/drawnix/commit/6ff70b9))
|
| 257 |
+
- **mermaid:** improve mermaid-to-drawnix ([a928ba1](https://github.com/plait-board/drawnix/commit/a928ba1))
|
| 258 |
+
|
| 259 |
+
### ❤️ Thank You
|
| 260 |
+
|
| 261 |
+
- pubuzhixing8 @pubuzhixing8
|
| 262 |
+
|
| 263 |
+
## 0.0.4-1 (2025-03-16)
|
| 264 |
+
|
| 265 |
+
This was a version bump only, there were no code changes.
|
| 266 |
+
|
| 267 |
+
## 0.0.4-0 (2025-03-16)
|
| 268 |
+
|
| 269 |
+
|
| 270 |
+
### 🚀 Features
|
| 271 |
+
|
| 272 |
+
- add dependencies for packages ([6d89b32](https://github.com/plait-board/drawnix/commit/6d89b32))
|
| 273 |
+
- **component:** support update value from drawnix component outside ([#103](https://github.com/plait-board/drawnix/pull/103))
|
| 274 |
+
- **component:** fit viewport after children updated ([#104](https://github.com/plait-board/drawnix/pull/104))
|
| 275 |
+
- **drawnix:** export utils ([#105](https://github.com/plait-board/drawnix/pull/105))
|
| 276 |
+
|
| 277 |
+
### 🩹 Fixes
|
| 278 |
+
|
| 279 |
+
- **app-toolbar:** correct app-toolbar style ([#106](https://github.com/plait-board/drawnix/pull/106))
|
| 280 |
+
|
| 281 |
+
### ❤️ Thank You
|
| 282 |
+
|
| 283 |
+
- pubuzhixing8 @pubuzhixing8
|
| 284 |
+
|
| 285 |
+
## 0.0.3 (2025-03-14)
|
| 286 |
+
|
| 287 |
+
|
| 288 |
+
### 🩹 Fixes
|
| 289 |
+
|
| 290 |
+
- revert package lock ([1aa9d42](https://github.com/plait-board/drawnix/commit/1aa9d42))
|
| 291 |
+
- fix pub issue ([156abcb](https://github.com/plait-board/drawnix/commit/156abcb))
|
| 292 |
+
- **text:** fix text can not display correctly on windows 10 chrome env #99 ([#100](https://github.com/plait-board/drawnix/pull/100), [#99](https://github.com/plait-board/drawnix/issues/99))
|
| 293 |
+
|
| 294 |
+
### ❤️ Thank You
|
| 295 |
+
|
| 296 |
+
- pubuzhixing8 @pubuzhixing8
|
| 297 |
+
|
| 298 |
+
## 0.0.2 (2025-03-10)
|
| 299 |
+
|
| 300 |
+
|
| 301 |
+
### 🚀 Features
|
| 302 |
+
|
| 303 |
+
- improve README ([9e0190d](https://github.com/plait-board/drawnix/commit/9e0190d))
|
| 304 |
+
|
| 305 |
+
### ❤️ Thank You
|
| 306 |
+
|
| 307 |
+
- pubuzhixing8 @pubuzhixing8
|
| 308 |
+
|
| 309 |
+
## 0.0.1 (2025-03-10)
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
### 🚀 Features
|
| 313 |
+
|
| 314 |
+
- import styles ([ecfe3cd](https://github.com/plait-board/drawnix/commit/ecfe3cd))
|
| 315 |
+
- add script and update ci ([147c028](https://github.com/plait-board/drawnix/commit/147c028))
|
| 316 |
+
- bump plait into 0.62.0-next.7 ([7ab4003](https://github.com/plait-board/drawnix/commit/7ab4003))
|
| 317 |
+
- add main menu ([#14](https://github.com/plait-board/drawnix/pull/14))
|
| 318 |
+
- improve active-toolbar ([fd19725](https://github.com/plait-board/drawnix/commit/fd19725))
|
| 319 |
+
- rename active-toolbar to popup-toolbar and modify tool-button ([aa06c7e](https://github.com/plait-board/drawnix/commit/aa06c7e))
|
| 320 |
+
- support opacity for color property ([#16](https://github.com/plait-board/drawnix/pull/16))
|
| 321 |
+
- support local storage ([9c0e652](https://github.com/plait-board/drawnix/commit/9c0e652))
|
| 322 |
+
- add product_showcase bump plait into 0.69.0 ([61fe571](https://github.com/plait-board/drawnix/commit/61fe571))
|
| 323 |
+
- add sitemap ([3b9d9a3](https://github.com/plait-board/drawnix/commit/3b9d9a3))
|
| 324 |
+
- improve pinch zoom ([#77](https://github.com/plait-board/drawnix/pull/77))
|
| 325 |
+
- bump plait into 0.76.0 and handle break changes ([#90](https://github.com/plait-board/drawnix/pull/90))
|
| 326 |
+
- **active-toolbar:** add active toolbar ([7e737a2](https://github.com/plait-board/drawnix/commit/7e737a2))
|
| 327 |
+
- **active-toolbar:** support font color property ([4b2d964](https://github.com/plait-board/drawnix/commit/4b2d964))
|
| 328 |
+
- **app-toolbar:** support undo/redo operation ([50f8831](https://github.com/plait-board/drawnix/commit/50f8831))
|
| 329 |
+
- **app-toolbar:** add trash and duplicate in app-toolbar ([#28](https://github.com/plait-board/drawnix/pull/28))
|
| 330 |
+
- **color-picker:** support merge operations for update opacity #4 ([#45](https://github.com/plait-board/drawnix/pull/45), [#4](https://github.com/plait-board/drawnix/issues/4))
|
| 331 |
+
- **component:** improve the onXXXChange feature for drawnix component #79 ([#79](https://github.com/plait-board/drawnix/issues/79))
|
| 332 |
+
- **component:** add afterInit to expose board instance ([23d91dc](https://github.com/plait-board/drawnix/commit/23d91dc))
|
| 333 |
+
- **creation-toolbar:** support long-press triggers drag selection an… ([#78](https://github.com/plait-board/drawnix/pull/78))
|
| 334 |
+
- **draw:** bump plait into 0.75.0-next.0 and support fine-grained selection ([#69](https://github.com/plait-board/drawnix/pull/69))
|
| 335 |
+
- **draw-toolbar:** add draw toolbar ([#9](https://github.com/plait-board/drawnix/pull/9))
|
| 336 |
+
- **draw-toolbar:** add shape and arrow panel for draw-toolbar #10 ([#12](https://github.com/plait-board/drawnix/pull/12), [#10](https://github.com/plait-board/drawnix/issues/10))
|
| 337 |
+
- **drawnix:** init drawnix package ([397d865](https://github.com/plait-board/drawnix/commit/397d865))
|
| 338 |
+
- **drawnix-board:** initialize drawnix board ([117e5a8](https://github.com/plait-board/drawnix/commit/117e5a8))
|
| 339 |
+
- **fill:** split fill color and fill opacity setting ([#53](https://github.com/plait-board/drawnix/pull/53))
|
| 340 |
+
- **flowchart:** add terminal shape element ([#80](https://github.com/plait-board/drawnix/pull/80))
|
| 341 |
+
- **freehand:** initialize freehand #2 ([#2](https://github.com/plait-board/drawnix/issues/2))
|
| 342 |
+
- **freehand:** apply gaussianSmooth to freehand curve ([#47](https://github.com/plait-board/drawnix/pull/47))
|
| 343 |
+
- **freehand:** update stroke width to 2 and optimize freehand end points ([#50](https://github.com/plait-board/drawnix/pull/50))
|
| 344 |
+
- **freehand:** improve freehand experience ([#51](https://github.com/plait-board/drawnix/pull/51))
|
| 345 |
+
- **freehand:** add FreehandSmoother to optimize freehand curve ([#62](https://github.com/plait-board/drawnix/pull/62))
|
| 346 |
+
- **freehand:** optimize freehand curve by stylus features ([#63](https://github.com/plait-board/drawnix/pull/63))
|
| 347 |
+
- **freehand:** freehand support theme ([b7c7965](https://github.com/plait-board/drawnix/commit/b7c7965))
|
| 348 |
+
- **freehand:** support closed freehand and add popup for freehand ([#68](https://github.com/plait-board/drawnix/pull/68))
|
| 349 |
+
- **freehand:** bump plait into 0.75.0-next.9 and resolve freehand unexpected resize-handle after moving freehand elements ([#84](https://github.com/plait-board/drawnix/pull/84))
|
| 350 |
+
- **hotkey:** support export png hotkey ([#30](https://github.com/plait-board/drawnix/pull/30))
|
| 351 |
+
- **image:** support free image element and support insert image at m… ([#95](https://github.com/plait-board/drawnix/pull/95))
|
| 352 |
+
- **image:** should hide popup toolbar when selected element include image ([#96](https://github.com/plait-board/drawnix/pull/96))
|
| 353 |
+
- **menu:** support export to json file ([d0d6ca5](https://github.com/plait-board/drawnix/commit/d0d6ca5))
|
| 354 |
+
- **menu:** support load file action ([758aa6d](https://github.com/plait-board/drawnix/commit/758aa6d))
|
| 355 |
+
- **mobile:** adapt mobile device ([7c0742f](https://github.com/plait-board/drawnix/commit/7c0742f))
|
| 356 |
+
- **pencil-mode:** add pencil mode and add drawnix context ([#76](https://github.com/plait-board/drawnix/pull/76))
|
| 357 |
+
- **pinch-zoom:** support pinch zoom for touch device ([#60](https://github.com/plait-board/drawnix/pull/60))
|
| 358 |
+
- **pinch-zoom:** improve pinch zoom functionality and support hand moving ([#75](https://github.com/plait-board/drawnix/pull/75))
|
| 359 |
+
- **popover:** add reusable popover and replace radix popover ([d30388a](https://github.com/plait-board/drawnix/commit/d30388a))
|
| 360 |
+
- **popup:** display icon when color is complete opacity ([#42](https://github.com/plait-board/drawnix/pull/42))
|
| 361 |
+
- **popup-toolbar:** support set branch color remove color property when select transparent #17 ([#17](https://github.com/plait-board/drawnix/issues/17))
|
| 362 |
+
- **popup-toolbar:** bump plait into 0.71.0 and mind node link stroke and node stroke support dashed/dotted style #22 ([#22](https://github.com/plait-board/drawnix/issues/22))
|
| 363 |
+
- **property:** support stroke style setting ([463c92a](https://github.com/plait-board/drawnix/commit/463c92a))
|
| 364 |
+
- **size-slider:** improve size-slider component ([780be9d](https://github.com/plait-board/drawnix/commit/780be9d))
|
| 365 |
+
- **text:** support soft break ([#39](https://github.com/plait-board/drawnix/pull/39))
|
| 366 |
+
- **text:** support update text from outside ([#58](https://github.com/plait-board/drawnix/pull/58))
|
| 367 |
+
- **theme-toolbar:** add theme selection toolbar for customizable themes ([dca0e33](https://github.com/plait-board/drawnix/commit/dca0e33))
|
| 368 |
+
- **toolbar:** support zoom toolbar ([76ef5d9](https://github.com/plait-board/drawnix/commit/76ef5d9))
|
| 369 |
+
- **web:** seo ([84cde4b](https://github.com/plait-board/drawnix/commit/84cde4b))
|
| 370 |
+
- **web:** add cloud.umami.is to track views ([#64](https://github.com/plait-board/drawnix/pull/64))
|
| 371 |
+
- **web:** modify initialize-data for adding freehand data ([#65](https://github.com/plait-board/drawnix/pull/65))
|
| 372 |
+
- **web:** add debug console ([#83](https://github.com/plait-board/drawnix/pull/83))
|
| 373 |
+
- **wrapper:** add wrapper component and context hook ([#6](https://github.com/plait-board/drawnix/pull/6))
|
| 374 |
+
- **zoom-toolbar:** support zoom menu ([cc6a6b8](https://github.com/plait-board/drawnix/commit/cc6a6b8))
|
| 375 |
+
|
| 376 |
+
### 🩹 Fixes
|
| 377 |
+
|
| 378 |
+
- remove theme-toolbar font-weight style ([#67](https://github.com/plait-board/drawnix/pull/67))
|
| 379 |
+
- **arrow-line:** optimize the popup toolbar position when selected element is arrow line ([#70](https://github.com/plait-board/drawnix/pull/70))
|
| 380 |
+
- **board:** resolve mobile scrolling issue when resize or moving ([8fdca8e](https://github.com/plait-board/drawnix/commit/8fdca8e))
|
| 381 |
+
- **board:** bump plait into 0.69.1 deselect when text editing end refactor popup toolbar placement ([aef6d23](https://github.com/plait-board/drawnix/commit/aef6d23))
|
| 382 |
+
- **board:** use updateViewBox to fix board wobbles when dragging or resizing ([#94](https://github.com/plait-board/drawnix/pull/94))
|
| 383 |
+
- **color-picker:** support display 0 opacity ([#48](https://github.com/plait-board/drawnix/pull/48))
|
| 384 |
+
- **creation-toolbar:** use pointerUp set basic pointer cause onChange do not fire on mobile bind pointermove/pointerup to viewportContainerRef to implement dnd on mobile #20 ([#20](https://github.com/plait-board/drawnix/issues/20))
|
| 385 |
+
- **creation-toolbar:** move out toolbar from board to avoid fired pointer down event when operating ([ddb6092](https://github.com/plait-board/drawnix/commit/ddb6092))
|
| 386 |
+
- **font-color:** fix color can not be assigned when current color is empty ([#55](https://github.com/plait-board/drawnix/pull/55))
|
| 387 |
+
- **freehand:** fix freehand creation issue(caused by throttleRAF) ([#40](https://github.com/plait-board/drawnix/pull/40))
|
| 388 |
+
- **mind:** remove branchColor property setting ([#46](https://github.com/plait-board/drawnix/pull/46))
|
| 389 |
+
- **property:** prevent set fill color opacity when color is none ([#56](https://github.com/plait-board/drawnix/pull/56))
|
| 390 |
+
- **react-board:** resolve text should not display in safari ([19fc20f](https://github.com/plait-board/drawnix/commit/19fc20f))
|
| 391 |
+
- **size-slider:** correct size slider click handle can not fire ([#57](https://github.com/plait-board/drawnix/pull/57))
|
| 392 |
+
- **text:** fix composition input and abc input trembly issue ([#15](https://github.com/plait-board/drawnix/pull/15))
|
| 393 |
+
- **text:** resolve with-text build error ([#41](https://github.com/plait-board/drawnix/pull/41))
|
| 394 |
+
- **text:** fix text can not editing ([#52](https://github.com/plait-board/drawnix/pull/52))
|
| 395 |
+
- **use-board-event:** fix board event timing ([0d4a8f1](https://github.com/plait-board/drawnix/commit/0d4a8f1))
|
| 396 |
+
|
| 397 |
+
### ❤️ Thank You
|
| 398 |
+
|
| 399 |
+
- pubuzhixing8 @pubuzhixing8
|
Dockerfile
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM node:20 AS builder
|
| 2 |
+
|
| 3 |
+
WORKDIR /builder
|
| 4 |
+
|
| 5 |
+
COPY . /builder
|
| 6 |
+
|
| 7 |
+
RUN npm install \
|
| 8 |
+
&& npm run build
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
FROM lipanski/docker-static-website:2.4.0
|
| 12 |
+
|
| 13 |
+
WORKDIR /home/static
|
| 14 |
+
|
| 15 |
+
COPY --from=builder /builder/dist/apps/web/ /home/static
|
| 16 |
+
|
| 17 |
+
EXPOSE 7860
|
| 18 |
+
|
| 19 |
+
CMD ["/busybox-httpd", "-f", "-v", "-p", "7860", "-c", "httpd.conf"]
|
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2024 Drawnix
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Mindmap
|
| 3 |
-
emoji: 💻
|
| 4 |
-
colorFrom: gray
|
| 5 |
-
colorTo: red
|
| 6 |
-
sdk: docker
|
| 7 |
-
pinned: false
|
| 8 |
-
---
|
| 9 |
-
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Mindmap
|
| 3 |
+
emoji: 💻
|
| 4 |
+
colorFrom: gray
|
| 5 |
+
colorTo: red
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
README_en.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<p align="center">
|
| 2 |
+
<picture style="width: 320px">
|
| 3 |
+
<source media="(prefers-color-scheme: light)" srcset="https://github.com/plait-board/drawnix/blob/develop/apps/web/public/logo/logo_drawnix_h.svg?raw=true" />
|
| 4 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/plait-board/drawnix/blob/develop/apps/web/public/logo/logo_drawnix_h_dark.svg?raw=true" />
|
| 5 |
+
<img src="https://github.com/plait-board/drawnix/blob/develop/apps/web/public/logo/logo_drawnix_h.svg?raw=true" width="360" alt="Drawnix logo and name" />
|
| 6 |
+
</picture>
|
| 7 |
+
</p>
|
| 8 |
+
<div align="center">
|
| 9 |
+
<h2>
|
| 10 |
+
Open-source whiteboard tool (SaaS), an all-in-one collaborative canvas that includes mind mapping, flowcharts, freehand and more.
|
| 11 |
+
<br />
|
| 12 |
+
</h2>
|
| 13 |
+
</div>
|
| 14 |
+
|
| 15 |
+
<div align="center">
|
| 16 |
+
<figure>
|
| 17 |
+
<a target="_blank" rel="noopener">
|
| 18 |
+
<img src="https://github.com/plait-board/drawnix/blob/develop/apps/web/public/product_showcase/case-2.png" alt="Product showcase" width="80%" />
|
| 19 |
+
</a>
|
| 20 |
+
<figcaption>
|
| 21 |
+
<p align="center">
|
| 22 |
+
Whiteboard with mind mapping, flowcharts, freehand drawing and more
|
| 23 |
+
</p>
|
| 24 |
+
</figcaption>
|
| 25 |
+
</figure>
|
| 26 |
+
<a href="https://hellogithub.com/repository/plait-board/drawnix" target="_blank">
|
| 27 |
+
<picture style="width: 250">
|
| 28 |
+
<source media="(prefers-color-scheme: light)" srcset="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=4dcea807fab7468a962c153b07ae4e4e&claim_uid=zmFSY5k8EuZri43&theme=neutral" />
|
| 29 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=4dcea807fab7468a962c153b07ae4e4e&claim_uid=zmFSY5k8EuZri43&theme=dark" />
|
| 30 |
+
<img src="https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=4dcea807fab7468a962c153b07ae4e4e&claim_uid=zmFSY5k8EuZri43&theme=neutral" alt="Featured|HelloGitHub" style="width: 250px; height: 54px;" width="250" height="54"/>
|
| 31 |
+
</picture>
|
| 32 |
+
</a>
|
| 33 |
+
|
| 34 |
+
<br />
|
| 35 |
+
|
| 36 |
+
<a href="https://trendshift.io/repositories/13979" target="_blank"><img src="https://trendshift.io/api/badge/repositories/13979" alt="plait-board%2Fdrawnix | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
|
| 37 |
+
</div>
|
| 38 |
+
|
| 39 |
+
[*中文*](https://github.com/plait-board/drawnix/blob/develop/README.md)
|
| 40 |
+
|
| 41 |
+
## Features
|
| 42 |
+
|
| 43 |
+
- 💯 Free and Open Source
|
| 44 |
+
- ⚒️ Mind Maps and Flowcharts
|
| 45 |
+
- 🖌 Freehand
|
| 46 |
+
- 😀 Image Support
|
| 47 |
+
- 🚀 Plugin-based Architecture - Extensible
|
| 48 |
+
- 🖼️ 📃 Export to PNG, JPG, JSON(.drawnix)
|
| 49 |
+
- 💾 Auto-save (Browser Storage)
|
| 50 |
+
- ⚡ Edit Features: Undo, Redo, Copy, Paste, etc.
|
| 51 |
+
- 🌌 Infinite Canvas: Zoom, Pan
|
| 52 |
+
- 🎨 Theme Support
|
| 53 |
+
- 📱 Mobile-friendly
|
| 54 |
+
- 📈 Support mermaid syntax conversion to flowchart
|
| 55 |
+
- ✨ Support markdown text conversion to mind map(New 🔥🔥🔥)
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
## About the Name
|
| 59 |
+
|
| 60 |
+
***Drawnix*** is born from the interweaving of ***Draw*** and ***Phoenix***, a fusion of artistic inspiration.
|
| 61 |
+
|
| 62 |
+
The *Phoenix* symbolizes endless creativity, while *Draw* represents humanity's most fundamental form of expression. Here, each creation is an artistic rebirth, every stroke a renaissance of inspiration.
|
| 63 |
+
|
| 64 |
+
Like a Phoenix, creativity must rise from the flames to be reborn, and ***Drawnix*** stands as the guardian of both technical and creative fire.
|
| 65 |
+
|
| 66 |
+
*Draw Beyond, Rise Above.*
|
| 67 |
+
|
| 68 |
+
## About Plait Drawing Framework
|
| 69 |
+
|
| 70 |
+
*Drawnix* is positioned as an out-of-the-box, *open-source*, and free tool product. It is built on top of the *Plait* framework, which is our company's *open-source* drawing framework representing significant technical accumulation in knowledge base products([PingCode Wiki](https://pingcode.com/product/wiki?utm_source=drawnix)).
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
*Drawnix* uses a *plugin architecture*, which is technically more complex than the previously mentioned *open-source* tools. However, this *plugin architecture* has its advantages: it supports multiple *UI frameworks* (*Angular*, *React*), integrates with different *rich text frameworks* (currently only supporting *Slate* framework), enables better business layer separation in development, allows development of various fine-grained reusable plugins, and can expand to more whiteboard application scenarios.
|
| 74 |
+
|
| 75 |
+
## Repository Structure
|
| 76 |
+
|
| 77 |
+
```
|
| 78 |
+
drawnix/
|
| 79 |
+
├── apps/
|
| 80 |
+
│ ├── web # drawnix.com
|
| 81 |
+
│ │ └── index.html # HTML
|
| 82 |
+
├── dist/ # Build artifacts
|
| 83 |
+
├── packages/
|
| 84 |
+
│ └── drawnix/ # Whiteboard application core
|
| 85 |
+
│ └── react-board/ # Whiteboard react view layer
|
| 86 |
+
│ └── react-text/ # Text rendering module
|
| 87 |
+
├── package.json
|
| 88 |
+
├── ...
|
| 89 |
+
└── README.md
|
| 90 |
+
└── README_en.md
|
| 91 |
+
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
## Try It Out
|
| 95 |
+
|
| 96 |
+
*https://drawnix.com* is the minimal application of *drawnix*.
|
| 97 |
+
|
| 98 |
+
I will be iterating frequently on *drawnix.com* until the release of the *Dawn* version.
|
| 99 |
+
|
| 100 |
+
|
| 101 |
+
## Development
|
| 102 |
+
|
| 103 |
+
```
|
| 104 |
+
npm install
|
| 105 |
+
|
| 106 |
+
npm run start
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
## Docker
|
| 110 |
+
|
| 111 |
+
```
|
| 112 |
+
docker pull pubuzhixing/drawnix:latest
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
## Dependencies
|
| 116 |
+
|
| 117 |
+
- [plait](https://github.com/worktile/plait) - Open source drawing framework
|
| 118 |
+
- [slate](https://github.com/ianstormtaylor/slate) - Rich text editor framework
|
| 119 |
+
- [floating-ui](https://github.com/floating-ui/floating-ui) - An awesome library for creating floating UI elements
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
## Contributing
|
| 123 |
+
|
| 124 |
+
Any form of contribution is welcome:
|
| 125 |
+
|
| 126 |
+
- Report bugs
|
| 127 |
+
|
| 128 |
+
- Contribute code
|
| 129 |
+
|
| 130 |
+
## Thank you for supporting
|
| 131 |
+
|
| 132 |
+
Special thanks to the company for its strong support for open source projects, and also to the friends who contributed code and provided suggestions to this project.
|
| 133 |
+
|
| 134 |
+
<p align="left">
|
| 135 |
+
<a href="https://pingcode.com?utm_source=drawnix" target="_blank">
|
| 136 |
+
<img src="https://cdn-aliyun.pingcode.com/static/site/img/pingcode-logo.4267e7b.svg" width="120" alt="PingCode" />
|
| 137 |
+
</a>
|
| 138 |
+
</p>
|
| 139 |
+
|
| 140 |
+
## License
|
| 141 |
+
|
| 142 |
+
[MIT License](https://github.com/plait-board/drawnix/blob/master/LICENSE)
|
SECURITY.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Security Policy
|
| 2 |
+
|
| 3 |
+
## Reporting a Vulnerability
|
| 4 |
+
|
| 5 |
+
We have an official discord server for discussing and reporting about Drawnix.
|
| 6 |
+
Please contact pubuzhixing in the server if the valnerability is confidential and critical.
|
| 7 |
+
[Discord Server Link](https://discord.gg/5d9undgnsP)
|
apps/web-e2e/.eslintrc.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": ["plugin:playwright/recommended", "../../.eslintrc.json"],
|
| 3 |
+
"ignorePatterns": ["!**/*"],
|
| 4 |
+
"overrides": [
|
| 5 |
+
{
|
| 6 |
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
| 7 |
+
"rules": {}
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"files": ["*.ts", "*.tsx"],
|
| 11 |
+
"rules": {}
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"files": ["*.js", "*.jsx"],
|
| 15 |
+
"rules": {}
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"files": ["src/**/*.{ts,js,tsx,jsx}"],
|
| 19 |
+
"rules": {}
|
| 20 |
+
}
|
| 21 |
+
]
|
| 22 |
+
}
|
apps/web-e2e/playwright.config.ts
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { defineConfig, devices } from '@playwright/test';
|
| 2 |
+
import { nxE2EPreset } from '@nx/playwright/preset';
|
| 3 |
+
|
| 4 |
+
import { workspaceRoot } from '@nx/devkit';
|
| 5 |
+
|
| 6 |
+
// For CI, you may want to set BASE_URL to the deployed application.
|
| 7 |
+
const baseURL = process.env['BASE_URL'] || 'http://localhost:7200';
|
| 8 |
+
|
| 9 |
+
/**
|
| 10 |
+
* Read environment variables from file.
|
| 11 |
+
* https://github.com/motdotla/dotenv
|
| 12 |
+
*/
|
| 13 |
+
// require('dotenv').config();
|
| 14 |
+
|
| 15 |
+
/**
|
| 16 |
+
* See https://playwright.dev/docs/test-configuration.
|
| 17 |
+
*/
|
| 18 |
+
export default defineConfig({
|
| 19 |
+
...nxE2EPreset(__filename, { testDir: './src' }),
|
| 20 |
+
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
| 21 |
+
use: {
|
| 22 |
+
baseURL,
|
| 23 |
+
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
| 24 |
+
trace: 'on-first-retry',
|
| 25 |
+
},
|
| 26 |
+
/* Run your local dev server before starting the tests */
|
| 27 |
+
webServer: {
|
| 28 |
+
command: 'npx nx serve web',
|
| 29 |
+
url: 'http://localhost:7200',
|
| 30 |
+
reuseExistingServer: !process.env.CI,
|
| 31 |
+
cwd: workspaceRoot,
|
| 32 |
+
},
|
| 33 |
+
projects: [
|
| 34 |
+
{
|
| 35 |
+
name: 'chromium',
|
| 36 |
+
use: { ...devices['Desktop Chrome'] },
|
| 37 |
+
},
|
| 38 |
+
|
| 39 |
+
{
|
| 40 |
+
name: 'firefox',
|
| 41 |
+
use: { ...devices['Desktop Firefox'] },
|
| 42 |
+
},
|
| 43 |
+
|
| 44 |
+
{
|
| 45 |
+
name: 'webkit',
|
| 46 |
+
use: { ...devices['Desktop Safari'] },
|
| 47 |
+
},
|
| 48 |
+
|
| 49 |
+
// Uncomment for mobile browsers support
|
| 50 |
+
/* {
|
| 51 |
+
name: 'Mobile Chrome',
|
| 52 |
+
use: { ...devices['Pixel 5'] },
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
name: 'Mobile Safari',
|
| 56 |
+
use: { ...devices['iPhone 12'] },
|
| 57 |
+
}, */
|
| 58 |
+
|
| 59 |
+
// Uncomment for branded browsers
|
| 60 |
+
/* {
|
| 61 |
+
name: 'Microsoft Edge',
|
| 62 |
+
use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
name: 'Google Chrome',
|
| 66 |
+
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
|
| 67 |
+
}, */
|
| 68 |
+
],
|
| 69 |
+
});
|
apps/web-e2e/project.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "web-e2e",
|
| 3 |
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
| 4 |
+
"projectType": "application",
|
| 5 |
+
"sourceRoot": "apps/web-e2e/src",
|
| 6 |
+
"implicitDependencies": ["web"],
|
| 7 |
+
"// targets": "to see all targets run: nx show project web-e2e --web",
|
| 8 |
+
"targets": {}
|
| 9 |
+
}
|
apps/web-e2e/src/example.spec.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { test, expect } from '@playwright/test';
|
| 2 |
+
|
| 3 |
+
test('has title', async ({ page }) => {
|
| 4 |
+
await page.goto('/');
|
| 5 |
+
|
| 6 |
+
// Expect h1 to contain a substring.
|
| 7 |
+
expect(await page.title()).toContain('Drawnix - 开源白板工具');
|
| 8 |
+
expect(page.locator('drawnix')).toBeTruthy();
|
| 9 |
+
});
|
apps/web-e2e/tsconfig.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": "../../tsconfig.base.json",
|
| 3 |
+
"compilerOptions": {
|
| 4 |
+
"allowJs": true,
|
| 5 |
+
"outDir": "../../dist/out-tsc",
|
| 6 |
+
"module": "commonjs",
|
| 7 |
+
"sourceMap": false
|
| 8 |
+
},
|
| 9 |
+
"include": [
|
| 10 |
+
"**/*.ts",
|
| 11 |
+
"**/*.js",
|
| 12 |
+
"playwright.config.ts",
|
| 13 |
+
"src/**/*.spec.ts",
|
| 14 |
+
"src/**/*.spec.js",
|
| 15 |
+
"src/**/*.test.ts",
|
| 16 |
+
"src/**/*.test.js",
|
| 17 |
+
"src/**/*.d.ts"
|
| 18 |
+
]
|
| 19 |
+
}
|
apps/web/.eslintrc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
|
| 3 |
+
"ignorePatterns": ["!**/*"],
|
| 4 |
+
"overrides": [
|
| 5 |
+
{
|
| 6 |
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
| 7 |
+
"rules": {}
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"files": ["*.ts", "*.tsx"],
|
| 11 |
+
"rules": {}
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"files": ["*.js", "*.jsx"],
|
| 15 |
+
"rules": {}
|
| 16 |
+
}
|
| 17 |
+
]
|
| 18 |
+
}
|
apps/web/index.html
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="zh-CN">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<!-- 基本 SEO Meta 标签 (中文) -->
|
| 6 |
+
<title>Drawnix - 开源白板工具</title>
|
| 7 |
+
<meta name="description" content="Drawnix 是一款强大的开源白板工具(https://github.com/plait-board/drawnix),集成思维导图、流程图等功能。基于 Plait 框架开发,支持插件扩展,提供自动保存、无限画布等特性。Draw Beyond, Rise Above.">
|
| 8 |
+
<meta name="keywords" content="Drawnix,白板工具,白板,思维导图,流程图,开源白板,开源思维导图,在线绘图,在线白板,协作工具,协作白板,Plait 框架">
|
| 9 |
+
<!-- 基本 SEO Meta 标签 (English) -->
|
| 10 |
+
<meta name="description" lang="en" content="Drawnix is a powerful open-source whiteboard tool featuring mind mapping and flowchart capabilities. Built on the Plait framework, it offers plugin extensibility, auto-save, infinite canvas, and more. Draw Beyond, Rise Above.">
|
| 11 |
+
<meta name="keywords" lang="en" content="Drawnix,whiteboard tool, whiteboard,mind mapping,flowchart,open source whiteboard, open source mind mapping,online drawing,collaboration tool, collaboration whiteboard,Plait framework">
|
| 12 |
+
<!-- 基本 SEO Meta 标签 (Русский) -->
|
| 13 |
+
<meta name="description" lang="ru" content="Drawnix — это виртуальная доска с открытым исходным кодом, позволяющая строить mind-карты и блок-схемы. Написанный на основе фреймворка Plait, он имеет возможности расширения плагинами, автосохранения, бесконечного холта и многое другое. Draw Beyond, Rise Above.">
|
| 14 |
+
<meta name="keywords" lang="ru" content="Drawnix,доска,виртуальная доска,mind-карты,интеллект-карты,карты мыслей,блоксхемы,блок-схемы,open source доска,доска с открытым кодом,open source mind-карты,mind-карты с открытым кодом,онлайн-рисование,рисовалка онлайн,совместная работа,доска для совместной работы,электронная доска для совместной работы,Plait framework,фреймворк Plait">
|
| 15 |
+
<!-- Open Graph Meta 标签 (中文) -->
|
| 16 |
+
<meta property="og:title" content="Drawnix - 开源白板工具 | 思维导图 | 流程图 | 白板 | 协作白板">
|
| 17 |
+
<meta property="og:description" content="一体化开源白板工具(在线白板 | 协作白板),支持思维导图、流程图,基于 Plait 框架开发">
|
| 18 |
+
<meta property="og:type" content="website">
|
| 19 |
+
<meta property="og:url" content="https://drawnix.com">
|
| 20 |
+
<meta property="og:site_name" content="Drawnix">
|
| 21 |
+
<!-- Open Graph Meta 标签 (English) -->
|
| 22 |
+
<meta property="og:title" lang="en" content="Drawnix - Open Source Whiteboard | Mind Mapping | Flowchart | Whiteboard | Collaboration Whiteboard">
|
| 23 |
+
<meta property="og:description" lang="en" content="An integrated open-source whiteboard tool(online whiteboard | collaboration whiteboard) supporting mind mapping and flowcharts, built on the Plait framework">
|
| 24 |
+
<!-- Open Graph Meta 标签 (Русский) -->
|
| 25 |
+
<meta property="og:title" lang="ru" content="Drawnix - Доска с открытым кодом | Mind-карты | Блок-схемы | Электронная доска для совместной работы">
|
| 26 |
+
<meta property="og:description" lang="ru" content="Интегрированная доска с открытым исходным кодом (онлайн доска | доска для совеместной работы), поддерживающая создание mind-карт и блок-схем, построенная на основе фреймворка Plait">
|
| 27 |
+
<!-- Twitter Card Meta 标签 (English) -->
|
| 28 |
+
<meta name="twitter:card" content="summary_large_image">
|
| 29 |
+
<meta name="twitter:title" content="Drawnix - Open Source Whiteboard | Mind Mapping | Flowchart | Whiteboard | Collaboration Whiteboard">
|
| 30 |
+
<meta name="twitter:description" content="An integrated open-source whiteboard tool(online whiteboard | collaboration whiteboard) supporting mind mapping and flowcharts, built on the Plait framework">
|
| 31 |
+
<!-- 其他重要 Meta 标签 -->
|
| 32 |
+
<meta name="robots" content="index, follow">
|
| 33 |
+
<meta name="author" content="Drawnix Team">
|
| 34 |
+
<link rel="canonical" href="https://drawnix.com">
|
| 35 |
+
<!-- 语言替代链接 -->
|
| 36 |
+
<link rel="alternate" hreflang="zh-CN" href="https://drawnix.com">
|
| 37 |
+
<!-- <link rel="alternate" hreflang="en" href="https://drawnix.com/en"> -->
|
| 38 |
+
<!-- <link rel="alternate" hreflang="ru" href="https://drawnix.com/ru"> -->
|
| 39 |
+
<link rel="alternate" hreflang="x-default" href="https://drawnix.com">
|
| 40 |
+
<!-- 结构化数据 (JSON-LD) - 中英双语 -->
|
| 41 |
+
<script type="application/ld+json">
|
| 42 |
+
{
|
| 43 |
+
"@context": "https://schema.org",
|
| 44 |
+
"@type": "SoftwareApplication",
|
| 45 |
+
"name": "Drawnix",
|
| 46 |
+
"alternateName": ["开源白板工具", "Open Source Whiteboard Tool"],
|
| 47 |
+
"description": {
|
| 48 |
+
"zh-CN": "Drawnix 是一款强大的开源白板工具,集成思维导图、流程图等功能。基于 Plait 框架开发,支持插件扩展,提供自动保存、无限画布等特性。",
|
| 49 |
+
"en": "Drawnix is a powerful open-source whiteboard tool featuring mind mapping and flowchart capabilities. Built on the Plait framework, it offers plugin extensibility, auto-save, infinite canvas, and more.",
|
| 50 |
+
"ru": "Drawnix — это мощная виртуальная доска с открытым исходным кодом, позволяющая строить mind-карты и блок-схемы. Написанный на основе фреймворка Plait, он имеет возможности расширения плагинами, автосохранения, бесконечного холта и многое другое."
|
| 51 |
+
},
|
| 52 |
+
"url": "https://drawnix.com",
|
| 53 |
+
"applicationCategory": "DesignApplication",
|
| 54 |
+
"operatingSystem": "Any",
|
| 55 |
+
"offers": {
|
| 56 |
+
"@type": "Offer",
|
| 57 |
+
"price": "0",
|
| 58 |
+
"priceCurrency": "USD"
|
| 59 |
+
},
|
| 60 |
+
"creator": {
|
| 61 |
+
"@type": "Organization",
|
| 62 |
+
"name": "Drawnix Team"
|
| 63 |
+
},
|
| 64 |
+
"keywords": ["доска", "электронная доска", "mind-карты", "блок-схемы", "диаграммы", "whiteboard", "mind mapping", "flowchart", "open source", "思维导图", "流程图", "白板"],
|
| 65 |
+
"inLanguage": ["zh-CN", "en", "ru"],
|
| 66 |
+
"license": "https://github.com/plait-board/drawnix/blob/master/LICENSE"
|
| 67 |
+
}
|
| 68 |
+
</script>
|
| 69 |
+
<base href="/" />
|
| 70 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 71 |
+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
| 72 |
+
<link rel="stylesheet" href="/src/styles.scss" />
|
| 73 |
+
<script defer src="https://cloud.umami.is/script.js" data-website-id="7083aa92-85b1-4a67-a6d4-03d52819ba3d"></script>
|
| 74 |
+
</head>
|
| 75 |
+
<body>
|
| 76 |
+
<div id="root"></div>
|
| 77 |
+
<script type="module" src="/src/main.tsx"></script>
|
| 78 |
+
</body>
|
| 79 |
+
</html>
|
apps/web/jest.config.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-disable */
|
| 2 |
+
export default {
|
| 3 |
+
displayName: 'web',
|
| 4 |
+
preset: '../../jest.preset.js',
|
| 5 |
+
transform: {
|
| 6 |
+
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
|
| 7 |
+
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
|
| 8 |
+
},
|
| 9 |
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
| 10 |
+
coverageDirectory: '../../coverage/apps/web',
|
| 11 |
+
};
|
apps/web/project.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "web",
|
| 3 |
+
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
| 4 |
+
"sourceRoot": "apps/web/src",
|
| 5 |
+
"projectType": "application",
|
| 6 |
+
"tags": [],
|
| 7 |
+
"// targets": "to see all targets run: nx show project web --web",
|
| 8 |
+
"targets": {}
|
| 9 |
+
}
|
apps/web/public/_headers
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# 基本缓存配置
|
| 2 |
+
/*
|
| 3 |
+
Cache-Control: public, max-age=31536000, immutable
|
| 4 |
+
|
| 5 |
+
/*.html
|
| 6 |
+
Cache-Control: public, max-age=0, must-revalidate
|
| 7 |
+
|
| 8 |
+
/
|
| 9 |
+
Cache-Control: public, max-age=0, must-revalidate
|
apps/web/public/_redirects
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPA 路由支持
|
| 2 |
+
/* /index.html 200
|
apps/web/public/favicon.ico
ADDED
|
|
apps/web/public/logo/logo_drawnix_h.svg
ADDED
|
|
apps/web/public/logo/logo_drawnix_h_dark.svg
ADDED
|
|
apps/web/public/robots.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
id: robots-txt
|
| 2 |
+
name: Robots.txt
|
| 3 |
+
type: code.txt
|
| 4 |
+
content: |-
|
| 5 |
+
User-agent: *
|
| 6 |
+
Allow: /
|
| 7 |
+
|
| 8 |
+
# 禁止访问管理后台
|
| 9 |
+
Disallow: /admin/
|
| 10 |
+
Disallow: /private/
|
| 11 |
+
|
| 12 |
+
# 站点地图
|
| 13 |
+
Sitemap: https://drawnix.com/sitemap.xml
|
apps/web/public/sitemap.xml
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
| 3 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 4 |
+
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
| 5 |
+
<url>
|
| 6 |
+
<loc>https://drawnix.com/</loc>
|
| 7 |
+
<lastmod>2024-11-15</lastmod>
|
| 8 |
+
<changefreq>weekly</changefreq>
|
| 9 |
+
<priority>1.0</priority>
|
| 10 |
+
</url>
|
| 11 |
+
<url>
|
| 12 |
+
<loc>https://drawnix.com/en</loc>
|
| 13 |
+
<lastmod>2024-11-15</lastmod>
|
| 14 |
+
<changefreq>weekly</changefreq>
|
| 15 |
+
<priority>0.9</priority>
|
| 16 |
+
</url>
|
| 17 |
+
<url>
|
| 18 |
+
<loc>https://drawnix.com/docs</loc>
|
| 19 |
+
<lastmod>2024-11-15</lastmod>
|
| 20 |
+
<changefreq>weekly</changefreq>
|
| 21 |
+
<priority>0.8</priority>
|
| 22 |
+
</url>
|
| 23 |
+
<url>
|
| 24 |
+
<loc>https://drawnix.com/docs/getting-started</loc>
|
| 25 |
+
<lastmod>2024-11-15</lastmod>
|
| 26 |
+
<changefreq>monthly</changefreq>
|
| 27 |
+
<priority>0.7</priority>
|
| 28 |
+
</url>
|
| 29 |
+
</urlset>
|
apps/web/src/app/app.module.scss
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
/* Your styles goes here. */
|
apps/web/src/app/app.spec.tsx
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { render } from '@testing-library/react';
|
| 2 |
+
|
| 3 |
+
import App from './app';
|
| 4 |
+
|
| 5 |
+
describe('App', () => {
|
| 6 |
+
it('should render successfully', () => {
|
| 7 |
+
// const { baseElement } = render(<App />);
|
| 8 |
+
// expect(baseElement).toBeTruthy();
|
| 9 |
+
});
|
| 10 |
+
});
|
apps/web/src/app/app.tsx
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useState, useEffect } from 'react';
|
| 2 |
+
import { Drawnix } from '@drawnix/drawnix';
|
| 3 |
+
import { PlaitBoard, PlaitElement, PlaitTheme, Viewport } from '@plait/core';
|
| 4 |
+
import localforage from 'localforage';
|
| 5 |
+
|
| 6 |
+
type AppValue = {
|
| 7 |
+
children: PlaitElement[];
|
| 8 |
+
viewport?: Viewport;
|
| 9 |
+
theme?: PlaitTheme;
|
| 10 |
+
};
|
| 11 |
+
|
| 12 |
+
const MAIN_BOARD_CONTENT_KEY = 'main_board_content';
|
| 13 |
+
|
| 14 |
+
localforage.config({
|
| 15 |
+
name: 'Drawnix',
|
| 16 |
+
storeName: 'drawnix_store',
|
| 17 |
+
driver: [localforage.INDEXEDDB, localforage.LOCALSTORAGE],
|
| 18 |
+
});
|
| 19 |
+
|
| 20 |
+
export function App() {
|
| 21 |
+
const [value, setValue] = useState<AppValue>({ children: [] });
|
| 22 |
+
|
| 23 |
+
const [tutorial, setTutorial] = useState(false);
|
| 24 |
+
|
| 25 |
+
useEffect(() => {
|
| 26 |
+
const loadData = async () => {
|
| 27 |
+
const storedData = (await localforage.getItem(
|
| 28 |
+
MAIN_BOARD_CONTENT_KEY
|
| 29 |
+
)) as AppValue;
|
| 30 |
+
if (storedData) {
|
| 31 |
+
setValue(storedData);
|
| 32 |
+
if (storedData.children && storedData.children.length === 0) {
|
| 33 |
+
setTutorial(true);
|
| 34 |
+
}
|
| 35 |
+
return;
|
| 36 |
+
}
|
| 37 |
+
setTutorial(true);
|
| 38 |
+
};
|
| 39 |
+
loadData();
|
| 40 |
+
}, []);
|
| 41 |
+
return (
|
| 42 |
+
<Drawnix
|
| 43 |
+
value={value.children}
|
| 44 |
+
viewport={value.viewport}
|
| 45 |
+
theme={value.theme}
|
| 46 |
+
onChange={(value) => {
|
| 47 |
+
const newValue = value as AppValue;
|
| 48 |
+
localforage.setItem(MAIN_BOARD_CONTENT_KEY, newValue);
|
| 49 |
+
setValue(newValue);
|
| 50 |
+
if (newValue.children && newValue.children.length > 0) {
|
| 51 |
+
setTutorial(false);
|
| 52 |
+
}
|
| 53 |
+
}}
|
| 54 |
+
tutorial={tutorial}
|
| 55 |
+
afterInit={(board) => {
|
| 56 |
+
console.log('board initialized');
|
| 57 |
+
/*
|
| 58 |
+
console.log(
|
| 59 |
+
`add __drawnix__web__debug_log to window, so you can call add log anywhere, like: window.__drawnix__web__console('some thing')`
|
| 60 |
+
);
|
| 61 |
+
(window as any)['__drawnix__web__console'] = (value: string) => {
|
| 62 |
+
addDebugLog(board, value);
|
| 63 |
+
};
|
| 64 |
+
*/
|
| 65 |
+
}}
|
| 66 |
+
></Drawnix>
|
| 67 |
+
);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
const addDebugLog = (board: PlaitBoard, value: string) => {
|
| 71 |
+
const container = PlaitBoard.getBoardContainer(board).closest(
|
| 72 |
+
'.drawnix'
|
| 73 |
+
) as HTMLElement;
|
| 74 |
+
let consoleContainer = container.querySelector('.drawnix-console');
|
| 75 |
+
if (!consoleContainer) {
|
| 76 |
+
consoleContainer = document.createElement('div');
|
| 77 |
+
consoleContainer.classList.add('drawnix-console');
|
| 78 |
+
container.append(consoleContainer);
|
| 79 |
+
}
|
| 80 |
+
const div = document.createElement('div');
|
| 81 |
+
div.innerHTML = value;
|
| 82 |
+
consoleContainer.append(div);
|
| 83 |
+
};
|
| 84 |
+
|
| 85 |
+
export default App;
|
apps/web/src/assets/.gitkeep
ADDED
|
File without changes
|
apps/web/src/main.tsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { StrictMode } from 'react';
|
| 2 |
+
import * as ReactDOM from 'react-dom/client';
|
| 3 |
+
|
| 4 |
+
import App from './app/app';
|
| 5 |
+
|
| 6 |
+
const root = ReactDOM.createRoot(
|
| 7 |
+
document.getElementById('root') as HTMLElement
|
| 8 |
+
);
|
| 9 |
+
root.render(
|
| 10 |
+
<StrictMode>
|
| 11 |
+
<App />
|
| 12 |
+
</StrictMode>
|
| 13 |
+
);
|
apps/web/src/styles.scss
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* You can add global styles to this file, and also import other style files */
|
| 2 |
+
body {
|
| 3 |
+
margin: 0;
|
| 4 |
+
padding: 0;
|
| 5 |
+
}
|
| 6 |
+
html,
|
| 7 |
+
body {
|
| 8 |
+
height: 100%;
|
| 9 |
+
width: 100%;
|
| 10 |
+
overflow: hidden;
|
| 11 |
+
}
|
| 12 |
+
#root {
|
| 13 |
+
height: 100%;
|
| 14 |
+
width: 100%;
|
| 15 |
+
overflow: hidden;
|
| 16 |
+
}
|
| 17 |
+
.drawnix-console {
|
| 18 |
+
position: absolute;
|
| 19 |
+
top: 50%;
|
| 20 |
+
transform: translateY(-50%);
|
| 21 |
+
left: 0;
|
| 22 |
+
height: 200px;
|
| 23 |
+
width: 200px;
|
| 24 |
+
overflow: auto;
|
| 25 |
+
background-color: black;
|
| 26 |
+
color: white;
|
| 27 |
+
padding: 8px;
|
| 28 |
+
opacity: 0.5;
|
| 29 |
+
}
|
apps/web/tsconfig.app.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": "./tsconfig.json",
|
| 3 |
+
"compilerOptions": {
|
| 4 |
+
"outDir": "../../dist/out-tsc",
|
| 5 |
+
"types": [
|
| 6 |
+
"node",
|
| 7 |
+
"@nx/react/typings/cssmodule.d.ts",
|
| 8 |
+
"@nx/react/typings/image.d.ts",
|
| 9 |
+
"vite/client"
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
"exclude": [
|
| 13 |
+
"src/**/*.spec.ts",
|
| 14 |
+
"src/**/*.test.ts",
|
| 15 |
+
"src/**/*.spec.tsx",
|
| 16 |
+
"src/**/*.test.tsx",
|
| 17 |
+
"src/**/*.spec.js",
|
| 18 |
+
"src/**/*.test.js",
|
| 19 |
+
"src/**/*.spec.jsx",
|
| 20 |
+
"src/**/*.test.jsx"
|
| 21 |
+
],
|
| 22 |
+
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
|
| 23 |
+
}
|
apps/web/tsconfig.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"compilerOptions": {
|
| 3 |
+
"jsx": "react-jsx",
|
| 4 |
+
"allowJs": false,
|
| 5 |
+
"esModuleInterop": false,
|
| 6 |
+
"allowSyntheticDefaultImports": true,
|
| 7 |
+
"strict": true,
|
| 8 |
+
"types": ["vite/client"]
|
| 9 |
+
},
|
| 10 |
+
"files": [],
|
| 11 |
+
"include": [],
|
| 12 |
+
"references": [
|
| 13 |
+
{
|
| 14 |
+
"path": "./tsconfig.app.json"
|
| 15 |
+
},
|
| 16 |
+
{
|
| 17 |
+
"path": "./tsconfig.spec.json"
|
| 18 |
+
}
|
| 19 |
+
],
|
| 20 |
+
"extends": "../../tsconfig.base.json"
|
| 21 |
+
}
|
apps/web/tsconfig.spec.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": "./tsconfig.json",
|
| 3 |
+
"compilerOptions": {
|
| 4 |
+
"outDir": "../../dist/out-tsc",
|
| 5 |
+
"module": "commonjs",
|
| 6 |
+
"types": [
|
| 7 |
+
"jest",
|
| 8 |
+
"node",
|
| 9 |
+
"@nx/react/typings/cssmodule.d.ts",
|
| 10 |
+
"@nx/react/typings/image.d.ts"
|
| 11 |
+
]
|
| 12 |
+
},
|
| 13 |
+
"include": [
|
| 14 |
+
"jest.config.ts",
|
| 15 |
+
"src/**/*.test.ts",
|
| 16 |
+
"src/**/*.spec.ts",
|
| 17 |
+
"src/**/*.test.tsx",
|
| 18 |
+
"src/**/*.spec.tsx",
|
| 19 |
+
"src/**/*.test.js",
|
| 20 |
+
"src/**/*.spec.js",
|
| 21 |
+
"src/**/*.test.jsx",
|
| 22 |
+
"src/**/*.spec.jsx",
|
| 23 |
+
"src/**/*.d.ts"
|
| 24 |
+
]
|
| 25 |
+
}
|
apps/web/vite.config.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/// <reference types='vitest' />
|
| 2 |
+
import { defineConfig } from 'vite';
|
| 3 |
+
import react from '@vitejs/plugin-react';
|
| 4 |
+
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
| 5 |
+
|
| 6 |
+
export default defineConfig({
|
| 7 |
+
root: __dirname,
|
| 8 |
+
cacheDir: '../../node_modules/.vite/apps/web',
|
| 9 |
+
|
| 10 |
+
server: {
|
| 11 |
+
port: 7860,
|
| 12 |
+
host: 'localhost',
|
| 13 |
+
},
|
| 14 |
+
|
| 15 |
+
preview: {
|
| 16 |
+
port: 4300,
|
| 17 |
+
host: 'localhost',
|
| 18 |
+
},
|
| 19 |
+
|
| 20 |
+
plugins: [react(), nxViteTsPaths()],
|
| 21 |
+
|
| 22 |
+
// Uncomment this if you are using workers.
|
| 23 |
+
// worker: {
|
| 24 |
+
// plugins: [ nxViteTsPaths() ],
|
| 25 |
+
// },
|
| 26 |
+
|
| 27 |
+
build: {
|
| 28 |
+
outDir: '../../dist/apps/web',
|
| 29 |
+
emptyOutDir: true,
|
| 30 |
+
reportCompressedSize: true,
|
| 31 |
+
commonjsOptions: {
|
| 32 |
+
transformMixedEsModules: true,
|
| 33 |
+
},
|
| 34 |
+
},
|
| 35 |
+
});
|
jest.config.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { getJestProjectsAsync } from '@nx/jest';
|
| 2 |
+
|
| 3 |
+
export default async () => ({
|
| 4 |
+
projects: await getJestProjectsAsync(),
|
| 5 |
+
});
|
jest.preset.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const nxPreset = require('@nx/jest/preset').default;
|
| 2 |
+
|
| 3 |
+
module.exports = { ...nxPreset };
|
nx.json
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
| 3 |
+
"namedInputs": {
|
| 4 |
+
"default": [
|
| 5 |
+
"{projectRoot}/**/*",
|
| 6 |
+
"sharedGlobals"
|
| 7 |
+
],
|
| 8 |
+
"production": [
|
| 9 |
+
"default",
|
| 10 |
+
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
|
| 11 |
+
"!{projectRoot}/tsconfig.spec.json",
|
| 12 |
+
"!{projectRoot}/.eslintrc.json",
|
| 13 |
+
"!{projectRoot}/eslint.config.js",
|
| 14 |
+
"!{projectRoot}/jest.config.[jt]s",
|
| 15 |
+
"!{projectRoot}/src/test-setup.[jt]s",
|
| 16 |
+
"!{projectRoot}/test-setup.[jt]s"
|
| 17 |
+
],
|
| 18 |
+
"sharedGlobals": []
|
| 19 |
+
},
|
| 20 |
+
"plugins": [
|
| 21 |
+
{
|
| 22 |
+
"plugin": "@nx/vite/plugin",
|
| 23 |
+
"options": {
|
| 24 |
+
"buildTargetName": "build",
|
| 25 |
+
"testTargetName": "test",
|
| 26 |
+
"serveTargetName": "serve",
|
| 27 |
+
"previewTargetName": "preview",
|
| 28 |
+
"serveStaticTargetName": "serve-static"
|
| 29 |
+
}
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"plugin": "@nx/eslint/plugin",
|
| 33 |
+
"options": {
|
| 34 |
+
"targetName": "lint"
|
| 35 |
+
}
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"plugin": "@nx/playwright/plugin",
|
| 39 |
+
"options": {
|
| 40 |
+
"targetName": "e2e"
|
| 41 |
+
}
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"plugin": "@nx/jest/plugin",
|
| 45 |
+
"options": {
|
| 46 |
+
"targetName": "test"
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
],
|
| 50 |
+
"generators": {
|
| 51 |
+
"@nx/react": {
|
| 52 |
+
"application": {
|
| 53 |
+
"babel": true,
|
| 54 |
+
"style": "scss",
|
| 55 |
+
"linter": "eslint",
|
| 56 |
+
"bundler": "vite"
|
| 57 |
+
},
|
| 58 |
+
"component": {
|
| 59 |
+
"style": "scss"
|
| 60 |
+
},
|
| 61 |
+
"library": {
|
| 62 |
+
"style": "scss",
|
| 63 |
+
"linter": "eslint",
|
| 64 |
+
"unitTestRunner": "jest"
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
},
|
| 68 |
+
"release": {
|
| 69 |
+
"changelog": {
|
| 70 |
+
"workspaceChangelog": true,
|
| 71 |
+
"file": "CHANGELOG.md",
|
| 72 |
+
"git": {
|
| 73 |
+
"commit": false,
|
| 74 |
+
"tag": false
|
| 75 |
+
}
|
| 76 |
+
},
|
| 77 |
+
"version": {
|
| 78 |
+
"git": {
|
| 79 |
+
"commit": false,
|
| 80 |
+
"tag": false
|
| 81 |
+
}
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
}
|
package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@drawnix/source",
|
| 3 |
+
"version": "0.0.2",
|
| 4 |
+
"license": "MIT",
|
| 5 |
+
"scripts": {
|
| 6 |
+
"start": "nx serve web --host=0.0.0.0",
|
| 7 |
+
"build": "nx run-many -t=build",
|
| 8 |
+
"lint": "nx run-many --target=lint --all --fix",
|
| 9 |
+
"build:web": "nx build web",
|
| 10 |
+
"test": "nx run-many -t=test",
|
| 11 |
+
"release": "node scripts/release-version.js",
|
| 12 |
+
"pub": "npm run build && node scripts/publish.js"
|
| 13 |
+
},
|
| 14 |
+
"private": true,
|
| 15 |
+
"dependencies": {
|
| 16 |
+
"@floating-ui/react": "^0.26.24",
|
| 17 |
+
"@plait-board/markdown-to-drawnix": "^0.0.7",
|
| 18 |
+
"@plait-board/mermaid-to-drawnix": "^0.0.7",
|
| 19 |
+
"@plait/common": "^0.86.1",
|
| 20 |
+
"@plait/core": "^0.86.1",
|
| 21 |
+
"@plait/draw": "^0.86.1",
|
| 22 |
+
"@plait/layouts": "^0.86.1",
|
| 23 |
+
"@plait/mind": "^0.86.1",
|
| 24 |
+
"@plait/text-plugins": "^0.86.1",
|
| 25 |
+
"ahooks": "^3.8.0",
|
| 26 |
+
"browser-fs-access": "^0.35.0",
|
| 27 |
+
"classnames": "^2.5.1",
|
| 28 |
+
"laser-pen": "^1.0.1",
|
| 29 |
+
"localforage": "^1.10.0",
|
| 30 |
+
"mobile-detect": "^1.4.5",
|
| 31 |
+
"open-color": "^1.9.1",
|
| 32 |
+
"react": "18.3.1",
|
| 33 |
+
"react-dom": "18.3.1",
|
| 34 |
+
"slate": "^0.116.0",
|
| 35 |
+
"slate-dom": "^0.116.0",
|
| 36 |
+
"slate-history": "^0.115.0",
|
| 37 |
+
"slate-react": "^0.116.0",
|
| 38 |
+
"tslib": "^2.3.0"
|
| 39 |
+
},
|
| 40 |
+
"devDependencies": {
|
| 41 |
+
"@babel/core": "^7.14.5",
|
| 42 |
+
"@babel/preset-react": "^7.14.5",
|
| 43 |
+
"@nx/cypress": "19.3.0",
|
| 44 |
+
"@nx/devkit": "19.3.0",
|
| 45 |
+
"@nx/eslint": "19.3.0",
|
| 46 |
+
"@nx/eslint-plugin": "19.3.0",
|
| 47 |
+
"@nx/jest": "19.3.0",
|
| 48 |
+
"@nx/js": "19.3.0",
|
| 49 |
+
"@nx/playwright": "19.3.0",
|
| 50 |
+
"@nx/react": "19.3.0",
|
| 51 |
+
"@nx/vite": "^20.6.0",
|
| 52 |
+
"@nx/web": "19.3.0",
|
| 53 |
+
"@nx/workspace": "19.3.0",
|
| 54 |
+
"@playwright/test": "^1.36.0",
|
| 55 |
+
"@swc-node/register": "~1.9.1",
|
| 56 |
+
"@swc/cli": "^0.6.0",
|
| 57 |
+
"@swc/core": "~1.5.7",
|
| 58 |
+
"@swc/helpers": "~0.5.11",
|
| 59 |
+
"@testing-library/react": "15.0.6",
|
| 60 |
+
"@types/is-hotkey": "^0.1.10",
|
| 61 |
+
"@types/jest": "^29.4.0",
|
| 62 |
+
"@types/node": "18.16.9",
|
| 63 |
+
"@types/react": "18.3.1",
|
| 64 |
+
"@types/react-dom": "18.3.0",
|
| 65 |
+
"@typescript-eslint/eslint-plugin": "^7.3.0",
|
| 66 |
+
"@typescript-eslint/parser": "^7.3.0",
|
| 67 |
+
"@vitejs/plugin-react": "^4.2.0",
|
| 68 |
+
"@vitest/ui": "^3.0.8",
|
| 69 |
+
"babel-jest": "^29.4.1",
|
| 70 |
+
"eslint": "~8.57.0",
|
| 71 |
+
"eslint-config-prettier": "^9.0.0",
|
| 72 |
+
"eslint-plugin-import": "2.27.5",
|
| 73 |
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
| 74 |
+
"eslint-plugin-playwright": "^0.15.3",
|
| 75 |
+
"eslint-plugin-react": "7.32.2",
|
| 76 |
+
"eslint-plugin-react-hooks": "4.6.0",
|
| 77 |
+
"jest": "^29.4.1",
|
| 78 |
+
"jest-environment-jsdom": "^29.4.1",
|
| 79 |
+
"jsdom": "~22.1.0",
|
| 80 |
+
"nx": "19.3.0",
|
| 81 |
+
"prettier": "^2.6.2",
|
| 82 |
+
"sass": "^1.55.0",
|
| 83 |
+
"ts-jest": "^29.1.0",
|
| 84 |
+
"ts-node": "10.9.1",
|
| 85 |
+
"typescript": "~5.4.2",
|
| 86 |
+
"vite": "^6.2.2",
|
| 87 |
+
"vite-plugin-dts": "^4.5.3",
|
| 88 |
+
"vitest": "^3.0.8"
|
| 89 |
+
}
|
| 90 |
+
}
|
packages/drawnix/.babelrc
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"presets": [
|
| 3 |
+
[
|
| 4 |
+
"@nx/react/babel",
|
| 5 |
+
{
|
| 6 |
+
"runtime": "automatic",
|
| 7 |
+
"useBuiltIns": "usage"
|
| 8 |
+
}
|
| 9 |
+
]
|
| 10 |
+
],
|
| 11 |
+
"plugins": []
|
| 12 |
+
}
|
packages/drawnix/.eslintrc.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"extends": ["plugin:@nx/react", "../../.eslintrc.json"],
|
| 3 |
+
"ignorePatterns": ["!**/*"],
|
| 4 |
+
"overrides": [
|
| 5 |
+
{
|
| 6 |
+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
|
| 7 |
+
"rules": {}
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
"files": ["*.ts", "*.tsx"],
|
| 11 |
+
"rules": {}
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"files": ["*.js", "*.jsx"],
|
| 15 |
+
"rules": {}
|
| 16 |
+
}
|
| 17 |
+
]
|
| 18 |
+
}
|
packages/drawnix/README.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# drawnix
|
| 2 |
+
|
| 3 |
+
This library was generated with [Nx](https://nx.dev).
|
| 4 |
+
|
| 5 |
+
## Running unit tests
|
| 6 |
+
|
| 7 |
+
Run `nx test drawnix` to execute the unit tests via [Vitest](https://vitest.dev/).
|
packages/drawnix/jest.config.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* eslint-disable */
|
| 2 |
+
export default {
|
| 3 |
+
displayName: 'drawnix',
|
| 4 |
+
preset: '../../jest.preset.js',
|
| 5 |
+
transform: {
|
| 6 |
+
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
|
| 7 |
+
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
|
| 8 |
+
},
|
| 9 |
+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
|
| 10 |
+
coverageDirectory: '../../coverage/packages/drawnix',
|
| 11 |
+
};
|