@takazudo/zudo-doc 0.2.18 → 0.2.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/dist/content.css CHANGED
@@ -123,7 +123,7 @@
123
123
  text-decoration: none;
124
124
  margin-left: var(--spacing-hsp-sm);
125
125
  opacity: 0;
126
- transition: opacity 150ms;
126
+ transition: opacity var(--default-transition-duration);
127
127
  }
128
128
 
129
129
  .zd-content :where(h2, h3, h4, h5, h6) .hash-link::after {
@@ -0,0 +1,82 @@
1
+ /* ============================================================================
2
+ * @takazudo/zudo-doc — page-loading stylesheet
3
+ *
4
+ * Shipped to consumers as `@takazudo/zudo-doc/page-loading.css` (copied to
5
+ * `dist/page-loading.css` by scripts/copy-page-loading-css.mjs on build).
6
+ * Provides the full visual contract for the page-loading overlay, pending-link
7
+ * indicator, and spinner — so consumers can @import a single file rather than
8
+ * inlining these rules per-project.
9
+ *
10
+ * ── Consumer contract ──────────────────────────────────────────────────────
11
+ * Host tokens consumed (all are optional — sensible fallbacks are built in):
12
+ * --color-page-loading-overlay
13
+ * Overlay background. Defaults to:
14
+ * color-mix(in oklch, var(--color-overlay, #000) 60%, transparent)
15
+ * Override to change the scrim colour or opacity independently of the
16
+ * host's --color-overlay token.
17
+ * --color-overlay Semi-opaque backdrop colour (used by the fallback chain
18
+ * above when --color-page-loading-overlay is not set).
19
+ * --color-fg Spinner border colour. Falls back to #fff.
20
+ * --color-accent Colour applied to links/buttons with data-zd-nav-pending.
21
+ * --z-index-modal Stack level for the overlay. Falls back to 100.
22
+ * ========================================================================== */
23
+
24
+ .page-loading-overlay {
25
+ position: fixed;
26
+ inset: 0;
27
+ /* Full-screen blocking load overlay — modal tier.
28
+ --z-index-modal fallback (100) ensures the overlay stacks on top even for
29
+ bare consumers that have not defined the token. */
30
+ z-index: var(--z-index-modal, 100);
31
+ display: flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ background: var(
35
+ --color-page-loading-overlay,
36
+ color-mix(in oklch, var(--color-overlay, #000) 60%, transparent)
37
+ );
38
+ opacity: 0;
39
+ pointer-events: none;
40
+ transition: opacity 150ms ease-out;
41
+ }
42
+
43
+ .page-loading-overlay[data-visible] {
44
+ opacity: 1;
45
+ }
46
+
47
+ a[data-zd-nav-pending],
48
+ button[data-zd-nav-pending] {
49
+ color: var(--color-accent);
50
+ }
51
+
52
+ .page-loading-spinner {
53
+ width: 48px;
54
+ height: 48px;
55
+ border: 5px solid var(--color-fg, #fff);
56
+ border-bottom-color: transparent;
57
+ border-radius: 50%;
58
+ display: inline-block;
59
+ box-sizing: border-box;
60
+ animation: page-loading-spin 1s linear infinite;
61
+ }
62
+
63
+ @media (min-width: 1024px) {
64
+ .page-loading-spinner {
65
+ width: 64px;
66
+ height: 64px;
67
+ border-width: 6px;
68
+ }
69
+ }
70
+
71
+ @keyframes page-loading-spin {
72
+ 0% { transform: rotate(0deg); }
73
+ 100% { transform: rotate(360deg); }
74
+ }
75
+
76
+ @media (prefers-reduced-motion: reduce) {
77
+ .page-loading-spinner {
78
+ animation: none;
79
+ border-bottom-color: var(--color-fg, #fff);
80
+ opacity: 0.5;
81
+ }
82
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-doc",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "type": "module",
5
5
  "description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
6
6
  "license": "MIT",
@@ -157,7 +157,8 @@
157
157
  },
158
158
  "./safelist.css": "./dist/safelist.css",
159
159
  "./safelist": "./dist/safelist.css",
160
- "./content.css": "./dist/content.css"
160
+ "./content.css": "./dist/content.css",
161
+ "./page-loading.css": "./dist/page-loading.css"
161
162
  },
162
163
  "files": [
163
164
  "dist",
@@ -165,8 +166,8 @@
165
166
  ],
166
167
  "peerDependencies": {
167
168
  "preact": "^10.29.1",
168
- "@takazudo/zfb": "^0.1.0-next.55",
169
- "@takazudo/zfb-runtime": "^0.1.0-next.55",
169
+ "@takazudo/zfb": "^0.1.0-next.58",
170
+ "@takazudo/zfb-runtime": "^0.1.0-next.58",
170
171
  "@takazudo/zudo-doc-history-server": "^0.2.15",
171
172
  "@takazudo/zdtp": "^0.2.3",
172
173
  "shiki": "^4.0.2"
@@ -194,8 +195,8 @@
194
195
  "tsup": "^8.0.0",
195
196
  "typescript": "^5.0.0",
196
197
  "vitest": "^4.1.0",
197
- "@takazudo/zfb": "0.1.0-next.55",
198
- "@takazudo/zfb-runtime": "0.1.0-next.55"
198
+ "@takazudo/zfb": "0.1.0-next.58",
199
+ "@takazudo/zfb-runtime": "0.1.0-next.58"
199
200
  },
200
201
  "scripts": {
201
202
  "build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsup",