@tnotesjs/core 0.1.18 → 0.1.20
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/README.md +87 -87
- package/package.json +1 -1
- package/types/config.ts +61 -61
- package/types/index.ts +11 -11
- package/types/note.ts +33 -33
- package/vitepress/assets/icons/icon__check.svg +3 -3
- package/vitepress/assets/icons/icon__clipboard.svg +7 -7
- package/vitepress/assets/icons/icon__close.svg +1 -1
- package/vitepress/assets/icons/icon__collapse.svg +1 -1
- package/vitepress/assets/icons/icon__confirm.svg +1 -1
- package/vitepress/assets/icons/icon__copy.svg +4 -4
- package/vitepress/assets/icons/icon__focus.svg +1 -1
- package/vitepress/assets/icons/icon__fold.svg +3 -3
- package/vitepress/assets/icons/icon__folder.svg +1 -1
- package/vitepress/assets/icons/icon__fullscreen.svg +1 -1
- package/vitepress/assets/icons/icon__fullscreen_exit.svg +1 -1
- package/vitepress/assets/icons/icon__github.svg +3 -3
- package/vitepress/assets/icons/icon__mindmap.svg +1 -1
- package/vitepress/assets/icons/icon__next.svg +1 -1
- package/vitepress/assets/icons/icon__number_gray.svg +1 -1
- package/vitepress/assets/icons/icon__number_purple.svg +1 -1
- package/vitepress/assets/icons/icon__prev.svg +1 -1
- package/vitepress/assets/icons/icon__restore.svg +1 -1
- package/vitepress/assets/icons/icon__rotate.svg +4 -4
- package/vitepress/assets/icons/icon__search.svg +1 -1
- package/vitepress/assets/icons/icon__sidebar_collapsed.svg +1 -1
- package/vitepress/assets/icons/icon__sidebar_opened.svg +1 -1
- package/vitepress/assets/icons/icon__totop.svg +5 -5
- package/vitepress/assets/icons/icon__vscode.svg +5 -5
- package/vitepress/assets/icons/icon__zoom_fit.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_in.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_out.svg +1 -1
- package/vitepress/assets/icons/icon__zoom_reset.svg +1 -1
- package/vitepress/assets/icons/index.ts +39 -39
- package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +20 -20
- package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +369 -369
- package/vitepress/components/CodeBlockFullscreen/index.ts +213 -213
- package/vitepress/components/CodeBlockFullscreen/styles.css +126 -126
- package/vitepress/components/Discussions/Discussions.module.scss +32 -32
- package/vitepress/components/Discussions/Discussions.vue +211 -211
- package/vitepress/components/EnWordList/EnWordList.module.scss +124 -124
- package/vitepress/components/EnWordList/EnWordList.vue +543 -543
- package/vitepress/components/EnWordList/RightClickMenu.module.scss +22 -22
- package/vitepress/components/EnWordList/RightClickMenu.vue +66 -66
- package/vitepress/components/Footprints/Footprints.module.scss +93 -93
- package/vitepress/components/Footprints/Footprints.vue +377 -377
- package/vitepress/components/Layout/AboutModal.module.scss +233 -233
- package/vitepress/components/Layout/AboutModal.vue +105 -105
- package/vitepress/components/Layout/AboutPanel.vue +270 -270
- package/vitepress/components/Layout/ContentCollapse.vue +603 -603
- package/vitepress/components/Layout/CustomSidebar.vue +817 -817
- package/vitepress/components/Layout/DocBeforeControls.vue +149 -149
- package/vitepress/components/Layout/DocFooter.vue +233 -233
- package/vitepress/components/Layout/ImagePreview.module.scss +201 -201
- package/vitepress/components/Layout/ImagePreview.vue +281 -281
- package/vitepress/components/Layout/Layout.module.scss +661 -661
- package/vitepress/components/Layout/Layout.vue +621 -621
- package/vitepress/components/Layout/NoteStatus.vue +140 -140
- package/vitepress/components/Layout/SidebarItems.vue +1083 -1083
- package/vitepress/components/Layout/SidebarNavBefore.vue +171 -171
- package/vitepress/components/Layout/SidebarResizeHandle.vue +319 -319
- package/vitepress/components/Layout/Swiper.vue +167 -167
- package/vitepress/components/Layout/ToggleFullContent.module.scss +11 -11
- package/vitepress/components/Layout/ToggleFullContent.vue +35 -35
- package/vitepress/components/Layout/ToggleSidebar.module.scss +11 -11
- package/vitepress/components/Layout/ToggleSidebar.vue +26 -26
- package/vitepress/components/Layout/composables/useCollapseControl.ts +88 -88
- package/vitepress/components/Layout/composables/useNoteConfig.ts +119 -119
- package/vitepress/components/Layout/composables/useNoteSave.ts +178 -178
- package/vitepress/components/Layout/composables/useNoteValidation.ts +85 -85
- package/vitepress/components/Layout/composables/useRedirect.ts +113 -113
- package/vitepress/components/Layout/composables/useSidebarLayout.ts +122 -122
- package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +85 -85
- package/vitepress/components/Layout/homeReadme.data.ts +124 -124
- package/vitepress/components/MarkMap/MarkMap.module.scss +159 -159
- package/vitepress/components/MarkMap/MarkMap.vue +405 -405
- package/vitepress/components/Mermaid/Mermaid.module.scss +275 -275
- package/vitepress/components/Mermaid/Mermaid.vue +365 -365
- package/vitepress/components/NotesTable/NotesTable.module.scss +77 -77
- package/vitepress/components/NotesTable/NotesTable.vue +98 -98
- package/vitepress/components/NotesTable/README.md +67 -67
- package/vitepress/components/Settings/Settings.module.scss +375 -375
- package/vitepress/components/Settings/Settings.vue +334 -334
- package/vitepress/components/SidebarCard/MindMapView.vue +484 -484
- package/vitepress/components/SidebarCard/NotesTrendChart.vue +108 -108
- package/vitepress/components/SidebarCard/SidebarCard.vue +946 -946
- package/vitepress/components/Tooltip/Tooltip.vue +70 -70
- package/vitepress/components/constants.ts +109 -109
- package/vitepress/components/notesConfig.data.ts +73 -73
- package/vitepress/components/sidebar.data.ts +59 -59
- package/vitepress/components/tnotes-config.data.ts +21 -21
- package/vitepress/components/utils.ts +26 -26
- package/vitepress/config/index.ts +169 -169
- package/vitepress/configs/constants.ts +26 -26
- package/vitepress/configs/head.config.ts +25 -25
- package/vitepress/configs/index.ts +9 -9
- package/vitepress/configs/markdown-it.d.ts +23 -23
- package/vitepress/configs/markdown.config.ts +366 -366
- package/vitepress/configs/theme.config.ts +108 -108
- package/vitepress/plugins/buildProgressPlugin.ts +434 -434
- package/vitepress/plugins/getNoteByConfigIdPlugin.ts +107 -107
- package/vitepress/plugins/renameNotePlugin.ts +68 -68
- package/vitepress/plugins/sidebarStructurePlugin.ts +260 -260
- package/vitepress/plugins/updateConfigPlugin.ts +63 -63
- package/vitepress/theme/index.ts +137 -137
- package/vitepress/theme/styles/base.scss +64 -59
- package/vitepress/theme/styles/components/404.scss +31 -31
- package/vitepress/theme/styles/components/collapse.scss +172 -185
- package/vitepress/theme/styles/components/markmap.scss +101 -101
- package/vitepress/theme/styles/components/swiper.scss +255 -255
- package/vitepress/theme/styles/index.scss +25 -25
- package/vitepress/theme/styles/layout.scss +78 -78
- package/vitepress/theme/styles/utilities.scss +39 -39
- package/vitepress/theme/styles/vitepress-override.scss +25 -25
|
@@ -1,275 +1,275 @@
|
|
|
1
|
-
/* ===================================== */
|
|
2
|
-
/* #region 容器布局 */
|
|
3
|
-
/* ===================================== */
|
|
4
|
-
.mermaidWrapper {
|
|
5
|
-
position: relative;
|
|
6
|
-
margin: 1rem 0;
|
|
7
|
-
border: 1px solid var(--vp-c-divider);
|
|
8
|
-
border-radius: 8px;
|
|
9
|
-
background: var(--vp-c-bg-soft);
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
12
|
-
/* ===================================== */
|
|
13
|
-
/* #endregion 容器布局 */
|
|
14
|
-
/* ===================================== */
|
|
15
|
-
|
|
16
|
-
/* ===================================== */
|
|
17
|
-
/* #region 工具栏 */
|
|
18
|
-
/* ===================================== */
|
|
19
|
-
.toolbar {
|
|
20
|
-
position: absolute;
|
|
21
|
-
top: 0;
|
|
22
|
-
left: 0;
|
|
23
|
-
right: 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
align-items: center;
|
|
26
|
-
gap: 2px;
|
|
27
|
-
padding: 6px 8px;
|
|
28
|
-
background: var(--vp-c-bg);
|
|
29
|
-
border-bottom: 1px solid var(--vp-c-divider);
|
|
30
|
-
flex-wrap: wrap;
|
|
31
|
-
transform: translateY(-100%);
|
|
32
|
-
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
33
|
-
opacity: 0;
|
|
34
|
-
z-index: 10;
|
|
35
|
-
pointer-events: none;
|
|
36
|
-
|
|
37
|
-
&.visible {
|
|
38
|
-
transform: translateY(0);
|
|
39
|
-
opacity: 1;
|
|
40
|
-
pointer-events: auto;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.toolbarBtn {
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
align-items: center;
|
|
47
|
-
justify-content: center;
|
|
48
|
-
width: 28px;
|
|
49
|
-
height: 28px;
|
|
50
|
-
padding: 0;
|
|
51
|
-
font-size: 12px;
|
|
52
|
-
background: transparent;
|
|
53
|
-
border: none;
|
|
54
|
-
border-radius: 4px;
|
|
55
|
-
cursor: pointer;
|
|
56
|
-
transition: all 0.2s ease;
|
|
57
|
-
opacity: 0.6;
|
|
58
|
-
|
|
59
|
-
&:hover {
|
|
60
|
-
background: var(--vp-c-brand-soft);
|
|
61
|
-
opacity: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:active {
|
|
65
|
-
transform: scale(0.95);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.iconBtn {
|
|
70
|
-
padding: 4px;
|
|
71
|
-
|
|
72
|
-
.btnIcon {
|
|
73
|
-
width: 16px;
|
|
74
|
-
height: 16px;
|
|
75
|
-
display: block;
|
|
76
|
-
pointer-events: none;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.zoomLevel {
|
|
81
|
-
margin-left: auto;
|
|
82
|
-
padding: 0 6px;
|
|
83
|
-
font-size: 11px;
|
|
84
|
-
font-weight: 500;
|
|
85
|
-
color: var(--vp-c-text-3);
|
|
86
|
-
user-select: none;
|
|
87
|
-
}
|
|
88
|
-
/* ===================================== */
|
|
89
|
-
/* #endregion 工具栏 */
|
|
90
|
-
/* ===================================== */
|
|
91
|
-
|
|
92
|
-
/* ===================================== */
|
|
93
|
-
/* #region 图表容器 */
|
|
94
|
-
/* ===================================== */
|
|
95
|
-
.mermaidContainer {
|
|
96
|
-
position: relative;
|
|
97
|
-
min-height: 200px;
|
|
98
|
-
max-height: 600px;
|
|
99
|
-
overflow: auto;
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
justify-content: center;
|
|
103
|
-
padding: 20px;
|
|
104
|
-
background: var(--vp-c-bg);
|
|
105
|
-
|
|
106
|
-
&.fullscreen {
|
|
107
|
-
position: fixed;
|
|
108
|
-
top: 0;
|
|
109
|
-
left: 0;
|
|
110
|
-
right: 0;
|
|
111
|
-
bottom: 0;
|
|
112
|
-
max-height: none;
|
|
113
|
-
z-index: 9999;
|
|
114
|
-
background: var(--vp-c-bg);
|
|
115
|
-
padding: 40px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/* 自定义滚动条 */
|
|
119
|
-
&::-webkit-scrollbar {
|
|
120
|
-
width: 8px;
|
|
121
|
-
height: 8px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
&::-webkit-scrollbar-track {
|
|
125
|
-
background: var(--vp-c-bg-soft);
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
&::-webkit-scrollbar-thumb {
|
|
129
|
-
background: var(--vp-c-divider);
|
|
130
|
-
border-radius: 4px;
|
|
131
|
-
|
|
132
|
-
&:hover {
|
|
133
|
-
background: var(--vp-c-text-3);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
/* ===================================== */
|
|
138
|
-
/* #endregion 图表容器 */
|
|
139
|
-
/* ===================================== */
|
|
140
|
-
|
|
141
|
-
/* ===================================== */
|
|
142
|
-
/* #region 加载和错误状态 */
|
|
143
|
-
/* ===================================== */
|
|
144
|
-
.mermaidLoading {
|
|
145
|
-
display: flex;
|
|
146
|
-
flex-direction: column;
|
|
147
|
-
align-items: center;
|
|
148
|
-
gap: 12px;
|
|
149
|
-
padding: 2rem;
|
|
150
|
-
color: var(--vp-c-text-2);
|
|
151
|
-
|
|
152
|
-
p {
|
|
153
|
-
margin: 0;
|
|
154
|
-
font-size: 14px;
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.spinner {
|
|
159
|
-
width: 40px;
|
|
160
|
-
height: 40px;
|
|
161
|
-
border: 3px solid var(--vp-c-divider);
|
|
162
|
-
border-top-color: var(--vp-c-brand-1);
|
|
163
|
-
border-radius: 50%;
|
|
164
|
-
animation: spin 0.8s linear infinite;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@keyframes spin {
|
|
168
|
-
to {
|
|
169
|
-
transform: rotate(360deg);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.mermaidError {
|
|
174
|
-
display: flex;
|
|
175
|
-
flex-direction: column;
|
|
176
|
-
align-items: center;
|
|
177
|
-
gap: 8px;
|
|
178
|
-
padding: 2rem;
|
|
179
|
-
color: var(--vp-c-danger-1);
|
|
180
|
-
|
|
181
|
-
p {
|
|
182
|
-
margin: 0;
|
|
183
|
-
font-size: 14px;
|
|
184
|
-
text-align: center;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.errorIcon {
|
|
189
|
-
font-size: 32px;
|
|
190
|
-
}
|
|
191
|
-
/* ===================================== */
|
|
192
|
-
/* #endregion 加载和错误状态 */
|
|
193
|
-
/* ===================================== */
|
|
194
|
-
|
|
195
|
-
/* ===================================== */
|
|
196
|
-
/* #region 图表样式 */
|
|
197
|
-
/* ===================================== */
|
|
198
|
-
.mermaidDiagram {
|
|
199
|
-
width: 100%;
|
|
200
|
-
display: flex;
|
|
201
|
-
align-items: center;
|
|
202
|
-
justify-content: center;
|
|
203
|
-
transition: transform 0.2s ease;
|
|
204
|
-
cursor: grab;
|
|
205
|
-
|
|
206
|
-
&:active {
|
|
207
|
-
cursor: grabbing;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
:global(svg) {
|
|
211
|
-
max-width: 100%;
|
|
212
|
-
height: auto;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
/* ===================================== */
|
|
216
|
-
/* #endregion 图表样式 */
|
|
217
|
-
/* ===================================== */
|
|
218
|
-
|
|
219
|
-
/* ===================================== */
|
|
220
|
-
/* #region 暗色主题优化 */
|
|
221
|
-
/* ===================================== */
|
|
222
|
-
:global(html.dark) .mermaidWrapper {
|
|
223
|
-
background: var(--vp-code-block-bg);
|
|
224
|
-
border-color: var(--vp-c-divider);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
:global(html.dark) .toolbar {
|
|
228
|
-
background: var(--vp-code-block-bg);
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
:global(html.dark) .mermaidContainer {
|
|
232
|
-
background: var(--vp-code-block-bg);
|
|
233
|
-
}
|
|
234
|
-
/* ===================================== */
|
|
235
|
-
/* #endregion 暗色主题优化 */
|
|
236
|
-
/* ===================================== */
|
|
237
|
-
|
|
238
|
-
/* ===================================== */
|
|
239
|
-
/* #region 响应式设计 */
|
|
240
|
-
/* ===================================== */
|
|
241
|
-
@media (max-width: 768px) {
|
|
242
|
-
.toolbar {
|
|
243
|
-
padding: 4px 6px;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
.toolbarBtn {
|
|
247
|
-
width: 24px;
|
|
248
|
-
height: 24px;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
.iconBtn {
|
|
252
|
-
padding: 3px;
|
|
253
|
-
|
|
254
|
-
.btnIcon {
|
|
255
|
-
width: 14px;
|
|
256
|
-
height: 14px;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.zoomLevel {
|
|
261
|
-
font-size: 10px;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.mermaidContainer {
|
|
265
|
-
padding: 12px;
|
|
266
|
-
max-height: 400px;
|
|
267
|
-
|
|
268
|
-
&.fullscreen {
|
|
269
|
-
padding: 20px;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
/* ===================================== */
|
|
274
|
-
/* #endregion 响应式设计 */
|
|
275
|
-
/* ===================================== */
|
|
1
|
+
/* ===================================== */
|
|
2
|
+
/* #region 容器布局 */
|
|
3
|
+
/* ===================================== */
|
|
4
|
+
.mermaidWrapper {
|
|
5
|
+
position: relative;
|
|
6
|
+
margin: 1rem 0;
|
|
7
|
+
border: 1px solid var(--vp-c-divider);
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
background: var(--vp-c-bg-soft);
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
}
|
|
12
|
+
/* ===================================== */
|
|
13
|
+
/* #endregion 容器布局 */
|
|
14
|
+
/* ===================================== */
|
|
15
|
+
|
|
16
|
+
/* ===================================== */
|
|
17
|
+
/* #region 工具栏 */
|
|
18
|
+
/* ===================================== */
|
|
19
|
+
.toolbar {
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
right: 0;
|
|
24
|
+
display: flex;
|
|
25
|
+
align-items: center;
|
|
26
|
+
gap: 2px;
|
|
27
|
+
padding: 6px 8px;
|
|
28
|
+
background: var(--vp-c-bg);
|
|
29
|
+
border-bottom: 1px solid var(--vp-c-divider);
|
|
30
|
+
flex-wrap: wrap;
|
|
31
|
+
transform: translateY(-100%);
|
|
32
|
+
transition: transform 0.3s ease, opacity 0.3s ease;
|
|
33
|
+
opacity: 0;
|
|
34
|
+
z-index: 10;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
|
|
37
|
+
&.visible {
|
|
38
|
+
transform: translateY(0);
|
|
39
|
+
opacity: 1;
|
|
40
|
+
pointer-events: auto;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.toolbarBtn {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
width: 28px;
|
|
49
|
+
height: 28px;
|
|
50
|
+
padding: 0;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
background: transparent;
|
|
53
|
+
border: none;
|
|
54
|
+
border-radius: 4px;
|
|
55
|
+
cursor: pointer;
|
|
56
|
+
transition: all 0.2s ease;
|
|
57
|
+
opacity: 0.6;
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
background: var(--vp-c-brand-soft);
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:active {
|
|
65
|
+
transform: scale(0.95);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.iconBtn {
|
|
70
|
+
padding: 4px;
|
|
71
|
+
|
|
72
|
+
.btnIcon {
|
|
73
|
+
width: 16px;
|
|
74
|
+
height: 16px;
|
|
75
|
+
display: block;
|
|
76
|
+
pointer-events: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.zoomLevel {
|
|
81
|
+
margin-left: auto;
|
|
82
|
+
padding: 0 6px;
|
|
83
|
+
font-size: 11px;
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
color: var(--vp-c-text-3);
|
|
86
|
+
user-select: none;
|
|
87
|
+
}
|
|
88
|
+
/* ===================================== */
|
|
89
|
+
/* #endregion 工具栏 */
|
|
90
|
+
/* ===================================== */
|
|
91
|
+
|
|
92
|
+
/* ===================================== */
|
|
93
|
+
/* #region 图表容器 */
|
|
94
|
+
/* ===================================== */
|
|
95
|
+
.mermaidContainer {
|
|
96
|
+
position: relative;
|
|
97
|
+
min-height: 200px;
|
|
98
|
+
max-height: 600px;
|
|
99
|
+
overflow: auto;
|
|
100
|
+
display: flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
padding: 20px;
|
|
104
|
+
background: var(--vp-c-bg);
|
|
105
|
+
|
|
106
|
+
&.fullscreen {
|
|
107
|
+
position: fixed;
|
|
108
|
+
top: 0;
|
|
109
|
+
left: 0;
|
|
110
|
+
right: 0;
|
|
111
|
+
bottom: 0;
|
|
112
|
+
max-height: none;
|
|
113
|
+
z-index: 9999;
|
|
114
|
+
background: var(--vp-c-bg);
|
|
115
|
+
padding: 40px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* 自定义滚动条 */
|
|
119
|
+
&::-webkit-scrollbar {
|
|
120
|
+
width: 8px;
|
|
121
|
+
height: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&::-webkit-scrollbar-track {
|
|
125
|
+
background: var(--vp-c-bg-soft);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&::-webkit-scrollbar-thumb {
|
|
129
|
+
background: var(--vp-c-divider);
|
|
130
|
+
border-radius: 4px;
|
|
131
|
+
|
|
132
|
+
&:hover {
|
|
133
|
+
background: var(--vp-c-text-3);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/* ===================================== */
|
|
138
|
+
/* #endregion 图表容器 */
|
|
139
|
+
/* ===================================== */
|
|
140
|
+
|
|
141
|
+
/* ===================================== */
|
|
142
|
+
/* #region 加载和错误状态 */
|
|
143
|
+
/* ===================================== */
|
|
144
|
+
.mermaidLoading {
|
|
145
|
+
display: flex;
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
align-items: center;
|
|
148
|
+
gap: 12px;
|
|
149
|
+
padding: 2rem;
|
|
150
|
+
color: var(--vp-c-text-2);
|
|
151
|
+
|
|
152
|
+
p {
|
|
153
|
+
margin: 0;
|
|
154
|
+
font-size: 14px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.spinner {
|
|
159
|
+
width: 40px;
|
|
160
|
+
height: 40px;
|
|
161
|
+
border: 3px solid var(--vp-c-divider);
|
|
162
|
+
border-top-color: var(--vp-c-brand-1);
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
animation: spin 0.8s linear infinite;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@keyframes spin {
|
|
168
|
+
to {
|
|
169
|
+
transform: rotate(360deg);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.mermaidError {
|
|
174
|
+
display: flex;
|
|
175
|
+
flex-direction: column;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 8px;
|
|
178
|
+
padding: 2rem;
|
|
179
|
+
color: var(--vp-c-danger-1);
|
|
180
|
+
|
|
181
|
+
p {
|
|
182
|
+
margin: 0;
|
|
183
|
+
font-size: 14px;
|
|
184
|
+
text-align: center;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.errorIcon {
|
|
189
|
+
font-size: 32px;
|
|
190
|
+
}
|
|
191
|
+
/* ===================================== */
|
|
192
|
+
/* #endregion 加载和错误状态 */
|
|
193
|
+
/* ===================================== */
|
|
194
|
+
|
|
195
|
+
/* ===================================== */
|
|
196
|
+
/* #region 图表样式 */
|
|
197
|
+
/* ===================================== */
|
|
198
|
+
.mermaidDiagram {
|
|
199
|
+
width: 100%;
|
|
200
|
+
display: flex;
|
|
201
|
+
align-items: center;
|
|
202
|
+
justify-content: center;
|
|
203
|
+
transition: transform 0.2s ease;
|
|
204
|
+
cursor: grab;
|
|
205
|
+
|
|
206
|
+
&:active {
|
|
207
|
+
cursor: grabbing;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
:global(svg) {
|
|
211
|
+
max-width: 100%;
|
|
212
|
+
height: auto;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/* ===================================== */
|
|
216
|
+
/* #endregion 图表样式 */
|
|
217
|
+
/* ===================================== */
|
|
218
|
+
|
|
219
|
+
/* ===================================== */
|
|
220
|
+
/* #region 暗色主题优化 */
|
|
221
|
+
/* ===================================== */
|
|
222
|
+
:global(html.dark) .mermaidWrapper {
|
|
223
|
+
background: var(--vp-code-block-bg);
|
|
224
|
+
border-color: var(--vp-c-divider);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
:global(html.dark) .toolbar {
|
|
228
|
+
background: var(--vp-code-block-bg);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
:global(html.dark) .mermaidContainer {
|
|
232
|
+
background: var(--vp-code-block-bg);
|
|
233
|
+
}
|
|
234
|
+
/* ===================================== */
|
|
235
|
+
/* #endregion 暗色主题优化 */
|
|
236
|
+
/* ===================================== */
|
|
237
|
+
|
|
238
|
+
/* ===================================== */
|
|
239
|
+
/* #region 响应式设计 */
|
|
240
|
+
/* ===================================== */
|
|
241
|
+
@media (max-width: 768px) {
|
|
242
|
+
.toolbar {
|
|
243
|
+
padding: 4px 6px;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.toolbarBtn {
|
|
247
|
+
width: 24px;
|
|
248
|
+
height: 24px;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.iconBtn {
|
|
252
|
+
padding: 3px;
|
|
253
|
+
|
|
254
|
+
.btnIcon {
|
|
255
|
+
width: 14px;
|
|
256
|
+
height: 14px;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.zoomLevel {
|
|
261
|
+
font-size: 10px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.mermaidContainer {
|
|
265
|
+
padding: 12px;
|
|
266
|
+
max-height: 400px;
|
|
267
|
+
|
|
268
|
+
&.fullscreen {
|
|
269
|
+
padding: 20px;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
/* ===================================== */
|
|
274
|
+
/* #endregion 响应式设计 */
|
|
275
|
+
/* ===================================== */
|