@zenuml/core 3.46.4 → 3.46.5
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/.claude/skills/babysit-pr/SKILL.md +203 -0
- package/.claude/skills/babysit-pr/agents/openai.yaml +7 -0
- package/.claude/skills/dia-scoring/SKILL.md +1 -1
- package/.claude/skills/propagate-core-release/SKILL.md +200 -0
- package/.claude/skills/propagate-core-release/agents/openai.yaml +7 -0
- package/.claude/skills/propagate-core-release/references/downstreams.md +41 -0
- package/dist/stats.html +1 -1
- package/dist/zenuml.esm.mjs +3 -3
- package/dist/zenuml.js +3 -3
- package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +698 -0
- package/{cy → e2e/data}/compare-cases.js +70 -37
- package/{cy/smoke-editable-label.html → e2e/fixtures/editable-label.html} +1 -1
- package/{cy/editable-span-test.html → e2e/fixtures/editable-span.html} +1 -1
- package/e2e/fixtures/fixture.html +31 -0
- package/{cy → e2e/tools}/canonical-history.html +1 -1
- package/{cy → e2e/tools}/compare-case.html +3 -3
- package/{cy → e2e/tools}/compare.html +2 -2
- package/{cy → e2e/tools}/native-diff-ext/content.js +2 -2
- package/firebase-debug.log +108 -0
- package/index.html +2 -2
- package/mermaid-zenuml-async-spa-auth.png +0 -0
- package/mermaid-zenuml-async-spa-auth.snapshot.md +96 -0
- package/package.json +1 -1
- package/scripts/analyze-compare-case/collect-data.mjs +1 -1
- package/scripts/analyze-compare-case.mjs +1 -1
- package/skills/dia-scoring/SKILL.md +1 -1
- package/vite.config.ts +5 -5
- package/cy/async-message-1.html +0 -32
- package/cy/async-message-2.html +0 -46
- package/cy/async-message-3.html +0 -41
- package/cy/creation-rtl.html +0 -28
- package/cy/defect-406-alt-under-creation.html +0 -40
- package/cy/demo1.html +0 -28
- package/cy/demo3.html +0 -28
- package/cy/demo4.html +0 -28
- package/cy/element-report.html +0 -705
- package/cy/fragments-with-return.html +0 -35
- package/cy/icons-test.html +0 -29
- package/cy/if-fragment.html +0 -28
- package/cy/legacy-vs-html.html +0 -291
- package/cy/named-parameters.html +0 -30
- package/cy/nested-interaction-with-fragment.html +0 -34
- package/cy/nested-interaction-with-outbound.html +0 -34
- package/cy/parity-test.html +0 -122
- package/cy/return-in-nested-if.html +0 -29
- package/cy/return.html +0 -38
- package/cy/self-sync-message-at-root.html +0 -28
- package/cy/smoke-creation.html +0 -26
- package/cy/smoke-fragment-issue.html +0 -36
- package/cy/smoke-fragment.html +0 -42
- package/cy/smoke-interaction.html +0 -34
- package/cy/smoke.html +0 -40
- package/cy/theme-default-test.html +0 -28
- package/cy/vertical-1.html +0 -25
- package/cy/vertical-10.html +0 -33
- package/cy/vertical-11.html +0 -29
- package/cy/vertical-2.html +0 -23
- package/cy/vertical-3.html +0 -37
- package/cy/vertical-4.html +0 -42
- package/cy/vertical-5.html +0 -40
- package/cy/vertical-6.html +0 -29
- package/cy/vertical-7.html +0 -27
- package/cy/vertical-8.html +0 -32
- package/cy/vertical-9.html +0 -25
- package/cy/xss.html +0 -21
- /package/{cy → e2e/data}/diff-algorithm.js +0 -0
- /package/{cy → e2e/fixtures}/svg-test.html +0 -0
- /package/{cy → e2e/tools}/native-diff-ext/background.js +0 -0
- /package/{cy → e2e/tools}/native-diff-ext/bridge.js +0 -0
- /package/{cy → e2e/tools}/svg-preview.html +0 -0
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>If-Else and Try-Catch with Return</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
A.method {
|
|
18
|
-
if(x) {
|
|
19
|
-
return x
|
|
20
|
-
} else {
|
|
21
|
-
return y
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
return 1
|
|
25
|
-
} catch {
|
|
26
|
-
return 2
|
|
27
|
-
} finally {
|
|
28
|
-
return 3
|
|
29
|
-
}
|
|
30
|
-
}</pre>
|
|
31
|
-
</div>
|
|
32
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
33
|
-
</body>
|
|
34
|
-
</html>
|
|
35
|
-
|
package/cy/icons-test.html
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>Icons Test</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
@Actor User
|
|
18
|
-
@Database DB <<database>>
|
|
19
|
-
@Queue MQ <<sqs>>
|
|
20
|
-
|
|
21
|
-
User.login() {
|
|
22
|
-
DB.verify()
|
|
23
|
-
MQ.enqueue()
|
|
24
|
-
}
|
|
25
|
-
</pre>
|
|
26
|
-
</div>
|
|
27
|
-
<script type="module" src="/src/main.ts"></script>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
package/cy/if-fragment.html
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>vue-sequence smoke 1</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0; /* mostly for demo on mobile */
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
title Issue 232 - wrong layout for if-fragment
|
|
18
|
-
Client -> Server:SendRequest
|
|
19
|
-
|
|
20
|
-
if(true){
|
|
21
|
-
Server -> Server: processRequest
|
|
22
|
-
}</pre
|
|
23
|
-
>
|
|
24
|
-
</div>
|
|
25
|
-
<!-- built files will be auto injected -->
|
|
26
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
27
|
-
</body>
|
|
28
|
-
</html>
|
package/cy/legacy-vs-html.html
DELETED
|
@@ -1,291 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>Legacy vs HTML Vertical Mode</title>
|
|
6
|
-
<style>
|
|
7
|
-
body { margin: 0; font-family: system-ui, sans-serif; }
|
|
8
|
-
.page-header { padding: 8px 16px; background: #1e293b; color: white; display: flex; gap: 12px; align-items: center; }
|
|
9
|
-
.page-header h2 { margin: 0; font-size: 14px; font-weight: 600; }
|
|
10
|
-
.nav { display: flex; gap: 8px; margin-left: auto; align-items: center; }
|
|
11
|
-
.nav a { color: #93c5fd; text-decoration: none; font-size: 12px; padding: 4px 10px; background: #334155; border-radius: 4px; }
|
|
12
|
-
.nav a:hover { text-decoration: underline; }
|
|
13
|
-
.nav a.hidden { visibility: hidden; }
|
|
14
|
-
.container { display: flex; gap: 0; }
|
|
15
|
-
.panel { flex: 1; overflow: auto; border-right: 1px solid #e2e8f0; }
|
|
16
|
-
.panel:last-child { border-right: none; }
|
|
17
|
-
.panel-header { padding: 6px 12px; background: #334155; color: white; font-size: 13px; font-weight: 600; }
|
|
18
|
-
.panel-content { padding: 0; background: white; }
|
|
19
|
-
.panel-info { padding: 8px 12px; background: #f1f5f9; font-size: 12px; font-family: monospace; color: #475569; border-top: 1px solid #e2e8f0; }
|
|
20
|
-
.delta { padding: 8px 16px; font-size: 13px; font-family: monospace; display: none; }
|
|
21
|
-
</style>
|
|
22
|
-
</head>
|
|
23
|
-
<body>
|
|
24
|
-
<div class="page-header">
|
|
25
|
-
<h2 id="case-name">Vertical Mode Comparison</h2>
|
|
26
|
-
<div class="nav">
|
|
27
|
-
<a id="prev-link" href="#">← Prev</a>
|
|
28
|
-
<a id="next-link" href="#">Next →</a>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div id="delta-bar" class="delta"></div>
|
|
32
|
-
<div class="container">
|
|
33
|
-
<div class="panel">
|
|
34
|
-
<div class="panel-header">HTML Mode (VerticalCoordinates)</div>
|
|
35
|
-
<div class="panel-content" id="html-output"></div>
|
|
36
|
-
<div class="panel-info" id="html-info">Loading...</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="panel">
|
|
39
|
-
<div class="panel-header">Legacy Mode (DOM Measurement)</div>
|
|
40
|
-
<div class="panel-content" id="legacy-output"></div>
|
|
41
|
-
<div class="panel-info" id="legacy-info">Loading...</div>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<script type="module">
|
|
46
|
-
import ZenUml from "/src/core.tsx";
|
|
47
|
-
|
|
48
|
-
const CASES = {
|
|
49
|
-
"return-in-nested-if": `A.m {
|
|
50
|
-
if (condition) {
|
|
51
|
-
return ret
|
|
52
|
-
if(x) {
|
|
53
|
-
new B
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}`,
|
|
57
|
-
"vertical-1": `// red
|
|
58
|
-
// green
|
|
59
|
-
a = A.m111
|
|
60
|
-
new E`,
|
|
61
|
-
"vertical-2": `// [red]
|
|
62
|
-
new B`,
|
|
63
|
-
"vertical-3": `if(x) {
|
|
64
|
-
// comment
|
|
65
|
-
new A
|
|
66
|
-
} else {
|
|
67
|
-
new B
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
new C
|
|
71
|
-
try {
|
|
72
|
-
new D
|
|
73
|
-
} catch {
|
|
74
|
-
par {
|
|
75
|
-
new E
|
|
76
|
-
new F
|
|
77
|
-
}
|
|
78
|
-
}`,
|
|
79
|
-
"vertical-4": `if(x) {
|
|
80
|
-
// comment
|
|
81
|
-
new A
|
|
82
|
-
} else {
|
|
83
|
-
new B
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
new C
|
|
87
|
-
try {
|
|
88
|
-
new D
|
|
89
|
-
} catch {
|
|
90
|
-
par {
|
|
91
|
-
new E
|
|
92
|
-
new F
|
|
93
|
-
if(x) {
|
|
94
|
-
new X
|
|
95
|
-
} else {
|
|
96
|
-
new Y
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}`,
|
|
100
|
-
"vertical-5": `par {
|
|
101
|
-
new F
|
|
102
|
-
if(x) {
|
|
103
|
-
new X
|
|
104
|
-
} else {
|
|
105
|
-
try {
|
|
106
|
-
new Y
|
|
107
|
-
} catch {
|
|
108
|
-
par {
|
|
109
|
-
new G
|
|
110
|
-
if(x) {
|
|
111
|
-
new H
|
|
112
|
-
} else {
|
|
113
|
-
new I
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}`,
|
|
119
|
-
"vertical-6": `new a
|
|
120
|
-
if(x) {
|
|
121
|
-
new b
|
|
122
|
-
} else {
|
|
123
|
-
new c
|
|
124
|
-
new e
|
|
125
|
-
}
|
|
126
|
-
new D`,
|
|
127
|
-
"vertical-7": `A.method
|
|
128
|
-
section(){
|
|
129
|
-
new B
|
|
130
|
-
}`,
|
|
131
|
-
"vertical-8": `new Creation() {
|
|
132
|
-
return from_creation
|
|
133
|
-
}
|
|
134
|
-
return "from if to original source"
|
|
135
|
-
try {
|
|
136
|
-
new AHasAVeryLongNameLongNameLongNameLongName() {
|
|
137
|
-
new CreatWithinCreat()
|
|
138
|
-
}
|
|
139
|
-
}`,
|
|
140
|
-
"vertical-9": `A0->A0: self
|
|
141
|
-
new A`,
|
|
142
|
-
"vertical-10": `new E
|
|
143
|
-
E.messageA()
|
|
144
|
-
new A {
|
|
145
|
-
if (x) {
|
|
146
|
-
new D
|
|
147
|
-
}
|
|
148
|
-
new B {
|
|
149
|
-
new C
|
|
150
|
-
}
|
|
151
|
-
}`,
|
|
152
|
-
"vertical-11": `A.call {
|
|
153
|
-
// pre creation
|
|
154
|
-
A->B: prep
|
|
155
|
-
a = new A()
|
|
156
|
-
a->B: post
|
|
157
|
-
}`,
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
const caseNames = Object.keys(CASES);
|
|
161
|
-
const params = new URLSearchParams(window.location.search);
|
|
162
|
-
const caseName = params.get("case") || caseNames[0];
|
|
163
|
-
const code = CASES[caseName];
|
|
164
|
-
|
|
165
|
-
// Update title
|
|
166
|
-
document.title = `Legacy vs HTML: ${caseName}`;
|
|
167
|
-
document.getElementById("case-name").textContent = caseName;
|
|
168
|
-
|
|
169
|
-
// Prev/Next navigation
|
|
170
|
-
const idx = caseNames.indexOf(caseName);
|
|
171
|
-
const prevLink = document.getElementById("prev-link");
|
|
172
|
-
const nextLink = document.getElementById("next-link");
|
|
173
|
-
if (idx > 0) {
|
|
174
|
-
prevLink.href = `?case=${encodeURIComponent(caseNames[idx - 1])}`;
|
|
175
|
-
} else {
|
|
176
|
-
prevLink.classList.add("hidden");
|
|
177
|
-
}
|
|
178
|
-
if (idx < caseNames.length - 1) {
|
|
179
|
-
nextLink.href = `?case=${encodeURIComponent(caseNames[idx + 1])}`;
|
|
180
|
-
} else {
|
|
181
|
-
nextLink.classList.add("hidden");
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
if (code === undefined) {
|
|
185
|
-
const errP = document.createElement("p");
|
|
186
|
-
errP.style.color = "red";
|
|
187
|
-
errP.textContent = "Unknown case: " + caseName;
|
|
188
|
-
document.getElementById("html-output").appendChild(errP);
|
|
189
|
-
} else {
|
|
190
|
-
function createPanel(containerId, mode) {
|
|
191
|
-
const container = document.getElementById(containerId);
|
|
192
|
-
const pre = document.createElement("pre");
|
|
193
|
-
pre.className = "zenuml";
|
|
194
|
-
pre.style.margin = "0";
|
|
195
|
-
pre.textContent = code;
|
|
196
|
-
container.appendChild(pre);
|
|
197
|
-
|
|
198
|
-
const zenUml = new ZenUml(pre);
|
|
199
|
-
zenUml.setVerticalMode(mode);
|
|
200
|
-
zenUml.render(code, { theme: "theme-default" });
|
|
201
|
-
return zenUml;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function measureCreationParticipants(containerId) {
|
|
205
|
-
const container = document.getElementById(containerId);
|
|
206
|
-
const diagram = container.querySelector(".sequence-diagram");
|
|
207
|
-
if (!diagram) return {};
|
|
208
|
-
|
|
209
|
-
// Hide footer
|
|
210
|
-
const footer = container.querySelector(".footer");
|
|
211
|
-
if (footer) footer.style.display = "none";
|
|
212
|
-
|
|
213
|
-
const dRect = diagram.getBoundingClientRect();
|
|
214
|
-
const results = {};
|
|
215
|
-
container.querySelectorAll("[data-participant-id]").forEach(el => {
|
|
216
|
-
const name = el.getAttribute("data-participant-id");
|
|
217
|
-
// Check if this is a creation participant (lifeline paddingTop > 20)
|
|
218
|
-
const lifeline = container.querySelector(`[id="${name}"]`);
|
|
219
|
-
const pt = lifeline ? parseFloat(lifeline.style.paddingTop) : 0;
|
|
220
|
-
if (pt > 20) {
|
|
221
|
-
const rect = el.getBoundingClientRect();
|
|
222
|
-
results[name] = Math.round(rect.top - dRect.top);
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
return results;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// Render both panels
|
|
229
|
-
createPanel("html-output", "html");
|
|
230
|
-
createPanel("legacy-output", "legacy");
|
|
231
|
-
|
|
232
|
-
// Poll until both panels have .sequence-diagram, then measure
|
|
233
|
-
const poll = setInterval(() => {
|
|
234
|
-
const htmlDiag = document.querySelector('#html-output .sequence-diagram');
|
|
235
|
-
const legacyDiag = document.querySelector('#legacy-output .sequence-diagram');
|
|
236
|
-
if (!htmlDiag || !legacyDiag) return;
|
|
237
|
-
|
|
238
|
-
clearInterval(poll);
|
|
239
|
-
|
|
240
|
-
setTimeout(() => {
|
|
241
|
-
const htmlPositions = measureCreationParticipants("html-output");
|
|
242
|
-
const legacyPositions = measureCreationParticipants("legacy-output");
|
|
243
|
-
|
|
244
|
-
const allNames = new Set([...Object.keys(htmlPositions), ...Object.keys(legacyPositions)]);
|
|
245
|
-
|
|
246
|
-
if (allNames.size === 0) {
|
|
247
|
-
document.getElementById("html-info").textContent = "No creation participants";
|
|
248
|
-
document.getElementById("legacy-info").textContent = "No creation participants";
|
|
249
|
-
const bar = document.getElementById("delta-bar");
|
|
250
|
-
bar.style.display = "block";
|
|
251
|
-
bar.textContent = "No creation participants in this case";
|
|
252
|
-
bar.style.background = "#e2e8f0";
|
|
253
|
-
bar.style.color = "#475569";
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
const htmlLines = [];
|
|
258
|
-
const legacyLines = [];
|
|
259
|
-
const deltaLines = [];
|
|
260
|
-
let allMatch = true;
|
|
261
|
-
|
|
262
|
-
for (const name of allNames) {
|
|
263
|
-
const h = htmlPositions[name];
|
|
264
|
-
const l = legacyPositions[name];
|
|
265
|
-
htmlLines.push(`${name}: ${h != null ? h + 'px' : 'n/a'}`);
|
|
266
|
-
legacyLines.push(`${name}: ${l != null ? l + 'px' : 'n/a'}`);
|
|
267
|
-
if (h != null && l != null) {
|
|
268
|
-
const delta = l - h;
|
|
269
|
-
if (delta !== 0) allMatch = false;
|
|
270
|
-
deltaLines.push(`${name}: ${delta === 0 ? 'identical' : delta + 'px'} (html=${h}, legacy=${l})`);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
document.getElementById("html-info").textContent = htmlLines.join(' | ');
|
|
275
|
-
document.getElementById("legacy-info").textContent = legacyLines.join(' | ');
|
|
276
|
-
|
|
277
|
-
const bar = document.getElementById("delta-bar");
|
|
278
|
-
bar.style.display = "block";
|
|
279
|
-
bar.textContent = allMatch
|
|
280
|
-
? `All creation participants identical`
|
|
281
|
-
: deltaLines.join(' | ');
|
|
282
|
-
bar.style.background = allMatch ? "#d1fae5" : "#fef3c7";
|
|
283
|
-
bar.style.color = allMatch ? "#065f46" : "#92400e";
|
|
284
|
-
|
|
285
|
-
console.info("[Parity] %s: %s", caseName, allMatch ? "all identical" : deltaLines.join(", "));
|
|
286
|
-
}, 500);
|
|
287
|
-
}, 100);
|
|
288
|
-
}
|
|
289
|
-
</script>
|
|
290
|
-
</body>
|
|
291
|
-
</html>
|
package/cy/named-parameters.html
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>Named Parameters Test</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0; /* mostly for demo on mobile */
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
title Named Parameters Test
|
|
18
|
-
// Testing named parameter syntax (param=value)
|
|
19
|
-
A.method(userId=123, name="John")
|
|
20
|
-
B.create(type="User", active=true)
|
|
21
|
-
C.mixedCall(1, name="Mixed", enabled=false)
|
|
22
|
-
D.oldStyle(1, 2, 3)
|
|
23
|
-
E.complex(first="value1", second=42, third=true, fourth="final")
|
|
24
|
-
</pre
|
|
25
|
-
>
|
|
26
|
-
</div>
|
|
27
|
-
<!-- built files will be auto injected -->
|
|
28
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
29
|
-
</body>
|
|
30
|
-
</html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>Nested Interaction with Fragment Test</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0; /* mostly for demo on mobile */
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
title Nested Interaction with Fragment and Self-Invocation
|
|
18
|
-
A.Read() {
|
|
19
|
-
B.Submit() {
|
|
20
|
-
Process() {
|
|
21
|
-
if (true) {
|
|
22
|
-
ProcessCallback() {
|
|
23
|
-
A.method
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}</pre
|
|
29
|
-
>
|
|
30
|
-
</div>
|
|
31
|
-
<!-- built files will be auto injected -->
|
|
32
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
33
|
-
</body>
|
|
34
|
-
</html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>Nested Interaction with Outbound Message and Fragment Test</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0; /* mostly for demo on mobile */
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
title Nested Interaction with Outbound Message and Fragment
|
|
18
|
-
A.Read() {
|
|
19
|
-
B.Submit() {
|
|
20
|
-
C->B.method {
|
|
21
|
-
if (true) {
|
|
22
|
-
ProcessCallback() {
|
|
23
|
-
A.method
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}</pre
|
|
29
|
-
>
|
|
30
|
-
</div>
|
|
31
|
-
<!-- built files will be auto injected -->
|
|
32
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
33
|
-
</body>
|
|
34
|
-
</html>
|
package/cy/parity-test.html
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<title>SVG Parity Test - Side by Side</title>
|
|
6
|
-
<style>
|
|
7
|
-
body { margin: 0; font-family: sans-serif; }
|
|
8
|
-
.controls { padding: 10px; background: #1e293b; color: white; display: flex; gap: 16px; align-items: center; }
|
|
9
|
-
.controls select, .controls button { font-size: 14px; padding: 4px 8px; }
|
|
10
|
-
.container { display: flex; gap: 0; }
|
|
11
|
-
.panel { flex: 1; overflow: auto; }
|
|
12
|
-
.panel h3 { margin: 0; padding: 8px 16px; background: #334155; color: white; font-size: 13px; }
|
|
13
|
-
.panel-content { padding: 10px; background: white; }
|
|
14
|
-
</style>
|
|
15
|
-
</head>
|
|
16
|
-
<body>
|
|
17
|
-
<div class="controls">
|
|
18
|
-
<label>Test case: </label>
|
|
19
|
-
<select id="case-select"></select>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="container">
|
|
22
|
-
<div class="panel">
|
|
23
|
-
<h3>HTML/React Renderer (theme-default)</h3>
|
|
24
|
-
<div class="panel-content" id="html-output">
|
|
25
|
-
<div id="diagram"><pre class="zenuml" style="margin: 0">A -> B: hello</pre></div>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="panel">
|
|
29
|
-
<h3>Native SVG Renderer (theme-default)</h3>
|
|
30
|
-
<div class="panel-content" id="svg-output"></div>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
<script type="module">
|
|
34
|
-
import ZenUml from "/src/core.tsx";
|
|
35
|
-
import { renderToSvg } from "/src/svg/renderToSvg.ts";
|
|
36
|
-
|
|
37
|
-
const CASES = {
|
|
38
|
-
"simple-messages": `A -> B: hello
|
|
39
|
-
B -> C: process
|
|
40
|
-
C -> B: result
|
|
41
|
-
B -> A: done`,
|
|
42
|
-
"self-call": `A.method() {
|
|
43
|
-
B.method
|
|
44
|
-
}`,
|
|
45
|
-
"fragment-if": `A -> B: request
|
|
46
|
-
if(condition) {
|
|
47
|
-
B -> C: process
|
|
48
|
-
} else {
|
|
49
|
-
B -> D: fallback
|
|
50
|
-
}`,
|
|
51
|
-
"fragment-loop": `A -> B: request
|
|
52
|
-
loop(condition) {
|
|
53
|
-
B -> C: process
|
|
54
|
-
}`,
|
|
55
|
-
"fragment-tcf": `A.method {
|
|
56
|
-
try {
|
|
57
|
-
B.process
|
|
58
|
-
} catch(error) {
|
|
59
|
-
C.handle
|
|
60
|
-
} finally {
|
|
61
|
-
D.cleanup
|
|
62
|
-
}
|
|
63
|
-
}`,
|
|
64
|
-
"creation": `A.m {
|
|
65
|
-
new B(1,2,3)
|
|
66
|
-
}`,
|
|
67
|
-
"return": `A B C
|
|
68
|
-
A->B.method() {
|
|
69
|
-
C.call {
|
|
70
|
-
return result
|
|
71
|
-
}
|
|
72
|
-
return done
|
|
73
|
-
}`,
|
|
74
|
-
"async": `A->B: async
|
|
75
|
-
B->C: async
|
|
76
|
-
C->A: async`,
|
|
77
|
-
"nested": `A.Read() {
|
|
78
|
-
B.Submit() {
|
|
79
|
-
Process() {
|
|
80
|
-
if (true) {
|
|
81
|
-
ProcessCallback() {
|
|
82
|
-
A.method
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}`,
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const select = document.getElementById("case-select");
|
|
91
|
-
const svgOutput = document.getElementById("svg-output");
|
|
92
|
-
const htmlEl = document.querySelector("pre.zenuml");
|
|
93
|
-
|
|
94
|
-
let zenUml;
|
|
95
|
-
|
|
96
|
-
for (const name of Object.keys(CASES)) {
|
|
97
|
-
const opt = document.createElement("option");
|
|
98
|
-
opt.value = name;
|
|
99
|
-
opt.textContent = name;
|
|
100
|
-
select.appendChild(opt);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function render(name) {
|
|
104
|
-
const code = CASES[name];
|
|
105
|
-
|
|
106
|
-
// SVG side
|
|
107
|
-
const result = renderToSvg(code);
|
|
108
|
-
svgOutput.innerHTML = result.svg;
|
|
109
|
-
|
|
110
|
-
// HTML side - recreate ZenUml instance
|
|
111
|
-
const diagram = document.getElementById("diagram");
|
|
112
|
-
diagram.innerHTML = '<pre class="zenuml" style="margin: 0">' + code + '</pre>';
|
|
113
|
-
const pre = diagram.querySelector("pre.zenuml");
|
|
114
|
-
zenUml = new ZenUml(pre);
|
|
115
|
-
await zenUml.render(code, { theme: "theme-default" });
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
select.addEventListener("change", () => render(select.value));
|
|
119
|
-
render(select.value);
|
|
120
|
-
</script>
|
|
121
|
-
</body>
|
|
122
|
-
</html>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>Return in Nested If</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
A.m {
|
|
18
|
-
if (condition) {
|
|
19
|
-
return ret
|
|
20
|
-
if(x) {
|
|
21
|
-
new B
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
</pre>
|
|
26
|
-
</div>
|
|
27
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
package/cy/return.html
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
7
|
-
<title>vue-sequence smoke 1</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0; /* mostly for demo on mobile */
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
<body>
|
|
15
|
-
<div id="diagram" class="diagram">
|
|
16
|
-
<pre class="zenuml" style="margin: 0">
|
|
17
|
-
A B C D
|
|
18
|
-
|
|
19
|
-
A->B.method() {
|
|
20
|
-
ret0_assign_rtl =C.method_long_to_give_space {
|
|
21
|
-
@return C->D: ret1_annotation_ltr
|
|
22
|
-
ret5_assign_ltr = B.method
|
|
23
|
-
B.method2 {
|
|
24
|
-
return ret2_return_ltr
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return ret2_return_rtl
|
|
29
|
-
@return B->A: ret4_annotation_rtl
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
</pre
|
|
33
|
-
>
|
|
34
|
-
</div>
|
|
35
|
-
<!-- built files will be auto injected -->
|
|
36
|
-
<script type="module" src="/src/main-cy.ts"></script>
|
|
37
|
-
</body>
|
|
38
|
-
</html>
|