@kolkrabbi/kol-workshop 0.26.0 → 0.28.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/package.json +4 -4
- package/src/shell/ShellLayout.jsx +19 -4
- package/src/shell/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-workshop",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "KOL workshop/docs system — a handrolled markdown engine, search, tag system (incl. a d3 tag graph), docs viewer, and docs shell. Sits above @kolkrabbi/kol-{theme,icons,component,framework}; content is consumer-injected (the package never globs docs).",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@kolkrabbi/kol-component": "^0.
|
|
28
|
+
"@kolkrabbi/kol-component": "^0.179.0",
|
|
29
29
|
"@kolkrabbi/kol-icons": "^0.25.0",
|
|
30
|
-
"@kolkrabbi/kol-
|
|
31
|
-
"@kolkrabbi/kol-
|
|
30
|
+
"@kolkrabbi/kol-framework": "^0.42.0",
|
|
31
|
+
"@kolkrabbi/kol-theme": "^0.138.0"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"src",
|
|
@@ -2,7 +2,7 @@ import { createContext, useState, useEffect, Suspense } from 'react'
|
|
|
2
2
|
import { Outlet, Link, useLocation, useNavigate } from 'react-router-dom'
|
|
3
3
|
import { ShellHeader } from '@kolkrabbi/kol-framework'
|
|
4
4
|
import ShellSidebar from './ShellSidebar.jsx'
|
|
5
|
-
import { Button, IconFrame, ShellDrawer, ShellSearchOverlay, Tooltip } from '@kolkrabbi/kol-component'
|
|
5
|
+
import { Button, IconFrame, ShellDrawer, ShellSearchOverlay, Tooltip, CloseButton } from '@kolkrabbi/kol-component'
|
|
6
6
|
import { matchSearchItems } from '../engine/search.js'
|
|
7
7
|
import { useTagMode } from '../tags/TagModeContext.jsx'
|
|
8
8
|
import TagModeOverlay from '../tags/TagModeOverlay.jsx'
|
|
@@ -36,6 +36,15 @@ export const ShellContentWidthContext = createContext(null)
|
|
|
36
36
|
// useLayoutEffect(() => { setTocCollapsed(true) ; return () => setTocCollapsed(false) }, [setTocCollapsed])
|
|
37
37
|
export const ShellTocCollapsedContext = createContext(null)
|
|
38
38
|
|
|
39
|
+
// THE LEFT RAIL IS THE PAGE'S CALL TOO (2026-09-01). The TOC had this seam and
|
|
40
|
+
// the nav did not, so a landing page could shed one rail and not the other —
|
|
41
|
+
// the showcase home claimed "top nav (no sidebar)" in its docstring and rendered
|
|
42
|
+
// under both. Same shape as the TOC seam: set on mount, restore on unmount, and
|
|
43
|
+
// the header's own toggles keep working on top of it.
|
|
44
|
+
// Usage: const setNavCollapsed = useContext(ShellNavCollapsedContext)
|
|
45
|
+
// useLayoutEffect(() => { setNavCollapsed(true) ; return () => setNavCollapsed(false) }, [setNavCollapsed])
|
|
46
|
+
export const ShellNavCollapsedContext = createContext(null)
|
|
47
|
+
|
|
39
48
|
/* overflow-x-hidden (2026-07-30): long tree rows (component names + counters)
|
|
40
49
|
* overflowed the 256px rail into an internal horizontal scroll — with the
|
|
41
50
|
* scrollbar hidden it read as content silently walking off, and the pan
|
|
@@ -279,6 +288,7 @@ const ShellLayout = ({ routes = [], basePath = '/', brand: brandProp, brandLogoS
|
|
|
279
288
|
<ShellFullHeightContext.Provider value={setIsFullHeight}>
|
|
280
289
|
<ShellContentWidthContext.Provider value={setContentWidth}>
|
|
281
290
|
<ShellTocCollapsedContext.Provider value={setTocCollapsed}>
|
|
291
|
+
<ShellNavCollapsedContext.Provider value={setNavCollapsed}>
|
|
282
292
|
<div className="fixed inset-0 flex flex-col bg-surface-primary text-auto">
|
|
283
293
|
<ShellHeader
|
|
284
294
|
brand={brand}
|
|
@@ -414,7 +424,9 @@ const ShellLayout = ({ routes = [], basePath = '/', brand: brandProp, brandLogoS
|
|
|
414
424
|
* for months. */}
|
|
415
425
|
{isShortcutsOpen && (
|
|
416
426
|
<div
|
|
417
|
-
|
|
427
|
+
/* THE scrim (overlay-scrim-outliers sweep, 2026-09-03): was a hand
|
|
428
|
+
`bg-fg-48` — the ink wash, not the class's ab-black 48 */
|
|
429
|
+
className="fixed inset-0 z-50 flex items-center justify-center kol-overlay-scrim"
|
|
418
430
|
onClick={() => setIsShortcutsOpen(false)}
|
|
419
431
|
role="presentation"
|
|
420
432
|
>
|
|
@@ -430,8 +442,10 @@ const ShellLayout = ({ routes = [], basePath = '/', brand: brandProp, brandLogoS
|
|
|
430
442
|
style={{ borderBottomColor: 'var(--kol-oq-08)' }}
|
|
431
443
|
>
|
|
432
444
|
<span className="kol-doc-eyebrow text-meta">Keyboard shortcuts</span>
|
|
433
|
-
|
|
434
|
-
|
|
445
|
+
{/* was `Button variant="outline" quiet` — the boxed treatment the
|
|
446
|
+
* 2026-09-01 one-idiom ruling retired, still shipping here because
|
|
447
|
+
* the idiom was a comment rather than a component (2026-09-03) */}
|
|
448
|
+
<CloseButton onClick={() => setIsShortcutsOpen(false)} />
|
|
435
449
|
</div>
|
|
436
450
|
<ul className="flex flex-col px-4 py-3">
|
|
437
451
|
{SHORTCUTS.map((s) => (
|
|
@@ -452,6 +466,7 @@ const ShellLayout = ({ routes = [], basePath = '/', brand: brandProp, brandLogoS
|
|
|
452
466
|
</div>
|
|
453
467
|
)}
|
|
454
468
|
</div>
|
|
469
|
+
</ShellNavCollapsedContext.Provider>
|
|
455
470
|
</ShellTocCollapsedContext.Provider>
|
|
456
471
|
</ShellContentWidthContext.Provider>
|
|
457
472
|
</ShellFullHeightContext.Provider>
|
package/src/shell/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* against.
|
|
8
8
|
*/
|
|
9
9
|
export { default as ShellLayout } from './ShellLayout.jsx'
|
|
10
|
-
export { ShellTocContext, ShellFullHeightContext, ShellTocCollapsedContext, ShellContentWidthContext } from './ShellLayout.jsx'
|
|
10
|
+
export { ShellTocContext, ShellFullHeightContext, ShellTocCollapsedContext, ShellNavCollapsedContext, ShellContentWidthContext } from './ShellLayout.jsx'
|
|
11
11
|
export { default as ShellSidebar } from './ShellSidebar.jsx'
|
|
12
12
|
/* RailSection — THE rail ladder. Every rail header at every rung comes from
|
|
13
13
|
* here, in both rails; see the file header for why a class alone was not
|