y-mxgraph 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +9 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -29,8 +29,8 @@ import { Binding, LOCAL_ORIGIN } from 'y-mxgraph';
29
29
  const doc = new Y.Doc();
30
30
 
31
31
  App.main((app) => {
32
- // 确保多端初始文件一致;draw.io 默认创建时 diagram id 是随机的,
33
- // 若各客户端起点不同会导致协同异常。可用 generateFileTemplate 生成统一模板。
32
+ // Ensure consistent initial files across clients. draw.io generates random diagram ids by default,
33
+ // which can cause sync issues if clients start from different states. Use generateFileTemplate to create a unified template.
34
34
  if (!app.currentFile.data) {
35
35
  app.currentFile.data = Binding.generateFileTemplate('diagram-0');
36
36
  }
@@ -62,21 +62,22 @@ pnpm --filter y-mxgraph build
62
62
 
63
63
  # Test
64
64
  pnpm --filter y-mxgraph test
65
+ ```
65
66
 
66
- # Demo
67
+ ## Demo
67
68
 
68
69
  ```bash
69
- # 单页模式(draw.io 直接加载在当前页面)
70
+ # Single-page mode (draw.io loaded directly in the current page)
70
71
  pnpm --filter @y-mxgraph/demo dev
71
72
 
72
- # iframe 模式(父页运行 WebRTC Provider,两个 iframe 各跑一套 draw.io + y-mxgraph,通过 postMessage 同步)
73
- # 访问 http://localhost:5173/iframe-mode.html
73
+ # iframe mode (parent page runs WebRTC Provider, two iframes each run draw.io + y-mxgraph, synced via postMessage)
74
+ # Visit http://localhost:5173/iframe-mode.html
74
75
  ```
75
76
 
76
- # Docs
77
+ ## Docs
77
78
 
79
+ ```bash
78
80
  pnpm --filter @y-mxgraph/docs dev
79
-
80
81
  ```
81
82
 
82
83
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "y-mxgraph",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Yjs binding for draw.io (mxGraph) documents",
5
5
  "keywords": [
6
6
  "yjs",