@senad-d/drawme 0.1.6 → 0.1.9

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.
@@ -1,207 +1,215 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <mxfile host="drawio" version="26.0.9">
3
3
  <diagram id="git-graph-example" name="Git Graph">
4
- <mxGraphModel dx="1800" dy="920" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1920" pageHeight="940" math="0" shadow="0" background="#FFFFFF">
4
+ <mxGraphModel dx="1800" dy="920" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1840" pageHeight="950" math="0" shadow="0" background="#FFFFFF">
5
5
  <root>
6
- <mxCell id="0" />
7
- <mxCell id="1" parent="0" />
6
+ <mxCell id="0"/>
7
+ <mxCell id="1" parent="0"/>
8
8
  <mxCell id="2" value="Git Graph Example" style="text;html=1;align=left;verticalAlign=middle;fontSize=32;fontStyle=1;fontColor=#172B4D;" vertex="1" parent="1">
9
- <mxGeometry x="40" y="20" width="900" height="50" as="geometry" />
9
+ <mxGeometry x="40" y="40" width="900" height="50" as="geometry"/>
10
10
  </mxCell>
11
11
  <mxCell id="3" value="A documentation refresh with focused edits, updated references, and regenerated examples" style="text;html=1;align=left;verticalAlign=middle;fontSize=17;fontColor=#536273;" vertex="1" parent="1">
12
- <mxGeometry x="40" y="70" width="1250" height="40" as="geometry" />
12
+ <mxGeometry x="40" y="90" width="1250" height="40" as="geometry"/>
13
13
  </mxCell>
14
14
  <mxCell id="4" value="TIME FLOWS LEFT → RIGHT" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=13;fontStyle=1;fontColor=#172B4D;fillColor=#F4F1EA;strokeColor=#A8B0BA;strokeWidth=2;" vertex="1" parent="1">
15
- <mxGeometry x="1450" y="35" width="350" height="50" as="geometry" />
15
+ <mxGeometry x="1450" y="55" width="350" height="50" as="geometry"/>
16
16
  </mxCell>
17
17
  <mxCell id="5" value="" style="rounded=1;arcSize=8;container=1;pointerEvents=0;html=1;fillColor=#FAFAFC;strokeColor=#C7CED6;strokeWidth=2;" vertex="1" parent="1">
18
- <mxGeometry x="40" y="130" width="1760" height="620" as="geometry" />
18
+ <mxGeometry x="40" y="150" width="1760" height="620" as="geometry"/>
19
19
  </mxCell>
20
20
  <mxCell id="6" value="examples/refresh" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#E74C3C;strokeColor=#B83227;strokeWidth=2;" vertex="1" parent="5">
21
- <mxGeometry x="40" y="30" width="180" height="35" as="geometry" />
21
+ <mxGeometry x="40" y="30" width="180" height="35" as="geometry"/>
22
22
  </mxCell>
23
23
  <mxCell id="7" value="main" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#172B4D;strokeColor=#0D1A2E;strokeWidth=2;" vertex="1" parent="5">
24
- <mxGeometry x="40" y="180" width="180" height="35" as="geometry" />
24
+ <mxGeometry x="40" y="180" width="180" height="35" as="geometry"/>
25
25
  </mxCell>
26
26
  <mxCell id="8" value="docs/cleanup" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#00A6A6;strokeColor=#007A7A;strokeWidth=2;" vertex="1" parent="5">
27
- <mxGeometry x="40" y="340" width="180" height="35" as="geometry" />
27
+ <mxGeometry x="40" y="340" width="180" height="35" as="geometry"/>
28
28
  </mxCell>
29
29
  <mxCell id="9" value="references/tools" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#8E44AD;strokeColor=#663080;strokeWidth=2;" vertex="1" parent="5">
30
- <mxGeometry x="40" y="500" width="180" height="35" as="geometry" />
30
+ <mxGeometry x="40" y="500" width="180" height="35" as="geometry"/>
31
31
  </mxCell>
32
32
  <mxCell id="10" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#172B4D;strokeWidth=8;" edge="1" parent="5" source="25" target="26">
33
- <mxGeometry relative="1" as="geometry" />
33
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="330" y="230"/></Array></mxGeometry>
34
34
  </mxCell>
