@takazudo/zudo-doc 0.2.17 → 0.2.19
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
|
@@ -102,6 +102,14 @@ interface DocLayoutProps extends DocLayoutHtmlAttrs {
|
|
|
102
102
|
* the sidebar resizer) inject into the scripts slot specifically.
|
|
103
103
|
*/
|
|
104
104
|
bodyEndScripts?: ComponentChildren;
|
|
105
|
+
/**
|
|
106
|
+
* When `false`, the zfb SPA soft-swap router (`ClientRouter`) is not
|
|
107
|
+
* mounted — the page uses plain full-page navigation instead. This
|
|
108
|
+
* also omits the `zfb-view-transitions-enabled` /
|
|
109
|
+
* `zfb-preserve-html-attrs` meta tags and the route-announcer that
|
|
110
|
+
* `ClientRouter` emits. Defaults to `true` (router enabled).
|
|
111
|
+
*/
|
|
112
|
+
enableClientRouter?: boolean;
|
|
105
113
|
}
|
|
106
114
|
/**
|
|
107
115
|
* `id` attribute of the desktop sidebar `<aside>`. Used by consumer code
|
|
@@ -24,7 +24,8 @@ function DocLayout(props) {
|
|
|
24
24
|
hideToc = false,
|
|
25
25
|
footer,
|
|
26
26
|
bodyEndComponents,
|
|
27
|
-
bodyEndScripts
|
|
27
|
+
bodyEndScripts,
|
|
28
|
+
enableClientRouter = true
|
|
28
29
|
} = props;
|
|
29
30
|
const hasSidebar = sidebar !== void 0;
|
|
30
31
|
const showSidebar = !hideSidebar && hasSidebar;
|
|
@@ -43,9 +44,9 @@ function DocLayout(props) {
|
|
|
43
44
|
/* @__PURE__ */ jsx("title", { children: title }),
|
|
44
45
|
description !== void 0 && /* @__PURE__ */ jsx("meta", { name: "description", content: description }),
|
|
45
46
|
noindex && /* @__PURE__ */ jsx("meta", { name: "robots", content: "noindex, nofollow" }),
|
|
46
|
-
ClientRouter({
|
|
47
|
+
enableClientRouter !== false ? ClientRouter({
|
|
47
48
|
preserveHtmlAttrs: ["data-sidebar-hidden", "data-theme", "style"]
|
|
48
|
-
}),
|
|
49
|
+
}) : null,
|
|
49
50
|
head
|
|
50
51
|
] }),
|
|
51
52
|
/* @__PURE__ */ jsxs("body", { class: "min-h-screen antialiased", children: [
|
|
@@ -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.
|
|
3
|
+
"version": "0.2.19",
|
|
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.
|
|
169
|
-
"@takazudo/zfb-runtime": "^0.1.0-next.
|
|
169
|
+
"@takazudo/zfb": "^0.1.0-next.57",
|
|
170
|
+
"@takazudo/zfb-runtime": "^0.1.0-next.57",
|
|
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.
|
|
198
|
-
"@takazudo/zfb-runtime": "0.1.0-next.
|
|
198
|
+
"@takazudo/zfb": "0.1.0-next.57",
|
|
199
|
+
"@takazudo/zfb-runtime": "0.1.0-next.57"
|
|
199
200
|
},
|
|
200
201
|
"scripts": {
|
|
201
202
|
"build": "cross-env NODE_OPTIONS=--max-old-space-size=4096 tsup",
|