swimlane-diagram 1.3.0 → 1.4.0

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.
package/README.en.md CHANGED
@@ -36,25 +36,27 @@ swimlane
36
36
  node e "Done" lane=back phase=p3 shape=enddot
37
37
 
38
38
  s -> n1
39
- n1 -> n2
40
- n2 -> d1 "Ask for review"
41
- d1 -> n4 "OK"
42
- d1 -> n3 "NG"
43
- n3 -> n2 "Re-quote"
44
- n4 -> d2 "Request shipment"
45
- d2 -> n6 "Yes"
46
- d2 -> n5 "No"
47
- n5 -> n6 "On arrival"
39
+ n1 => n2
40
+ n2 => d1 "Ask for review"
41
+ d1 => n4 "OK"
42
+ d1 ==> n3 "NG" color=#D32F2F
43
+ n3 --> n2 "Re-quote" color=#D32F2F
44
+ n4 => d2 "Request shipment"
45
+ d2 => n6 "Yes"
46
+ d2 ==> n5 "No" color=#1565C0
47
+ n5 --> n6 "On arrival" color=#1565C0
48
48
  n6 --> n7 "Shipment notice"
49
- n7 -> n8
49
+ n7 => n8
50
50
  n8 -> e
51
51
  ```
52
52
 
53
53
  Put a node at the crossing of **who (lane) × when (phase)**, and the position and the route of every
54
54
  line are worked out for you. You never write coordinates.
55
55
 
56
- The example uses decisions (diamonds), a rework loop, input/output (parallelograms) and a dashed
57
- line (a hand-off or a notice). Where lines cross, one **hops over** the other; where they merge, they
56
+ The example uses decisions (diamonds), a rework loop and input/output (parallelograms). It also
57
+ uses all four line types: a **thick solid line for the main path**, a red dashed one for the rework
58
+ loop, a blue one for the detour taken when stock runs out, and a thin dashed one for a notice.
59
+ Thickness comes from `=>` and `==>`, colour from `color=`. Where lines cross, one **hops over** the other; where they merge, they
58
60
  **curve into one**. So you can tell from the shape of a line alone whether it passes by or joins in.
59
61
 
60
62
  ## Getting it
@@ -66,11 +68,11 @@ npm install swimlane-diagram
66
68
  ```
67
69
 
68
70
  ```html
69
- <script src="https://cdn.jsdelivr.net/npm/swimlane-diagram@1.3.0/swimlane.js"></script>
71
+ <script src="https://cdn.jsdelivr.net/npm/swimlane-diagram@1.4.0/swimlane.js"></script>
70
72
  ```
71
73
 
72
74
  You can also drop [swimlane.js](swimlane.js) from this repository onto your own server.