35
35
  <mxCell id="11" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#172B4D;strokeWidth=8;" edge="1" parent="5" source="26" target="27">
36
- <mxGeometry relative="1" as="geometry" />
36
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="580" y="230"/></Array></mxGeometry>
37
37
  </mxCell>
38
38
  <mxCell id="12" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#172B4D;strokeWidth=8;" edge="1" parent="5" source="27" target="28">
39
- <mxGeometry relative="1" as="geometry" />
39
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="900" y="230"/></Array></mxGeometry>
40
40
  </mxCell>
41
41
  <mxCell id="13" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#172B4D;strokeWidth=8;" edge="1" parent="5" source="28" target="30">
42
- <mxGeometry relative="1" as="geometry" />
42
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1330" y="230"/></Array></mxGeometry>
43
43
  </mxCell>
44
44
  <mxCell id="14" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#00A6A6;strokeWidth=8;" edge="1" parent="5" source="26" target="32">
45
- <mxGeometry relative="1" as="geometry" />
45
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="520" y="310"/></Array></mxGeometry>
46
46
  </mxCell>
47
47
  <mxCell id="15" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#00A6A6;strokeWidth=8;" edge="1" parent="5" source="32" target="33">
48
- <mxGeometry relative="1" as="geometry" />
48
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="690" y="390"/></Array></mxGeometry>
49
49
  </mxCell>
50
50
  <mxCell id="16" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#00A6A6;strokeWidth=8;" edge="1" parent="5" source="33" target="34">
51
- <mxGeometry relative="1" as="geometry" />
51
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="970" y="390"/></Array></mxGeometry>
52
52
  </mxCell>
53
53
  <mxCell id="17" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#00A6A6;strokeWidth=8;" edge="1" parent="5" source="34" target="36">
54
- <mxGeometry relative="1" as="geometry" />
54
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1260" y="390"/></Array></mxGeometry>
55
55
  </mxCell>
56
56
  <mxCell id="18" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#00A6A6;strokeWidth=8;" edge="1" parent="5" source="36" target="30">
57
- <mxGeometry relative="1" as="geometry" />
57
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1470" y="310"/></Array></mxGeometry>
58
58
  </mxCell>
59
59
  <mxCell id="19" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#8E44AD;strokeWidth=8;" edge="1" parent="5" source="32" target="37">
60
- <mxGeometry relative="1" as="geometry" />
60
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="690" y="470"/></Array></mxGeometry>
61
61
  </mxCell>
62
62
  <mxCell id="20" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#8E44AD;strokeWidth=8;" edge="1" parent="5" source="37" target="38">
63
- <mxGeometry relative="1" as="geometry" />
63
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="860" y="550"/></Array></mxGeometry>
64
64
  </mxCell>
65
65
  <mxCell id="21" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#8E44AD;strokeWidth=8;" edge="1" parent="5" source="38" target="39">
66
- <mxGeometry relative="1" as="geometry" />
66
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1010" y="550"/></Array></mxGeometry>
67
67
  </mxCell>
68
68
  <mxCell id="22" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#8E44AD;strokeWidth=8;" edge="1" parent="5" source="39" target="34">
69
- <mxGeometry relative="1" as="geometry" />
69
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="1120" y="470"/></Array></mxGeometry>
70
70
  </mxCell>
71
71
  <mxCell id="23" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#E74C3C;strokeWidth=8;" edge="1" parent="5" source="27" target="40">
72
- <mxGeometry relative="1" as="geometry" />
72
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="810" y="155"/></Array></mxGeometry>
73
73
  </mxCell>
74
74
  <mxCell id="24" value="" style="edgeStyle=none;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;startArrow=none;strokeColor=#E74C3C;strokeWidth=8;" edge="1" parent="5" source="40" target="28">
75
- <mxGeometry relative="1" as="geometry" />
75
+ <mxGeometry relative="1" as="geometry"><Array as="points"><mxPoint x="990" y="155"/></Array></mxGeometry>
76
76
  </mxCell>
77
77
  <mxCell id="25" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
