@takazudo/zudo-doc 9.0.0 → 9.1.0
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/CHANGELOG.md +18 -0
- package/README.md +5 -4
- package/dist/compiled.css +109 -3
- package/dist/design-token-panel-bootstrap-island.d.ts +1 -1
- package/dist/features.css +110 -0
- package/dist/html-preview-wrapper/preview-base.js +2 -2
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.js +36 -0
- package/dist/nav-scope/index.d.ts +1 -1
- package/dist/nav-scope/index.js +7 -8
- package/dist/page-loading/page-loading-overlay.d.ts +5 -1
- package/dist/page-loading/page-loading-overlay.js +1 -1
- package/dist/page-loading.css +2 -1
- package/dist/plugins/zdtp-loader.d.ts +1 -0
- package/dist/plugins/zdtp-loader.js +5 -1
- package/dist/sidebar-tree-island/branch-preview.d.ts +19 -0
- package/dist/sidebar-tree-island/branch-preview.js +199 -0
- package/dist/sidebar-tree-island/index.js +82 -33
- package/dist/sidebar-tree-island/scope-state.d.ts +15 -6
- package/dist/sidebar-tree-island/scope-state.js +30 -9
- package/dist/sidebar-utils/index.js +5 -2
- package/dist/tree-nav-shared/index.d.ts +5 -1
- package/dist/tree-nav-shared/index.js +7 -3
- package/dist/wind.json +6 -1
- package/dist/zdtp-loader.d.ts +1 -1
- package/eject/header/gen-nav-overflow-script.mjs +2 -2
- package/eject/page-loading/page-loading-overlay.tsx +7 -3
- package/eject/sidebar-tree-island/branch-preview.ts +247 -0
- package/eject/sidebar-tree-island/index.tsx +86 -19
- package/eject/sidebar-tree-island/scope-state.ts +40 -10
- package/package.json +14 -13
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,24 @@ The format is based on Keep a Changelog, and release notes are generated from th
|
|
|
8
8
|
|
|
9
9
|
No unreleased changes.
|
|
10
10
|
|
|
11
|
+
## [9.1.0] - 2026-10-28
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
- The sidebar's branch-focus control is now a four-corner focus frame (named "Focus sidebar on" plus the category) instead of "◎". Pointing at it or reaching it with the keyboard briefly highlights exactly the branch it would show, with a short tooltip and no layout, scope, filter or URL change; on touch, one tap focuses the branch. The frame of a branch already shown on its own is inactive (`aria-disabled`, out of the tab order). Restore uses a counter-clockwise reset arrow ("Restore current page's sidebar"). Japanese labels are included. (b918819b)
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
- The page-loading scrim covers the full viewport again, including the header and sidebar, with the spinner centered in the viewport. Since #4580 its bootstrap clipped it to the content area at runtime. The header and an unchanged desktop sidebar still stay undimmed and still during the page animation, because they use their own transition snapshots and the scrim is excluded from the animation. (d453d849)
|
|
20
|
+
- A `categoryMatch` now matches only the whole top-level slug segment. Before, `categoryMatch: "foo"` also claimed `foo2/...` pages in the sidebar filter, in the `"!"` fallback exclusion, and when choosing a page's header section. (28808511)
|
|
21
|
+
- The vertical guide line under an expanded note-tray year or month group now runs from the center of the group's toggle, and each child's connector reaches its label. (6ac3b3c8)
|
|
22
|
+
- HtmlPreview's source toggle and inactive viewport buttons use the foreground color on hover, so their hover text keeps AA contrast. (6c82bb0c)
|
|
23
|
+
|
|
24
|
+
### Other Changes
|
|
25
|
+
|
|
26
|
+
- The optional `@takazudo/zdtp` peer now also accepts 0.9 (`^0.5.2 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0`). zdtp 0.9.0 renders the design token panel without Preact, so a site on zdtp 0.9 installs no Preact at all; the panel's API, storage keys and CSS are unchanged. It also fixes undo on a generic token tab leaving the edited value on `:root` until reload. (09442500)
|
|
27
|
+
- Runtime dependency ranges are refreshed: `esbuild` `^0.28.2` (was `>=0.28.1`), `yaml` `^2.9.1`, `fs-extra` `^11.4.1`, `tsx` `^4.23.15` and `@inquirer/prompts` `^8.7.5`. (07381de5)
|
|
28
|
+
|
|
11
29
|
## [9.0.0] - 2026-10-27
|
|
12
30
|
|
|
13
31
|
### Breaking Changes
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ instead of editing the generated markdown directly.
|
|
|
9
9
|
This package provides the missing-by-design framework concerns:
|
|
10
10
|
|
|
11
11
|
- **Sidebar tree builder** (`./sidebar-tree`) — turns collection entries + `_category_.json` into breadcrumb/navigation nodes.
|
|
12
|
-
- **Theme controls** (`./theme`) — color scheme provider + design-token panel bootstrap (the optional zdtp package owns its opaque
|
|
12
|
+
- **Theme controls** (`./theme`) — color scheme provider + design-token panel bootstrap (the optional zdtp package owns its opaque panel UI).
|
|
13
13
|
- **Theme toggle (bare)** (`./theme-toggle`) — the un-wrapped ThemeToggle component for call sites that compose their own `<Island>` (the `./theme` barrel exports an Island-wrapped variant of the same component).
|
|
14
14
|
- **TOC** (`./toc`) — desktop and mobile TOC zudo-react islands fed by MDX `headings` export.
|
|
15
15
|
- **Breadcrumb** (`./breadcrumb`) — JSX breadcrumb fed by the sidebar tree.
|
|
@@ -126,9 +126,10 @@ are feature-dependent. Package defaults for `agentExport`, `mcp`, and `llmsTxt`
|
|
|
126
126
|
are all `false`. The create-zudo-doc initializer enables `llmsTxt` by default;
|
|
127
127
|
agent export and MCP remain opt-in.
|
|
128
128
|
|
|
129
|
-
For the panel, the installed **zdtp 0.
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
For the panel, the installed **zdtp 0.9.0** renders with its own bundled zudo-react
|
|
130
|
+
runtime and has **no Preact dependency** (0.8.6–0.8.7 carried Preact as a dependency; it
|
|
131
|
+
was a peer through 0.8.5). It exports `./styles.css` (also `./styles`) to `dist/zdtp.css`. Its internal
|
|
132
|
+
Tailwind browser dependency is isolated from host JSX.
|
|
132
133
|
Install `@takazudo/zdtp` and import `@takazudo/zdtp/styles.css` when enabling it.
|
|
133
134
|
|
|
134
135
|
## Styling — Wind and public CSS
|
package/dist/compiled.css
CHANGED
|
@@ -2102,6 +2102,97 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
2102
2102
|
.zd-theme-pack-active-ring {
|
|
2103
2103
|
box-shadow: 0 0 0 2px var(--color-accent);
|
|
2104
2104
|
}
|
|
2105
|
+
|
|
2106
|
+
[data-sidebar-preview] {
|
|
2107
|
+
background-color: color-mix(in oklch, var(--color-accent) 3%, transparent);
|
|
2108
|
+
box-shadow: inset 2px 0 0 var(--color-accent);
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
[data-sidebar-preview] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
2112
|
+
background-color: color-mix(in oklch, var(--color-accent) 7%, transparent);
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
[data-sidebar-preview] > [data-sidebar-row]:not([data-sidebar-current]) [data-sidebar-focus] {
|
|
2116
|
+
color: var(--color-accent);
|
|
2117
|
+
background-color: color-mix(in oklch, var(--color-accent) 7%, transparent);
|
|
2118
|
+
}
|
|
2119
|
+
|
|
2120
|
+
[data-sidebar-preview] > [data-sidebar-children] [data-tree-connector] {
|
|
2121
|
+
border-color: var(--color-accent);
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
[data-sidebar-arrived] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
2125
|
+
animation: .7s ease-out zd-sidebar-arrival;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
@keyframes zd-sidebar-arrival {
|
|
2129
|
+
0%, 22% {
|
|
2130
|
+
background-color: color-mix(in oklch, var(--color-accent) 12%, transparent);
|
|
2131
|
+
box-shadow: inset 2px 0 0 var(--color-accent);
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
100% {
|
|
2135
|
+
background-color: #0000;
|
|
2136
|
+
box-shadow: inset 0 0 #0000;
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
|
|
2140
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2141
|
+
[data-sidebar-arrived] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
2142
|
+
animation: none;
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
@media (pointer: coarse) {
|
|
2147
|
+
[data-sidebar-row] [data-sidebar-focus] {
|
|
2148
|
+
width: 2.5rem;
|
|
2149
|
+
height: 2.75rem;
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
[data-sidebar-tooltip] {
|
|
2154
|
+
position: fixed;
|
|
2155
|
+
z-index: var(--z-index-tooltip);
|
|
2156
|
+
max-width: min(18rem, 100vw - 1rem);
|
|
2157
|
+
padding: var(--spacing-vsp-2xs) var(--spacing-hsp-sm);
|
|
2158
|
+
border-radius: var(--radius-DEFAULT);
|
|
2159
|
+
background-color: var(--color-fg);
|
|
2160
|
+
color: var(--color-bg);
|
|
2161
|
+
font-size: var(--text-caption);
|
|
2162
|
+
line-height: 1.4;
|
|
2163
|
+
overflow-wrap: anywhere;
|
|
2164
|
+
box-shadow: 0 4px 12px color-mix(in oklch, var(--color-fg) 20%, transparent);
|
|
2165
|
+
}
|
|
2166
|
+
|
|
2167
|
+
[data-sidebar-tooltip][hidden] {
|
|
2168
|
+
display: none;
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
[data-sidebar-tooltip] > strong {
|
|
2172
|
+
display: block;
|
|
2173
|
+
font-weight: 600;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
[data-sidebar-tooltip] > span {
|
|
2177
|
+
display: block;
|
|
2178
|
+
font-size: var(--text-micro);
|
|
2179
|
+
opacity: .8;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
@media (forced-colors: active) {
|
|
2183
|
+
[data-sidebar-preview] > [data-sidebar-row] {
|
|
2184
|
+
outline: 2px solid highlight;
|
|
2185
|
+
outline-offset: -2px;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
[data-sidebar-preview] > [data-sidebar-children] [data-tree-connector] {
|
|
2189
|
+
border-color: highlight;
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
[data-sidebar-tooltip] {
|
|
2193
|
+
border: 1px solid canvastext;
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2105
2196
|
.block {
|
|
2106
2197
|
display: block;
|
|
2107
2198
|
}
|
|
@@ -2265,6 +2356,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
2265
2356
|
.h-\[0\.875rem\] {
|
|
2266
2357
|
height: 0.875rem;
|
|
2267
2358
|
}
|
|
2359
|
+
.h-\[1\.0625rem\] {
|
|
2360
|
+
height: 1.0625rem;
|
|
2361
|
+
}
|
|
2268
2362
|
.h-\[1\.125rem\] {
|
|
2269
2363
|
height: 1.125rem;
|
|
2270
2364
|
}
|
|
@@ -2274,6 +2368,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
2274
2368
|
.h-\[1\.575rem\] {
|
|
2275
2369
|
height: 1.575rem;
|
|
2276
2370
|
}
|
|
2371
|
+
.h-\[1\.875rem\] {
|
|
2372
|
+
height: 1.875rem;
|
|
2373
|
+
}
|
|
2277
2374
|
.h-\[10rem\] {
|
|
2278
2375
|
height: 10rem;
|
|
2279
2376
|
}
|
|
@@ -2418,6 +2515,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
2418
2515
|
.w-\[0\.875rem\] {
|
|
2419
2516
|
width: 0.875rem;
|
|
2420
2517
|
}
|
|
2518
|
+
.w-\[1\.0625rem\] {
|
|
2519
|
+
width: 1.0625rem;
|
|
2520
|
+
}
|
|
2421
2521
|
.w-\[1\.125rem\] {
|
|
2422
2522
|
width: 1.125rem;
|
|
2423
2523
|
}
|
|
@@ -2433,6 +2533,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
2433
2533
|
.w-\[1\.75rem\] {
|
|
2434
2534
|
width: 1.75rem;
|
|
2435
2535
|
}
|
|
2536
|
+
.w-\[1\.875rem\] {
|
|
2537
|
+
width: 1.875rem;
|
|
2538
|
+
}
|
|
2436
2539
|
.w-\[12rem\] {
|
|
2437
2540
|
width: 12rem;
|
|
2438
2541
|
}
|
|
@@ -3290,6 +3393,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
3290
3393
|
.shadow-lg {
|
|
3291
3394
|
box-shadow: var(--zw-shadow-lg);
|
|
3292
3395
|
}
|
|
3396
|
+
.opacity-50 {
|
|
3397
|
+
opacity: 0.5;
|
|
3398
|
+
}
|
|
3293
3399
|
.opacity-60 {
|
|
3294
3400
|
opacity: 0.6;
|
|
3295
3401
|
}
|
|
@@ -3346,6 +3452,9 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
3346
3452
|
.rotate-90 {
|
|
3347
3453
|
rotate: 90deg;
|
|
3348
3454
|
}
|
|
3455
|
+
.cursor-default {
|
|
3456
|
+
cursor: default;
|
|
3457
|
+
}
|
|
3349
3458
|
.cursor-not-allowed {
|
|
3350
3459
|
cursor: not-allowed;
|
|
3351
3460
|
}
|
|
@@ -3542,9 +3651,6 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
3542
3651
|
.focus-visible\:text-accent:focus-visible {
|
|
3543
3652
|
color: var(--zw-color-accent);
|
|
3544
3653
|
}
|
|
3545
|
-
.focus-visible\:text-fg:focus-visible {
|
|
3546
|
-
color: var(--zw-color-fg);
|
|
3547
|
-
}
|
|
3548
3654
|
.focus-visible\:bg-accent\/10:focus-visible {
|
|
3549
3655
|
background-color: color-mix(in oklab, var(--zw-color-accent) 10%, transparent);
|
|
3550
3656
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** Package-default island; zdtp owns the opaque
|
|
1
|
+
/** Package-default island; zdtp owns the opaque panel UI it mounts. */
|
|
2
2
|
export declare function DesignTokenPanelBootstrap(): null;
|
|
3
3
|
export declare namespace DesignTokenPanelBootstrap {
|
|
4
4
|
var displayName: string;
|
package/dist/features.css
CHANGED
|
@@ -1350,3 +1350,113 @@ site-search [data-search-results] > :is([data-search-placeholder], p) {
|
|
|
1350
1350
|
.zd-theme-pack-active-ring {
|
|
1351
1351
|
box-shadow: 0 0 0 2px var(--color-accent);
|
|
1352
1352
|
}
|
|
1353
|
+
|
|
1354
|
+
/* ========================================
|
|
1355
|
+
* Sidebar branch focus preview (frame + branch preview)
|
|
1356
|
+
*
|
|
1357
|
+
* Hovering (mouse/pen) or keyboard-focusing a category's focus frame marks
|
|
1358
|
+
* exactly that branch wrapper `[data-sidebar-preview]` (one per sidebar
|
|
1359
|
+
* instance — see sidebar-tree-island/branch-preview.ts). Every treatment is
|
|
1360
|
+
* paint-only: background, inset box-shadow and border-color. Nothing here may
|
|
1361
|
+
* change box geometry, or the preview would shift rows.
|
|
1362
|
+
*
|
|
1363
|
+
* The wash and leading rule live on the wrapper's own background layer, so the
|
|
1364
|
+
* current-page row's `bg-fg` fill paints over them and stays readable.
|
|
1365
|
+
* ======================================== */
|
|
1366
|
+
[data-sidebar-preview] {
|
|
1367
|
+
background-color: color-mix(in oklch, var(--color-accent) 3%, transparent);
|
|
1368
|
+
box-shadow: inset 2px 0 0 var(--color-accent);
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
[data-sidebar-preview] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
1372
|
+
background-color: color-mix(in oklch, var(--color-accent) 7%, transparent);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
[data-sidebar-preview] > [data-sidebar-row]:not([data-sidebar-current]) [data-sidebar-focus] {
|
|
1376
|
+
color: var(--color-accent);
|
|
1377
|
+
background-color: color-mix(in oklch, var(--color-accent) 7%, transparent);
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
/* Only connectors inside the previewed subtree — never the row's own elbow to
|
|
1381
|
+
* its parent, which belongs to the ancestor. */
|
|
1382
|
+
[data-sidebar-preview] > [data-sidebar-children] [data-tree-connector] {
|
|
1383
|
+
border-color: var(--color-accent);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
/* Scope arrival: a brief wash on the newly focused root row. */
|
|
1387
|
+
[data-sidebar-arrived] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
1388
|
+
animation: zd-sidebar-arrival 700ms ease-out;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
@keyframes zd-sidebar-arrival {
|
|
1392
|
+
0%,
|
|
1393
|
+
22% {
|
|
1394
|
+
background-color: color-mix(in oklch, var(--color-accent) 12%, transparent);
|
|
1395
|
+
box-shadow: inset 2px 0 0 var(--color-accent);
|
|
1396
|
+
}
|
|
1397
|
+
100% {
|
|
1398
|
+
background-color: transparent;
|
|
1399
|
+
box-shadow: inset 0 0 0 transparent;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1404
|
+
[data-sidebar-arrived] > [data-sidebar-row]:not([data-sidebar-current]) {
|
|
1405
|
+
animation: none;
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
|
|
1409
|
+
/* Touch target: a one-tap focus frame at a comfortable size. */
|
|
1410
|
+
@media (pointer: coarse) {
|
|
1411
|
+
/* Out-specifies the frame's w-/h- utilities, which are emitted after this file. */
|
|
1412
|
+
[data-sidebar-row] [data-sidebar-focus] {
|
|
1413
|
+
width: 2.5rem;
|
|
1414
|
+
height: 2.75rem;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/* Transient tooltip for the focus frame and Restore. Appended to <body> so the
|
|
1419
|
+
* sidebar's scroll viewport and the drawer's transform cannot clip it. */
|
|
1420
|
+
[data-sidebar-tooltip] {
|
|
1421
|
+
position: fixed;
|
|
1422
|
+
z-index: var(--z-index-tooltip);
|
|
1423
|
+
max-width: min(18rem, calc(100vw - 1rem));
|
|
1424
|
+
padding: var(--spacing-vsp-2xs) var(--spacing-hsp-sm);
|
|
1425
|
+
border-radius: var(--radius-DEFAULT);
|
|
1426
|
+
background-color: var(--color-fg);
|
|
1427
|
+
color: var(--color-bg);
|
|
1428
|
+
font-size: var(--text-caption);
|
|
1429
|
+
line-height: 1.4;
|
|
1430
|
+
overflow-wrap: anywhere;
|
|
1431
|
+
box-shadow: 0 4px 12px color-mix(in oklch, var(--color-fg) 20%, transparent);
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
[data-sidebar-tooltip][hidden] {
|
|
1435
|
+
display: none;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
[data-sidebar-tooltip] > strong {
|
|
1439
|
+
display: block;
|
|
1440
|
+
font-weight: 600;
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
[data-sidebar-tooltip] > span {
|
|
1444
|
+
display: block;
|
|
1445
|
+
font-size: var(--text-micro);
|
|
1446
|
+
opacity: 0.8;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
@media (forced-colors: active) {
|
|
1450
|
+
[data-sidebar-preview] > [data-sidebar-row] {
|
|
1451
|
+
outline: 2px solid Highlight;
|
|
1452
|
+
outline-offset: -2px;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
[data-sidebar-preview] > [data-sidebar-children] [data-tree-connector] {
|
|
1456
|
+
border-color: Highlight;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
[data-sidebar-tooltip] {
|
|
1460
|
+
border: 1px solid CanvasText;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
@@ -103,7 +103,7 @@ function PreviewBase({
|
|
|
103
103
|
"button",
|
|
104
104
|
{
|
|
105
105
|
type: "button",
|
|
106
|
-
class: computed(() => `min-h-[44px] min-w-[44px] px-hsp-sm py-hsp-2xs text-caption border rounded-full cursor-pointer transition-[background,color,border-color] duration-150 leading-snug ${i === activeViewport.value ? "bg-accent text-bg border-accent hover:bg-accent-hover hover:border-accent-hover" : "bg-transparent text-muted border-muted hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)]"}`),
|
|
106
|
+
class: computed(() => `min-h-[44px] min-w-[44px] px-hsp-sm py-hsp-2xs text-caption border rounded-full cursor-pointer transition-[background,color,border-color] duration-150 leading-snug ${i === activeViewport.value ? "bg-accent text-bg border-accent hover:bg-accent-hover hover:border-accent-hover" : "bg-transparent text-muted border-muted hover:text-fg hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)]"}`),
|
|
107
107
|
"aria-pressed": computed(() => i === activeViewport.value),
|
|
108
108
|
"on:click": () => {
|
|
109
109
|
activeViewport.value = i;
|
|
@@ -137,7 +137,7 @@ function PreviewBase({
|
|
|
137
137
|
"button",
|
|
138
138
|
{
|
|
139
139
|
type: "button",
|
|
140
|
-
class: "flex min-h-[44px] min-w-[44px] items-center w-full px-hsp-md py-hsp-sm text-caption font-medium text-muted bg-surface border-none cursor-pointer gap-hsp-xs hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)]",
|
|
140
|
+
class: "flex min-h-[44px] min-w-[44px] items-center w-full px-hsp-md py-hsp-sm text-caption font-medium text-muted bg-surface border-none cursor-pointer gap-hsp-xs hover:text-fg hover:bg-[color-mix(in_srgb,var(--color-surface)_80%,var(--color-fg)_20%)]",
|
|
141
141
|
"on:click": () => {
|
|
142
142
|
codeOpen.value = !codeOpen.value;
|
|
143
143
|
},
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -20,3 +20,5 @@ export declare function FileImage({ class: className }: IconProps): Child;
|
|
|
20
20
|
export declare function FileVideo({ class: className }: IconProps): Child;
|
|
21
21
|
export declare function FilePdf({ class: className }: IconProps): Child;
|
|
22
22
|
export declare function FileArchive({ class: className }: IconProps): Child;
|
|
23
|
+
export declare function FocusFrame({ class: className }: IconProps): Child;
|
|
24
|
+
export declare function RestoreArrow({ class: className }: IconProps): Child;
|
package/dist/icons/index.js
CHANGED
|
@@ -334,6 +334,40 @@ function FileArchive({ class: className }) {
|
|
|
334
334
|
}
|
|
335
335
|
);
|
|
336
336
|
}
|
|
337
|
+
function FocusFrame({ class: className }) {
|
|
338
|
+
return /* @__PURE__ */ jsx(
|
|
339
|
+
"svg",
|
|
340
|
+
{
|
|
341
|
+
class: className || void 0,
|
|
342
|
+
viewBox: "0 0 24 24",
|
|
343
|
+
fill: "none",
|
|
344
|
+
stroke: "currentColor",
|
|
345
|
+
"stroke-width": "1.65",
|
|
346
|
+
"stroke-linecap": "round",
|
|
347
|
+
"stroke-linejoin": "round",
|
|
348
|
+
"aria-hidden": "true",
|
|
349
|
+
focusable: "false",
|
|
350
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8 3H5a2 2 0 0 0-2 2v3m13-5h3a2 2 0 0 1 2 2v3M3 16v3a2 2 0 0 0 2 2h3m8 0h3a2 2 0 0 0 2-2v-3" })
|
|
351
|
+
}
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
function RestoreArrow({ class: className }) {
|
|
355
|
+
return /* @__PURE__ */ jsx(
|
|
356
|
+
"svg",
|
|
357
|
+
{
|
|
358
|
+
class: className || void 0,
|
|
359
|
+
viewBox: "0 0 24 24",
|
|
360
|
+
fill: "none",
|
|
361
|
+
stroke: "currentColor",
|
|
362
|
+
"stroke-width": "1.65",
|
|
363
|
+
"stroke-linecap": "round",
|
|
364
|
+
"stroke-linejoin": "round",
|
|
365
|
+
"aria-hidden": "true",
|
|
366
|
+
focusable: "false",
|
|
367
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 10a9 9 0 1 1 2.6 8.4M3 4v6h6" })
|
|
368
|
+
}
|
|
369
|
+
);
|
|
370
|
+
}
|
|
337
371
|
export {
|
|
338
372
|
ArrowLeft,
|
|
339
373
|
ChevronLeft,
|
|
@@ -346,9 +380,11 @@ export {
|
|
|
346
380
|
FilePdf,
|
|
347
381
|
FileText,
|
|
348
382
|
FileVideo,
|
|
383
|
+
FocusFrame,
|
|
349
384
|
Folder,
|
|
350
385
|
FolderOpen,
|
|
351
386
|
GitHub,
|
|
352
387
|
History,
|
|
388
|
+
RestoreArrow,
|
|
353
389
|
Search
|
|
354
390
|
};
|
|
@@ -28,7 +28,7 @@ export declare function getNavSectionForSlug(slug: string, headerNav: NavScopeHe
|
|
|
28
28
|
/**
|
|
29
29
|
* Filter top-level NavNodes by a headerNav categoryMatch value.
|
|
30
30
|
* - `"!"` means everything NOT claimed by explicit matchers
|
|
31
|
-
* - `"claude"` means nodes whose slug
|
|
31
|
+
* - `"claude"` means nodes whose slug is `"claude"` or under `"claude/"`
|
|
32
32
|
* - `undefined` means all nodes
|
|
33
33
|
*
|
|
34
34
|
* Parameterized version of the host's `getNavSubtree()` — receives the
|
package/dist/nav-scope/index.js
CHANGED
|
@@ -13,26 +13,25 @@ function getCategoryOrder(headerNav) {
|
|
|
13
13
|
function getNavSectionForSlug(slug, headerNav) {
|
|
14
14
|
const topCategory = slug.split("/")[0] ?? "";
|
|
15
15
|
const all = getCategoryOrder(headerNav);
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
);
|
|
19
|
-
if (explicitMatches.length > 0) {
|
|
20
|
-
return explicitMatches.sort((a, b) => b.length - a.length)[0];
|
|
21
|
-
}
|
|
16
|
+
const explicitMatch = all.find((cm) => cm !== "!" && topCategory === cm);
|
|
17
|
+
if (explicitMatch !== void 0) return explicitMatch;
|
|
22
18
|
const defaultItem = headerNav.find(
|
|
23
19
|
(item) => item.categoryMatch === "!"
|
|
24
20
|
);
|
|
25
21
|
return defaultItem?.categoryMatch;
|
|
26
22
|
}
|
|
23
|
+
function matchesCategory(slug, match) {
|
|
24
|
+
return slug === match || slug.startsWith(match + "/");
|
|
25
|
+
}
|
|
27
26
|
function getNavSubtree(tree, categoryMatch, headerNav) {
|
|
28
27
|
if (!categoryMatch) return tree;
|
|
29
28
|
if (categoryMatch === "!") {
|
|
30
29
|
const explicitPrefixes = getCategoryOrder(headerNav).filter((cm) => cm !== "!");
|
|
31
30
|
return tree.filter(
|
|
32
|
-
(node) => !explicitPrefixes.some((prefix) => node.slug
|
|
31
|
+
(node) => !explicitPrefixes.some((prefix) => matchesCategory(node.slug, prefix))
|
|
33
32
|
);
|
|
34
33
|
}
|
|
35
|
-
return tree.filter((node) => node.slug
|
|
34
|
+
return tree.filter((node) => matchesCategory(node.slug, categoryMatch));
|
|
36
35
|
}
|
|
37
36
|
export {
|
|
38
37
|
getCategoryOrder,
|
|
@@ -15,7 +15,11 @@ export interface PageLoadingOverlayProps {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare function buildPageLoadingOverlayBootstrap(overlayId: string): string;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Full-viewport loading overlay shown while a dynamic navigation is pending.
|
|
19
|
+
*
|
|
20
|
+
* Geometry belongs to `page-loading.css` (`position: fixed; inset: 0`); the
|
|
21
|
+
* bootstrap only toggles visibility. Header and sidebar stay stationary through
|
|
22
|
+
* their own named View Transition snapshots, not by clipping the scrim.
|
|
19
23
|
*
|
|
20
24
|
* Mount this once per layout (typically inside `DocLayoutWithDefaults`'s
|
|
21
25
|
* `bodyEnd` slot, alongside the existing body-end providers). It is
|
|
@@ -11,7 +11,7 @@ function buildPageLoadingOverlayBootstrap(overlayId) {
|
|
|
11
11
|
const after = JSON.stringify(AFTER_NAVIGATE_EVENT);
|
|
12
12
|
return `(function(){
|
|
13
13
|
var id=${id};
|
|
14
|
-
function show(){var el=document.getElementById(id);if(!el)return;
|
|
14
|
+
function show(){var el=document.getElementById(id);if(!el)return;el.setAttribute("data-visible","");el.setAttribute("aria-hidden","false");}
|
|
15
15
|
function hide(){var el=document.getElementById(id);if(!el)return;el.removeAttribute("data-visible");el.setAttribute("aria-hidden","true");}
|
|
16
16
|
function setPending(ev){document.querySelectorAll("[data-zd-nav-pending]").forEach(function(el){el.removeAttribute("data-zd-nav-pending");});var src=ev&&ev.sourceElement;if(src&&src instanceof Element)src.setAttribute("data-zd-nav-pending","");}
|
|
17
17
|
function clearPending(){document.querySelectorAll("[data-zd-nav-pending]").forEach(function(el){el.removeAttribute("data-zd-nav-pending");});}
|
package/dist/page-loading.css
CHANGED
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
position: fixed;
|
|
34
34
|
view-transition-name: zfb-loading;
|
|
35
35
|
inset: 0;
|
|
36
|
-
/*
|
|
36
|
+
/* Full-viewport pending scrim, header and sidebar included. Stationary
|
|
37
|
+
chrome comes from its own named snapshots, not from clipping this box.
|
|
37
38
|
--z-index-modal fallback (100) ensures the overlay stacks on top even for
|
|
38
39
|
bare consumers that have not defined the token. */
|
|
39
40
|
z-index: var(--z-index-modal, 100);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ZfbPlugin } from "@takazudo/zfb/plugins";
|
|
2
2
|
export declare const ZDTP_LOADER_SPECIFIER = "@takazudo/zudo-doc/zdtp-loader";
|
|
3
|
+
export declare const ZDTP_DISABLED_MESSAGE_PREFIX = "@takazudo/zdtp is not bundled";
|
|
3
4
|
declare const plugin: ZfbPlugin;
|
|
4
5
|
export default plugin;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
const ZDTP_LOADER_SPECIFIER = "@takazudo/zudo-doc/zdtp-loader";
|
|
2
|
-
const
|
|
2
|
+
const ZDTP_DISABLED_MESSAGE_PREFIX = "@takazudo/zdtp is not bundled";
|
|
3
|
+
const DISABLED_LOADER_SOURCE = `throw new Error("${ZDTP_DISABLED_MESSAGE_PREFIX}: designTokenPanel is false and bundleZdtp is not set, so this build shadows @takazudo/zudo-doc/zdtp-loader. If you reached this through @takazudo/zudo-doc/design-token-panel-bootstrap to mount your own panel, set bundleZdtp: true and install @takazudo/zdtp.");
|
|
4
|
+
export {};
|
|
5
|
+
`;
|
|
3
6
|
const plugin = {
|
|
4
7
|
name: "zdtp-loader",
|
|
5
8
|
setup(ctx) {
|
|
@@ -8,6 +11,7 @@ const plugin = {
|
|
|
8
11
|
};
|
|
9
12
|
var zdtp_loader_default = plugin;
|
|
10
13
|
export {
|
|
14
|
+
ZDTP_DISABLED_MESSAGE_PREFIX,
|
|
11
15
|
ZDTP_LOADER_SPECIFIER,
|
|
12
16
|
zdtp_loader_default as default
|
|
13
17
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReadonlySignal, type Ref } from "@takazudo/zfb/zudo-react";
|
|
2
|
+
/** Trigger attribute: the tooltip's title text. */
|
|
3
|
+
export declare const TIP_ATTR = "data-sidebar-tip";
|
|
4
|
+
/** Trigger attribute: optional secondary tooltip line. */
|
|
5
|
+
export declare const TIP_DETAIL_ATTR = "data-sidebar-tip-detail";
|
|
6
|
+
export interface BranchPreview {
|
|
7
|
+
/** Occurrence previewed in this sidebar instance, or null. Never persisted or broadcast. */
|
|
8
|
+
active: ReadonlySignal<string | null>;
|
|
9
|
+
clear: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Transient branch preview + tooltip for one sidebar island instance.
|
|
13
|
+
* Call `activate()` from the island's `onActivate`; it returns the cleanup.
|
|
14
|
+
* The desktop tree and the mobile drawer are separate instances, so each
|
|
15
|
+
* visible sidebar owns at most one preview and one tooltip.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createBranchPreview(navRef: Ref<HTMLElement>): BranchPreview & {
|
|
18
|
+
activate: () => () => void;
|
|
19
|
+
};
|