73
- **Pin the version** when you load it from a CDN (without `@1.3.0`, your diagram may look different
75
+ **Pin the version** when you load it from a CDN (without `@1.4.0`, your diagram may look different
74
76
  once the next release lands).
75
77
 
76
78
  ### Browser
@@ -115,6 +117,15 @@ The first line is `swimlane`. Anything from `#` to the end of a line is a commen
115
117
  | `node n1 "Send a quote" lane=sales phase=p1` | A node. `lane` and `phase` decide where it sits |
116
118
  | `n1 -> n2 "label"` | A link (solid). The label is optional |
117
119
  | `n1 --> n2` | A link (dashed) |
120
+ | `n1 => n2` | A link (thick solid) |
121
+ | `n1 ==> n2` | A link (thick dashed) |
122
+
123
+ One line means solid, two mean dashed; `=` makes it thick. Spaces around the arrow are optional
124
+ (`n1-->n2` reads the same). A line may join only two nodes, so `n1 -> n2 -> n3` is an error.
125
+
126
+ > **Different from Mermaid.** In Mermaid flowcharts `-->` is solid and `==>` is thick solid.
127
+ > swimlane-diagram follows the rule above (one line solid, two lines dashed), so both mean the
128
+ > opposite of what they mean in Mermaid. These are different formats, and we are not reconciling them.
118
129
 
119
130
  Attributes a node can take:
120
131
 
@@ -124,6 +135,12 @@ Attributes a node can take:
124
135
  | `shape=` | `process` (default, rectangle) / `start` / `end` (rounded) / `decision` (diamond) / `io` (parallelogram) / `startdot` (●) / `enddot` (◉) |
125
136
  | `color=` | `#RRGGBB`. Fill color of the node |
126
137
 
138
+ Attributes a link can take:
139
+
140
+ | Attribute | Values |
141
+ |---|---|
142
+ | `color=` | `#RRGGBB`. Color of the line and its arrowhead, and of the label box border. `#42506B` by default |
143
+
127
144
  Values are read as whitespace-separated tokens, so a value itself cannot contain a space.
128
145
 
129
146
  ## API
@@ -142,6 +159,7 @@ When you want finer control:
142
159
  | `computeLayout(state)` | Computes coordinates only; draws nothing |
143
160
  | `drawSvg(state, layout)` | Produces the SVG string from a computed layout |
144
161
  | `SHAPES` / `LINK_STYLES` | The available shapes and line styles |
162
+ | `LINK_COLOR` | The default line color (`#42506B`) |
145
163
  | `VERSION` | Engine version |
146
164
 
147
165
  Layout (`computeLayout`) and drawing (`drawSvg`) are separate, so you can replace the placement
@@ -168,8 +186,9 @@ logic alone and keep the rest.
168
186
  npm test
169
187
  ```
170
188
 
171
- 39 checks run. They cover which side of a node a line leaves from and enters (out on the right and
172
- bottom, in on the left and top), headers fitting inside their bands, labels never being crossed by
189
+ 109 checks run. They cover which side of a node a line leaves from and enters (out on the right and
190
+ bottom, in on the left and top), headers fitting inside their bands, phase bands keeping their
191
+ inner padding, labels never being crossed by
173
192
  another line, crossings being distinguishable from merges — **properties that decide whether a
174
193
  diagram can be read at a glance**. The example above (`examples/order.swim` and this English
175
194
  version) goes through the same checks.
package/README.md CHANGED
@@ -36,24 +36,27 @@ swimlane
36
36
  node e "完了" lane=back phase=p3 shape=enddot
37
37
 
38
38
  s -> n1
39
- n1 -> n2
40
- n2 -> d1 "審査を依頼"
41
- d1 -> n4 "OK"
42
- d1 -> n3 "NG"
43
- n3 -> n2 "再見積"
44
- n4 -> d2 "出荷を指示"
45
- d2 -> n6 "あり"
46
- d2 -> n5 "なし"
47
- n5 -> n6 "入荷後"
39
+ n1 => n2
40
+ n2 => d1 "審査を依頼"
41
+ d1 => n4 "OK"
42
+ d1 ==> n3 "NG" color=#D32F2F
43
+ n3 --> n2 "再見積" color=#D32F2F
44
+ n4 => d2 "出荷を指示"
45
+ d2 => n6 "あり"
46
+ d2 ==> n5 "なし" color=#1565C0
47
+ n5 --> n6 "入荷後" color=#1565C0
48
48
  n6 --> n7 "出荷を通知"
49
- n7 -> n8
49
+ n7 => n8
50
50
  n8 -> e
51
51
  ```
52
52
 
53
53
  **誰が(レーン)× いつ(フェーズ)** の交点にノードを置くと、位置と線の通り道は
54
54
  自動で決まります。座標を書く必要はありません。
55
55
 
56
- 上の図には、判断(ひし形)・差し戻し・入出力(平行四辺形)・破線(連絡や書類の受け渡し)が入っています。
56
+ 上の図には、判断(ひし形)・差し戻し・入出力(平行四辺形)が入っています。
57
+ 線は4種を使い分けています。**太い実線が本筋**、赤い破線が差し戻し(与信が足りない)、
58
+ 青い破線が在庫が無いときの迂回、細い破線が連絡(出荷を通知)です。
59
+ 太さは `=>` と `==>`、色は `color=` で指定します。
57
60
  線が交わる所は**またいで**通り過ぎ、合流する所は**カーブで寄り添って**1本になります。
58
61
  通り抜けているのか、集まっているのかが、線の形だけで分かります。
59
62
 
@@ -66,11 +69,11 @@ npm install swimlane-diagram
66
69
  ```
67
70
 
68
71
  ```html
69
- <script src="https://cdn.jsdelivr.net/npm/swimlane-diagram@1.3.0/swimlane.js"></script>
72
+ <script src="https://cdn.jsdelivr.net/npm/swimlane-diagram@1.4.0/swimlane.js"></script>
70
73
  ```
71
74
 
72
75
  このリポジトリの [swimlane.js](swimlane.js) をそのまま置いても構いません。
73
- CDN は**版を固定して**読み込みます(`@1.3.0` を外すと、次の版が出たときに図が変わります)。
76
+ CDN は**版を固定して**読み込みます(`@1.4.0` を外すと、次の版が出たときに図が変わります)。
74
77
 
75
78
  ### ブラウザ
76
79
 
@@ -114,6 +117,16 @@ DOM に依存しないので、ビルドスクリプトや静的サイトの生
114
117
  | `node n1 "見積を出す" lane=sales phase=p1` | ノード。`lane` と `phase` で置き場所を決める |
115
118
  | `n1 -> n2 "ラベル"` | 接続(実線)。ラベルは省略可 |
116
119
  | `n1 --> n2` | 接続(破線) |
120
+ | `n1 => n2` | 接続(太い実線) |
121
+ | `n1 ==> n2` | 接続(太い破線) |
122
+
123
+ 線が1本なら実線、2本なら破線。`=` にすると太くなります。
124
+ 矢印の前後の空白は、あっても無くてもかまいません(`n1-->n2` でも読めます)。
125
+ 1行でつなげられるのは2つまでで、`n1 -> n2 -> n3` はエラーになります。
126
+
127
+ > **Mermaid との違い。** Mermaid のフローチャートでは `-->` が実線、`==>` が太い実線です。
128
+ > swimlane-diagram は上の規則(線1本=実線、2本=破線)を通すので、どちらも Mermaid とは
129
+ > 逆の意味になります。もともと別の記法なので、ここは合わせていません。
117
130
 
118
131
  ノードに付けられる属性:
119
132
 
@@ -123,6 +136,12 @@ DOM に依存しないので、ビルドスクリプトや静的サイトの生
123
136
  | `shape=` | `process`(既定・四角) / `start` / `end`(角丸) / `decision`(ひし形) / `io`(平行四辺形) / `startdot`(●) / `enddot`(◉) |
124
137
  | `color=` | `#RRGGBB`。ノードの塗り |
125
138
 
139
+ 接続に付けられる属性:
140
+
141
+ | 属性 | 値 |
142
+ |---|---|
143
+ | `color=` | `#RRGGBB`。線と矢じりの色。ラベルの箱の枠にも使われます。省略すると `#42506B` |
144
+
126
145
  ## API
127
146
 
128
147
  ```js
@@ -139,6 +158,7 @@ Swimlane.renderTo(target, code) // セレクタか要素に描画して → { o
139
158
  | `computeLayout(state)` | 座標だけを計算する。描画は含まない |
140
159
  | `drawSvg(state, layout)` | 計算済みのレイアウトから SVG 文字列を作る |
141
160
  | `SHAPES` / `LINK_STYLES` | 選べる図形・線種の一覧 |
161
+ | `LINK_COLOR` | 線の既定色(`#42506B`) |
142
162
  | `VERSION` | エンジンのバージョン |
143
163
 
144
164
  レイアウト計算(`computeLayout`)と描画(`drawSvg`)は分かれているので、
@@ -165,9 +185,10 @@ Swimlane.renderTo(target, code) // セレクタか要素に描画して → { o
165
185
  npm test
166
186
  ```
167
187
 
168
- 39件の検証が走ります。線の出入りする辺の使い分け(出力は右・下、入力は左・上)、
169
- 見出しが帯からはみ出していないこと、ラベルの上を他の線が通らないこと、
188
+ 109件の検証が走ります。線の出入りする辺の使い分け(出力は右・下、入力は左・上)、
189
+ 見出しが帯からはみ出していないこと、フェーズの帯に余白があること、ラベルの上を他の線が通らないこと、
170
190
  交差と合流が見分けられることなど、**図の読みやすさに直結する性質**を確かめています。
191
+ 線の記法については、`parse → generate → parse` の往復で意味が変わらないことも見ています。
171
192
  上の図(`examples/order.swim` と、その英語版)そのものも、この検証を通しています。
172
193
 
173
194
  ```
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="788" height="1193" viewBox="0 0 788 1193" font-family="Inter, 'Yu Gothic UI', 'Meiryo UI', sans-serif"><rect x="0" y="0" width="788" height="1193" fill="#FFFFFF"></rect><text x="394" y="24" text-anchor="middle" font-size="16" font-weight="700" fill="#16233A">From order to payment</text><g transform="translate(14, 48)"><g data-pick="lane" data-idx="0"><rect class="sl-shape" x="132" y="0" width="204" height="1131" fill="#FFF1E0" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="132" y="0" width="204" height="38" fill="#FFF1E0" stroke="#B9C7DA"></rect><text x="234" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Sales</text></g><g data-pick="lane" data-idx="1"><rect class="sl-shape" x="336" y="0" width="204" height="1131" fill="#E6EFFC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="336" y="0" width="204" height="38" fill="#E6EFFC" stroke="#B9C7DA"></rect><text x="438" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Back office</text></g><g data-pick="lane" data-idx="2"><rect class="sl-shape" x="540" y="0" width="204" height="1131" fill="#E7F6EC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="540" y="0" width="204" height="38" fill="#E7F6EC" stroke="#B9C7DA"></rect><text x="642" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Warehouse</text></g><g data-pick="phase" data-idx="0"><rect class="sl-shape" x="0" y="38" width="132" height="396" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="241" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Intake</text></g><g data-pick="phase" data-idx="1"><rect class="sl-shape" x="0" y="460" width="132" height="358" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="644" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Fulfillment</text></g><g data-pick="phase" data-idx="2"><rect class="sl-shape" x="0" y="844" width="132" height="210" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="954" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Billing</text></g><g><path class="sl-hit" d="M 234 64 V 81 H 234 V 98" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="0"></path><path d="M 234 64 L 234 81 Q 234 81 234 81 L 234 81 Q 234 81 234 81 L 234 98" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="0"></path><polygon class="sl-arrow" points="234,98 229.66,91 238.34,91" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 156 V 167 H 234 V 178" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="1"></path><path d="M 234 156 L 234 167 Q 234 167 234 167 L 234 167 Q 234 167 234 167 L 234 178" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="1"></path><polygon class="sl-arrow" points="234,178 229.66,171 238.34,171" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 236 V 250 H 327 V 256 H 438 V 274" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="2"></path><path d="M 234 236 L 234 243 Q 234 250 241 250 L 324 250 Q 327 250 327 253 L 327 253 Q 327 256 330 256 L 335 256 Q 340 249 345 256 L 429 256 Q 438 256 438 265 L 438 274" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="2"></path><polygon class="sl-arrow" points="438,274 433.66,267 442.34,267" fill="#42506B"></polygon><rect x="231.07999999999998" y="241" width="94" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="2"></rect><text x="278.08" y="254" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="2">Ask for review</text></g><g><path class="sl-hit" d="M 522 303 H 540 V 454 H 438 V 466" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="3"></path><path d="M 522 303 L 531 303 Q 540 303 540 312 L 540 445 Q 540 454 531 454 L 444 454 Q 438 454 438 460 L 438 466" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="3"></path><polygon class="sl-arrow" points="438,466 433.66,459 442.34,459" fill="#42506B"></polygon><rect x="529" y="375.5" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="3"></rect><text x="540" y="388.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="3">OK</text></g><g><path class="sl-hit" d="M 438 332 V 351 H 234 V 370" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="4"></path><path d="M 438 332 L 438 342 Q 438 351 429 351 L 345 351 Q 340 344 335 351 L 243 351 Q 234 351 234 360 L 234 370" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="4"></path><polygon class="sl-arrow" points="234,370 229.66,363 238.34,363" fill="#42506B"></polygon><rect x="354.03999999999996" y="342" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="4"></rect><text x="365.03999999999996" y="355" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="4">NG</text></g><g><path class="sl-hit" d="M 318 399 H 340 V 207 H 318" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="5"></path><path d="M 318 399 L 331 399 Q 340 399 340 390 L 340 216 Q 340 207 331 207 L 318 207" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="5"></path><polygon class="sl-arrow" points="318,207 325,202.66 325,211.34" fill="#42506B"></polygon><rect x="291" y="294" width="58" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="5"></rect><text x="320" y="307" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="5">Re-quote</text></g><g><path class="sl-hit" d="M 438 524 V 538 H 531 V 544 H 642 V 562" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="6"></path><path d="M 438 524 L 438 531 Q 438 538 445 538 L 528 538 Q 531 538 531 541 L 531 541 Q 531 544 534 544 L 633 544 Q 642 544 642 553 L 642 562" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="6"></path><polygon class="sl-arrow" points="642,562 637.66,555 646.34,555" fill="#42506B"></polygon><rect x="462.96000000000004" y="529" width="106" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="6"></rect><text x="515.96" y="542" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="6">Request shipment</text></g><g><path class="sl-hit" d="M 726 591 H 744 V 742 H 642 V 754" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="7"></path><path d="M 726 591 L 735 591 Q 744 591 744 600 L 744 733 Q 744 742 735 742 L 648 742 Q 642 742 642 748 L 642 754" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="7"></path><polygon class="sl-arrow" points="642,754 637.66,747 646.34,747" fill="#42506B"></polygon><rect x="730" y="663.5" width="28" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="7"></rect><text x="744" y="676.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="7">Yes</text></g><g><path class="sl-hit" d="M 642 620 V 639 H 642 V 658" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="8"></path><path d="M 642 620 L 642 639 Q 642 639 642 639 L 642 639 Q 642 639 642 639 L 642 658" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="8"></path><polygon class="sl-arrow" points="642,658 637.66,651 646.34,651" fill="#42506B"></polygon><rect x="631" y="630" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="8"></rect><text x="642" y="643" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="8">No</text></g><g><path class="sl-hit" d="M 642 716 V 735 H 642 V 754" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="9"></path><path d="M 642 716 L 642 735 Q 642 735 642 735 L 642 735 Q 642 735 642 735 L 642 754" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="9"></path><polygon class="sl-arrow" points="642,754 637.66,747 646.34,747" fill="#42506B"></polygon><rect x="607" y="721.44" width="70" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="9"></rect><text x="642" y="734.44" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="9">On arrival</text></g><g><path class="sl-hit" d="M 642 812 V 826 H 549 V 832 H 438 V 850" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="10"></path><path d="M 642 812 L 642 819 Q 642 826 635 826 L 552 826 Q 549 826 549 829 L 549 829 Q 549 832 546 832 L 447 832 Q 438 832 438 841 L 438 850" fill="none" stroke="#42506B" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="10"></path><polygon class="sl-arrow" points="438,850 433.66,843 442.34,843" fill="#42506B"></polygon><rect x="514.04" y="817" width="100" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="10"></rect><text x="564.04" y="830" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="10">Shipment notice</text></g><g><path class="sl-hit" d="M 438 908 V 919 H 438 V 930" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="11"></path><path d="M 438 908 L 438 919 Q 438 919 438 919 L 438 919 Q 438 919 438 919 L 438 930" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="11"></path><polygon class="sl-arrow" points="438,930 433.66,923 442.34,923" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 438 988 V 1005 H 438 V 1022" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="12"></path><path d="M 438 988 L 438 1005 Q 438 1005 438 1005 L 438 1005 Q 438 1005 438 1005 L 438 1022" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="12"></path><polygon class="sl-arrow" points="438,1022 433.66,1015 442.34,1015" fill="#42506B"></polygon></g><g data-pick="node" data-idx="1"><rect class="sl-shape" x="150" y="98" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="132" text-anchor="middle" font-size="12" fill="#16233A">Send a quote</text></g><g data-pick="node" data-idx="2"><polygon class="sl-shape" points="166,178 318,178 302,236 150,236" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="234" y="212" text-anchor="middle" font-size="12" fill="#16233A">Take the order</text></g><g data-pick="node" data-idx="4"><rect class="sl-shape" x="150" y="370" width="168" height="58" rx="7" ry="7" fill="#FFE0E0" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="404" text-anchor="middle" font-size="12" fill="#16233A">Revise the terms</text></g><g data-pick="node" data-idx="3"><polygon class="sl-shape" points="438,274 522,303 438,332 354,303" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="438" y="300.5" text-anchor="middle" font-size="12" fill="#16233A">Credit </text><text x="438" y="315.5" text-anchor="middle" font-size="12" fill="#16233A">approved?</text></g><g data-pick="node" data-idx="5"><rect class="sl-shape" x="354" y="466" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="492.5" text-anchor="middle" font-size="12" fill="#16233A">Register the </text><text x="438" y="507.5" text-anchor="middle" font-size="12" fill="#16233A">order</text></g><g data-pick="node" data-idx="9"><rect class="sl-shape" x="354" y="850" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="884" text-anchor="middle" font-size="12" fill="#16233A">Send the invoice</text></g><g data-pick="node" data-idx="10"><rect class="sl-shape" x="354" y="930" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="964" text-anchor="middle" font-size="12" fill="#16233A">Confirm payment</text></g><g data-pick="node" data-idx="6"><polygon class="sl-shape" points="642,562 726,591 642,620 558,591" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="642" y="596" text-anchor="middle" font-size="12" fill="#16233A">In stock?</text></g><g data-pick="node" data-idx="7"><rect class="sl-shape" x="558" y="658" width="168" height="58" rx="7" ry="7" fill="#FFF3D6" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="684.5" text-anchor="middle" font-size="12" fill="#16233A">Order from </text><text x="642" y="699.5" text-anchor="middle" font-size="12" fill="#16233A">supplier</text></g><g data-pick="node" data-idx="8"><rect class="sl-shape" x="558" y="754" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="788" text-anchor="middle" font-size="12" fill="#16233A">Ship it</text></g><g data-pick="node" data-idx="0"><circle class="sl-shape" cx="234" cy="51" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><rect x="208" y="64" width="52" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="234" y="77" text-anchor="middle" font-size="11" fill="#3C516C">Inquiry</text></g><g data-pick="node" data-idx="11"><circle class="sl-shape" cx="438" cy="1035" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><circle cx="438" cy="1035" r="9" fill="#FFFFFF"></circle><circle cx="438" cy="1035" r="6" fill="#42506B"></circle><rect x="421" y="1048" width="34" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="438" y="1061" text-anchor="middle" font-size="11" fill="#3C516C">Done</text></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="788" height="1162" viewBox="0 0 788 1162" font-family="Inter, 'Yu Gothic UI', 'Meiryo UI', sans-serif"><rect x="0" y="0" width="788" height="1162" fill="#FFFFFF"></rect><text x="394" y="24" text-anchor="middle" font-size="16" font-weight="700" fill="#16233A">From order to payment</text><g transform="translate(14, 48)"><g data-pick="lane" data-idx="0"><rect class="sl-shape" x="132" y="0" width="204" height="1100" fill="#FFF1E0" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="132" y="0" width="204" height="38" fill="#FFF1E0" stroke="#B9C7DA"></rect><text x="234" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Sales</text></g><g data-pick="lane" data-idx="1"><rect class="sl-shape" x="336" y="0" width="204" height="1100" fill="#E6EFFC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="336" y="0" width="204" height="38" fill="#E6EFFC" stroke="#B9C7DA"></rect><text x="438" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Back office</text></g><g data-pick="lane" data-idx="2"><rect class="sl-shape" x="540" y="0" width="204" height="1100" fill="#E7F6EC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="540" y="0" width="204" height="38" fill="#E7F6EC" stroke="#B9C7DA"></rect><text x="642" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">Warehouse</text></g><line x1="132" y1="464" x2="744" y2="464" stroke="#D3E1EF" stroke-width="1"></line><line x1="132" y1="848" x2="744" y2="848" stroke="#D3E1EF" stroke-width="1"></line><g data-pick="phase" data-idx="0"><rect class="sl-shape" x="0" y="38" width="132" height="426" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="256" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Intake</text></g><g data-pick="phase" data-idx="1"><rect class="sl-shape" x="0" y="464" width="132" height="384" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="661" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Fulfillment</text></g><g data-pick="phase" data-idx="2"><rect class="sl-shape" x="0" y="848" width="132" height="252" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="979" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">Billing</text></g><g><path class="sl-hit" d="M 234 81 V 98 H 234 V 115" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="0"></path><path d="M 234 81 L 234 98 Q 234 98 234 98 L 234 98 Q 234 98 234 98 L 234 115" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="0"></path><polygon class="sl-arrow" points="234,115 229.66,108 238.34,108" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 173 V 184 H 234 V 195" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="1"></path><path d="M 234 173 L 234 184 Q 234 184 234 184 L 234 184 Q 234 184 234 184 L 234 195" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="1"></path><polygon class="sl-arrow" points="234,195 228.42,186 239.58,186" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 253 V 267 H 327 V 273 H 438 V 291" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="2"></path><path d="M 234 253 L 234 260 Q 234 267 241 267 L 324 267 Q 327 267 327 270 L 327 270 Q 327 273 330 273 L 335 273 Q 340 266 345 273 L 429 273 Q 438 273 438 282 L 438 291" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="2"></path><polygon class="sl-arrow" points="438,291 432.42,282 443.58,282" fill="#42506B"></polygon><rect x="231.07999999999998" y="258" width="94" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="2"></rect><text x="278.08" y="271" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="2">Ask for review</text></g><g><path class="sl-hit" d="M 522 320 H 540 V 471 H 438 V 483" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="3"></path><path d="M 522 320 L 531 320 Q 540 320 540 329 L 540 462 Q 540 471 531 471 L 444 471 Q 438 471 438 477 L 438 483" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="3"></path><polygon class="sl-arrow" points="438,483 432.42,474 443.58,474" fill="#42506B"></polygon><rect x="529" y="392.5" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="3"></rect><text x="540" y="405.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="3">OK</text></g><g><path class="sl-hit" d="M 438 349 V 368 H 234 V 387" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="4"></path><path d="M 438 349 L 438 359 Q 438 368 429 368 L 345 368 Q 340 361 335 368 L 243 368 Q 234 368 234 377 L 234 387" fill="none" stroke="#D32F2F" stroke-width="3" stroke-dasharray="10 6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="4"></path><polygon class="sl-arrow" points="234,387 228.42,378 239.58,378" fill="#D32F2F"></polygon><rect x="354.03999999999996" y="359" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D32F2F" data-pick="link" data-idx="4"></rect><text x="365.03999999999996" y="372" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="4">NG</text></g><g><path class="sl-hit" d="M 318 416 H 340 V 224 H 318" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="5"></path><path d="M 318 416 L 331 416 Q 340 416 340 407 L 340 233 Q 340 224 331 224 L 318 224" fill="none" stroke="#D32F2F" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="5"></path><polygon class="sl-arrow" points="318,224 325,219.66 325,228.34" fill="#D32F2F"></polygon><rect x="291" y="311" width="58" height="18" rx="4" fill="#FFFFFF" stroke="#D32F2F" data-pick="link" data-idx="5"></rect><text x="320" y="324" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="5">Re-quote</text></g><g><path class="sl-hit" d="M 438 541 V 555 H 531 V 561 H 642 V 579" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="6"></path><path d="M 438 541 L 438 548 Q 438 555 445 555 L 528 555 Q 531 555 531 558 L 531 558 Q 531 561 534 561 L 633 561 Q 642 561 642 570 L 642 579" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="6"></path><polygon class="sl-arrow" points="642,579 636.42,570 647.58,570" fill="#42506B"></polygon><rect x="462.96000000000004" y="546" width="106" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="6"></rect><text x="515.96" y="559" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="6">Request shipment</text></g><g><path class="sl-hit" d="M 726 608 H 744 V 759 H 642 V 771" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="7"></path><path d="M 726 608 L 735 608 Q 744 608 744 617 L 744 750 Q 744 759 735 759 L 648 759 Q 642 759 642 765 L 642 771" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="7"></path><polygon class="sl-arrow" points="642,771 636.42,762 647.58,762" fill="#42506B"></polygon><rect x="730" y="680.5" width="28" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="7"></rect><text x="744" y="693.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="7">Yes</text></g><g><path class="sl-hit" d="M 642 637 V 656 H 642 V 675" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="8"></path><path d="M 642 637 L 642 656 Q 642 656 642 656 L 642 656 Q 642 656 642 656 L 642 675" fill="none" stroke="#1565C0" stroke-width="3" stroke-dasharray="10 6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="8"></path><polygon class="sl-arrow" points="642,675 636.42,666 647.58,666" fill="#1565C0"></polygon><rect x="631" y="647" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#1565C0" data-pick="link" data-idx="8"></rect><text x="642" y="660" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="8">No</text></g><g><path class="sl-hit" d="M 642 733 V 752 H 642 V 771" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="9"></path><path d="M 642 733 L 642 752 Q 642 752 642 752 L 642 752 Q 642 752 642 752 L 642 771" fill="none" stroke="#1565C0" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="9"></path><polygon class="sl-arrow" points="642,771 637.66,764 646.34,764" fill="#1565C0"></polygon><rect x="607" y="738.44" width="70" height="18" rx="4" fill="#FFFFFF" stroke="#1565C0" data-pick="link" data-idx="9"></rect><text x="642" y="751.44" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="9">On arrival</text></g><g><path class="sl-hit" d="M 642 829 V 843 H 549 V 849 H 438 V 867" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="10"></path><path d="M 642 829 L 642 836 Q 642 843 635 843 L 552 843 Q 549 843 549 846 L 549 846 Q 549 849 546 849 L 447 849 Q 438 849 438 858 L 438 867" fill="none" stroke="#42506B" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="10"></path><polygon class="sl-arrow" points="438,867 433.66,860 442.34,860" fill="#42506B"></polygon><rect x="514.04" y="834" width="100" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="10"></rect><text x="564.04" y="847" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="10">Shipment notice</text></g><g><path class="sl-hit" d="M 438 925 V 936 H 438 V 947" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="11"></path><path d="M 438 925 L 438 936 Q 438 936 438 936 L 438 936 Q 438 936 438 936 L 438 947" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="11"></path><polygon class="sl-arrow" points="438,947 432.42,938 443.58,938" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 438 1005 V 1022 H 438 V 1039" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="12"></path><path d="M 438 1005 L 438 1022 Q 438 1022 438 1022 L 438 1022 Q 438 1022 438 1022 L 438 1039" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="12"></path><polygon class="sl-arrow" points="438,1039 433.66,1032 442.34,1032" fill="#42506B"></polygon></g><g data-pick="node" data-idx="1"><rect class="sl-shape" x="150" y="115" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="149" text-anchor="middle" font-size="12" fill="#16233A">Send a quote</text></g><g data-pick="node" data-idx="2"><polygon class="sl-shape" points="166,195 318,195 302,253 150,253" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="234" y="229" text-anchor="middle" font-size="12" fill="#16233A">Take the order</text></g><g data-pick="node" data-idx="4"><rect class="sl-shape" x="150" y="387" width="168" height="58" rx="7" ry="7" fill="#FFE0E0" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="421" text-anchor="middle" font-size="12" fill="#16233A">Revise the terms</text></g><g data-pick="node" data-idx="3"><polygon class="sl-shape" points="438,291 522,320 438,349 354,320" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="438" y="317.5" text-anchor="middle" font-size="12" fill="#16233A">Credit </text><text x="438" y="332.5" text-anchor="middle" font-size="12" fill="#16233A">approved?</text></g><g data-pick="node" data-idx="5"><rect class="sl-shape" x="354" y="483" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="509.5" text-anchor="middle" font-size="12" fill="#16233A">Register the </text><text x="438" y="524.5" text-anchor="middle" font-size="12" fill="#16233A">order</text></g><g data-pick="node" data-idx="9"><rect class="sl-shape" x="354" y="867" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="901" text-anchor="middle" font-size="12" fill="#16233A">Send the invoice</text></g><g data-pick="node" data-idx="10"><rect class="sl-shape" x="354" y="947" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="981" text-anchor="middle" font-size="12" fill="#16233A">Confirm payment</text></g><g data-pick="node" data-idx="6"><polygon class="sl-shape" points="642,579 726,608 642,637 558,608" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="642" y="613" text-anchor="middle" font-size="12" fill="#16233A">In stock?</text></g><g data-pick="node" data-idx="7"><rect class="sl-shape" x="558" y="675" width="168" height="58" rx="7" ry="7" fill="#FFF3D6" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="701.5" text-anchor="middle" font-size="12" fill="#16233A">Order from </text><text x="642" y="716.5" text-anchor="middle" font-size="12" fill="#16233A">supplier</text></g><g data-pick="node" data-idx="8"><rect class="sl-shape" x="558" y="771" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="805" text-anchor="middle" font-size="12" fill="#16233A">Ship it</text></g><g data-pick="node" data-idx="0"><circle class="sl-shape" cx="234" cy="68" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><rect x="208" y="81" width="52" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="234" y="94" text-anchor="middle" font-size="11" fill="#3C516C">Inquiry</text></g><g data-pick="node" data-idx="11"><circle class="sl-shape" cx="438" cy="1052" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><circle cx="438" cy="1052" r="9" fill="#FFFFFF"></circle><circle cx="438" cy="1052" r="6" fill="#42506B"></circle><rect x="421" y="1065" width="34" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="438" y="1078" text-anchor="middle" font-size="11" fill="#3C516C">Done</text></g></g></svg>
package/docs/example.svg CHANGED
@@ -1 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="790" height="1193" viewBox="0 0 790 1193" font-family="Inter, 'Yu Gothic UI', 'Meiryo UI', sans-serif"><rect x="0" y="0" width="790" height="1193" fill="#FFFFFF"></rect><text x="395" y="24" text-anchor="middle" font-size="16" font-weight="700" fill="#16233A">受注から入金までの流れ</text><g transform="translate(14, 48)"><g data-pick="lane" data-idx="0"><rect class="sl-shape" x="132" y="0" width="204" height="1131" fill="#FFF1E0" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="132" y="0" width="204" height="38" fill="#FFF1E0" stroke="#B9C7DA"></rect><text x="234" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">営業</text></g><g data-pick="lane" data-idx="1"><rect class="sl-shape" x="336" y="0" width="204" height="1131" fill="#E6EFFC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="336" y="0" width="204" height="38" fill="#E6EFFC" stroke="#B9C7DA"></rect><text x="438" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">業務</text></g><g data-pick="lane" data-idx="2"><rect class="sl-shape" x="540" y="0" width="204" height="1131" fill="#E7F6EC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="540" y="0" width="204" height="38" fill="#E7F6EC" stroke="#B9C7DA"></rect><text x="642" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">倉庫</text></g><g data-pick="phase" data-idx="0"><rect class="sl-shape" x="0" y="38" width="132" height="396" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="241" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">受付</text></g><g data-pick="phase" data-idx="1"><rect class="sl-shape" x="0" y="460" width="132" height="358" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="644" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">出荷</text></g><g data-pick="phase" data-idx="2"><rect class="sl-shape" x="0" y="844" width="132" height="210" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="954" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">請求</text></g><g><path class="sl-hit" d="M 234 64 V 81 H 234 V 98" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="0"></path><path d="M 234 64 L 234 81 Q 234 81 234 81 L 234 81 Q 234 81 234 81 L 234 98" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="0"></path><polygon class="sl-arrow" points="234,98 229.66,91 238.34,91" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 156 V 167 H 234 V 178" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="1"></path><path d="M 234 156 L 234 167 Q 234 167 234 167 L 234 167 Q 234 167 234 167 L 234 178" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="1"></path><polygon class="sl-arrow" points="234,178 229.66,171 238.34,171" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 236 V 250 H 327 V 256 H 438 V 274" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="2"></path><path d="M 234 236 L 234 243 Q 234 250 241 250 L 324 250 Q 327 250 327 253 L 327 253 Q 327 256 330 256 L 335 256 Q 340 249 345 256 L 429 256 Q 438 256 438 265 L 438 274" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="2"></path><polygon class="sl-arrow" points="438,274 433.66,267 442.34,267" fill="#42506B"></polygon><rect x="260.1" y="241" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="2"></rect><text x="292.6" y="254" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="2">審査を依頼</text></g><g><path class="sl-hit" d="M 522 303 H 540 V 454 H 438 V 466" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="3"></path><path d="M 522 303 L 531 303 Q 540 303 540 312 L 540 445 Q 540 454 531 454 L 444 454 Q 438 454 438 460 L 438 466" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="3"></path><polygon class="sl-arrow" points="438,466 433.66,459 442.34,459" fill="#42506B"></polygon><rect x="529" y="375.5" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="3"></rect><text x="540" y="388.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="3">OK</text></g><g><path class="sl-hit" d="M 438 332 V 351 H 234 V 370" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="4"></path><path d="M 438 332 L 438 342 Q 438 351 429 351 L 345 351 Q 340 344 335 351 L 243 351 Q 234 351 234 360 L 234 370" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="4"></path><polygon class="sl-arrow" points="234,370 229.66,363 238.34,363" fill="#42506B"></polygon><rect x="354.03999999999996" y="342" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="4"></rect><text x="365.03999999999996" y="355" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="4">NG</text></g><g><path class="sl-hit" d="M 318 399 H 340 V 207 H 318" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="5"></path><path d="M 318 399 L 331 399 Q 340 399 340 390 L 340 216 Q 340 207 331 207 L 318 207" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="5"></path><polygon class="sl-arrow" points="318,207 325,202.66 325,211.34" fill="#42506B"></polygon><rect x="306.5" y="294" width="43" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="5"></rect><text x="328" y="307" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="5">再見積</text></g><g><path class="sl-hit" d="M 438 524 V 538 H 531 V 544 H 642 V 562" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="6"></path><path d="M 438 524 L 438 531 Q 438 538 445 538 L 528 538 Q 531 538 531 541 L 531 541 Q 531 544 534 544 L 633 544 Q 642 544 642 553 L 642 562" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="6"></path><polygon class="sl-arrow" points="642,562 637.66,555 646.34,555" fill="#42506B"></polygon><rect x="483.46000000000004" y="529" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="6"></rect><text x="515.96" y="542" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="6">出荷を指示</text></g><g><path class="sl-hit" d="M 726 591 H 744 V 742 H 642 V 754" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="7"></path><path d="M 726 591 L 735 591 Q 744 591 744 600 L 744 733 Q 744 742 735 742 L 648 742 Q 642 742 642 748 L 642 754" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="7"></path><polygon class="sl-arrow" points="642,754 637.66,747 646.34,747" fill="#42506B"></polygon><rect x="728" y="631.92" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="7"></rect><text x="744" y="644.92" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="7">あり</text></g><g><path class="sl-hit" d="M 642 620 V 639 H 642 V 658" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="8"></path><path d="M 642 620 L 642 639 Q 642 639 642 639 L 642 639 Q 642 639 642 639 L 642 658" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="8"></path><polygon class="sl-arrow" points="642,658 637.66,651 646.34,651" fill="#42506B"></polygon><rect x="626" y="630" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="8"></rect><text x="642" y="643" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="8">なし</text></g><g><path class="sl-hit" d="M 642 716 V 735 H 642 V 754" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="9"></path><path d="M 642 716 L 642 735 Q 642 735 642 735 L 642 735 Q 642 735 642 735 L 642 754" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="9"></path><polygon class="sl-arrow" points="642,754 637.66,747 646.34,747" fill="#42506B"></polygon><rect x="620.5" y="721.44" width="43" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="9"></rect><text x="642" y="734.44" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="9">入荷後</text></g><g><path class="sl-hit" d="M 642 812 V 826 H 549 V 832 H 438 V 850" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="10"></path><path d="M 642 812 L 642 819 Q 642 826 635 826 L 552 826 Q 549 826 549 829 L 549 829 Q 549 832 546 832 L 447 832 Q 438 832 438 841 L 438 850" fill="none" stroke="#42506B" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="10"></path><polygon class="sl-arrow" points="438,850 433.66,843 442.34,843" fill="#42506B"></polygon><rect x="531.54" y="817" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="10"></rect><text x="564.04" y="830" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="10">出荷を通知</text></g><g><path class="sl-hit" d="M 438 908 V 919 H 438 V 930" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="11"></path><path d="M 438 908 L 438 919 Q 438 919 438 919 L 438 919 Q 438 919 438 919 L 438 930" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="11"></path><polygon class="sl-arrow" points="438,930 433.66,923 442.34,923" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 438 988 V 1005 H 438 V 1022" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="12"></path><path d="M 438 988 L 438 1005 Q 438 1005 438 1005 L 438 1005 Q 438 1005 438 1005 L 438 1022" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="12"></path><polygon class="sl-arrow" points="438,1022 433.66,1015 442.34,1015" fill="#42506B"></polygon></g><g data-pick="node" data-idx="1"><rect class="sl-shape" x="150" y="98" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="132" text-anchor="middle" font-size="12" fill="#16233A">見積を出す</text></g><g data-pick="node" data-idx="2"><polygon class="sl-shape" points="166,178 318,178 302,236 150,236" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="234" y="212" text-anchor="middle" font-size="12" fill="#16233A">注文を受ける</text></g><g data-pick="node" data-idx="4"><rect class="sl-shape" x="150" y="370" width="168" height="58" rx="7" ry="7" fill="#FFE0E0" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="404" text-anchor="middle" font-size="12" fill="#16233A">条件を見直す</text></g><g data-pick="node" data-idx="3"><polygon class="sl-shape" points="438,274 522,303 438,332 354,303" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="438" y="300.5" text-anchor="middle" font-size="12" fill="#16233A">与信は足りる</text><text x="438" y="315.5" text-anchor="middle" font-size="12" fill="#16233A">か</text></g><g data-pick="node" data-idx="5"><rect class="sl-shape" x="354" y="466" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="500" text-anchor="middle" font-size="12" fill="#16233A">受注を登録する</text></g><g data-pick="node" data-idx="9"><rect class="sl-shape" x="354" y="850" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="884" text-anchor="middle" font-size="12" fill="#16233A">請求書を送る</text></g><g data-pick="node" data-idx="10"><rect class="sl-shape" x="354" y="930" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="964" text-anchor="middle" font-size="12" fill="#16233A">入金を確認する</text></g><g data-pick="node" data-idx="6"><polygon class="sl-shape" points="642,562 726,591 642,620 558,591" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="642" y="596" text-anchor="middle" font-size="12" fill="#16233A">在庫はあるか</text></g><g data-pick="node" data-idx="7"><rect class="sl-shape" x="558" y="658" width="168" height="58" rx="7" ry="7" fill="#FFF3D6" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="692" text-anchor="middle" font-size="12" fill="#16233A">取り寄せる</text></g><g data-pick="node" data-idx="8"><rect class="sl-shape" x="558" y="754" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="788" text-anchor="middle" font-size="12" fill="#16233A">出荷する</text></g><g data-pick="node" data-idx="0"><circle class="sl-shape" cx="234" cy="51" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><rect x="218" y="64" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="234" y="77" text-anchor="middle" font-size="11" fill="#3C516C">引合</text></g><g data-pick="node" data-idx="11"><circle class="sl-shape" cx="438" cy="1035" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><circle cx="438" cy="1035" r="9" fill="#FFFFFF"></circle><circle cx="438" cy="1035" r="6" fill="#42506B"></circle><rect x="422" y="1048" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="438" y="1061" text-anchor="middle" font-size="11" fill="#3C516C">完了</text></g></g></svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="790" height="1162" viewBox="0 0 790 1162" font-family="Inter, 'Yu Gothic UI', 'Meiryo UI', sans-serif"><rect x="0" y="0" width="790" height="1162" fill="#FFFFFF"></rect><text x="395" y="24" text-anchor="middle" font-size="16" font-weight="700" fill="#16233A">受注から入金までの流れ</text><g transform="translate(14, 48)"><g data-pick="lane" data-idx="0"><rect class="sl-shape" x="132" y="0" width="204" height="1100" fill="#FFF1E0" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="132" y="0" width="204" height="38" fill="#FFF1E0" stroke="#B9C7DA"></rect><text x="234" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">営業</text></g><g data-pick="lane" data-idx="1"><rect class="sl-shape" x="336" y="0" width="204" height="1100" fill="#E6EFFC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="336" y="0" width="204" height="38" fill="#E6EFFC" stroke="#B9C7DA"></rect><text x="438" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">業務</text></g><g data-pick="lane" data-idx="2"><rect class="sl-shape" x="540" y="0" width="204" height="1100" fill="#E7F6EC" fill-opacity="0.55" stroke="#B9C7DA"></rect><rect x="540" y="0" width="204" height="38" fill="#E7F6EC" stroke="#B9C7DA"></rect><text x="642" y="24" text-anchor="middle" font-size="12.5" font-weight="700" fill="#16233A">倉庫</text></g><line x1="132" y1="464" x2="744" y2="464" stroke="#D3E1EF" stroke-width="1"></line><line x1="132" y1="848" x2="744" y2="848" stroke="#D3E1EF" stroke-width="1"></line><g data-pick="phase" data-idx="0"><rect class="sl-shape" x="0" y="38" width="132" height="426" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="256" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">受付</text></g><g data-pick="phase" data-idx="1"><rect class="sl-shape" x="0" y="464" width="132" height="384" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="661" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">出荷</text></g><g data-pick="phase" data-idx="2"><rect class="sl-shape" x="0" y="848" width="132" height="252" fill="#EEF4FB" stroke="#B9C7DA"></rect><text x="66" y="979" text-anchor="middle" font-size="12" font-weight="700" fill="#3C516C">請求</text></g><g><path class="sl-hit" d="M 234 81 V 98 H 234 V 115" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="0"></path><path d="M 234 81 L 234 98 Q 234 98 234 98 L 234 98 Q 234 98 234 98 L 234 115" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="0"></path><polygon class="sl-arrow" points="234,115 229.66,108 238.34,108" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 173 V 184 H 234 V 195" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="1"></path><path d="M 234 173 L 234 184 Q 234 184 234 184 L 234 184 Q 234 184 234 184 L 234 195" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="1"></path><polygon class="sl-arrow" points="234,195 228.42,186 239.58,186" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 234 253 V 267 H 327 V 273 H 438 V 291" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="2"></path><path d="M 234 253 L 234 260 Q 234 267 241 267 L 324 267 Q 327 267 327 270 L 327 270 Q 327 273 330 273 L 335 273 Q 340 266 345 273 L 429 273 Q 438 273 438 282 L 438 291" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="2"></path><polygon class="sl-arrow" points="438,291 432.42,282 443.58,282" fill="#42506B"></polygon><rect x="260.1" y="258" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="2"></rect><text x="292.6" y="271" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="2">審査を依頼</text></g><g><path class="sl-hit" d="M 522 320 H 540 V 471 H 438 V 483" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="3"></path><path d="M 522 320 L 531 320 Q 540 320 540 329 L 540 462 Q 540 471 531 471 L 444 471 Q 438 471 438 477 L 438 483" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="3"></path><polygon class="sl-arrow" points="438,483 432.42,474 443.58,474" fill="#42506B"></polygon><rect x="529" y="392.5" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="3"></rect><text x="540" y="405.5" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="3">OK</text></g><g><path class="sl-hit" d="M 438 349 V 368 H 234 V 387" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="4"></path><path d="M 438 349 L 438 359 Q 438 368 429 368 L 345 368 Q 340 361 335 368 L 243 368 Q 234 368 234 377 L 234 387" fill="none" stroke="#D32F2F" stroke-width="3" stroke-dasharray="10 6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="4"></path><polygon class="sl-arrow" points="234,387 228.42,378 239.58,378" fill="#D32F2F"></polygon><rect x="354.03999999999996" y="359" width="22" height="18" rx="4" fill="#FFFFFF" stroke="#D32F2F" data-pick="link" data-idx="4"></rect><text x="365.03999999999996" y="372" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="4">NG</text></g><g><path class="sl-hit" d="M 318 416 H 340 V 224 H 318" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="5"></path><path d="M 318 416 L 331 416 Q 340 416 340 407 L 340 233 Q 340 224 331 224 L 318 224" fill="none" stroke="#D32F2F" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="5"></path><polygon class="sl-arrow" points="318,224 325,219.66 325,228.34" fill="#D32F2F"></polygon><rect x="306.5" y="311" width="43" height="18" rx="4" fill="#FFFFFF" stroke="#D32F2F" data-pick="link" data-idx="5"></rect><text x="328" y="324" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="5">再見積</text></g><g><path class="sl-hit" d="M 438 541 V 555 H 531 V 561 H 642 V 579" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="6"></path><path d="M 438 541 L 438 548 Q 438 555 445 555 L 528 555 Q 531 555 531 558 L 531 558 Q 531 561 534 561 L 633 561 Q 642 561 642 570 L 642 579" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="6"></path><polygon class="sl-arrow" points="642,579 636.42,570 647.58,570" fill="#42506B"></polygon><rect x="483.46000000000004" y="546" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="6"></rect><text x="515.96" y="559" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="6">出荷を指示</text></g><g><path class="sl-hit" d="M 726 608 H 744 V 759 H 642 V 771" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="7"></path><path d="M 726 608 L 735 608 Q 744 608 744 617 L 744 750 Q 744 759 735 759 L 648 759 Q 642 759 642 765 L 642 771" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="7"></path><polygon class="sl-arrow" points="642,771 636.42,762 647.58,762" fill="#42506B"></polygon><rect x="728" y="648.92" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="7"></rect><text x="744" y="661.92" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="7">あり</text></g><g><path class="sl-hit" d="M 642 637 V 656 H 642 V 675" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="8"></path><path d="M 642 637 L 642 656 Q 642 656 642 656 L 642 656 Q 642 656 642 656 L 642 675" fill="none" stroke="#1565C0" stroke-width="3" stroke-dasharray="10 6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="8"></path><polygon class="sl-arrow" points="642,675 636.42,666 647.58,666" fill="#1565C0"></polygon><rect x="626" y="647" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#1565C0" data-pick="link" data-idx="8"></rect><text x="642" y="660" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="8">なし</text></g><g><path class="sl-hit" d="M 642 733 V 752 H 642 V 771" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="9"></path><path d="M 642 733 L 642 752 Q 642 752 642 752 L 642 752 Q 642 752 642 752 L 642 771" fill="none" stroke="#1565C0" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="9"></path><polygon class="sl-arrow" points="642,771 637.66,764 646.34,764" fill="#1565C0"></polygon><rect x="620.5" y="738.44" width="43" height="18" rx="4" fill="#FFFFFF" stroke="#1565C0" data-pick="link" data-idx="9"></rect><text x="642" y="751.44" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="9">入荷後</text></g><g><path class="sl-hit" d="M 642 829 V 843 H 549 V 849 H 438 V 867" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="10"></path><path d="M 642 829 L 642 836 Q 642 843 635 843 L 552 843 Q 549 843 549 846 L 549 846 Q 549 849 546 849 L 447 849 Q 438 849 438 858 L 438 867" fill="none" stroke="#42506B" stroke-width="1.6" stroke-dasharray="6 4" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="10"></path><polygon class="sl-arrow" points="438,867 433.66,860 442.34,860" fill="#42506B"></polygon><rect x="531.54" y="834" width="65" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="10"></rect><text x="564.04" y="847" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="10">出荷を通知</text></g><g><path class="sl-hit" d="M 438 925 V 936 H 438 V 947" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="11"></path><path d="M 438 925 L 438 936 Q 438 936 438 936 L 438 936 Q 438 936 438 936 L 438 947" fill="none" stroke="#42506B" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="11"></path><polygon class="sl-arrow" points="438,947 432.42,938 443.58,938" fill="#42506B"></polygon></g><g><path class="sl-hit" d="M 438 1005 V 1022 H 438 V 1039" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="12"></path><path d="M 438 1005 L 438 1022 Q 438 1022 438 1022 L 438 1022 Q 438 1022 438 1022 L 438 1039" fill="none" stroke="#42506B" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="12"></path><polygon class="sl-arrow" points="438,1039 433.66,1032 442.34,1032" fill="#42506B"></polygon></g><g data-pick="node" data-idx="1"><rect class="sl-shape" x="150" y="115" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="149" text-anchor="middle" font-size="12" fill="#16233A">見積を出す</text></g><g data-pick="node" data-idx="2"><polygon class="sl-shape" points="166,195 318,195 302,253 150,253" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="234" y="229" text-anchor="middle" font-size="12" fill="#16233A">注文を受ける</text></g><g data-pick="node" data-idx="4"><rect class="sl-shape" x="150" y="387" width="168" height="58" rx="7" ry="7" fill="#FFE0E0" stroke="#42506B" stroke-width="1.6"></rect><text x="234" y="421" text-anchor="middle" font-size="12" fill="#16233A">条件を見直す</text></g><g data-pick="node" data-idx="3"><polygon class="sl-shape" points="438,291 522,320 438,349 354,320" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="438" y="317.5" text-anchor="middle" font-size="12" fill="#16233A">与信は足りる</text><text x="438" y="332.5" text-anchor="middle" font-size="12" fill="#16233A">か</text></g><g data-pick="node" data-idx="5"><rect class="sl-shape" x="354" y="483" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="517" text-anchor="middle" font-size="12" fill="#16233A">受注を登録する</text></g><g data-pick="node" data-idx="9"><rect class="sl-shape" x="354" y="867" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="901" text-anchor="middle" font-size="12" fill="#16233A">請求書を送る</text></g><g data-pick="node" data-idx="10"><rect class="sl-shape" x="354" y="947" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="438" y="981" text-anchor="middle" font-size="12" fill="#16233A">入金を確認する</text></g><g data-pick="node" data-idx="6"><polygon class="sl-shape" points="642,579 726,608 642,637 558,608" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></polygon><text x="642" y="613" text-anchor="middle" font-size="12" fill="#16233A">在庫はあるか</text></g><g data-pick="node" data-idx="7"><rect class="sl-shape" x="558" y="675" width="168" height="58" rx="7" ry="7" fill="#FFF3D6" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="709" text-anchor="middle" font-size="12" fill="#16233A">取り寄せる</text></g><g data-pick="node" data-idx="8"><rect class="sl-shape" x="558" y="771" width="168" height="58" rx="7" ry="7" fill="#FFFFFF" stroke="#42506B" stroke-width="1.6"></rect><text x="642" y="805" text-anchor="middle" font-size="12" fill="#16233A">出荷する</text></g><g data-pick="node" data-idx="0"><circle class="sl-shape" cx="234" cy="68" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><rect x="218" y="81" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="234" y="94" text-anchor="middle" font-size="11" fill="#3C516C">引合</text></g><g data-pick="node" data-idx="11"><circle class="sl-shape" cx="438" cy="1052" r="13" fill="#42506B" stroke="#42506B" stroke-width="1.6"></circle><circle cx="438" cy="1052" r="9" fill="#FFFFFF"></circle><circle cx="438" cy="1052" r="6" fill="#42506B"></circle><rect x="422" y="1065" width="32" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect><text x="438" y="1078" text-anchor="middle" font-size="11" fill="#3C516C">完了</text></g></g></svg>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swimlane-diagram",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "Render swimlane (cross-functional) flowcharts as SVG from a small plain-text format. Zero dependencies, single file, works in the browser and in Node.",
5
5
  "keywords": [
6
6
  "swimlane",
@@ -32,7 +32,7 @@
32
32
  ],
33
33
  "scripts": {
34
34
  "example": "node build/make-example.js",
35
- "test": "node test/meta.test.js && node test/port-rule.test.js && node test/header-fit.test.js && node test/readability.test.js"
35
+ "test": "node test/meta.test.js && node test/port-rule.test.js && node test/header-fit.test.js && node test/readability.test.js && node test/roundtrip.test.js && node test/phase-band.test.js"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">=14"
package/swimlane.js CHANGED
@@ -68,10 +68,29 @@ const DOT_SIZE = 26;
68
68
  const DOT_GAP = 34;
69
69
  const DOT_SLOT = DOT_SIZE + DOT_GAP;
70
70
  const isDot = (shape)=> DOT_SHAPES.includes(shape);
71
+ /* 線種と、それを書くための記法。線が1本なら実線、2本なら破線。`=` にすると太くなる。
72
+ Mermaid のフローチャートでは `-->` が実線・`==>` が太い実線だが、こちらは
73
+ swimlane 記法の中での規則性を採るので、どちらも逆の意味になる。
74
+ SGS は線種セレクトと接続一覧をこの一覧から作るので、記法も一緒に持たせる。 */
71
75
  const LINK_STYLES = [
72
- { v:'solid', label:'実線' },
73
- { v:'dashed', label:'破線' },
76
+ { v:'solid', label:'実線', arrow:'->' },
77
+ { v:'dashed', label:'破線', arrow:'-->' },
78
+ { v:'thick', label:'太い実線', arrow:'=>' },
79
+ { v:'thickDashed', label:'太い破線', arrow:'==>' },
74
80
  ];
81
+ const LINK_DEFAULT_STYLE = LINK_STYLES[0];
82
+ /* 接続行を読む正規表現と、連鎖を見つけるための正規表現。長い記法から試す必要がある。
83
+ 上の LINK_STYLES と食い違わないことは test/roundtrip.test.js で見ている */
84
+ const LINK_ARROW_RE = /(==>|=>|-->|->)/;
85
+ const arrowOfStyle = (style)=> (LINK_STYLES.find(s=>s.v === style) || LINK_DEFAULT_STYLE).arrow;
86
+ const styleOfArrow = (arrow)=> (LINK_STYLES.find(s=>s.arrow === arrow) || LINK_DEFAULT_STYLE).v;
87
+ const isThickLink = (style)=> style === 'thick' || style === 'thickDashed';
88
+ const isDashedLink = (style)=> style === 'dashed' || style === 'thickDashed';
89
+ /* 線の既定色。color を指定しなかったときはこれで描く */
90
+ const LINK_COLOR = '#42506B';
91
+ /* レーンの上に引くフェーズの境目の色。帯の枠(#B9C7DA)より薄くして、
92
+ 図形や線より手前に出てこないようにする */
93
+ const PHASE_RULE = '#D3E1EF';
75
94
  function esc(s){
76
95
  return String(s == null ? '' : s)
77
96
  .replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;')
@@ -131,8 +150,11 @@ function generateCode(state){
131
150
  if(state.links.length){
132
151
  lines.push('');
133
152
  state.links.forEach(e=>{
134
- const arrow = e.style === 'dashed' ? '-->' : '->';
135
- lines.push(`${e.from} ${arrow} ${e.to}${e.label ? ' ' + quote(e.label) : ''}`);
153
+ const attrs = [];
154
+ if(e.color) attrs.push('color=' + e.color);
155
+ lines.push(`${e.from} ${arrowOfStyle(e.style)} ${e.to}`
156
+ + (e.label ? ' ' + quote(e.label) : '')
157
+ + (attrs.length ? ' ' + attrs.join(' ') : ''));
136
158
  });
137
159
  }
138
160
  if(!state.lanes.length && !state.nodes.length){
@@ -205,13 +227,27 @@ function parseCode(text){
205
227
  });
206
228
  return;
207
229
  }
208
- // 接続: A -> B "ラベル" / A --> B
209
- const link = line.match(/^(\S+)\s*(-->|->)\s*(\S+)(.*)$/);
230
+ // 接続: A -> B "ラベル" / A --> B / A => B / A ==> B / A -> B color=#D32F2F
231
+ // 1つめを控えめ(\S+?)にする。欲張りだと `A-->B` の from が `A-` になり、
232
+ // 線種も破線ではなく実線になっていた(空白を入れた `A --> B` だけが正しく読めていた)。
233
+ const link = line.match(/^(\S+?)\s*(==>|=>|-->|->)\s*(\S+)(.*)$/);
210
234
  if(link){
235
+ const tail = takeLabel(link[4] || '');
236
+ // `A -> B -> C` は from=A, to=B になり残りが黙って捨てられていた。はっきり断る
237
+ if(LINK_ARROW_RE.test(tail.rest)){
238
+ errors.push(`${lineNo}行目: 1行でつなげるのは2つまでです → ${line}`);
239
+ return;
240
+ }
241
+ const attr = {};
242
+ tail.rest.split(/\s+/).filter(Boolean).forEach(t=>{
243
+ const eq = t.indexOf('=');
244
+ if(eq > 0) attr[t.slice(0, eq)] = t.slice(eq + 1);
245
+ });
211
246
  next.links.push({
212
247
  from: link[1], to: link[3],
213
- label: takeLabel(link[4] || '').label,
214
- style: link[2] === '-->' ? 'dashed' : 'solid',
248
+ label: tail.label,
249
+ style: styleOfArrow(link[2]),
250
+ color: attr.color || '',
215
251
  });
216
252
  return;
217
253
  }
@@ -237,6 +273,7 @@ const LAYOUT = {
237
273
  phaseHeaderH: 38, // フェーズ名の帯
238
274
  nodeW: 168, nodeH: 58,
239
275
  gapMain: 34, // フェーズとフェーズの間隔
276
+ phasePad: 17, // フェーズ帯の内側の余白(隣の帯と gapMain を分け合った分と同じ値)
240
277
  gapInner: 22, // 同じフェーズ内で流れ方向に並べるときの間隔
241
278
  gapCross: 18, // レーンを横切る向き(分岐で枝を並べたとき)の間隔
242
279
  };
@@ -652,7 +689,7 @@ function computeLayout(state){
652
689
  const laneRuns = lanes.map(l=> Math.max(1, laneCross.get(l.id) || 0));
653
690
 
654
691
  const headerMain = dir === 'LR' ? L.laneHeaderW : L.phaseHeaderH;
655
- const mainStart = headerMain + leadPad; // 先頭に開始●があれば、その分だけ流れ方向にずらす
692
+ const mainStart = headerMain + leadPad + L.phasePad; // 先頭に開始●があれば、その分だけ流れ方向にずらす。帯の内側の余白も空ける
656
693
  const crossStart = dir === 'LR'
657
694
  ? (hasPhaseHeader ? L.phaseHeaderH : 0)
658
695
  : (hasPhaseHeader ? L.laneHeaderW : 0);
@@ -868,33 +905,50 @@ function computeLayout(state){
868
905
  const pid = isDot(b.node.shape) ? dotPhase.get(b.node) : phaseIdOf(b.node);
869
906
  const j = phases.findIndex(p=> p.id === pid);
870
907
  if(j < 0) return;
871
- const s = dir === 'LR' ? b.x : b.y, e = dir === 'LR' ? b.x + b.w : b.y + b.h;
908
+ let s = dir === 'LR' ? b.x : b.y, e = dir === 'LR' ? b.x + b.w : b.y + b.h;
909
+ /* ●のラベルは●の枠の外(真下)に白い箱で添えるので、箱の分まで帯に入れる。
910
+ 入れないと最後の●の「完了」が帯の縁の線に触る。寸法は描画側と同じものを使う。 */
911
+ if(isDot(b.node.shape) && b.node.label){
912
+ if(dir === 'LR'){
913
+ const half = labelPixelWidth(b.node.label) / 2, cx = b.x + b.w / 2;
914
+ s = Math.min(s, cx - half); e = Math.max(e, cx + half);
915
+ }else{
916
+ e = Math.max(e, b.y + b.h + LABEL_BOX_H);
917
+ }
918
+ }
872
919
  lo[j] = Math.min(lo[j], s); hi[j] = Math.max(hi[j], e);
873
920
  });
874
- // 前の帯の終端を覚えておき、重ならないように順に確定する。
875
- // ノードが無いフェーズは既定の幅(phaseRuns基準のサイズ)を保ったまま、位置だけ前の帯に合わせる。
921
+ // 中身の無いフェーズは、既定の大きさを保ったまま前のフェーズの後ろに置く
922
+ let tail = null;
923
+ phases.forEach((p, j)=>{
924
+ if(lo[j] !== Infinity){ tail = hi[j]; return; }
925
+ const s = tail != null ? tail + L.gapMain : mainStart;
926
+ lo[j] = s;
927
+ hi[j] = s + Math.max(0, phaseBands[j].size - L.phasePad * 2);
928
+ tail = hi[j];
929
+ });
930
+ /* 帯の縁を決める。隣り合う帯はノードどうしの隙間を真ん中で分け合い、地続きに並べる。
931
+ 離して並べていた頃は帯の縁が26px空いて2本並び、レーンの上にフェーズの境界線を
932
+ 引いてもどちらが境目なのか分からなかった。内側の余白 phasePad は、
933
+ 隙間を分け合った分(gapMain の半分)と同じ値にしてあるので、どの帯も同じだけ空く。 */
876
934
  let prevEnd = null;
877
935
  phases.forEach((p, j)=>{
878
- if(lo[j] === Infinity){
879
- const s = prevEnd != null ? prevEnd + L.gapMain / 2 : phaseBands[j].start;
880
- phaseBands[j].start = s; // size は既定値のまま変更しない
881
- prevEnd = s + phaseBands[j].size;
882
- return;
883
- }
884
- let s = lo[j] - 6, e = hi[j] + 6;
885
- if(prevEnd != null) s = Math.max(s, (prevEnd + lo[j]) / 2); // 直前とは中間で分ける
886
- if(j === 0) s = Math.max(headerMain, s);
936
+ const s = j === 0
937
+ ? Math.max(headerMain, lo[0] - L.phasePad) // 先頭はレーン名の帯にくっつける
938
+ : Math.max((hi[j - 1] + lo[j]) / 2, prevEnd); // 以降は前の帯の終端から続ける
939
+ let e = j === phases.length - 1 ? hi[j] + L.phasePad : (hi[j] + lo[j + 1]) / 2;
887
940
  // LRではフェーズ名が上の細い帯(高さ38px固定)に横書きで入る。ノードの位置ぴったりに
888
941
  // 詰めると名前がはみ出して切れるので、名前に要る長さは残す。
889
- // 帯どうしの間隔は上で名前のぶんを見込んで取ってあるので、ここで広げても隣とぶつからない。
942
+ // 帯の間隔は上で名前のぶんを見込んで取ってあるので、ここで広げても隣とぶつからない。
890
943
  if(hasPhaseHeader && dir === 'LR') e = Math.max(e, s + headerTextWidth(p.label, 12) + 16);
891
944
  phaseBands[j].start = s;
892
945
  phaseBands[j].size = Math.max(0, e - s);
893
- prevEnd = e;
946
+ prevEnd = s + phaseBands[j].size;
894
947
  });
895
- // 帯の拡張で末尾が伸びていれば、全体サイズもそれに合わせる(描画が切れないように)
896
- const lastBand = phaseBands[phases.length - 1];
897
- mainTotal = Math.max(mainTotal, lastBand.start + lastBand.size + trailPad + L.gapMain / 2);
948
+ /* 図の長さは最後の帯の終端で決める。以前はここに trailPad(終了●の分)と gapMain/2 を
949
+ 足していたが、終了●はもう帯の中に入っているので二重に空けていた
950
+ (examples/order.swim で最後のフェーズの下に 77px の空白が出ていた)。 */
951
+ mainTotal = phaseBands[phases.length - 1].start + phaseBands[phases.length - 1].size;
898
952
  }
899
953
 
900
954
  const width = dir === 'LR' ? mainTotal : crossTotal;
@@ -1191,8 +1245,8 @@ function crossingsAndJunctions(renders){
1191
1245
  return { hopsBy };
1192
1246
  }
1193
1247
 
1194
- function arrowHead(tip){
1195
- const s = 7;
1248
+ function arrowHead(tip, color, thick){
1249
+ const s = thick ? 9 : 7;
1196
1250
  const { x, y, dirn } = tip;
1197
1251
  const pts = {
1198
1252
  right: `${x},${y} ${x-s},${y-s*0.62} ${x-s},${y+s*0.62}`,
@@ -1200,7 +1254,7 @@ function arrowHead(tip){
1200
1254
  down: `${x},${y} ${x-s*0.62},${y-s} ${x+s*0.62},${y-s}`,
1201
1255
  up: `${x},${y} ${x-s*0.62},${y+s} ${x+s*0.62},${y+s}`,
1202
1256
  }[dirn];
1203
- return `<polygon class="sl-arrow" points="${pts}" fill="#42506B"></polygon>`;
1257
+ return `<polygon class="sl-arrow" points="${pts}" fill="${esc(color || LINK_COLOR)}"></polygon>`;
1204
1258
  }
1205
1259
 
1206
1260
  /* ---- エッジ経路の補助(分岐の角出し・ノード回避) ---- */
@@ -1704,6 +1758,17 @@ function drawSvg(state){
1704
1758
  }
1705
1759
  });
1706
1760
 
1761
+ /* フェーズの境目を、レーンの上にも薄く引く。
1762
+ フェーズ名は端の列にしか出ないので、名前が無い側ではノードがどのフェーズに
1763
+ 入っているのかを目で辿ることになっていた。帯は地続きなので境目は1本で足りる。 */
1764
+ if(lay.hasPhaseHeader && lay.phaseBands.length > 1){
1765
+ lay.phaseBands.slice(1).forEach(pb=>{
1766
+ out.push(lay.dir === 'LR'
1767
+ ? `<line x1="${pb.start}" y1="${LAYOUT.phaseHeaderH}" x2="${pb.start}" y2="${lay.height}" stroke="${PHASE_RULE}" stroke-width="1"></line>`
1768
+ : `<line x1="${LAYOUT.laneHeaderW}" y1="${pb.start}" x2="${lay.width}" y2="${pb.start}" stroke="${PHASE_RULE}" stroke-width="1"></line>`);
1769
+ });
1770
+ }
1771
+
1707
1772
  // フェーズの見出し
1708
1773
  if(lay.hasPhaseHeader){
1709
1774
  lay.phaseBands.forEach(pb=>{
@@ -1730,16 +1795,21 @@ function drawSvg(state){
1730
1795
  linkRenders.forEach(item=>{
1731
1796
  if(!item) return;
1732
1797
  const { e, i, p } = item;
1733
- const dash = e.style === 'dashed' ? ' stroke-dasharray="6 4"' : '';
1798
+ // 太線で `6 4` のままだと刻みが詰まって実線に見えるので、太いときは広げる
1799
+ const thick = isThickLink(e.style);
1800
+ const stroke = e.color || LINK_COLOR;
1801
+ const dash = isDashedLink(e.style)
1802
+ ? (thick ? ' stroke-dasharray="10 6"' : ' stroke-dasharray="6 4"')
1803
+ : '';
1734
1804
  // 見た目だけ角丸+またぎにする。当たり判定(class="sl-hit")は直角のままでよい
1735
1805
  const shown = decoratePath(pathSegmentsOf(p.d), hopsBy.get(i) || []) || p.d;
1736
1806
  out.push(`<g>`);
1737
1807
  out.push(`<path class="sl-hit" d="${p.d}" fill="none" stroke="transparent" stroke-width="14" data-pick="link" data-idx="${i}"></path>`);
1738
- out.push(`<path d="${shown}" fill="none" stroke="#42506B" stroke-width="1.6"${dash} stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="${i}"></path>`);
1739
- out.push(arrowHead(p.tip));
1808
+ out.push(`<path d="${shown}" fill="none" stroke="${esc(stroke)}" stroke-width="${thick ? 3 : 1.6}"${dash} stroke-linecap="round" stroke-linejoin="round" data-pick="link" data-idx="${i}"></path>`);
1809
+ out.push(arrowHead(p.tip, stroke, thick));
1740
1810
  if(e.label){
1741
1811
  const tw = labelPixelWidth(e.label);
1742
- out.push(`<rect x="${p.mid.x - tw/2}" y="${p.mid.y - 9}" width="${tw}" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF" data-pick="link" data-idx="${i}"></rect>`);
1812
+ out.push(`<rect x="${p.mid.x - tw/2}" y="${p.mid.y - 9}" width="${tw}" height="18" rx="4" fill="#FFFFFF" stroke="${esc(e.color || '#D3E1EF')}" data-pick="link" data-idx="${i}"></rect>`);
1743
1813
  out.push(`<text x="${p.mid.x}" y="${p.mid.y + 4}" text-anchor="middle" font-size="11" fill="#3C516C" data-pick="link" data-idx="${i}">${esc(e.label)}</text>`);
1744
1814
  }
1745
1815
  out.push(`</g>`);
@@ -1758,7 +1828,7 @@ function drawSvg(state){
1758
1828
  if(n.label){
1759
1829
  const tw = labelPixelWidth(n.label);
1760
1830
  const cx = b.x + b.w / 2, base = b.y + b.h + 13;
1761
- out.push(`<rect x="${cx - tw/2}" y="${base - 13}" width="${tw}" height="18" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect>`);
1831
+ out.push(`<rect x="${cx - tw/2}" y="${base - 13}" width="${tw}" height="${LABEL_BOX_H}" rx="4" fill="#FFFFFF" stroke="#D3E1EF"></rect>`);
1762
1832
  out.push(`<text x="${cx}" y="${base}" text-anchor="middle" font-size="11" fill="#3C516C">${esc(n.label)}</text>`);
1763
1833
  }
1764
1834
  }else{
@@ -1801,9 +1871,10 @@ function renderTo(target, code){
1801
1871
  }
1802
1872
 
1803
1873
  return {
1804
- VERSION: '1.3.0',
1874
+ VERSION: '1.4.0',
1805
1875
  SHAPES,
1806
1876
  LINK_STYLES,
1877
+ LINK_COLOR,
1807
1878
  isDot,
1808
1879
  parse: parseCode,
1809
1880
  generate: generateCode,