78
- <mxGeometry x="207" y="217" width="26" height="26" as="geometry" />
78
+ <mxGeometry x="207" y="217" width="26" height="26" as="geometry"/>
79
79
  </mxCell>
80
80
  <mxCell id="26" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
81
- <mxGeometry x="427" y="217" width="26" height="26" as="geometry" />
81
+ <mxGeometry x="427" y="217" width="26" height="26" as="geometry"/>
82
82
  </mxCell>
83
83
  <mxCell id="27" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
84
- <mxGeometry x="707" y="217" width="26" height="26" as="geometry" />
84
+ <mxGeometry x="707" y="217" width="26" height="26" as="geometry"/>
85
85
  </mxCell>
86
86
  <mxCell id="28" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
87
- <mxGeometry x="1061" y="211" width="38" height="38" as="geometry" />
87
+ <mxGeometry x="1061" y="211" width="38" height="38" as="geometry"/>
88
88
  </mxCell>
89
89
  <mxCell id="29" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=3;perimeter=ellipsePerimeter;" vertex="1" parent="28">
90
- <mxGeometry x="10" y="10" width="18" height="18" as="geometry" />
90
+ <mxGeometry x="0.5" y="0.5" width="18" height="18" relative="1" as="geometry">
91
+ <mxPoint x="-9" y="-9" as="offset"/>
92
+ </mxGeometry>
91
93
  </mxCell>
92
94
  <mxCell id="30" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
93
- <mxGeometry x="1561" y="211" width="38" height="38" as="geometry" />
95
+ <mxGeometry x="1561" y="211" width="38" height="38" as="geometry"/>
94
96
  </mxCell>
95
97
  <mxCell id="31" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=3;perimeter=ellipsePerimeter;" vertex="1" parent="30">
96
- <mxGeometry x="10" y="10" width="18" height="18" as="geometry" />
98
+ <mxGeometry x="0.5" y="0.5" width="18" height="18" relative="1" as="geometry">
99
+ <mxPoint x="-9" y="-9" as="offset"/>
100
+ </mxGeometry>
97
101
  </mxCell>
98
102
  <mxCell id="32" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#00A6A6;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
99
- <mxGeometry x="587" y="377" width="26" height="26" as="geometry" />
103
+ <mxGeometry x="587" y="377" width="26" height="26" as="geometry"/>
100
104
  </mxCell>
101
105
  <mxCell id="33" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#00A6A6;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
102
- <mxGeometry x="767" y="377" width="26" height="26" as="geometry" />
106
+ <mxGeometry x="767" y="377" width="26" height="26" as="geometry"/>
103
107
  </mxCell>
104
108
  <mxCell id="34" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#00A6A6;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
105
- <mxGeometry x="1141" y="371" width="38" height="38" as="geometry" />
109
+ <mxGeometry x="1141" y="371" width="38" height="38" as="geometry"/>
106
110
  </mxCell>
107
111
  <mxCell id="35" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#00A6A6;strokeWidth=3;perimeter=ellipsePerimeter;" vertex="1" parent="34">
108
- <mxGeometry x="10" y="10" width="18" height="18" as="geometry" />
112
+ <mxGeometry x="0.5" y="0.5" width="18" height="18" relative="1" as="geometry">
113
+ <mxPoint x="-9" y="-9" as="offset"/>
114
+ </mxGeometry>
109
115
  </mxCell>
110
116
  <mxCell id="36" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#00A6A6;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
111
- <mxGeometry x="1347" y="377" width="26" height="26" as="geometry" />
117
+ <mxGeometry x="1347" y="377" width="26" height="26" as="geometry"/>
112
118
  </mxCell>
113
119
  <mxCell id="37" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#8E44AD;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
114
- <mxGeometry x="767" y="537" width="26" height="26" as="geometry" />
120
+ <mxGeometry x="767" y="537" width="26" height="26" as="geometry"/>
115
121
  </mxCell>
116
122
  <mxCell id="38" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#8E44AD;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
117
- <mxGeometry x="927" y="537" width="26" height="26" as="geometry" />
123
+ <mxGeometry x="927" y="537" width="26" height="26" as="geometry"/>
118
124
  </mxCell>
119
125
  <mxCell id="39" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#8E44AD;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
