@zenuml/core 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/zenuml/core.common.js +241 -190
- package/dist/zenuml/core.common.js.map +1 -1
- package/dist/zenuml/core.css +2 -4
- package/dist/zenuml/core.umd.js +241 -190
- package/dist/zenuml/core.umd.js.map +1 -1
- package/dist/zenuml/core.umd.min.js +4 -4
- package/dist/zenuml/core.umd.min.js.map +1 -1
- package/docs/asciidoc/create-my-own-theme.adoc +67 -0
- package/docs/asciidoc/images/three-layer-info-arch.png +0 -0
- package/package.json +1 -1
- package/tailwind.config.js +55 -1
|
@@ -4,6 +4,73 @@ Since the elements on the rendered diagram is based on HTML Dom (and svg), it is
|
|
|
4
4
|
to create your own theme. There is a repository on GitHub that have some themes collected
|
|
5
5
|
by third party. You may be able to get some inspiration from there. https://github.com/abruzzi/zenuml-css-overrides
|
|
6
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
|
+
[%autowidth]
|
|
23
|
+
|===
|
|
24
|
+
|Category | Diagram Frame |Lifeline Layer | Message Layer
|
|
25
|
+
|
|
26
|
+
h|Text Info
|
|
27
|
+
a|* Title
|
|
28
|
+
* Brand
|
|
29
|
+
a|* Participant name
|
|
30
|
+
* Stereotype
|
|
31
|
+
* Comment
|
|
32
|
+
|
|
33
|
+
a|* Message name
|
|
34
|
+
* Fragment type
|
|
35
|
+
* Fragment condition
|
|
36
|
+
* Comment
|
|
37
|
+
* Divider name
|
|
38
|
+
|
|
39
|
+
h|Shapes
|
|
40
|
+
a|* Security (icon)
|
|
41
|
+
* Tips (icon)
|
|
42
|
+
a|* Participant box (rectangle)
|
|
43
|
+
* Lifeline (vertical line)
|
|
44
|
+
a|* Message arrow (line and head)
|
|
45
|
+
* Fragment (rectangle)
|
|
46
|
+
* Divider line (left and right)
|
|
47
|
+
|
|
48
|
+
|===
|
|
49
|
+
|
|
50
|
+
Each of the elements has a semantic selector that can be used to customize the appearance.
|
|
51
|
+
|
|
52
|
+
The component has basic styling in itself mostly to support layout and positioning. Then
|
|
53
|
+
the core renderer comes with a default theme that defines the appearance of the elements.
|
|
54
|
+
|
|
55
|
+
[source,css]
|
|
56
|
+
----
|
|
57
|
+
|
|
58
|
+
----
|
|
59
|
+
|
|
60
|
+
A typical custom theme will be like below:
|
|
61
|
+
|
|
62
|
+
[source,css]
|
|
63
|
+
----
|
|
64
|
+
----
|
|
65
|
+
|
|
66
|
+
== What can a theme change?
|
|
67
|
+
|
|
68
|
+
A theme can change two aspects of the diagram:
|
|
69
|
+
|
|
70
|
+
1. colors
|
|
71
|
+
2. slightly change the layout (e.g. padding, margin, etc.). For example, you can make the
|
|
72
|
+
diagram more compact by reducing the padding.
|
|
73
|
+
|
|
7
74
|
== where can I apply themes
|
|
8
75
|
|
|
9
76
|
You can apply themes on the follow products:
|
|
Binary file
|
package/package.json
CHANGED
package/tailwind.config.js
CHANGED
|
@@ -3,7 +3,61 @@ module.exports = {
|
|
|
3
3
|
content: ['./public/**/*.html', './src/**/*.vue'],
|
|
4
4
|
darkMode: false, // or 'media' or 'class'
|
|
5
5
|
theme: {
|
|
6
|
-
extend: {
|
|
6
|
+
extend: {
|
|
7
|
+
textColor: {
|
|
8
|
+
skin: {
|
|
9
|
+
title: 'var(--color-text-title)',
|
|
10
|
+
participant: 'var(--color-text-participant)',
|
|
11
|
+
message: 'var(--color-text-message)',
|
|
12
|
+
"message-arrow": 'var(--color-message-arrow)', // message arrow head
|
|
13
|
+
"message-hover": 'var(--color-text-message-hover)',
|
|
14
|
+
comment: 'var(--color-text-comment)',
|
|
15
|
+
fragment: 'var(--color-text-fragment)',
|
|
16
|
+
base: 'var(--color-text-base)',
|
|
17
|
+
header: 'var(--color-text-header)',
|
|
18
|
+
secondary: 'var(--color-text-secondary)',
|
|
19
|
+
control: 'var(--color-text-control)',
|
|
20
|
+
muted: 'var(--color-text-muted)',
|
|
21
|
+
hover: 'var(--color-text-hover)',
|
|
22
|
+
link: `var(--color-text-link)`,
|
|
23
|
+
fill: `var(--color-text-fill)`,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
backgroundColor: {
|
|
27
|
+
skin: {
|
|
28
|
+
canvas: 'var(--color-bg-canvas)',
|
|
29
|
+
frame: 'var(--color-bg-frame)',
|
|
30
|
+
title: 'var(--color-bg-title)',
|
|
31
|
+
participant: 'var(--color-bg-participant)',
|
|
32
|
+
lifeline: 'var(--color-border-participant)',
|
|
33
|
+
divider: 'var(--color-border-participant)',
|
|
34
|
+
"message-hover": 'var(--color-bg-message-hover)',
|
|
35
|
+
"fragment-header": 'var(--color-bg-fragment-header)',
|
|
36
|
+
occurrence: 'var(--color-bg-occurrence)',
|
|
37
|
+
base: 'var(--color-bg-base)',
|
|
38
|
+
secondary: 'var(--color-bg-secondary)',
|
|
39
|
+
hover: 'var(--color-bg-hover)',
|
|
40
|
+
fill: 'var(--color-bg-fill)',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
borderColor: {
|
|
44
|
+
skin: {
|
|
45
|
+
frame: 'var(--color-border-frame)',
|
|
46
|
+
participant: 'var(--color-border-participant)',
|
|
47
|
+
"message-arrow": 'var(--color-message-arrow)', // message arrow line
|
|
48
|
+
fragment: 'var(--color-border-fragment)',
|
|
49
|
+
occurrence: 'var(--color-border-occurrence)',
|
|
50
|
+
base: 'var(--color-border-base)',
|
|
51
|
+
secondary: 'var(--color-border-secondary)',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
gradientColorStops: {
|
|
55
|
+
skin: {
|
|
56
|
+
base: 'var(--color-bg-base)',
|
|
57
|
+
secondary: 'var(--color-bg-secondary)',
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
},
|
|
7
61
|
},
|
|
8
62
|
variants: {
|
|
9
63
|
extend: {
|