@tnotesjs/core 0.0.6 → 0.0.8

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.
Files changed (116) hide show
  1. package/README.md +87 -84
  2. package/dist/{chunk-JDVN2QYW.js → chunk-JUMVJKWV.js} +615 -614
  3. package/dist/cli/index.js +125 -125
  4. package/dist/vitepress/config/index.js +184 -210
  5. package/package.json +15 -3
  6. package/types/config.ts +61 -61
  7. package/types/index.ts +11 -11
  8. package/types/note.ts +33 -33
  9. package/types/shims.d.ts +3 -4
  10. package/vitepress/assets/icons/icon__check.svg +3 -3
  11. package/vitepress/assets/icons/icon__clipboard.svg +7 -7
  12. package/vitepress/assets/icons/icon__close.svg +1 -1
  13. package/vitepress/assets/icons/icon__collapse.svg +1 -1
  14. package/vitepress/assets/icons/icon__confirm.svg +1 -1
  15. package/vitepress/assets/icons/icon__copy.svg +4 -4
  16. package/vitepress/assets/icons/icon__focus.svg +1 -1
  17. package/vitepress/assets/icons/icon__fold.svg +3 -3
  18. package/vitepress/assets/icons/icon__folder.svg +1 -1
  19. package/vitepress/assets/icons/icon__fullscreen.svg +1 -1
  20. package/vitepress/assets/icons/icon__fullscreen_exit.svg +1 -1
  21. package/vitepress/assets/icons/icon__github.svg +3 -3
  22. package/vitepress/assets/icons/icon__mindmap.svg +1 -1
  23. package/vitepress/assets/icons/icon__next.svg +1 -1
  24. package/vitepress/assets/icons/icon__number_gray.svg +1 -1
  25. package/vitepress/assets/icons/icon__number_purple.svg +1 -1
  26. package/vitepress/assets/icons/icon__prev.svg +1 -1
  27. package/vitepress/assets/icons/icon__restore.svg +1 -1
  28. package/vitepress/assets/icons/icon__rotate.svg +4 -4
  29. package/vitepress/assets/icons/icon__search.svg +1 -1
  30. package/vitepress/assets/icons/icon__sidebar_collapsed.svg +1 -1
  31. package/vitepress/assets/icons/icon__sidebar_opened.svg +1 -1
  32. package/vitepress/assets/icons/icon__totop.svg +5 -5
  33. package/vitepress/assets/icons/icon__vscode.svg +5 -5
  34. package/vitepress/assets/icons/icon__zoom_fit.svg +1 -1
  35. package/vitepress/assets/icons/icon__zoom_in.svg +1 -1
  36. package/vitepress/assets/icons/icon__zoom_out.svg +1 -1
  37. package/vitepress/assets/icons/icon__zoom_reset.svg +1 -1
  38. package/vitepress/assets/icons/index.ts +38 -38
  39. package/vitepress/components/BilibiliOutsidePlayer/BilibiliOutsidePlayer.vue +20 -20
  40. package/vitepress/components/CodeBlockFullscreen/CodeBlockFullscreen.vue +373 -372
  41. package/vitepress/components/CodeBlockFullscreen/index.ts +115 -114
  42. package/vitepress/components/CodeBlockFullscreen/styles.css +64 -64
  43. package/vitepress/components/Discussions/Discussions.module.scss +32 -32
  44. package/vitepress/components/Discussions/Discussions.vue +211 -210
  45. package/vitepress/components/EnWordList/EnWordList.module.scss +124 -124
  46. package/vitepress/components/EnWordList/EnWordList.vue +543 -542
  47. package/vitepress/components/EnWordList/RightClickMenu.module.scss +22 -22
  48. package/vitepress/components/EnWordList/RightClickMenu.vue +66 -66
  49. package/vitepress/components/Footprints/Footprints.module.scss +93 -93
  50. package/vitepress/components/Footprints/Footprints.vue +377 -377
  51. package/vitepress/components/Layout/AboutModal.module.scss +233 -233
  52. package/vitepress/components/Layout/AboutModal.vue +105 -105
  53. package/vitepress/components/Layout/AboutPanel.vue +270 -265
  54. package/vitepress/components/Layout/ContentCollapse.vue +603 -602
  55. package/vitepress/components/Layout/CustomSidebar.vue +608 -605
  56. package/vitepress/components/Layout/DocBeforeControls.vue +149 -139
  57. package/vitepress/components/Layout/DocFooter.vue +233 -232
  58. package/vitepress/components/Layout/ImagePreview.module.scss +201 -201
  59. package/vitepress/components/Layout/ImagePreview.vue +281 -280
  60. package/vitepress/components/Layout/Layout.module.scss +661 -661
  61. package/vitepress/components/Layout/Layout.vue +539 -542
  62. package/vitepress/components/Layout/NoteStatus.vue +140 -139
  63. package/vitepress/components/Layout/SidebarItems.vue +267 -262
  64. package/vitepress/components/Layout/SidebarNavBefore.vue +92 -92
  65. package/vitepress/components/Layout/Swiper.vue +167 -167
  66. package/vitepress/components/Layout/ToggleFullContent.module.scss +11 -11
  67. package/vitepress/components/Layout/ToggleFullContent.vue +35 -34
  68. package/vitepress/components/Layout/ToggleSidebar.module.scss +11 -11
  69. package/vitepress/components/Layout/ToggleSidebar.vue +36 -35
  70. package/vitepress/components/Layout/composables/useCollapseControl.ts +88 -88
  71. package/vitepress/components/Layout/composables/useNoteConfig.ts +119 -121
  72. package/vitepress/components/Layout/composables/useNoteSave.ts +173 -172
  73. package/vitepress/components/Layout/composables/useNoteValidation.ts +85 -85
  74. package/vitepress/components/Layout/composables/useRedirect.ts +113 -110
  75. package/vitepress/components/Layout/composables/useVSCodeIntegration.ts +86 -83
  76. package/vitepress/components/Layout/homeReadme.data.ts +124 -124
  77. package/vitepress/components/LoadingPage/LoadingPage.vue +192 -192
  78. package/vitepress/components/MarkMap/MarkMap.module.scss +159 -159
  79. package/vitepress/components/MarkMap/MarkMap.vue +405 -404
  80. package/vitepress/components/Mermaid/Mermaid.module.scss +275 -275
  81. package/vitepress/components/Mermaid/Mermaid.vue +365 -363
  82. package/vitepress/components/NotesTable/NotesTable.module.scss +77 -77
  83. package/vitepress/components/NotesTable/NotesTable.vue +98 -97
  84. package/vitepress/components/NotesTable/README.md +67 -67
  85. package/vitepress/components/Settings/Settings.module.scss +433 -433
  86. package/vitepress/components/Settings/Settings.vue +306 -305
  87. package/vitepress/components/SidebarCard/MindMapView.vue +484 -483
  88. package/vitepress/components/SidebarCard/NotesTrendChart.vue +108 -108
  89. package/vitepress/components/SidebarCard/SidebarCard.vue +946 -948
  90. package/vitepress/components/Tooltip/Tooltip.vue +70 -70
  91. package/vitepress/components/constants.ts +91 -91
  92. package/vitepress/components/notesConfig.data.ts +73 -73
  93. package/vitepress/components/sidebar.data.ts +59 -59
  94. package/vitepress/components/tnotes-config.data.ts +21 -21
  95. package/vitepress/components/utils.ts +26 -26
  96. package/vitepress/config/index.ts +160 -146
  97. package/vitepress/configs/constants.ts +26 -26
  98. package/vitepress/configs/head.config.ts +25 -24
  99. package/vitepress/configs/index.ts +9 -9
  100. package/vitepress/configs/markdown-it.d.ts +23 -20
  101. package/vitepress/configs/markdown.config.ts +366 -365
  102. package/vitepress/configs/theme.config.ts +108 -108
  103. package/vitepress/plugins/buildProgressPlugin.ts +434 -470
  104. package/vitepress/plugins/getNoteByConfigIdPlugin.ts +107 -106
  105. package/vitepress/plugins/renameNotePlugin.ts +60 -59
  106. package/vitepress/plugins/updateConfigPlugin.ts +63 -62
  107. package/vitepress/theme/index.ts +95 -93
  108. package/vitepress/theme/styles/base.scss +50 -50
  109. package/vitepress/theme/styles/components/404.scss +31 -31
  110. package/vitepress/theme/styles/components/collapse.scss +175 -175
  111. package/vitepress/theme/styles/components/markmap.scss +101 -101
  112. package/vitepress/theme/styles/components/swiper.scss +255 -255
  113. package/vitepress/theme/styles/index.scss +25 -25
  114. package/vitepress/theme/styles/layout.scss +62 -62
  115. package/vitepress/theme/styles/utilities.scss +39 -39
  116. package/vitepress/theme/styles/vitepress-override.scss +25 -25