120
- <mxGeometry x="1067" y="537" width="26" height="26" as="geometry" />
126
+ <mxGeometry x="1067" y="537" width="26" height="26" as="geometry"/>
121
127
  </mxCell>
122
128
  <mxCell id="40" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#E74C3C;strokeWidth=5;perimeter=ellipsePerimeter;" vertex="1" parent="5">
123
- <mxGeometry x="887" y="67" width="26" height="26" as="geometry" />
129
+ <mxGeometry x="887" y="67" width="26" height="26" as="geometry"/>
124
130
  </mxCell>
125
131
  <mxCell id="41" value="&lt;b&gt;a1b2c3&lt;/b&gt;&lt;br&gt;Baseline docs" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
126
- <mxGeometry x="150" y="260" width="140" height="45" as="geometry" />
132
+ <mxGeometry x="150" y="260" width="140" height="45" as="geometry"/>
127
133
  </mxCell>
128
134
  <mxCell id="42" value="&lt;b&gt;d4e5f6&lt;/b&gt;&lt;br&gt;Current v0.1.2" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
129
- <mxGeometry x="370" y="155" width="140" height="45" as="geometry" />
135
+ <mxGeometry x="370" y="155" width="140" height="45" as="geometry"/>
130
136
  </mxCell>
131
137
  <mxCell id="43" value="&lt;b&gt;71ac90&lt;/b&gt;&lt;br&gt;Plan cleanup" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
132
- <mxGeometry x="650" y="155" width="140" height="45" as="geometry" />
138
+ <mxGeometry x="650" y="260" width="140" height="45" as="geometry"/>
133
139
  </mxCell>
134
140
  <mxCell id="44" value="&lt;b&gt;b77c12&lt;/b&gt;&lt;br&gt;Merge examples" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
135
- <mxGeometry x="1000" y="150" width="160" height="45" as="geometry" />
141
+ <mxGeometry x="1000" y="260" width="160" height="45" as="geometry"/>
136
142
  </mxCell>
137
143
  <mxCell id="45" value="&lt;b&gt;c91e44&lt;/b&gt;&lt;br&gt;Validated docs" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
138
- <mxGeometry x="1500" y="150" width="160" height="45" as="geometry" />
144
+ <mxGeometry x="1500" y="150" width="160" height="45" as="geometry"/>
139
145
  </mxCell>
140
146
  <mxCell id="46" value="&lt;b&gt;18ad20&lt;/b&gt;&lt;br&gt;Refocus README" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
141
- <mxGeometry x="530" y="420" width="140" height="45" as="geometry" />
147
+ <mxGeometry x="430" y="420" width="140" height="45" as="geometry"/>
142
148
  </mxCell>
143
149
  <mxCell id="47" value="&lt;b&gt;42be11&lt;/b&gt;&lt;br&gt;Update security" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
144
- <mxGeometry x="710" y="420" width="140" height="45" as="geometry" />
150
+ <mxGeometry x="710" y="420" width="140" height="45" as="geometry"/>
145
151
  </mxCell>
146
152
  <mxCell id="48" value="&lt;b&gt;9dd0a8&lt;/b&gt;&lt;br&gt;Merge references" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
147
- <mxGeometry x="1080" y="420" width="160" height="45" as="geometry" />
153
+ <mxGeometry x="1080" y="315" width="160" height="45" as="geometry"/>
148
154
  </mxCell>
149
155
  <mxCell id="49" value="&lt;b&gt;a30f14&lt;/b&gt;&lt;br&gt;Align metadata" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
150
- <mxGeometry x="1290" y="420" width="140" height="45" as="geometry" />
156
+ <mxGeometry x="1290" y="420" width="140" height="45" as="geometry"/>
151
157
  </mxCell>
152
158
  <mxCell id="50" value="&lt;b&gt;33fa80&lt;/b&gt;&lt;br&gt;Remove old paths" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
153
- <mxGeometry x="710" y="570" width="140" height="45" as="geometry" />
159
+ <mxGeometry x="710" y="570" width="140" height="45" as="geometry"/>
154
160
  </mxCell>
155
161
  <mxCell id="51" value="&lt;b&gt;6cb821&lt;/b&gt;&lt;br&gt;Use DrawMe tools" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
