docnest 0.1.2 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docnest",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "可复用的本地 Markdown 文档中心",
5
5
  "repository": {
6
6
  "type": "git",
@@ -22,6 +22,11 @@
22
22
  --doc-reading-width: 1024px;
23
23
  }
24
24
 
25
+ /* Hold the first paint until the stored appearance has reached <body>. */
26
+ html[data-docnest-theme-pending] body {
27
+ visibility: hidden;
28
+ }
29
+
25
30
  html[data-theme="dark"] {
26
31
  --doc-surface-raised: #1c1c1e;
27
32
  --doc-selection: rgba(165, 180, 252, 0.24);
@@ -121,6 +126,11 @@ body {
121
126
  border-top: 1px solid var(--linear-border);
122
127
  }
123
128
 
129
+ /* 明暗模式保留在 DOM 与运行时中,暂时只使用顶部的独立切换入口。 */
130
+ .theme-popover .theme-mode-section {
131
+ display: none;
132
+ }
133
+
124
134
  .theme-popover-label {
125
135
  margin: 0 0 9px;
126
136
  color: var(--linear-text-muted);
@@ -480,8 +490,8 @@ body[data-doc-theme="precision-index"][data-theme="dark"] {
480
490
  }
481
491
 
482
492
  body[data-doc-theme="precision-index"] .header {
483
- min-height: 54px;
484
- padding: 0 1rem;
493
+ min-height: 68px;
494
+ padding: 0.6rem 1rem;
485
495
  border-bottom: 2px solid var(--linear-text);
486
496
  background: var(--linear-bg-subtle);
487
497
  }
@@ -908,7 +918,7 @@ body[data-doc-theme="swiss-manual"] .markdown-body h1 {
908
918
  margin-bottom: 2.5rem;
909
919
  padding: 0 0 1.5rem;
910
920
  border-bottom: 3px solid var(--linear-text);
911
- font-size: clamp(2.8rem, 6vw, 5.6rem);
921
+ font-size: clamp(2.25rem, 4vw, 3.75rem);
912
922
  font-weight: 800;
913
923
  letter-spacing: -0.065em;
914
924
  line-height: 0.98;
@@ -2,6 +2,10 @@
2
2
  (function() {
3
3
  'use strict';
4
4
 
5
+ // The theme script is loaded in <head>. Keep the document out of the first
6
+ // paint until the persisted appearance has been copied onto <body>.
7
+ document.documentElement.setAttribute('data-docnest-theme-pending', '');
8
+
5
9
  var THEME_PROFILES = {
6
10
  'slate-modern': {
7
11
  label: 'Slate Modern',
@@ -316,6 +320,7 @@
316
320
  }
317
321
 
318
322
  applyAppearance(activeTheme, activeMode, { persist: false });
323
+ document.documentElement.removeAttribute('data-docnest-theme-pending');
319
324
  }
320
325
 
321
326
  window.DocNestAppearance = {