@@ -1,433 +1,433 @@
1
- /* 容器 */
2
- .settingsWrapper {
3
- max-width: 720px;
4
- margin: 0 auto;
5
- padding: 20px;
6
- }
7
-
8
- /* 设置项 */
9
- .settingItem {
10
- background: var(--vp-c-bg-soft);
11
- border: 1px solid var(--vp-c-divider);
12
- border-radius: 8px;
13
- padding: 20px;
14
- margin-bottom: 16px;
15
- transition: border-color 0.2s ease;
16
-
17
- &:hover {
18
- border-color: var(--vp-c-brand-1);
19
- }
20
- }
21
-
22
- /* 项头部 */
23
- .itemHeader {
24
- display: flex;
25
- align-items: center;
26
- justify-content: space-between;
27
- margin-bottom: 12px;
28
- }
29
-
30
- .itemTitle {
31
- display: flex;
32
- align-items: center;
33
- gap: 8px;
34
- }
35
-
36
- .itemIcon {
37
- font-size: 18px;
38
- }
39
-
40
- .itemName {
41
- font-size: 15px;
42
- font-weight: 600;
43
- color: var(--vp-c-text-1);
44
- }
45
-
46
- .statusBadge {
47
- display: inline-flex;
48
- align-items: center;
49
- justify-content: center;
50
- padding: 2px 8px;
51
- border-radius: 12px;
52
- background: var(--vp-c-brand-soft);
53
- color: var(--vp-c-brand-1);
54
- font-size: 12px;
55
- font-weight: 600;
56
- }
57
-
58
- .currentValue {
59
- font-size: 13px;
60
- color: var(--vp-c-text-2);
61
- font-family: var(--vp-font-family-mono);
62
- }
63
-
64
- /* 帮助文本 */
65
- .helpText {
66
- margin-bottom: 12px;
67
- padding: 8px 12px;
68
- background: var(--vp-c-bg);
69
- border-left: 3px solid var(--vp-c-brand-1);
70
- border-radius: 4px;
71
- font-size: 13px;
72
- line-height: 1.6;
73
- color: var(--vp-c-text-2);
74
- animation: slideDown 0.2s ease;
75
- }
76
-
77
- @keyframes slideDown {
78
- from {
79
- opacity: 0;
80
- transform: translateY(-4px);
81
- }
82
- to {
83
- opacity: 1;
84
- transform: translateY(0);
85
- }
86
- }
87
-
88
- /* 输入组 */
89
- .inputGroup {
90
- position: relative;
91
- }
92
-
93
- .input {
94
- width: 100%;
95
- padding: 10px 40px 10px 12px;
96
- font-size: 14px;
97
- font-family: var(--vp-font-family-mono);
98
- color: var(--vp-c-text-1);
99
- background: var(--vp-c-bg);
100
- border: 1px solid var(--vp-c-divider);
101
- border-radius: 6px;
102
- transition: border-color 0.2s ease;
103
-
104
- &::placeholder {
105
- color: var(--vp-c-text-3);
106
- }
107
-
108
- &:focus {
109
- border-color: var(--vp-c-brand-1);
110
- outline: none;
111
- }
112
- }
113
-
114
- .clearBtn {
115
- position: absolute;
116
- right: 8px;
117
- top: 50%;
118
- transform: translateY(-50%);
119
- width: 20px;
120
- height: 20px;
121
- display: flex;
122
- align-items: center;
123
- justify-content: center;
124
- background: transparent;
125
- border: none;
126
- border-radius: 4px;
127
- cursor: pointer;
128
- font-size: 14px;
129
- color: var(--vp-c-text-3);
130
- transition: all 0.2s ease;
131
-
132
- &:hover {
133
- background: var(--vp-c-danger-soft);
134
- color: var(--vp-c-danger-1);
135
- }
136
- }
137
-
138
- /* 字段 */
139
- .field {
140
- margin-top: 16px;
141
-
142
- &:first-of-type {
143
- margin-top: 0;
144
- }
145
- }
146
-
147
- .fieldLabel {
148
- font-size: 13px;
149
- font-weight: 500;
150
- color: var(--vp-c-text-2);
151
- margin-bottom: 6px;
152
- }
153
-
154
- .fieldHelp {
155
- font-size: 12px;
156
- color: var(--vp-c-text-3);
157
- line-height: 1.5;
158
- margin-bottom: 10px;
159
- }
160
-
161
- .select {
162
- width: 100%;
163
- padding: 10px 12px;
164
- font-size: 14px;
165
- color: var(--vp-c-text-1);
166
- background: var(--vp-c-bg);
167
- border: 1px solid var(--vp-c-divider);
168
- border-radius: 6px;
169
- transition: border-color 0.2s ease;
170
- cursor: pointer;
171
-
172
- &:focus {
173
- border-color: var(--vp-c-brand-1);
174
- outline: none;
175
- }
176
-
177
- &:hover {
178
- border-color: var(--vp-c-brand-1);
179
- }
180
- }
181
-
182
- .inputWithUnit {
183
- position: relative;
184
- display: flex;
185
- align-items: center;
186
-
187
- .input {
188
- padding-right: 40px;
189
- }
190
- }
191
-
192
- .unit {
193
- position: absolute;
194
- right: 12px;
195
- font-size: 13px;
196
- color: var(--vp-c-text-3);
197
- pointer-events: none;
198
- }
199
-
200
- .checkboxLabel {
201
- display: flex;
202
- align-items: center;
203
- gap: 10px;
204
- font-size: 14px;
205
- color: var(--vp-c-text-1);
206
- cursor: pointer;
207
- user-select: none;
208
- padding: 8px 0;
209
-
210
- &:hover {
211
- color: var(--vp-c-brand-1);
212
- }
213
- }
214
-
215
- .checkbox {
216
- width: 18px;
217
- height: 18px;
218
- cursor: pointer;
219
- accent-color: var(--vp-c-brand-1);
220
- }
221
-
222
- /* 操作栏 */
223
- .actionBar {
224
- display: flex;
225
- gap: 12px;
226
- justify-content: flex-end;
227
- padding-top: 16px;
228
- margin-top: 8px;
229
- border-top: 1px solid var(--vp-c-divider);
230
- }
231
-
232
- .saveBtn,
233
- .resetBtn {
234
- padding: 10px 20px;
235
- font-size: 14px;
236
- font-weight: 500;
237
- border: none;
238
- border-radius: 6px;
239
- cursor: pointer;
240
- transition: all 0.2s ease;
241
- }
242
-
243
- .saveBtn {
244
- background: var(--vp-c-brand-1);
245
- color: #fff;
246
-
247
- &:hover:not(.disabled) {
248
- background: var(--vp-c-brand-2);
249
- }
250
-
251
- &:active:not(.disabled) {
252
- transform: scale(0.98);
253
- }
254
-
255
- &.disabled {
256
- opacity: 0.5;
257
- cursor: not-allowed;
258
- }
259
- }
260
-
261
- .resetBtn {
262
- background: var(--vp-c-bg);
263
- color: var(--vp-c-text-1);
264
- border: 1px solid var(--vp-c-divider);
265
-
266
- &:hover {
267
- background: var(--vp-c-bg-soft);
268
- border-color: var(--vp-c-brand-1);
269
- }
270
-
271
- &:active {
272
- transform: scale(0.98);
273
- }
274
- }
275
-
276
- /* Toast 提示 */
277
- .toast {
278
- position: fixed;
279
- top: 80px;
280
- left: 50%;
281
- transform: translateX(-50%);
282
- padding: 12px 20px;
283
- background: var(--vp-c-brand-1);
284
- color: #fff;
285
- border-radius: 6px;
286
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
287
- font-size: 14px;
288
- font-weight: 500;
289
- z-index: 1000;
290
- }
291
-
292
- /* 过渡动画 */
293
- :global(.toast-enter-active),
294
- :global(.toast-leave-active) {
295
- transition: all 0.3s ease;
296
- }
297
-
298
- :global(.toast-enter-from),
299
- :global(.toast-leave-to) {
300
- opacity: 0;
301
- transform: translate(-50%, -20px);
302
- }
303
-
304
- /* 响应式 */
305
- @media (max-width: 768px) {
306
- .settingsWrapper {
307
- padding: 12px;
308
- }
309
-
310
- .settingItem {
311
- padding: 16px;
312
- }
313
-
314
- .actionBar {
315
- flex-direction: column;
316
-
317
- .saveBtn,
318
- .resetBtn {
319
- width: 100%;
320
- }
321
- }
322
-
323
- .toast {
324
- left: 12px;
325
- right: 12px;
326
- transform: translateX(0);
327
- }
328
- }
329
- /* ===================================== */
330
- /* #endregion 过渡动画 */
331
- /* ===================================== */
332
-
333
- /* ===================================== */
334
- /* #region 响应式设计 */
335
- /* ===================================== */
336
- @media (max-width: 768px) {
337
- .settingsWrapper {
338
- padding: 16px;
339
- }
340
-
341
- .section {
342
- padding: 16px;
343
- }
344
-
345
- .sectionTitle {
346
- font-size: 16px;
347
- }
348
-
349
- .formRow {
350
- grid-template-columns: 1fr;
351
- gap: 16px;
352
- }
353
-
354
- .actionBar {
355
- padding: 16px;
356
- flex-direction: column-reverse;
357
- }
358
-
359
- .saveBtn,
360
- .resetBtn {
361
- width: 100%;
362
- justify-content: center;
363
- }
364
-
365
- .toast {
366
- left: 16px;
367
- right: 16px;
368
- transform: none;
369
- }
370
-
371
- @keyframes slideDown {
372
- from {
373
- opacity: 0;
374
- transform: translateY(-20px);
375
- }
376
- to {
377
- opacity: 1;
378
- transform: translateY(0);
379
- }
380
- }
381
- }
382
- /* ===================================== */
383
- /* #endregion 响应式设计 */
384
- /* ===================================== */
385
-
386
- /* ===================================== */
387
- /* #region 内容宽度配置 */
388
- /* ===================================== */
389
- .widthOptions {
390
- display: flex;
391
- gap: 12px;
392
- margin-top: 8px;
393
- }
394
-
395
- .widthBtn {
396
- flex: 1;
397
- padding: 12px 16px;
398
- border: 2px solid var(--vp-c-divider);
399
- border-radius: 8px;
400
- background: var(--vp-c-bg);
401
- color: var(--vp-c-text-2);
402
- font-size: 14px;
403
- font-weight: 500;
404
- cursor: pointer;
405
- transition: all 0.2s ease;
406
- display: flex;
407
- align-items: center;
408
- justify-content: center;
409
- gap: 6px;
410
-
411
- &:hover {
412
- border-color: var(--vp-c-brand-1);
413
- color: var(--vp-c-brand-1);
414
- background: var(--vp-c-bg-alt);
415
- transform: translateY(-1px);
416
- box-shadow: 0 2px 8px rgba(100, 108, 255, 0.1);
417
- }
418
-
419
- &:active {
420
- transform: translateY(0);
421
- }
422
-
423
- &.active {
424
- border-color: var(--vp-c-brand-1);
425
- background: var(--vp-c-brand-1);
426
- color: white;
427
- font-weight: 600;
428
- box-shadow: 0 2px 12px rgba(100, 108, 255, 0.3);
429
- }
430
- }
431
- /* ===================================== */
432
- /* #endregion 内容宽度配置 */
433
- /* ===================================== */
1
+ /* 容器 */
2
+ .settingsWrapper {
3
+ max-width: 720px;
4
+ margin: 0 auto;
5
+ padding: 20px;
6
+ }
7
+
8
+ /* 设置项 */
9
+ .settingItem {
10
+ background: var(--vp-c-bg-soft);
11
+ border: 1px solid var(--vp-c-divider);
12
+ border-radius: 8px;
13
+ padding: 20px;
14
+ margin-bottom: 16px;
15
+ transition: border-color 0.2s ease;
16
+
17
+ &:hover {
18
+ border-color: var(--vp-c-brand-1);
19
+ }
20
+ }
21
+
22
+ /* 项头部 */
23
+ .itemHeader {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: space-between;
27
+ margin-bottom: 12px;
28
+ }
29
+
30
+ .itemTitle {
31
+ display: flex;
32
+ align-items: center;
33
+ gap: 8px;
34
+ }
35
+
36
+ .itemIcon {
37
+ font-size: 18px;
38
+ }
39
+
40
+ .itemName {
41
+ font-size: 15px;
42
+ font-weight: 600;
43
+ color: var(--vp-c-text-1);
44
+ }
45
+
46
+ .statusBadge {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ padding: 2px 8px;
51
+ border-radius: 12px;
52
+ background: var(--vp-c-brand-soft);
53
+ color: var(--vp-c-brand-1);
54
+ font-size: 12px;
55
+ font-weight: 600;
56
+ }
57
+
58
+ .currentValue {
59
+ font-size: 13px;
60
+ color: var(--vp-c-text-2);
61
+ font-family: var(--vp-font-family-mono);
62
+ }
63
+
64
+ /* 帮助文本 */
65
+ .helpText {
66
+ margin-bottom: 12px;
67
+ padding: 8px 12px;
68
+ background: var(--vp-c-bg);
69
+ border-left: 3px solid var(--vp-c-brand-1);
70
+ border-radius: 4px;
71
+ font-size: 13px;
72
+ line-height: 1.6;
73
+ color: var(--vp-c-text-2);
74
+ animation: slideDown 0.2s ease;
75
+ }
76
+
77
+ @keyframes slideDown {
78
+ from {
79
+ opacity: 0;
80
+ transform: translateY(-4px);
81
+ }
82
+ to {
83
+ opacity: 1;
84
+ transform: translateY(0);
85
+ }
86
+ }
87
+
88
+ /* 输入组 */
89
+ .inputGroup {
90
+ position: relative;
91
+ }
92
+
93
+ .input {
94
+ width: 100%;
95
+ padding: 10px 40px 10px 12px;
96
+ font-size: 14px;
97
+ font-family: var(--vp-font-family-mono);
98
+ color: var(--vp-c-text-1);
99
+ background: var(--vp-c-bg);
100
+ border: 1px solid var(--vp-c-divider);
101
+ border-radius: 6px;
102
+ transition: border-color 0.2s ease;
103
+
104
+ &::placeholder {
105
+ color: var(--vp-c-text-3);
106
+ }
107
+
108
+ &:focus {
109
+ border-color: var(--vp-c-brand-1);
110
+ outline: none;
111
+ }
112
+ }
113
+
114
+ .clearBtn {
115
+ position: absolute;
116
+ right: 8px;
117
+ top: 50%;
118
+ transform: translateY(-50%);
119
+ width: 20px;
120
+ height: 20px;
121
+ display: flex;
122
+ align-items: center;
123
+ justify-content: center;
124
+ background: transparent;
125
+ border: none;
126
+ border-radius: 4px;
127
+ cursor: pointer;
128
+ font-size: 14px;
129
+ color: var(--vp-c-text-3);
130
+ transition: all 0.2s ease;
131
+
132
+ &:hover {
133
+ background: var(--vp-c-danger-soft);
134
+ color: var(--vp-c-danger-1);
135
+ }
136
+ }
137
+
138
+ /* 字段 */
139
+ .field {
140
+ margin-top: 16px;
141
+
142
+ &:first-of-type {
143
+ margin-top: 0;
144
+ }
145
+ }
146
+
147
+ .fieldLabel {
148
+ font-size: 13px;
149
+ font-weight: 500;
150
+ color: var(--vp-c-text-2);
151
+ margin-bottom: 6px;
152
+ }
153
+
154
+ .fieldHelp {
155
+ font-size: 12px;
156
+ color: var(--vp-c-text-3);
157
+ line-height: 1.5;
158
+ margin-bottom: 10px;
159
+ }
160
+
161
+ .select {
162
+ width: 100%;
163
+ padding: 10px 12px;
164
+ font-size: 14px;
165
+ color: var(--vp-c-text-1);
166
+ background: var(--vp-c-bg);
167
+ border: 1px solid var(--vp-c-divider);
168
+ border-radius: 6px;
169
+ transition: border-color 0.2s ease;
170
+ cursor: pointer;
171
+
172
+ &:focus {
173
+ border-color: var(--vp-c-brand-1);
174
+ outline: none;
175
+ }
176
+
177
+ &:hover {
178
+ border-color: var(--vp-c-brand-1);
179
+ }
180
+ }
181
+
182
+ .inputWithUnit {
183
+ position: relative;
184
+ display: flex;
185
+ align-items: center;
186
+
187
+ .input {
188
+ padding-right: 40px;
189
+ }
190
+ }
191
+
192
+ .unit {
193
+ position: absolute;
194
+ right: 12px;
195
+ font-size: 13px;
196
+ color: var(--vp-c-text-3);
197
+ pointer-events: none;
198
+ }
199
+
200
+ .checkboxLabel {
201
+ display: flex;
202
+ align-items: center;
203
+ gap: 10px;
204
+ font-size: 14px;
205
+ color: var(--vp-c-text-1);
206
+ cursor: pointer;
207
+ user-select: none;
208
+ padding: 8px 0;
209
+
210
+ &:hover {
211
+ color: var(--vp-c-brand-1);
212
+ }
213
+ }
214
+
215
+ .checkbox {
216
+ width: 18px;
217
+ height: 18px;
218
+ cursor: pointer;
219
+ accent-color: var(--vp-c-brand-1);
220
+ }
221
+
222
+ /* 操作栏 */
223
+ .actionBar {
224
+ display: flex;
225
+ gap: 12px;
226
+ justify-content: flex-end;
227
+ padding-top: 16px;
228
+ margin-top: 8px;
229
+ border-top: 1px solid var(--vp-c-divider);
230
+ }
231
+
232
+ .saveBtn,
233
+ .resetBtn {
234
+ padding: 10px 20px;
235
+ font-size: 14px;
236
+ font-weight: 500;
237
+ border: none;
238
+ border-radius: 6px;
239
+ cursor: pointer;
240
+ transition: all 0.2s ease;
241
+ }
242
+
243
+ .saveBtn {
244
+ background: var(--vp-c-brand-1);
245
+ color: #fff;
246
+
247
+ &:hover:not(.disabled) {
248
+ background: var(--vp-c-brand-2);
249
+ }
250
+
251
+ &:active:not(.disabled) {
252
+ transform: scale(0.98);
253
+ }
254
+
255
+ &.disabled {
256
+ opacity: 0.5;
257
+ cursor: not-allowed;
258
+ }
259
+ }
260
+
261
+ .resetBtn {
262
+ background: var(--vp-c-bg);
263
+ color: var(--vp-c-text-1);
264
+ border: 1px solid var(--vp-c-divider);
265
+
266
+ &:hover {
267
+ background: var(--vp-c-bg-soft);
268
+ border-color: var(--vp-c-brand-1);
269
+ }
270
+
271
+ &:active {
272
+ transform: scale(0.98);
273
+ }
274
+ }
275
+
276
+ /* Toast 提示 */
277
+ .toast {
278
+ position: fixed;
279
+ top: 80px;
280
+ left: 50%;
281
+ transform: translateX(-50%);
282
+ padding: 12px 20px;
283
+ background: var(--vp-c-brand-1);
284
+ color: #fff;
285
+ border-radius: 6px;
286
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
287
+ font-size: 14px;
288
+ font-weight: 500;
289
+ z-index: 1000;
290
+ }
291
+
292
+ /* 过渡动画 */
293
+ :global(.toast-enter-active),
294
+ :global(.toast-leave-active) {
295
+ transition: all 0.3s ease;
296
+ }
297
+
298
+ :global(.toast-enter-from),
299
+ :global(.toast-leave-to) {
300
+ opacity: 0;
301
+ transform: translate(-50%, -20px);
302
+ }
303
+
304
+ /* 响应式 */
305
+ @media (max-width: 768px) {
306
+ .settingsWrapper {
307
+ padding: 12px;
308
+ }
309
+
310
+ .settingItem {
311
+ padding: 16px;
312
+ }
313
+
314
+ .actionBar {
315
+ flex-direction: column;
316
+
317
+ .saveBtn,
318
+ .resetBtn {
319
+ width: 100%;
320
+ }
321
+ }
322
+
323
+ .toast {
324
+ left: 12px;
325
+ right: 12px;
326
+ transform: translateX(0);
327
+ }
328
+ }
329
+ /* ===================================== */
330
+ /* #endregion 过渡动画 */
331
+ /* ===================================== */
332
+
333
+ /* ===================================== */
334
+ /* #region 响应式设计 */
335
+ /* ===================================== */
336
+ @media (max-width: 768px) {
337
+ .settingsWrapper {
338
+ padding: 16px;
339
+ }
340
+
341
+ .section {
342
+ padding: 16px;
343
+ }
344
+
345
+ .sectionTitle {
346
+ font-size: 16px;
347
+ }
348
+
349
+ .formRow {
350
+ grid-template-columns: 1fr;
351
+ gap: 16px;
352
+ }
353
+
354
+ .actionBar {
355
+ padding: 16px;
356
+ flex-direction: column-reverse;
357
+ }
358
+
359
+ .saveBtn,
360
+ .resetBtn {
361
+ width: 100%;
362
+ justify-content: center;
363
+ }
364
+
365
+ .toast {
366
+ left: 16px;
367
+ right: 16px;
368
+ transform: none;
369
+ }
370
+
371
+ @keyframes slideDown {
372
+ from {
373
+ opacity: 0;
374
+ transform: translateY(-20px);
375
+ }
376
+ to {
377
+ opacity: 1;
378
+ transform: translateY(0);
379
+ }
380
+ }
381
+ }
382
+ /* ===================================== */
383
+ /* #endregion 响应式设计 */
384
+ /* ===================================== */
385
+
386
+ /* ===================================== */
387
+ /* #region 内容宽度配置 */
388
+ /* ===================================== */
389
+ .widthOptions {
390
+ display: flex;
391
+ gap: 12px;
392
+ margin-top: 8px;
393
+ }
394
+
395
+ .widthBtn {
396
+ flex: 1;
397
+ padding: 12px 16px;
398
+ border: 2px solid var(--vp-c-divider);
399
+ border-radius: 8px;
400
+ background: var(--vp-c-bg);
401
+ color: var(--vp-c-text-2);
402
+ font-size: 14px;
403
+ font-weight: 500;
404
+ cursor: pointer;
405
+ transition: all 0.2s ease;
406
+ display: flex;
407
+ align-items: center;
408
+ justify-content: center;
409
+ gap: 6px;
410
+
411
+ &:hover {
412
+ border-color: var(--vp-c-brand-1);
413
+ color: var(--vp-c-brand-1);
414
+ background: var(--vp-c-bg-alt);
415
+ transform: translateY(-1px);
416
+ box-shadow: 0 2px 8px rgba(100, 108, 255, 0.1);
417
+ }
418
+
419
+ &:active {
420
+ transform: translateY(0);
421
+ }
422
+
423
+ &.active {
424
+ border-color: var(--vp-c-brand-1);
425
+ background: var(--vp-c-brand-1);
426
+ color: white;
427
+ font-weight: 600;
428
+ box-shadow: 0 2px 12px rgba(100, 108, 255, 0.3);
429
+ }
430
+ }
431
+ /* ===================================== */
432
+ /* #endregion 内容宽度配置 */
433
+ /* ===================================== */