156
- <mxGeometry x="870" y="570" width="140" height="45" as="geometry" />
162
+ <mxGeometry x="870" y="570" width="140" height="45" as="geometry"/>
157
163
  </mxCell>
158
164
  <mxCell id="52" value="&lt;b&gt;70ee91&lt;/b&gt;&lt;br&gt;Refresh references" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
159
- <mxGeometry x="1010" y="570" width="140" height="45" as="geometry" />
165
+ <mxGeometry x="1010" y="570" width="140" height="45" as="geometry"/>
160
166
  </mxCell>
161
167
  <mxCell id="53" value="&lt;b&gt;f00d42&lt;/b&gt;&lt;br&gt;Refresh examples" style="text;html=1;align=center;verticalAlign=middle;fontSize=12;fontColor=#263746;" vertex="1" parent="5">
162
- <mxGeometry x="830" y="100" width="140" height="45" as="geometry" />
168
+ <mxGeometry x="830" y="10" width="140" height="45" as="geometry"/>
163
169
  </mxCell>
164
170
  <mxCell id="54" value="baseline: v0.1.2" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=11;fontStyle=1;fontColor=#2D5E36;fillColor=#D5E8D4;strokeColor=#82B366;" vertex="1" parent="5">
165
- <mxGeometry x="385" y="100" width="110" height="30" as="geometry" />
171
+ <mxGeometry x="385" y="100" width="110" height="30" as="geometry"/>
166
172
  </mxCell>
167
173
  <mxCell id="55" value="HEAD → main • docs ready" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=11;fontStyle=1;fontColor=#2D5E36;fillColor=#D5E8D4;strokeColor=#82B366;" vertex="1" parent="5">
168
- <mxGeometry x="1480" y="100" width="200" height="30" as="geometry" />
174
+ <mxGeometry x="1480" y="100" width="200" height="30" as="geometry"/>
169
175
  </mxCell>
170
176
  <mxCell id="56" value="Focused documentation branches reconnect at double-ring merge commits." style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=13;fontColor=#405466;fillColor=#FFFFFF;strokeColor=#C7CED6;dashed=1;" vertex="1" parent="5">
171
- <mxGeometry x="1030" y="30" width="570" height="45" as="geometry" />
177
+ <mxGeometry x="1030" y="30" width="570" height="45" as="geometry"/>
172
178
  </mxCell>
173
179
  <mxCell id="57" value="LEGEND" style="rounded=1;arcSize=8;container=1;pointerEvents=0;html=1;verticalAlign=top;align=left;spacingTop=10;spacingLeft=15;fontSize=14;fontStyle=1;fontColor=#172B4D;fillColor=#F7F8FA;strokeColor=#C7CED6;strokeWidth=2;" vertex="1" parent="1">
174
- <mxGeometry x="40" y="780" width="1760" height="110" as="geometry" />
180
+ <mxGeometry x="40" y="800" width="1760" height="110" as="geometry"/>
175
181
  </mxCell>
176
182
  <mxCell id="58" value="main" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#172B4D;strokeColor=#0D1A2E;" vertex="1" parent="57">
177
- <mxGeometry x="80" y="50" width="180" height="35" as="geometry" />
183
+ <mxGeometry x="80" y="50" width="180" height="35" as="geometry"/>
178
184
  </mxCell>
179
185
  <mxCell id="59" value="docs" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#00A6A6;strokeColor=#007A7A;" vertex="1" parent="57">
180
- <mxGeometry x="300" y="50" width="180" height="35" as="geometry" />
186
+ <mxGeometry x="300" y="50" width="180" height="35" as="geometry"/>
181
187
  </mxCell>
182
188
  <mxCell id="60" value="references" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#8E44AD;strokeColor=#663080;" vertex="1" parent="57">
183
- <mxGeometry x="520" y="50" width="180" height="35" as="geometry" />
189
+ <mxGeometry x="520" y="50" width="180" height="35" as="geometry"/>
184
190
  </mxCell>
