docnest 0.1.3 → 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/dist/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docnest",
3
- "version": "0.1.3",
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);
@@ -913,7 +918,7 @@ body[data-doc-theme="swiss-manual"] .markdown-body h1 {
913
918
  margin-bottom: 2.5rem;
914
919
  padding: 0 0 1.5rem;
915
920
  border-bottom: 3px solid var(--linear-text);
916
- font-size: clamp(2.8rem, 6vw, 5.6rem);
921
+ font-size: clamp(2.25rem, 4vw, 3.75rem);
917
922
  font-weight: 800;
918
923
  letter-spacing: -0.065em;
919
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 = {