File size: 6,266 Bytes
9b7d64e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76fc93a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b7d64e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76fc93a
 
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
76fc93a
9b7d64e
 
 
 
 
76fc93a
9b7d64e
 
 
 
76fc93a
9b7d64e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
.mermaid .nodeLabel p {
    color: var(--text-color) !important;
}

.mermaid .cluster-label .nodeLabel {
    color: var(--text-color) !important;
}

/* Styles pour le texte des subgraphs/clusters - gérer les foreignObject */
.mermaid .cluster-label text,
.mermaid .cluster-label .nodeLabel text,
.mermaid .cluster-label foreignObject,
.mermaid .cluster-label foreignObject div,
.mermaid .cluster-label foreignObject span {
    color: var(--text-color) !important;
    fill: var(--text-color) !important;
}

/* Styles spécifiques pour les clusters/subgraphs */
.mermaid .cluster rect {
    fill: transparent !important;
    stroke: var(--border-color) !important;
    stroke-width: 1px !important;
}

.mermaid .cluster-label {
    color: var(--text-color) !important;
    fill: var(--text-color) !important;
}

/* Masquer le flicker pendant la conversion */
.mermaid-zoom-wrapper.converting {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.mermaid-zoom-wrapper.converting .mermaid {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

/* Assurer que les diagrammes Mermaid prennent toute la largeur */
.mermaid {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    background: none !important;
}

/* Dark mode: ensure Mermaid SVG elements use theme-aware colors */
[data-theme="dark"] .mermaid .edgePath .path,
[data-theme="dark"] .mermaid .flowchart-link {
    stroke: rgba(255, 255, 255, .4) !important;
}

[data-theme="dark"] .mermaid .arrowheadPath,
[data-theme="dark"] .mermaid .edgePath marker path {
    fill: rgba(255, 255, 255, .4) !important;
    stroke: rgba(255, 255, 255, .4) !important;
}

[data-theme="dark"] .mermaid .edgeLabel,
[data-theme="dark"] .mermaid .edgeLabel rect {
    background-color: transparent !important;
    fill: transparent !important;
}

[data-theme="dark"] .mermaid .edgeLabel span {
    color: var(--text-color) !important;
}

[data-theme="dark"] .mermaid text {
    fill: var(--text-color) !important;
}

[data-theme="dark"] .mermaid .label foreignObject div {
    color: var(--text-color) !important;
}

/* Styles pour les SVG Mermaid */
.mermaid svg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

/* Styles pour les wrappers de zoom Mermaid */
.mermaid-zoom-wrapper {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    cursor: zoom-in;
    position: relative;
}

.mermaid-zoom-wrapper .mermaid {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.mermaid-zoom-wrapper .mermaid svg {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* Styles pour les nœuds avec bords arrondis et bordure interne */
.mermaid rect:not(.flowchart-link),
.mermaid .node rect,
.mermaid .nodeLabel rect,
.mermaid .cluster rect {
    rx: 8px !important;
    ry: 8px !important;
    stroke: color-mix(in srgb, var(--text-color) 20%, transparent) !important;
    stroke-width: 1px !important;
    /* Décalage pour créer l'effet de bordure interne */
}

/* Styles pour les diagrammes Mermaid zoomables */
.mermaid-zoom-wrapper:hover {
    opacity: 0.95;
    transition: opacity 0.2s ease;
}

/* Appliquer le même style que les images zoomables */
.mermaid-zoom-wrapper[data-zoomable="1"] {
    cursor: zoom-in;
}

/* Styles pour le mode zoom ouvert */
.medium-zoom--opened .mermaid-zoom-wrapper {
    cursor: zoom-out;
}

/* Exclude Mermaid images from dark mode inversion filter */
[data-theme="dark"] .mermaid-zoom-wrapper img.medium-zoom-image--opened {
    filter: none !important;
}

[data-theme="dark"] .mermaid-zoom-wrapper .medium-zoom-image--opened {
    filter: none !important;
}

[data-theme="dark"] .mermaid-zoom-wrapper img[data-zoomable="1"].medium-zoom-image--opened {
    filter: none !important;
}

.medium-zoom-overlay {
    z-index: 9999999 !important;
}

.medium-zoom-image--opened {
    z-index: 10000000 !important;
}

[data-theme="dark"] .mermaid-zoom-image.medium-zoom-image--opened {
    filter: none !important;
}

.medium-zoom-overlay:has(.mermaid-zoom-wrapper) {
    z-index: 9999999 !important;
}

.mermaid-zoom-image.medium-zoom-image--opened {
    z-index: 10000000 !important;
}

.mermaid-zoom-wrapper:has(.medium-zoom-image--opened) {
    z-index: 10000000 !important;
}

.medium-zoom--opened .mermaid-zoom-wrapper {
    opacity: 0;
    z-index: calc(var(--z-base) - 1);
    transition: opacity 0.3s ease;
}

.medium-zoom--opened .mermaid-zoom-wrapper:has(.medium-zoom--opened) {
    opacity: 1;
    z-index: var(--z-overlay);
}

.medium-zoom--opened .mermaid-zoom-wrapper.zoom-active {
    opacity: 1 !important;
    z-index: var(--z-overlay) !important;
}

/* Styles spécifiques pour différents types de diagrammes */

/* Flowchart/Graph - styles généraux */
.mermaid .node rect,
.mermaid .node circle,
.mermaid .node ellipse,
.mermaid .label rect {
    rx: 8px !important;
    ry: 8px !important;
}

/* Flowchart - nœuds principaux */
.mermaid .flowchart-node rect,
.mermaid .flowchart-label rect {
    rx: 8px !important;
    ry: 8px !important;
}

/* Sequence diagram */
.mermaid .actor rect,
.mermaid .participant rect {
    rx: 8px !important;
    ry: 8px !important;
}

/* ER diagram */
.mermaid .entityBox rect,
.mermaid .er .entityBox rect {
    rx: 6px !important;
    ry: 6px !important;
}

/* Gantt chart */
.mermaid .section0 rect,
.mermaid .section1 rect,
.mermaid .section2 rect,
.mermaid .section3 rect {
    rx: 4px !important;
    ry: 4px !important;
}

/* Gitgraph */
.mermaid .commit rect {
    rx: 12px !important;
    ry: 12px !important;
}

/* Mindmap */
.mermaid .mindmap-node rect {
    rx: 10px !important;
    ry: 10px !important;
}

/* Sankey */
.mermaid .sankey .node rect {
    rx: 4px !important;
    ry: 4px !important;
}

/* Timeline */
.mermaid .timeline rect {
    rx: 6px !important;
    ry: 6px !important;
}

/* Pie chart */
.mermaid .pieTitleText {
    rx: 8px !important;
    ry: 8px !important;
}

/* Journey */
.mermaid .journey .section0 rect,
.mermaid .journey .section1 rect,
.mermaid .journey .section2 rect,
.mermaid .journey .section3 rect {
    rx: 8px !important;
    ry: 8px !important;
}