185
191
  <mxCell id="61" value="examples" style="rounded=1;arcSize=20;whiteSpace=wrap;html=1;align=center;verticalAlign=middle;fontSize=12;fontStyle=1;fontColor=#FFFFFF;fillColor=#E74C3C;strokeColor=#B83227;" vertex="1" parent="57">
186
- <mxGeometry x="740" y="50" width="180" height="35" as="geometry" />
192
+ <mxGeometry x="740" y="50" width="180" height="35" as="geometry"/>
187
193
  </mxCell>
188
194
  <mxCell id="62" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;" vertex="1" parent="57">
189
- <mxGeometry x="1040" y="54" width="28" height="28" as="geometry" />
195
+ <mxGeometry x="1040" y="54" width="28" height="28" as="geometry"/>
190
196
  </mxCell>
191
197
  <mxCell id="63" value="Commit" style="text;html=1;align=left;verticalAlign=middle;fontSize=13;fontColor=#263746;" vertex="1" parent="57">
192
- <mxGeometry x="1080" y="50" width="90" height="35" as="geometry" />
198
+ <mxGeometry x="1080" y="50" width="90" height="35" as="geometry"/>
193
199
  </mxCell>
194
200
  <mxCell id="64" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=5;" vertex="1" parent="57">
195
- <mxGeometry x="1230" y="48" width="40" height="40" as="geometry" />
201
+ <mxGeometry x="1230" y="48" width="40" height="40" as="geometry"/>
196
202
  </mxCell>
197
203
  <mxCell id="65" value="" style="ellipse;aspect=fixed;html=1;fillColor=#FFFFFF;strokeColor=#172B4D;strokeWidth=3;" vertex="1" parent="64">
198
- <mxGeometry x="10" y="10" width="20" height="20" as="geometry" />
204
+ <mxGeometry x="0.5" y="0.5" width="20" height="20" relative="1" as="geometry">
205
+ <mxPoint x="-10" y="-10" as="offset"/>
206
+ </mxGeometry>
199
207
  </mxCell>
200
208
  <mxCell id="66" value="Merge commit" style="text;html=1;align=left;verticalAlign=middle;fontSize=13;fontColor=#263746;" vertex="1" parent="57">
201
- <mxGeometry x="1285" y="50" width="130" height="35" as="geometry" />
209
+ <mxGeometry x="1285" y="50" width="130" height="35" as="geometry"/>
202
210
  </mxCell>
203
211
  <mxCell id="67" value="Green pills mark the baseline and refreshed main branch." style="text;html=1;align=left;verticalAlign=middle;fontSize=12;fontColor=#667583;fontStyle=2;" vertex="1" parent="57">
204
- <mxGeometry x="1440" y="45" width="260" height="45" as="geometry" />
212
+ <mxGeometry x="1440" y="45" width="260" height="45" as="geometry"/>
205
213
  </mxCell>
206
214
  </root>
207
215
  </mxGraphModel>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senad-d/drawme",
3
- "version": "0.1.6",
3
+ "version": "0.1.9",
4
4
  "description": "Pi extension for authoring, validating, and exporting editable draw.io diagrams from natural-language descriptions.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -66,22 +66,22 @@
66
66
  "dev": "pi --no-extensions -e ."
67
67
  },
68
68
  "dependencies": {
69
- "@xmldom/xmldom": "^0.9.8"
69
+ "@xmldom/xmldom": "^0.9.12"
70
70
  },
71
71
  "peerDependencies": {
72
72
  "@earendil-works/pi-coding-agent": "*",
73
73
  "typebox": "*"
74
74
  },
75
75
  "devDependencies": {
76
- "@earendil-works/pi-coding-agent": "^0.75.3",
76
+ "@earendil-works/pi-coding-agent": "^1.1.0",
77
77
  "@eslint/js": "^10.0.1",
78
78
  "@types/node": "^26.1.2",
79
- "@vitest/coverage-v8": "^4.1.10",
79
+ "@vitest/coverage-v8": "^5.0.0",
80
80
  "eslint": "^10.8.0",
81
81
  "globals": "^17.8.0",
82
- "typebox": "1.3.9",
83
- "typescript": "^5.6.0",
82
+ "typebox": "1.3.25",
83
+ "typescript": "~6.0.3",
84
84
  "typescript-eslint": "^8.10.0",
85
- "vitest": "^4.1.10"
85
+ "vitest": "^5.0.0"
86
86
  }
