@zenuml/core 3.47.9 → 3.48.1
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/dist/cli/zenuml.mjs +13529 -0
- package/dist/cli/zenuml.mjs.map +1 -0
- package/dist/cloud-icons-eHuugVSv.js.map +1 -0
- package/dist/zenuml.esm.mjs +2153 -2156
- package/dist/zenuml.esm.mjs.map +1 -0
- package/dist/zenuml.js +82 -82
- package/dist/zenuml.js.map +1 -0
- package/package.json +18 -5
- package/.agents/skills/babysit-pr/SKILL.md +0 -223
- package/.agents/skills/babysit-pr/agents/openai.yaml +0 -7
- package/.agents/skills/dia-scoring/SKILL.md +0 -139
- package/.agents/skills/dia-scoring/agents/openai.yaml +0 -7
- package/.agents/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/.agents/skills/land-pr/SKILL.md +0 -120
- package/.agents/skills/propagate-core-release/SKILL.md +0 -205
- package/.agents/skills/propagate-core-release/agents/openai.yaml +0 -7
- package/.agents/skills/propagate-core-release/references/downstreams.md +0 -42
- package/.agents/skills/ship-branch/SKILL.md +0 -105
- package/.agents/skills/submit-branch/SKILL.md +0 -76
- package/.agents/skills/validate-branch/SKILL.md +0 -72
- package/.claude/commands/README.md +0 -162
- package/.claude/commands/analyze.md +0 -101
- package/.claude/commands/clarify.md +0 -158
- package/.claude/commands/code-review.md +0 -322
- package/.claude/commands/constitution.md +0 -73
- package/.claude/commands/create-docs.md +0 -309
- package/.claude/commands/full-context.md +0 -121
- package/.claude/commands/gemini-consult.md +0 -164
- package/.claude/commands/handoff.md +0 -146
- package/.claude/commands/implement.md +0 -56
- package/.claude/commands/plan.md +0 -43
- package/.claude/commands/refactor.md +0 -188
- package/.claude/commands/specify.md +0 -21
- package/.claude/commands/tasks.md +0 -62
- package/.claude/commands/update-docs.md +0 -314
- package/.claude/hooks/README.md +0 -270
- package/.claude/hooks/config/sensitive-patterns.json +0 -86
- package/.claude/hooks/gemini-context-injector.sh +0 -129
- package/.claude/hooks/mcp-security-scan.sh +0 -147
- package/.claude/hooks/notify.sh +0 -103
- package/.claude/hooks/setup/hook-setup.md +0 -96
- package/.claude/hooks/setup/settings.json.template +0 -63
- package/.claude/hooks/sounds/complete.wav +0 -0
- package/.claude/hooks/sounds/input-needed.wav +0 -0
- package/.claude/hooks/subagent-context-injector.sh +0 -65
- package/.claude/skills/babysit-pr/SKILL.md +0 -223
- package/.claude/skills/babysit-pr/agents/openai.yaml +0 -7
- package/.claude/skills/dia-scoring/SKILL.md +0 -139
- package/.claude/skills/dia-scoring/agents/openai.yaml +0 -7
- package/.claude/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/.claude/skills/emoji-eval/SKILL.md +0 -187
- package/.claude/skills/land-pr/SKILL.md +0 -120
- package/.claude/skills/propagate-core-release/SKILL.md +0 -205
- package/.claude/skills/propagate-core-release/agents/openai.yaml +0 -7
- package/.claude/skills/propagate-core-release/references/downstreams.md +0 -42
- package/.claude/skills/ship-branch/SKILL.md +0 -105
- package/.claude/skills/submit-branch/SKILL.md +0 -76
- package/.claude/skills/validate-branch/SKILL.md +0 -72
- package/.claude/skills/zenuml-ux-research/SKILL.md +0 -183
- package/.claude/skills/zenuml-ux-research/references/assertion-catalog.md +0 -261
- package/.claude/skills/zenuml-ux-research/references/best-practices-overview.md +0 -56
- package/.claude/skills/zenuml-ux-research/references/report-template.md +0 -89
- package/.claude/skills/zenuml-ux-research/references/scenarios/edit-message-label.md +0 -37
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-message.md +0 -36
- package/.claude/skills/zenuml-ux-research/references/scenarios/insert-participant.md +0 -31
- package/.claude/skills/zenuml-ux-research/references/scenarios/rename-participant.md +0 -33
- package/.claude/skills/zenuml-ux-research/references/scenarios/undo-insert.md +0 -35
- package/.devcontainer/devcontainer.json +0 -21
- package/.dockerignore +0 -19
- package/.eslintrc.js +0 -39
- package/.git-blame-ignore-revs +0 -6
- package/.kiro/hooks/README.md +0 -38
- package/.kiro/hooks/session-sound-notification.js +0 -44
- package/.kiro/hooks/session-sound-notification.json +0 -23
- package/.mcp.json.example +0 -17
- package/.nvmrc +0 -1
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/.specify/memory/constitution.md +0 -33
- package/.specify/scripts/bash/check-prerequisites.sh +0 -166
- package/.specify/scripts/bash/common.sh +0 -113
- package/.specify/scripts/bash/create-new-feature.sh +0 -97
- package/.specify/scripts/bash/setup-plan.sh +0 -60
- package/.specify/scripts/bash/update-agent-context.sh +0 -728
- package/.specify/templates/agent-file-template.md +0 -23
- package/.specify/templates/plan-template.md +0 -219
- package/.specify/templates/spec-template.md +0 -116
- package/.specify/templates/tasks-template.md +0 -127
- package/.storybook/main.ts +0 -25
- package/.storybook/preview.ts +0 -29
- package/.watchmanconfig +0 -3
- package/AGENTS.md +0 -26
- package/CLAUDE.md +0 -124
- package/DEPLOYMENT.md +0 -62
- package/Dockerfile +0 -36
- package/IMPLEMENTATION_PLAN.md +0 -163
- package/Integration/vanilla-js/index.html +0 -42
- package/MCP-ASSISTANT-RULES.md +0 -85
- package/README_CN.md +0 -15
- package/TUTORIAL.md +0 -116
- package/antlr/antlr-4.11.1-complete.jar +0 -0
- package/bun.lock +0 -1544
- package/bunfig.toml +0 -52
- package/docs/UNICODE_SUPPORT.md +0 -179
- package/docs/ai-context/deployment-infrastructure.md +0 -21
- package/docs/ai-context/docs-overview.md +0 -89
- package/docs/ai-context/handoff.md +0 -174
- package/docs/ai-context/project-structure.md +0 -160
- package/docs/ai-context/system-integration.md +0 -21
- package/docs/asciidoc/contributor.adoc +0 -54
- package/docs/asciidoc/create-my-own-theme.adoc +0 -149
- package/docs/asciidoc/images/creation-component.png +0 -0
- package/docs/asciidoc/images/creation-rtl.png +0 -0
- package/docs/asciidoc/images/message-arrow-rtl.png +0 -0
- package/docs/asciidoc/images/occurrence.png +0 -0
- package/docs/asciidoc/images/return-message-conflict.png +0 -0
- package/docs/asciidoc/images/shift-up-half-the-height.png +0 -0
- package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
- package/docs/asciidoc/images/vertical-alignment.svg +0 -1
- package/docs/asciidoc/images/vertically-aligning.png +0 -0
- package/docs/asciidoc/index.adoc +0 -277
- package/docs/asciidoc/theme-debug-web-app.png +0 -0
- package/docs/asciidoc/tutorial.adoc +0 -22
- package/docs/asciidoc/user-css.png +0 -0
- package/docs/async-vs-sync-parser-rules.md +0 -81
- package/docs/divider-parser-allow-spaces.md +0 -38
- package/docs/highlighting-messages.md +0 -52
- package/docs/images/editor-sample.png +0 -0
- package/docs/inherited-vs-provided-from.md +0 -64
- package/docs/parser/Assignment.md +0 -8
- package/docs/parser/PARSER_IMPROVEMENTS_CC.md +0 -425
- package/docs/parser/grammar_review_gemini.md +0 -116
- package/docs/participants-function.md +0 -25
- package/docs/responsive-participant-margin.md +0 -52
- package/docs/starter.md +0 -9
- package/docs/superpowers/plans/2026-03-27-e2e-test-reorg.md +0 -698
- package/docs/superpowers/plans/2026-03-30-emoji-support.md +0 -1220
- package/docs/superpowers/plans/2026-03-30-self-correcting-scoring.md +0 -206
- package/docs/superpowers/plans/2026-04-15-keyboard-editing-on-diagram.md +0 -1992
- package/docs/superpowers/plans/2026-04-15-zenuml-ux-research-skill.md +0 -1452
- package/docs/ux-research/.gitkeep +0 -0
- package/docs/ux-research/2026-04-15-rename-participant.md +0 -156
- package/docs/ux-research/2026-04-18-insert-participant.md +0 -151
- package/docs/width-translate-and-offsets.md +0 -62
- package/docs/xss.md +0 -59
- package/e2e/data/compare-cases.js +0 -1090
- package/e2e/data/diff-algorithm.js +0 -199
- package/e2e/fixtures/create-message.html +0 -26
- package/e2e/fixtures/editable-label.html +0 -35
- package/e2e/fixtures/editable-span.html +0 -122
- package/e2e/fixtures/empty-diagram.html +0 -23
- package/e2e/fixtures/fixture.html +0 -31
- package/e2e/fixtures/insert-participant.html +0 -23
- package/e2e/fixtures/reorder-cross-fragment.html +0 -31
- package/e2e/fixtures/reorder-fragment.html +0 -29
- package/e2e/fixtures/reorder-message.html +0 -27
- package/e2e/fixtures/svg-test.html +0 -21
- package/e2e/fixtures/type-switch.html +0 -29
- package/e2e/tools/canonical-history.html +0 -908
- package/e2e/tools/compare-case.html +0 -371
- package/e2e/tools/compare.html +0 -35
- package/e2e/tools/native-diff-ext/background.js +0 -60
- package/e2e/tools/native-diff-ext/bridge.js +0 -26
- package/e2e/tools/native-diff-ext/content.js +0 -194
- package/e2e/tools/svg-preview.html +0 -56
- package/embed.html +0 -193
- package/eslint.config.mjs +0 -35
- package/firebase-debug.log +0 -108
- package/iframe-container-demo/diagram.html +0 -124
- package/iframe-container-demo/host.html +0 -817
- package/index.html +0 -771
- package/mermaid-zenuml-async-spa-auth.png +0 -0
- package/mermaid-zenuml-async-spa-auth.snapshot.md +0 -96
- package/newsletter/unicode-support-announcement.md +0 -134
- package/playground/creation.html +0 -53
- package/playground/message.html +0 -63
- package/playwright.config.ts +0 -40
- package/renderer.html +0 -366
- package/scripts/analyze-compare-case/collect-data.mjs +0 -1134
- package/scripts/analyze-compare-case/config.mjs +0 -102
- package/scripts/analyze-compare-case/geometry.mjs +0 -101
- package/scripts/analyze-compare-case/native-diff.mjs +0 -224
- package/scripts/analyze-compare-case/output.mjs +0 -74
- package/scripts/analyze-compare-case/panel-diff.mjs +0 -114
- package/scripts/analyze-compare-case/report.mjs +0 -162
- package/scripts/analyze-compare-case/residual-scopes.mjs +0 -347
- package/scripts/analyze-compare-case/scoring.mjs +0 -829
- package/scripts/analyze-compare-case.mjs +0 -149
- package/scripts/bump-version.js +0 -117
- package/scripts/snapshot-dual.js +0 -173
- package/scripts/update-snapshots.js +0 -70
- package/skills/dia-scoring/SKILL.md +0 -129
- package/skills/dia-scoring/agents/openai.yaml +0 -7
- package/skills/dia-scoring/references/selectors-and-keys.md +0 -253
- package/tailwind.config.js +0 -126
- package/test-compression.html +0 -274
- package/test-mermaid-zenuml.html +0 -57
- package/test-setup.ts +0 -124
- package/test-url-params.html +0 -192
- package/tsconfig.app.json +0 -31
- package/tsconfig.node.json +0 -24
- package/tsconfig.test.json +0 -9
- package/vite.config.lib.ts +0 -93
- package/vite.config.ts +0 -84
- package/wrangler.toml +0 -18
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Shared pixel-diff algorithm used by:
|
|
3
|
-
* - compare-case.html (via window.diffFromImages)
|
|
4
|
-
* - native-diff-ext/content.js (extension)
|
|
5
|
-
* - analyze-compare-case.mjs (CLI, via window.diffFromImages on the page)
|
|
6
|
-
*
|
|
7
|
-
* Single source of truth for parameters and pixel classification.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
// Default parameters — callers may override via `opts`
|
|
11
|
-
export const DEFAULTS = {
|
|
12
|
-
LUMA_THRESHOLD: 240,
|
|
13
|
-
CHANNEL_TOLERANCE: 12,
|
|
14
|
-
POSITION_TOLERANCE: 0,
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// Diff output colors (RGBA)
|
|
18
|
-
export const COLORS = {
|
|
19
|
-
background: [240, 240, 240, 255],
|
|
20
|
-
match: [0, 100, 0, 255],
|
|
21
|
-
htmlOnly: [255, 0, 0, 255],
|
|
22
|
-
svgOnly: [0, 0, 255, 255],
|
|
23
|
-
colorDiff: [255, 0, 255, 255],
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
function luma(r, g, b) {
|
|
27
|
-
return 0.3 * r + 0.59 * g + 0.11 * b;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function getPixel(data, stride, x, y) {
|
|
31
|
-
const i = (y * stride + x) * 4;
|
|
32
|
-
return [data[i], data[i + 1], data[i + 2]];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Run pixel diff on two same-sized RGBA pixel arrays.
|
|
37
|
-
*
|
|
38
|
-
* @param {Uint8ClampedArray} data1 - HTML screenshot pixel data
|
|
39
|
-
* @param {Uint8ClampedArray} data2 - SVG screenshot pixel data
|
|
40
|
-
* @param {number} w - width of both images (use max if sizes differ)
|
|
41
|
-
* @param {number} h - height of both images
|
|
42
|
-
* @param {number} stride1 - row stride for data1 (usually same as w)
|
|
43
|
-
* @param {number} stride2 - row stride for data2
|
|
44
|
-
* @param {object} [opts] - optional parameter overrides
|
|
45
|
-
* @returns {{ diff: Uint8ClampedArray, stats: object }}
|
|
46
|
-
*/
|
|
47
|
-
export function pixelDiff(data1, data2, w, h, stride1, stride2, opts) {
|
|
48
|
-
const LUMA_THRESHOLD = opts?.LUMA_THRESHOLD ?? DEFAULTS.LUMA_THRESHOLD;
|
|
49
|
-
const CHANNEL_TOLERANCE = opts?.CHANNEL_TOLERANCE ?? DEFAULTS.CHANNEL_TOLERANCE;
|
|
50
|
-
const POSITION_TOLERANCE = opts?.POSITION_TOLERANCE ?? DEFAULTS.POSITION_TOLERANCE;
|
|
51
|
-
|
|
52
|
-
const diff = new Uint8ClampedArray(w * h * 4);
|
|
53
|
-
let total = 0, matched = 0, htmlOnly = 0, svgOnly = 0, colorDiff = 0;
|
|
54
|
-
|
|
55
|
-
function pixelsClose(a, b) {
|
|
56
|
-
return Math.abs(a[0] - b[0]) <= CHANNEL_TOLERANCE &&
|
|
57
|
-
Math.abs(a[1] - b[1]) <= CHANNEL_TOLERANCE &&
|
|
58
|
-
Math.abs(a[2] - b[2]) <= CHANNEL_TOLERANCE;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function hasNearbyMatch(srcData, srcStride, dstData, dstStride, x, y) {
|
|
62
|
-
const p1 = getPixel(srcData, srcStride, x, y);
|
|
63
|
-
for (let dy = -POSITION_TOLERANCE; dy <= POSITION_TOLERANCE; dy++) {
|
|
64
|
-
for (let dx = -POSITION_TOLERANCE; dx <= POSITION_TOLERANCE; dx++) {
|
|
65
|
-
const nx = x + dx, ny = y + dy;
|
|
66
|
-
if (nx < 0 || nx >= w || ny < 0 || ny >= h) continue;
|
|
67
|
-
const p2 = getPixel(dstData, dstStride, nx, ny);
|
|
68
|
-
if (luma(...p2) < LUMA_THRESHOLD && pixelsClose(p1, p2)) return true;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
for (let y = 0; y < h; y++) {
|
|
75
|
-
for (let x = 0; x < w; x++) {
|
|
76
|
-
const pA = getPixel(data1, stride1, x, y);
|
|
77
|
-
const pB = getPixel(data2, stride2, x, y);
|
|
78
|
-
const isA = luma(...pA) < LUMA_THRESHOLD;
|
|
79
|
-
const isB = luma(...pB) < LUMA_THRESHOLD;
|
|
80
|
-
const di = (y * w + x) * 4;
|
|
81
|
-
|
|
82
|
-
if (!isA && !isB) {
|
|
83
|
-
diff[di] = COLORS.background[0];
|
|
84
|
-
diff[di + 1] = COLORS.background[1];
|
|
85
|
-
diff[di + 2] = COLORS.background[2];
|
|
86
|
-
diff[di + 3] = COLORS.background[3];
|
|
87
|
-
continue;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
total++;
|
|
91
|
-
const matchAB = hasNearbyMatch(data1, stride1, data2, stride2, x, y);
|
|
92
|
-
const matchBA = hasNearbyMatch(data2, stride2, data1, stride1, x, y);
|
|
93
|
-
|
|
94
|
-
let color;
|
|
95
|
-
if (isA && isB) {
|
|
96
|
-
if (matchAB || matchBA) {
|
|
97
|
-
matched++;
|
|
98
|
-
color = COLORS.match;
|
|
99
|
-
} else {
|
|
100
|
-
colorDiff++;
|
|
101
|
-
color = COLORS.colorDiff;
|
|
102
|
-
}
|
|
103
|
-
} else if (isA) {
|
|
104
|
-
if (matchAB) {
|
|
105
|
-
matched++;
|
|
106
|
-
color = COLORS.match;
|
|
107
|
-
} else {
|
|
108
|
-
htmlOnly++;
|
|
109
|
-
color = COLORS.htmlOnly;
|
|
110
|
-
}
|
|
111
|
-
} else {
|
|
112
|
-
if (matchBA) {
|
|
113
|
-
matched++;
|
|
114
|
-
color = COLORS.match;
|
|
115
|
-
} else {
|
|
116
|
-
svgOnly++;
|
|
117
|
-
color = COLORS.svgOnly;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
diff[di] = color[0];
|
|
122
|
-
diff[di + 1] = color[1];
|
|
123
|
-
diff[di + 2] = color[2];
|
|
124
|
-
diff[di + 3] = color[3];
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
const posMatched = matched + colorDiff;
|
|
129
|
-
const pixelPct = total > 0 ? parseFloat((matched / total * 100).toFixed(1)) : 0.0;
|
|
130
|
-
const posPct = total > 0 ? parseFloat((posMatched / total * 100).toFixed(1)) : 0.0;
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
diff,
|
|
134
|
-
stats: { matched, posMatched, total, htmlOnly, svgOnly, colorDiff, pixelPct, posPct },
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Load an image from a data URL into an ImageData-compatible object.
|
|
140
|
-
* Works in any browser context (page or extension content script).
|
|
141
|
-
*/
|
|
142
|
-
export function loadImage(dataUrl) {
|
|
143
|
-
return new Promise((resolve, reject) => {
|
|
144
|
-
const img = new Image();
|
|
145
|
-
img.onload = () => resolve(img);
|
|
146
|
-
img.onerror = () => reject(new Error("Failed to load image"));
|
|
147
|
-
img.src = dataUrl;
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Draw an image onto a white-filled canvas and return its pixel data.
|
|
153
|
-
*/
|
|
154
|
-
export function getImageData(img, w, h) {
|
|
155
|
-
const canvas = document.createElement("canvas");
|
|
156
|
-
canvas.width = w;
|
|
157
|
-
canvas.height = h;
|
|
158
|
-
const ctx = canvas.getContext("2d");
|
|
159
|
-
ctx.fillStyle = "white";
|
|
160
|
-
ctx.fillRect(0, 0, w, h);
|
|
161
|
-
ctx.drawImage(img, 0, 0);
|
|
162
|
-
return ctx.getImageData(0, 0, w, h).data;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* High-level: load two data-URL images, run diff, render to a canvas.
|
|
167
|
-
* Returns { canvas, stats, badgeHtml }.
|
|
168
|
-
*/
|
|
169
|
-
export async function diffImages(htmlDataUrl, svgDataUrl, opts) {
|
|
170
|
-
const [htmlImg, svgImg] = await Promise.all([
|
|
171
|
-
loadImage(htmlDataUrl),
|
|
172
|
-
loadImage(svgDataUrl),
|
|
173
|
-
]);
|
|
174
|
-
|
|
175
|
-
const w = Math.max(htmlImg.width, svgImg.width);
|
|
176
|
-
const h = Math.max(htmlImg.height, svgImg.height);
|
|
177
|
-
|
|
178
|
-
const data1 = getImageData(htmlImg, w, h);
|
|
179
|
-
const data2 = getImageData(svgImg, w, h);
|
|
180
|
-
|
|
181
|
-
const { diff, stats } = pixelDiff(data1, data2, w, h, w, w, opts);
|
|
182
|
-
|
|
183
|
-
const canvas = document.createElement("canvas");
|
|
184
|
-
canvas.width = w;
|
|
185
|
-
canvas.height = h;
|
|
186
|
-
const ctx = canvas.getContext("2d");
|
|
187
|
-
const imageData = ctx.createImageData(w, h);
|
|
188
|
-
imageData.data.set(diff);
|
|
189
|
-
ctx.putImageData(imageData, 0, 0);
|
|
190
|
-
|
|
191
|
-
const badgeHtml =
|
|
192
|
-
`<b>${stats.pixelPct}%</b> native pixel match / <b>${stats.posPct}%</b> pos-only (${stats.matched}/${stats.total} px) ` +
|
|
193
|
-
`<span style="color:#006400">\u25a0</span> match ` +
|
|
194
|
-
`<span style="color:#ff0000">\u25a0</span> HTML-only (${stats.htmlOnly}) ` +
|
|
195
|
-
`<span style="color:#0000ff">\u25a0</span> SVG-only (${stats.svgOnly}) ` +
|
|
196
|
-
`<span style="color:#ff00ff">\u25a0</span> color diff (${stats.colorDiff})`;
|
|
197
|
-
|
|
198
|
-
return { canvas, stats, badgeHtml };
|
|
199
|
-
}
|
|
@@ -1,26 +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>create message</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="diagram" class="diagram">
|
|
17
|
-
<pre class="zenuml" style="margin: 0">
|
|
18
|
-
A
|
|
19
|
-
B
|
|
20
|
-
C
|
|
21
|
-
A->B.hello()
|
|
22
|
-
</pre>
|
|
23
|
-
</div>
|
|
24
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
25
|
-
</body>
|
|
26
|
-
</html>
|
|
@@ -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>vue-sequence editable label</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
/* mostly for demo on mobile */
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body>
|
|
17
|
-
<div id="diagram" class="diagram">
|
|
18
|
-
<pre class="zenuml" style="margin: 0">
|
|
19
|
-
title Editable label
|
|
20
|
-
A.method(){
|
|
21
|
-
SelfMessage
|
|
22
|
-
new B(create)
|
|
23
|
-
return x;
|
|
24
|
-
}
|
|
25
|
-
C->D: Hello Alice
|
|
26
|
-
D->C: Hello Bob
|
|
27
|
-
D-->C: Response payload
|
|
28
|
-
C->D: Good to see you
|
|
29
|
-
</pre
|
|
30
|
-
>
|
|
31
|
-
</div>
|
|
32
|
-
<!-- built files will be auto injected -->
|
|
33
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
|
@@ -1,122 +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>EditableSpan Test Page</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 20px;
|
|
11
|
-
font-family: Arial, sans-serif;
|
|
12
|
-
}
|
|
13
|
-
.test-container {
|
|
14
|
-
margin: 20px 0;
|
|
15
|
-
padding: 20px;
|
|
16
|
-
border: 1px solid #ccc;
|
|
17
|
-
border-radius: 4px;
|
|
18
|
-
}
|
|
19
|
-
.label {
|
|
20
|
-
font-weight: bold;
|
|
21
|
-
margin-bottom: 10px;
|
|
22
|
-
}
|
|
23
|
-
.log {
|
|
24
|
-
margin-top: 10px;
|
|
25
|
-
padding: 10px;
|
|
26
|
-
background: #f5f5f5;
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
font-family: monospace;
|
|
29
|
-
font-size: 12px;
|
|
30
|
-
max-height: 200px;
|
|
31
|
-
overflow-y: auto;
|
|
32
|
-
}
|
|
33
|
-
.log-entry {
|
|
34
|
-
margin: 2px 0;
|
|
35
|
-
}
|
|
36
|
-
.log-save {
|
|
37
|
-
color: green;
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
40
|
-
</head>
|
|
41
|
-
|
|
42
|
-
<body>
|
|
43
|
-
<h1>EditableSpan Test Page</h1>
|
|
44
|
-
|
|
45
|
-
<div class="test-container">
|
|
46
|
-
<div class="label">Test 1: Basic ESC Cancel</div>
|
|
47
|
-
<div>
|
|
48
|
-
Text: <span id="test1-span" data-testid="test1-span"></span>
|
|
49
|
-
</div>
|
|
50
|
-
<div class="log" id="test1-log" data-testid="test1-log"></div>
|
|
51
|
-
</div>
|
|
52
|
-
|
|
53
|
-
<div class="test-container">
|
|
54
|
-
<div class="label">Test 2: Enter Save</div>
|
|
55
|
-
<div>
|
|
56
|
-
Text: <span id="test2-span" data-testid="test2-span"></span>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="log" id="test2-log" data-testid="test2-log"></div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div class="test-container">
|
|
62
|
-
<div class="label">Test 3: Blur Save</div>
|
|
63
|
-
<div>
|
|
64
|
-
Text: <span id="test3-span" data-testid="test3-span"></span>
|
|
65
|
-
</div>
|
|
66
|
-
<div class="log" id="test3-log" data-testid="test3-log"></div>
|
|
67
|
-
<button id="blur-target" data-testid="blur-target">Click here to blur</button>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<script type="module">
|
|
71
|
-
import { createRoot } from 'react-dom/client';
|
|
72
|
-
import { createElement } from 'react';
|
|
73
|
-
import { EditableSpan } from '../../src/components/common/EditableSpan/EditableSpan';
|
|
74
|
-
|
|
75
|
-
function createLogger(logId) {
|
|
76
|
-
const logEl = document.getElementById(logId);
|
|
77
|
-
return {
|
|
78
|
-
log: (message, type = 'info') => {
|
|
79
|
-
const entry = document.createElement('div');
|
|
80
|
-
entry.className = `log-entry log-${type}`;
|
|
81
|
-
entry.textContent = `[${new Date().toLocaleTimeString()}] ${message}`;
|
|
82
|
-
logEl.appendChild(entry);
|
|
83
|
-
logEl.scrollTop = logEl.scrollHeight;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function createReactiveSpan(rootEl, logger, initialValue) {
|
|
89
|
-
let value = initialValue;
|
|
90
|
-
const render = () => {
|
|
91
|
-
rootEl.render(createElement(EditableSpan, {
|
|
92
|
-
text: value,
|
|
93
|
-
onSave: (newText) => {
|
|
94
|
-
value = newText;
|
|
95
|
-
logger.log(`onSave called: "${newText}"`, 'save');
|
|
96
|
-
render();
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
};
|
|
100
|
-
render();
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Test 1: ESC Cancel - should NOT call onSave when ESC is pressed
|
|
104
|
-
const logger1 = createLogger('test1-log');
|
|
105
|
-
const root1 = createRoot(document.getElementById('test1-span'));
|
|
106
|
-
createReactiveSpan(root1, logger1, 'Original Text');
|
|
107
|
-
|
|
108
|
-
// Test 2: Enter Save
|
|
109
|
-
const logger2 = createLogger('test2-log');
|
|
110
|
-
const root2 = createRoot(document.getElementById('test2-span'));
|
|
111
|
-
createReactiveSpan(root2, logger2, 'Press Enter');
|
|
112
|
-
|
|
113
|
-
// Test 3: Blur Save
|
|
114
|
-
const logger3 = createLogger('test3-log');
|
|
115
|
-
const root3 = createRoot(document.getElementById('test3-span'));
|
|
116
|
-
createReactiveSpan(root3, logger3, 'Click Outside');
|
|
117
|
-
|
|
118
|
-
// Make loggers available for testing
|
|
119
|
-
window.testLoggers = { logger1, logger2, logger3 };
|
|
120
|
-
</script>
|
|
121
|
-
</body>
|
|
122
|
-
</html>
|
|
@@ -1,23 +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 empty diagram</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
/* mostly for demo on mobile */
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body>
|
|
17
|
-
<div id="diagram" class="diagram">
|
|
18
|
-
<pre class="zenuml" style="margin: 0"></pre>
|
|
19
|
-
</div>
|
|
20
|
-
<!-- built files will be auto injected -->
|
|
21
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,31 +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>ZenUML Test Fixture</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" id="zenuml-code"></pre>
|
|
17
|
-
</div>
|
|
18
|
-
<script type="module">
|
|
19
|
-
import { CASES } from "../data/compare-cases.js";
|
|
20
|
-
const params = new URLSearchParams(window.location.search);
|
|
21
|
-
const caseName = params.get("case");
|
|
22
|
-
if (caseName && CASES[caseName]) {
|
|
23
|
-
document.getElementById("zenuml-code").textContent = CASES[caseName];
|
|
24
|
-
} else {
|
|
25
|
-
document.getElementById("zenuml-code").textContent =
|
|
26
|
-
"// Case not found: " + caseName;
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
30
|
-
</body>
|
|
31
|
-
</html>
|
|
@@ -1,23 +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>insert participant</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="diagram" class="diagram">
|
|
17
|
-
<pre class="zenuml" style="margin: 0">
|
|
18
|
-
A->C: Ping
|
|
19
|
-
</pre>
|
|
20
|
-
</div>
|
|
21
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
22
|
-
</body>
|
|
23
|
-
</html>
|
|
@@ -1,31 +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>reorder cross fragment</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="diagram" class="diagram">
|
|
17
|
-
<pre class="zenuml" style="margin: 0">
|
|
18
|
-
A
|
|
19
|
-
B
|
|
20
|
-
C
|
|
21
|
-
B->A.outside()
|
|
22
|
-
if(ready) {
|
|
23
|
-
A->B.alpha()
|
|
24
|
-
A->C.beta()
|
|
25
|
-
}
|
|
26
|
-
C->A.omega()
|
|
27
|
-
</pre>
|
|
28
|
-
</div>
|
|
29
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
30
|
-
</body>
|
|
31
|
-
</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>reorder fragment</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="diagram" class="diagram">
|
|
17
|
-
<pre class="zenuml" style="margin: 0">
|
|
18
|
-
A
|
|
19
|
-
B
|
|
20
|
-
C
|
|
21
|
-
if(ready) {
|
|
22
|
-
A->B: alpha
|
|
23
|
-
A->C: beta
|
|
24
|
-
}
|
|
25
|
-
</pre>
|
|
26
|
-
</div>
|
|
27
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|
|
@@ -1,27 +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>reorder message</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
13
|
-
</head>
|
|
14
|
-
|
|
15
|
-
<body>
|
|
16
|
-
<div id="diagram" class="diagram">
|
|
17
|
-
<pre class="zenuml" style="margin: 0">
|
|
18
|
-
A
|
|
19
|
-
B
|
|
20
|
-
C
|
|
21
|
-
A->B: first
|
|
22
|
-
A->C: second
|
|
23
|
-
</pre>
|
|
24
|
-
</div>
|
|
25
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
26
|
-
</body>
|
|
27
|
-
</html>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
|
|
6
|
-
<title>SVG Parity Test</title>
|
|
7
|
-
<style>
|
|
8
|
-
body { margin: 0; background: white; }
|
|
9
|
-
</style>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="svg-output"></div>
|
|
13
|
-
<script type="module">
|
|
14
|
-
import { renderToSvg } from "/src/svg/renderToSvg.ts";
|
|
15
|
-
window.__renderSvg = (code) => {
|
|
16
|
-
const result = renderToSvg(code);
|
|
17
|
-
document.getElementById("svg-output").innerHTML = result.svg;
|
|
18
|
-
};
|
|
19
|
-
</script>
|
|
20
|
-
</body>
|
|
21
|
-
</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>vue-sequence type switch</title>
|
|
8
|
-
<style>
|
|
9
|
-
body {
|
|
10
|
-
margin: 0;
|
|
11
|
-
/* mostly for demo on mobile */
|
|
12
|
-
}
|
|
13
|
-
</style>
|
|
14
|
-
</head>
|
|
15
|
-
|
|
16
|
-
<body>
|
|
17
|
-
<div id="diagram" class="diagram">
|
|
18
|
-
<pre class="zenuml" style="margin: 0">
|
|
19
|
-
title Type Switch
|
|
20
|
-
A->B.login()
|
|
21
|
-
B->C: validate
|
|
22
|
-
B-->A: token
|
|
23
|
-
</pre
|
|
24
|
-
>
|
|
25
|
-
</div>
|
|
26
|
-
<!-- built files will be auto injected -->
|
|
27
|
-
<script type="module" src="/src/main-e2e.ts"></script>
|
|
28
|
-
</body>
|
|
29
|
-
</html>
|