@zenuml/core 3.47.9 → 3.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +11 -1
- package/src/cli/zenuml.ts +1164 -0
- 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,21 +0,0 @@
|
|
|
1
|
-
# System Integration Documentation
|
|
2
|
-
|
|
3
|
-
This document contains cross-component integration patterns and system-wide architectural decisions.
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
This template serves as a placeholder for documenting:
|
|
8
|
-
- Cross-component communication patterns
|
|
9
|
-
- Data flow architectures between services
|
|
10
|
-
- Integration strategies with external systems
|
|
11
|
-
- Performance optimization patterns
|
|
12
|
-
- Testing strategies for integrated systems
|
|
13
|
-
- Error handling across service boundaries
|
|
14
|
-
|
|
15
|
-
## Implementation Note
|
|
16
|
-
|
|
17
|
-
Replace this template with your actual system integration documentation as your project develops. Focus on patterns that AI agents need to understand when working across component boundaries or implementing features that span multiple services.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
*Customize this template based on your specific integration patterns and architectural requirements.*
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
== Audience
|
|
2
|
-
:icons: font
|
|
3
|
-
|
|
4
|
-
This document is written for the contributors. If you want to integrate ZenUML in your application,
|
|
5
|
-
you should read index.adoc; if you want to create themes, you should read create-my-own-theme.adoc.
|
|
6
|
-
|
|
7
|
-
== Build
|
|
8
|
-
This project is built with vue cli. It has two types of target: the web application and the library.
|
|
9
|
-
|
|
10
|
-
....
|
|
11
|
-
# to build the library
|
|
12
|
-
bun run build
|
|
13
|
-
# to build the web application
|
|
14
|
-
bun run build:site
|
|
15
|
-
....
|
|
16
|
-
|
|
17
|
-
== Demo pages
|
|
18
|
-
In the public folder, there are some demo pages for testing the library.
|
|
19
|
-
|
|
20
|
-
=== How do they work?
|
|
21
|
-
|
|
22
|
-
The demo pages^1^ are built with vue cli service. On the page, there needs to be a `pre`
|
|
23
|
-
element with class `zenuml` and the content being the ZenUML DSL code.
|
|
24
|
-
|
|
25
|
-
For example:
|
|
26
|
-
[source, html]
|
|
27
|
-
....
|
|
28
|
-
<pre class="zenuml">
|
|
29
|
-
A.method
|
|
30
|
-
</pre>
|
|
31
|
-
....
|
|
32
|
-
|
|
33
|
-
The entry point of the demo pages is `src/main.ts`. It will find all the `pre` elements with
|
|
34
|
-
class `zenuml` and render the ZenUML DSL code in it.
|
|
35
|
-
|
|
36
|
-
== Parser
|
|
37
|
-
|
|
38
|
-
We use antlr4 to parse the ZenUML DSL code. The grammar files are:
|
|
39
|
-
|
|
40
|
-
1. Parser: `./src/g4/sequenceParser.g4`
|
|
41
|
-
2. Lexer: `./src/g4/sequenceLexer.g4`
|
|
42
|
-
|
|
43
|
-
=== How to generate the parser and lexer
|
|
44
|
-
|
|
45
|
-
Run `bun run antlr` to generate the parser and lexer.
|
|
46
|
-
|
|
47
|
-
=== Setup local development environment
|
|
48
|
-
|
|
49
|
-
Run `bun run antlr:setup` (`python3 -m pip install antlr4-tools`) to install the antlr4 command and the runtime.
|
|
50
|
-
|
|
51
|
-
To test the setup, go to `src/g4-unit/hello-world` folder, and run:
|
|
52
|
-
|
|
53
|
-
1.
|
|
54
|
-
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
= Creat my own theme
|
|
2
|
-
|
|
3
|
-
Since the elements on the rendered diagram is based on HTML Dom (and svg), it is simple
|
|
4
|
-
to create your own theme. There is a repository on GitHub that have some themes collected
|
|
5
|
-
by third party. You may be able to get some inspiration from there. https://github.com/abruzzi/zenuml-css-overrides
|
|
6
|
-
|
|
7
|
-
== The Information Architecture
|
|
8
|
-
image::./images/three-layer-info-arch.png[width=600]
|
|
9
|
-
|
|
10
|
-
The diagram is rendered in two layers. The back layer is the lifeline layer. The front layer
|
|
11
|
-
is the message layer.
|
|
12
|
-
|
|
13
|
-
Key information on the diagram can be grouped in the following structure:
|
|
14
|
-
|
|
15
|
-
Text messages are internally styled at four levels:
|
|
16
|
-
|
|
17
|
-
1. text-skin-base: used for all messages
|
|
18
|
-
2. text-skin-muted: used for comments
|
|
19
|
-
3. text-skin-link: used for links
|
|
20
|
-
4. text-skin-secondary: used for everything else, such as title, participant, divider notes, etc.
|
|
21
|
-
|
|
22
|
-
When it comes to branding, the following elements are the most important:
|
|
23
|
-
|
|
24
|
-
1. Canvas background, however, it can easily be overwhelming if you use high contrast color to the
|
|
25
|
-
overall page background.
|
|
26
|
-
2. Title background, participant background and fragment header background are the most attractive
|
|
27
|
-
elements to brand. These are where your brand color should be used.
|
|
28
|
-
3. The background of the occurrence (message bar) is also a good place to use your brand color, but
|
|
29
|
-
less attractive than the above three.
|
|
30
|
-
4. The borders of the frame, participant, fragment, occurrence and lifeline can add a bit
|
|
31
|
-
of color to the diagram.
|
|
32
|
-
5. The color of the message and the arrow are the most important information on
|
|
33
|
-
the diagram. Choose a striking and comfortable color for them. You can use the brand color here, but
|
|
34
|
-
they should not be the only elements that reflect your brand color. Same principles apply to the
|
|
35
|
-
background and text color for hover state.
|
|
36
|
-
6. Then is the color of link and control. They should avoid attracting too much attention
|
|
37
|
-
|
|
38
|
-
[%autowidth]
|
|
39
|
-
|===
|
|
40
|
-
|Category | Diagram Frame |Lifeline Layer | Message Layer
|
|
41
|
-
|
|
42
|
-
h|Text Info
|
|
43
|
-
a|* Title
|
|
44
|
-
* Brand
|
|
45
|
-
a|* Participant name
|
|
46
|
-
* Stereotype
|
|
47
|
-
* Comment
|
|
48
|
-
|
|
49
|
-
a|* Message name
|
|
50
|
-
* Fragment type
|
|
51
|
-
* Fragment condition
|
|
52
|
-
* Comment
|
|
53
|
-
* Divider name
|
|
54
|
-
|
|
55
|
-
h|Shapes
|
|
56
|
-
a|* Security (icon)
|
|
57
|
-
* Tips (icon)
|
|
58
|
-
a|* Participant box (rectangle)
|
|
59
|
-
* Lifeline (vertical line)
|
|
60
|
-
a|* Message arrow (line and head)
|
|
61
|
-
* Fragment (rectangle)
|
|
62
|
-
* Divider line (left and right)
|
|
63
|
-
|
|
64
|
-
|===
|
|
65
|
-
|
|
66
|
-
Each of the elements has a semantic selector that can be used to customize the appearance.
|
|
67
|
-
|
|
68
|
-
The component has basic styling in itself mostly to support layout and positioning. Then
|
|
69
|
-
the core renderer comes with a default theme that defines the appearance of the elements.
|
|
70
|
-
|
|
71
|
-
[source,css]
|
|
72
|
-
----
|
|
73
|
-
|
|
74
|
-
----
|
|
75
|
-
|
|
76
|
-
A typical custom theme will be like below:
|
|
77
|
-
|
|
78
|
-
[source,css]
|
|
79
|
-
----
|
|
80
|
-
----
|
|
81
|
-
|
|
82
|
-
== What can a theme change?
|
|
83
|
-
|
|
84
|
-
A theme can change two aspects of the diagram:
|
|
85
|
-
|
|
86
|
-
1. colors
|
|
87
|
-
2. slightly change the layout (e.g. padding, margin, etc.). For example, you can make the
|
|
88
|
-
diagram more compact by reducing the padding.
|
|
89
|
-
|
|
90
|
-
== where can I apply themes
|
|
91
|
-
|
|
92
|
-
You can apply themes on the follow products:
|
|
93
|
-
|
|
94
|
-
. JetBrains plugins (Intellij IDEA, WebStore, PhpStore, etc.)
|
|
95
|
-
. https://app.zenuml.com
|
|
96
|
-
|
|
97
|
-
With https://chrome.google.com/webstore/detail/user-css/okpjlejfhacmgjkmknjhadmkdbcldfcb[User CSS]
|
|
98
|
-
browser extension, you can apply themes anywhere (e.g. https://zenuml.cn).
|
|
99
|
-
|
|
100
|
-
== Principles of creating themes
|
|
101
|
-
|
|
102
|
-
=== 1. Do not override tailwind classes
|
|
103
|
-
The tailwind classes directly applied on the elements are important for layout so
|
|
104
|
-
they are NOT meant be overridden.
|
|
105
|
-
|
|
106
|
-
For example,
|
|
107
|
-
[html]
|
|
108
|
-
....
|
|
109
|
-
// Participant.vue
|
|
110
|
-
<div class="participant relative flex flex-col justify-center z-10 h-10"
|
|
111
|
-
....
|
|
112
|
-
|
|
113
|
-
=== 2. Use provided class selectors
|
|
114
|
-
Important elements are provided with a semantic class selector. You can use them
|
|
115
|
-
to override the style.
|
|
116
|
-
|
|
117
|
-
For the above example, the class selector is `participant`. You can override the
|
|
118
|
-
style by using this selector.
|
|
119
|
-
|
|
120
|
-
[css]
|
|
121
|
-
....
|
|
122
|
-
// use `.zenuml .sequence-diagram` to increase specificity
|
|
123
|
-
.zenuml .sequence-diagram .participant {
|
|
124
|
-
background-color: #f00;
|
|
125
|
-
}
|
|
126
|
-
....
|
|
127
|
-
|
|
128
|
-
=== 3. Debug your theme
|
|
129
|
-
|
|
130
|
-
You can use the browser extension https://chrome.google.com/webstore/detail/user-css/okpjlejfhacmgjkmknjhadmkdbcldfcb[User CSS]
|
|
131
|
-
to debug your theme.
|
|
132
|
-
|
|
133
|
-
image::user-css.png[User CSS]
|
|
134
|
-
|
|
135
|
-
Alternatively, you can use our web app https://app.zenuml.com[app.zenuml.com]. Go to the CSS tab
|
|
136
|
-
and paste your theme there. You can see the result immediately.
|
|
137
|
-
|
|
138
|
-
image::theme-debug-web-app.png[]
|
|
139
|
-
|
|
140
|
-
=== JetBrains
|
|
141
|
-
|
|
142
|
-
=== app.zenuml.com
|
|
143
|
-
|
|
144
|
-
== Tips
|
|
145
|
-
|
|
146
|
-
=== Give occurrence a boarder
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 202.624 202.624" style="enable-background:new 0 0 202.624 202.624" xml:space="preserve"><path d="M202.621 97.416h-38.966V58.45a3.896 3.896 0 0 0-3.897-3.897h-38.966a3.896 3.896 0 0 0-3.897 3.897v38.966H85.724V35.07a3.896 3.896 0 0 0-3.897-3.897H42.862a3.896 3.896 0 0 0-3.897 3.897v62.345H0v7.793h38.966v62.345a3.896 3.896 0 0 0 3.897 3.897h38.966a3.896 3.896 0 0 0 3.897-3.897v-62.345h31.172v38.966a3.896 3.896 0 0 0 3.897 3.897h38.966a3.896 3.896 0 0 0 3.897-3.897v-38.966h38.966v-7.793h-.003zm-124.69 0v66.241H46.759V38.968h31.172v58.448zm77.931 0v42.862H124.69V62.346h31.172v35.07z"/></svg>
|
|
Binary file
|
package/docs/asciidoc/index.adoc
DELETED
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
:icons: font
|
|
2
|
-
|
|
3
|
-
== Font
|
|
4
|
-
Font [.underline]#must# be *preloaded*. Font mainly have impact to Creation
|
|
5
|
-
rendering. The font will impact the width of the participant box which then
|
|
6
|
-
impacts the with of message container for creation.
|
|
7
|
-
|
|
8
|
-
The following code should help with preloading google fonts. But it is not super
|
|
9
|
-
reliable. Specifically, when you disable cache in Chrome. It is not preloaded
|
|
10
|
-
where you can see the impact.
|
|
11
|
-
|
|
12
|
-
....
|
|
13
|
-
<link rel='preconnect' href='https://fonts.gstatic.com' crossorigin>
|
|
14
|
-
<link rel='preload stylesheet' as='style' href='https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;500;700&display=swap'>
|
|
15
|
-
....
|
|
16
|
-
|
|
17
|
-
We have to use `setTimeout` to delay the calculation of the width of the
|
|
18
|
-
message container.
|
|
19
|
-
|
|
20
|
-
== The two layer structure
|
|
21
|
-
At the highest level, the diagram is rendered in two layers:
|
|
22
|
-
the lifeline layer and the message layer.
|
|
23
|
-
|
|
24
|
-
....
|
|
25
|
-
<div class="sequence-diagram">
|
|
26
|
-
<div class="life-line-layer absolute h-full">
|
|
27
|
-
</div>
|
|
28
|
-
<div class="message-layer">
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
....
|
|
32
|
-
|
|
33
|
-
=== Key classes
|
|
34
|
-
==== .absolute
|
|
35
|
-
The `absolute` class is used to remove the lifeline layer from the normal
|
|
36
|
-
flow of the document.
|
|
37
|
-
|
|
38
|
-
==== .h-full
|
|
39
|
-
The `h-full` class is used to make the lifeline layer as tall as the parent
|
|
40
|
-
element. The parent element get the height from the `message-layer`.
|
|
41
|
-
|
|
42
|
-
== The message layer
|
|
43
|
-
|
|
44
|
-
=== Occurrence
|
|
45
|
-
_TODO_: explain misalignment of the occurrence concept and the spec.
|
|
46
|
-
|
|
47
|
-
image::images/occurrence.png[width=304,alt="occurrence"]
|
|
48
|
-
|
|
49
|
-
The occurrence is the bar (or invisible bar for async messages) that
|
|
50
|
-
represents the execution of a message.
|
|
51
|
-
|
|
52
|
-
It has a width of 15px and border of 2px. These two values #must not#
|
|
53
|
-
be overridden in themes.
|
|
54
|
-
|
|
55
|
-
It has a padding-left of 5px which pushes the children `interaction` to
|
|
56
|
-
the middle of the occurrence.
|
|
57
|
-
....
|
|
58
|
-
(occurrenceWidth - occurrenceBorderWidth x 2 - lifelineWidth) / 2
|
|
59
|
-
= (15 - 2 x 2 - 1) / 2
|
|
60
|
-
= 5
|
|
61
|
-
....
|
|
62
|
-
|
|
63
|
-
Because the lifeline has width of 1px, for normal (left to right) `interaction` s
|
|
64
|
-
we give it a margin left of 1px to avoid the overlap of the lifeline and the
|
|
65
|
-
interaction border. See `interaction` for more details.
|
|
66
|
-
|
|
67
|
-
=== Interaction
|
|
68
|
-
The `interaction` is one of the key conceptual elements. It works with
|
|
69
|
-
the `occurrence` to influence high-level layout. The `interaction` is the container
|
|
70
|
-
of the message, children interactions and the response.
|
|
71
|
-
|
|
72
|
-
The `interaction` has a border of 5px. This value #must not# be overridden in themes.
|
|
73
|
-
....
|
|
74
|
-
(occurrenceWidth - occurrenceBorderWidth x 2 - lifelineWidth) / 2
|
|
75
|
-
= (15 - 2 x 2 - 1) / 2
|
|
76
|
-
= 5
|
|
77
|
-
....
|
|
78
|
-
|
|
79
|
-
Within Interaction, the DOM structure is like below:
|
|
80
|
-
|
|
81
|
-
....
|
|
82
|
-
<div class="interaction">
|
|
83
|
-
<div class="occurrence source"></div>
|
|
84
|
-
<comment/>
|
|
85
|
-
<invocation/> <1>
|
|
86
|
-
<occurrence/>
|
|
87
|
-
<message type="return">
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
....
|
|
91
|
-
<1> SelfInvocation or Message
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
==== Do not add margin to interaction
|
|
95
|
-
It is on purpose that interaction box overlaps source lifeline but not the target
|
|
96
|
-
lifeline. Do not add #margin# to interaction components. This margin will cause
|
|
97
|
-
interaction's right board overlaps target lifeline and that is accumulative.
|
|
98
|
-
|
|
99
|
-
==== Debugging
|
|
100
|
-
Disable transparency of the interaction borders.
|
|
101
|
-
|
|
102
|
-
=== Common features among Interaction, Interaction and Creation
|
|
103
|
-
|
|
104
|
-
All the three work as a container for the message, children interactions and the
|
|
105
|
-
response. In the normal direction (left to right), they start with the middle
|
|
106
|
-
of the source lifeline and end with the middle of the target lifeline.
|
|
107
|
-
|
|
108
|
-
=== Return message
|
|
109
|
-
|
|
110
|
-
The return message is the message that is sent back to the sender of the original
|
|
111
|
-
message. It is rendered as a dashed line.
|
|
112
|
-
|
|
113
|
-
A return message is rendered from three syntax:
|
|
114
|
-
|
|
115
|
-
* `return x` which matches `RETURN expr? SCOL?`
|
|
116
|
-
* `@return A->B: ret` which matches `ANNOTATION_RET asyncMessage EVENT_END?`
|
|
117
|
-
* `x=A.m` or `x=new A()` which matches `assignment? ((from ARROW)? to DOT)? func` or `assignment? NEW construct(OPAR parameters? CPAR)?`
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
==== Statement `return x` or `@return A->B: ret`
|
|
121
|
-
|
|
122
|
-
`return x` or `@return A->B: ret` is implemented via the `Return` component.
|
|
123
|
-
In such cases, it has its own context and can have a comment. Then it
|
|
124
|
-
delegates to `SelfInvocation` or `Message`.
|
|
125
|
-
|
|
126
|
-
===== When do we need `@return A->B: ret`?
|
|
127
|
-
|
|
128
|
-
....
|
|
129
|
-
Browser->BookController.onPost() {
|
|
130
|
-
BookLibService.Borrow(id) {
|
|
131
|
-
receipt = process(id)
|
|
132
|
-
if (receipt != null) {
|
|
133
|
-
return receipt
|
|
134
|
-
@return BookController->Browser: receipt
|
|
135
|
-
} else {
|
|
136
|
-
return null
|
|
137
|
-
@return BookController->Browser: 404
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
....
|
|
142
|
-
|
|
143
|
-
If the statement is the last statement we set the height of the message to 0px,
|
|
144
|
-
so that it does not push the message down further. This is because a return message
|
|
145
|
-
does not have children and does not need an occurrence.
|
|
146
|
-
|
|
147
|
-
....
|
|
148
|
-
.statement-container:last-child>.return {
|
|
149
|
-
height: 0;
|
|
150
|
-
}
|
|
151
|
-
....
|
|
152
|
-
|
|
153
|
-
==== Return message from `x=A.m` or `x=new A`
|
|
154
|
-
This is implemented in Interaction and Creation components.
|
|
155
|
-
|
|
156
|
-
....
|
|
157
|
-
<message class="return transform -translate-y-full"/>
|
|
158
|
-
....
|
|
159
|
-
|
|
160
|
-
==== Conflicting return messages
|
|
161
|
-
We provide two ways in DSL to represent `return` messages:
|
|
162
|
-
|
|
163
|
-
....
|
|
164
|
-
// option 1
|
|
165
|
-
x = A.method
|
|
166
|
-
// option 2
|
|
167
|
-
A.method() {
|
|
168
|
-
return y
|
|
169
|
-
}
|
|
170
|
-
....
|
|
171
|
-
|
|
172
|
-
If you use both, we will render both with overlapping. This is on purpose to expose
|
|
173
|
-
the conflict to the user.
|
|
174
|
-
|
|
175
|
-
.Return message conflict
|
|
176
|
-
image::images/return-message-conflict.png[width=200,alt="return message conflict"]
|
|
177
|
-
|
|
178
|
-
=== Message arrow
|
|
179
|
-
.Message arrow (the dashed line and arrow head)
|
|
180
|
-
image::images/creation-component.png[width=224]
|
|
181
|
-
|
|
182
|
-
This time we focus on how to align the arrow line and the arrow head.
|
|
183
|
-
We use a similar approach as pattern #vertically aligning# with pattern
|
|
184
|
-
#shift half the height#. Instead of `items-center` we use `items-end`.
|
|
185
|
-
Then we use `translate-y-1/2` to shift the arrow head down half the
|
|
186
|
-
height of the arrow head. (See Message.vue)
|
|
187
|
-
....
|
|
188
|
-
<div class="message flex items-end"
|
|
189
|
-
<div class="name flex-grow" style="padding-left: 10px">{{content}}</div>
|
|
190
|
-
<point class="flex-shrink-0 transform translate-y-1/2 -my-px" :fill="fill" :rtl="rtl"/>
|
|
191
|
-
</div>
|
|
192
|
-
....
|
|
193
|
-
|
|
194
|
-
==== Key classes
|
|
195
|
-
===== .flex .items-end
|
|
196
|
-
The `flex` and `items-end` classes are used to align the arrow line
|
|
197
|
-
and the arrow head at the bottom of the message.
|
|
198
|
-
|
|
199
|
-
===== .flex-grow
|
|
200
|
-
The `flex-grow` class is used to make the message name grow to fill
|
|
201
|
-
the available space.
|
|
202
|
-
|
|
203
|
-
===== .flex-shrink-0
|
|
204
|
-
The `flex-shrink-0` class is used to make the arrow head not shrink
|
|
205
|
-
when the message name is too long.
|
|
206
|
-
|
|
207
|
-
===== .transform .translate-y-1/2
|
|
208
|
-
The `transform` and `translate-y-1/2` classes are used to shift the
|
|
209
|
-
arrow head down half the height of the arrow head.
|
|
210
|
-
|
|
211
|
-
=== Message arrow right to left
|
|
212
|
-
image::images/message-arrow-rtl.png[width=200,alt="message arrow right to left"]
|
|
213
|
-
|
|
214
|
-
....
|
|
215
|
-
<div class="message flex items-end" :class="{'flex-row-reverse': rtl}">
|
|
216
|
-
<div class="name flex-grow"
|
|
217
|
-
>{{content}}</div>
|
|
218
|
-
<point class="flex-shrink-0 transform translate-y-1/2 -my-px"/>
|
|
219
|
-
</div>
|
|
220
|
-
....
|
|
221
|
-
|
|
222
|
-
==== Key classes
|
|
223
|
-
===== .flex-row-reverse
|
|
224
|
-
The `flex-row-reverse` class is used to reverse the order of the name and
|
|
225
|
-
the arrow head.
|
|
226
|
-
|
|
227
|
-
=== Creation
|
|
228
|
-
image::images/creation-component.png[width=240]
|
|
229
|
-
|
|
230
|
-
==== Pattern 1: Vertically aligning
|
|
231
|
-
image::images/vertical-alignment.svg[width=40]
|
|
232
|
-
|
|
233
|
-
....
|
|
234
|
-
<div class="flex items-center">
|
|
235
|
-
<div class="w-10 h-8 bg-blue-200"></div>
|
|
236
|
-
<div class="w-10 h-20 bg-green-200"></div>
|
|
237
|
-
</div>
|
|
238
|
-
....
|
|
239
|
-
|
|
240
|
-
==== Pattern 2: Shift half the height
|
|
241
|
-
image::images/shift-up-half-the-height.png[width=50]
|
|
242
|
-
|
|
243
|
-
The message arrow is supposed to point to the middle of the participant
|
|
244
|
-
box. It is not he whole message that is aligned with the participant
|
|
245
|
-
box. So we have to shift the message up half the height of the message.
|
|
246
|
-
....
|
|
247
|
-
<div class="flex items-center m-10">
|
|
248
|
-
<div class="w-10 h-8 bg-blue-200 transform -translate-y-1/2"></div>
|
|
249
|
-
<div class="w-10 h-20 bg-green-200"></div>
|
|
250
|
-
</div>
|
|
251
|
-
....
|
|
252
|
-
|
|
253
|
-
This pattern is also used at the arrows. See the image for creation.
|
|
254
|
-
|
|
255
|
-
=== Creation participant top
|
|
256
|
-
While all normal participants have their name boxes at the top of the
|
|
257
|
-
diagram, creation participant boxes need to be pushed down to align
|
|
258
|
-
with the message arrow.
|
|
259
|
-
|
|
260
|
-
To implement this, we add a `padding-top` to the containing lifeline
|
|
261
|
-
of the corresponding participant.
|
|
262
|
-
|
|
263
|
-
The padding top is calculated by subtracting the top of message from
|
|
264
|
-
the top of participant's original value.
|
|
265
|
-
|
|
266
|
-
==== Challenge
|
|
267
|
-
When the message container is mounted, it does not have the correct
|
|
268
|
-
participant box offsetWidth.
|
|
269
|
-
|
|
270
|
-
=== Creation right to left
|
|
271
|
-
image::images/creation-rtl.png[width=240,alt="creation right to left"]
|
|
272
|
-
|
|
273
|
-
On top of normal Creation, we need to flip the participant placeholder
|
|
274
|
-
and the message container. We use the `flex-row-reverse` class to flip.
|
|
275
|
-
See "Message right to left" for example using `flex-row-reverse`.
|
|
276
|
-
|
|
277
|
-
|
|
Binary file
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
= User's guide
|
|
2
|
-
|
|
3
|
-
== Audience
|
|
4
|
-
This document is written for end users of the software. If you want to integrate
|
|
5
|
-
ZenUML into your own application, please refer to the integration guide. If you
|
|
6
|
-
want to contribute to the development of ZenUML, please refer to the contributor's
|
|
7
|
-
guide.
|
|
8
|
-
|
|
9
|
-
== Introduction
|
|
10
|
-
> A Sequence diagram is an interaction diagram that shows how processes operate with one another and in what order.
|
|
11
|
-
|
|
12
|
-
ZenUML is a tool for creating sequence diagrams from text. It runs completely
|
|
13
|
-
in the browser, so you don't need to worry about data privacy or security. See
|
|
14
|
-
https://link[data privacy and security] for more information.
|
|
15
|
-
|
|
16
|
-
++++
|
|
17
|
-
<iframe src="https://embed.zenuml.com/smoke-creation.html"></iframe>
|
|
18
|
-
++++
|
|
19
|
-
|
|
20
|
-
== Syntax
|
|
21
|
-
|
|
22
|
-
=== Participants
|
|
Binary file
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
Async:
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
asyncMessage
|
|
5
|
-
: source ARROW target COL content
|
|
6
|
-
| source (MINUS | ARROW) target?
|
|
7
|
-
;
|
|
8
|
-
|
|
9
|
-
content
|
|
10
|
-
: EVENT_PAYLOAD_LXR
|
|
11
|
-
;
|
|
12
|
-
|
|
13
|
-
source
|
|
14
|
-
: ID | STRING
|
|
15
|
-
;
|
|
16
|
-
|
|
17
|
-
target
|
|
18
|
-
: ID | STRING
|
|
19
|
-
;
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Sync:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
message
|
|
26
|
-
: messageBody (SCOL | braceBlock)?
|
|
27
|
-
;
|
|
28
|
-
|
|
29
|
-
// Order of 'func | (to DOT)' is important. Otherwise A.m will be parsed as to messages
|
|
30
|
-
messageBody
|
|
31
|
-
: assignment? ((from ARROW)? to DOT)? func
|
|
32
|
-
| assignment
|
|
33
|
-
| to DOT
|
|
34
|
-
;
|
|
35
|
-
|
|
36
|
-
// func is also used in exp as parameter with expr: (to DOT)? func;
|
|
37
|
-
func
|
|
38
|
-
: signature (DOT signature)*
|
|
39
|
-
;
|
|
40
|
-
|
|
41
|
-
from
|
|
42
|
-
: ID | STRING
|
|
43
|
-
;
|
|
44
|
-
|
|
45
|
-
signature
|
|
46
|
-
: methodName invocation?
|
|
47
|
-
;
|
|
48
|
-
|
|
49
|
-
// We have removed the alternative rule with single OPAR as we are improving the editor to always close the brackets.
|
|
50
|
-
invocation
|
|
51
|
-
: OPAR parameters? CPAR
|
|
52
|
-
;
|
|
53
|
-
|
|
54
|
-
assignment
|
|
55
|
-
: (type? assignee ASSIGN)
|
|
56
|
-
;
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
First of all, `from->to` and `source->target` are very similar. Let's first merge them.
|
|
60
|
-
|
|
61
|
-
if(!this.rightToLeft) {
|
|
62
|
-
if(this.outOfBand) {
|
|
63
|
-
// A B C
|
|
64
|
-
// inh pro to
|
|
65
|
-
const dist = this.distance2(this.origin, this.providedFrom)
|
|
66
|
-
return dist - indent + fragmentOff
|
|
67
|
-
} else {
|
|
68
|
-
// A B
|
|
69
|
-
// inh to
|
|
70
|
-
// No self call indent here. It is used only for width.
|
|
71
|
-
return fragmentOff
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
// A B C
|
|
75
|
-
// to pro origin
|
|
76
|
-
// OR
|
|
77
|
-
// A B
|
|
78
|
-
// to origin
|
|
79
|
-
const dist = this.distance2(this.to, this.origin)
|
|
80
|
-
return (dist - indent - fragmentOff) * (-1)
|
|
81
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
This document describe the design of parsing rules for the `divider` statement.
|
|
2
|
-
|
|
3
|
-
## Typical use case
|
|
4
|
-
|
|
5
|
-
The `divider` statement is used to separate the sequence of statements into logical
|
|
6
|
-
groups.
|
|
7
|
-
|
|
8
|
-
For example, a HTTPS sequence can be separated into three logical groups:
|
|
9
|
-
|
|
10
|
-
1. Connect establishment
|
|
11
|
-
2. TLS handshake
|
|
12
|
-
3. HTTP request/response
|
|
13
|
-
|
|
14
|
-
```
|
|
15
|
-
Client->Server: TCP SYNC
|
|
16
|
-
Server->Client: TCP SYN+ACK
|
|
17
|
-
Client->Server: TCP ACK
|
|
18
|
-
== Connection Established ==
|
|
19
|
-
Client->Server: TLS Client Hello
|
|
20
|
-
Server->Client: TLS Server Hello
|
|
21
|
-
Server->Client: TLS Certificate
|
|
22
|
-
Server->Client: TLS Server Hello Done
|
|
23
|
-
== Certificate Check ==
|
|
24
|
-
Client->Server: TLS Client Key Exchange
|
|
25
|
-
Client->Server: TLS Change Cipher Spec
|
|
26
|
-
Client->Server: TLS Finished
|
|
27
|
-
Server->Client: TLS Change Cipher Spec
|
|
28
|
-
Server->Client: TLS Finished
|
|
29
|
-
== Key Exchange, Handshake Completed ==
|
|
30
|
-
Client->Server: HTTP Request
|
|
31
|
-
Server->Client: HTTP Response
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## The Lexer
|
|
35
|
-
|
|
36
|
-
## `divider` is a statement
|
|
37
|
-
|
|
38
|
-
`divider` is treated as a statement as any other messages.
|