87
87
  }
package/src/animate.ts ADDED
@@ -0,0 +1,177 @@
1
+ /**
2
+ * `drawio_animate` orchestration: validate a typed motion spec against a page,
3
+ * store it on the page root cell, export the page to SVG with the draw.io CLI,
4
+ * inject the compiled motion, and render a storyboard PNG for review.
5
+ */
6
+ import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
7
+ import { existsSync } from "node:fs";
8
+ import { tmpdir } from "node:os";
9
+ import { basename, dirname, extname, join } from "node:path";
10
+ import { DOMParser, XMLSerializer } from "@xmldom/xmldom";
11
+ import type { DomEl } from "./dom";
12
+ import { analyzeDrawioAnimation } from "./animation";
13
+ import { exportDiagram } from "./drawio";
14
+ import {
15
+ type MotionSpec,
16
+ compileMotion,
17
+ injectMotion,
18
+ motionCells,
19
+ parseMotionSpec,
20
+ readStoredMotion,
21
+ selectPage,
22
+ storeMotion,
23
+ themeAccent,
24
+ } from "./motion";
25
+ import { buildStoryboard, sampleFrames } from "./storyboard";
26
+
27
+ export interface AnimateOptions {
28
+ input: string;
29
+ /** New motion steps. Omit to re-export the motion already stored on the page. */
30
+ steps?: unknown[];
31
+ loop?: boolean;
32
+ hold?: number;
33
+ pageIndex?: number;
34
+ output?: string;
35
+ /** Render a storyboard PNG of the step end states (default true). */
36
+ storyboard?: boolean;
37
+ binary?: string;
38
+ }
39
+
40
+ export interface AnimateResult {
41
+ source: string;
42
+ /** True when the motion spec was written into the source file. */
43
+ saved: boolean;
44
+ page: string;
45
+ output: string;
46
+ steps: number;
47
+ loop: boolean;
48
+ sequenceMs: number;
49
+ durationMs: number;
50
+ animatedCells: number;
51
+ drawnConnectors: number;
52
+ travellingDots: number;
53
+ connectorFlows: number;
54
+ storyboard?: string;
55
+ storyboardFrames?: number;
56
+ storyboardFramesTotal?: number;
57
+ binary: string;
58
+ version?: string;
59
+ }
60
+
61
+ function stem(path: string): string {
62
+ const ext = extname(path);
63
+ return join(dirname(path), ext ? basename(path).slice(0, -ext.length) : basename(path));
64
+ }
65
+
66
+ function serialize(original: string, doc: unknown): string {
67
+ let serialized = new XMLSerializer().serializeToString(doc as never);
68
+ const declaration = /^<\?xml[^>]*\?>/.exec(original)?.[0];
69
+ if (declaration && !serialized.startsWith("<?xml")) serialized = `${declaration}\n${serialized}`;
70
+ if (original.endsWith("\n") && !serialized.endsWith("\n")) serialized += "\n";
71
+ return serialized;
72
+ }
73
+
74
+ function resolveSpec(opts: AnimateOptions, model: DomEl): { spec: MotionSpec; changed: boolean } {
75
+ const errors: string[] = [];
76
+ let spec: MotionSpec | null;
77
+ const stored = readStoredMotion(model);
78
+ if (opts.steps !== undefined) {
79
+ spec = parseMotionSpec({ loop: opts.loop, hold: opts.hold, steps: opts.steps }, errors);
80
+ } else {
81
+ if (stored === null || stored.trim() === "") {
82
+ throw new Error("the page has no stored motion; pass steps to define one");
83
+ }
84
+ let parsed: unknown;
85
+ try {
86
+ parsed = JSON.parse(stored);
87
+ } catch (error) {
88
+ throw new Error(`stored motion contains malformed JSON: ${(error as Error).message}`, { cause: error });
89
+ }
90
+ spec = parseMotionSpec(parsed, errors);
91
+ if (spec && opts.loop !== undefined) spec.loop = opts.loop;
92
+ if (spec && opts.hold !== undefined) spec.hold = opts.hold;
93
+ }
94
+ if (!spec || errors.length > 0) throw new Error(errors.join("; ") || "motion specification is invalid");
95
+ return { spec, changed: JSON.stringify(spec) !== stored };
96
+ }
97
+
98
+ /** Validate, store, export, and verify motion for one page. Throws on any failure. */
99
+ export async function animateDiagram(opts: AnimateOptions): Promise<AnimateResult> {
100
+ if (!existsSync(opts.input)) throw new Error(`input file not found: ${opts.input}`);
101
+ const pageIndex = opts.pageIndex ?? 1;
102
+ const xml = await readFile(opts.input, "utf8");
103
+ const doc = new DOMParser().parseFromString(xml, "text/xml");
104
+ const root = doc.documentElement as unknown as DomEl | null;
105
+ if (!root) throw new Error("no root element (malformed XML)");
106
+ const { model, name } = selectPage(root, pageIndex);
107
+
108
+ // Analyze native animation on its own parse: cell collection rewrites wrapper ids in the DOM it reads.
109
+ const native = analyzeDrawioAnimation(xml, pageIndex);
110
+ if (native.errors.length > 0) throw new Error(native.errors.join("; "));
111
+ if (native.sequence?.enabled) {
112
+ throw new Error(
113
+ "the page already has a native draw.io page animation; remove its animation attribute (or set enabled:false) so the motion steps are the only timeline",
114
+ );
115
+ }
116
+
117
+ const { spec, changed } = resolveSpec(opts, model);
118
+ const analysis = compileMotion(spec, motionCells(model), themeAccent(model));
119
+ if (!analysis.compiled) throw new Error(analysis.errors.join("; "));
120
+ const motion = analysis.compiled;
121
+
122
+ if (changed) {
123
+ storeMotion(model, JSON.stringify(spec));
124
+ await writeFile(opts.input, serialize(xml, doc), "utf8");
125
+ }
126
+
127
+ const output = opts.output ?? `${stem(opts.input)}.animated.svg`;
128
+ const exported = await exportDiagram({ input: opts.input, format: "svg", mode: "final", output, pageIndex, binary: opts.binary });
129
+ try {
130
+ const svg = await readFile(output, "utf8");
131
+ await writeFile(output, injectMotion(svg, motion, native.flowEdgeIds), "utf8");
132
+ } catch (error) {
133
+ await rm(output, { force: true });
134
+ throw new Error(`animated SVG verification failed: ${(error as Error).message}`, { cause: error });
135
+ }
136
+
137
+ const result: AnimateResult = {
138
+ source: opts.input,
139
+ saved: changed,
140
+ page: name,
141
+ output,
142
+ steps: spec.steps.length,
143
+ loop: motion.loop,
144
+ sequenceMs: Math.round(motion.sequenceMs),
145
+ durationMs: Math.round(motion.durationMs),
146
+ animatedCells: motion.targetCellIds.length,
147
+ drawnConnectors: motion.drawInEdgeIds.length,
148
+ travellingDots: motion.dots.length,
149
+ connectorFlows: native.flowEdgeIds.length,
150
+ binary: exported.binary,
151
+ version: exported.version,
152
+ };
153
+
154
+ if (opts.storyboard ?? true) {
155
+ const frames = sampleFrames(motion.frames);
156
+ const tempDir = await mkdtemp(join(tmpdir(), "drawme-storyboard-"));
157
+ try {
158
+ const boardSource = join(tempDir, "storyboard.drawio");
159
+ await writeFile(boardSource, buildStoryboard(model, frames), "utf8");
160
+ const board = await exportDiagram({
161
+ input: boardSource,
162
+ format: "png",
163
+ mode: "final",
164
+ embed: false,
165
+ width: 2000,
166
+ output: `${stem(opts.input)}.storyboard.png`,
167
+ binary: opts.binary,
168
+ });
169
+ result.storyboard = board.output;
170
+ result.storyboardFrames = frames.length;
171
+ result.storyboardFramesTotal = motion.frames.length;
172
+ } finally {
173
+ await rm(tempDir, { recursive: true, force: true });
174
+ }
175
+ }
176
+ return result;
177
+ }