@kolkrabbi/kol-workshop 0.1.6 → 0.1.7
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 +3 -3
- package/src/shell/ShellLayout.jsx +14 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-workshop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
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",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"d3": "^7.9.0",
|
|
16
16
|
"@kolkrabbi/kol-brand": "^0.1.2",
|
|
17
|
-
"@kolkrabbi/kol-component": "0.11.0",
|
|
18
17
|
"@kolkrabbi/kol-icons": "0.7.0",
|
|
18
|
+
"@kolkrabbi/kol-component": "0.12.0",
|
|
19
19
|
"@kolkrabbi/kol-framework": "0.5.0",
|
|
20
|
-
"@kolkrabbi/kol-theme": "0.
|
|
20
|
+
"@kolkrabbi/kol-theme": "0.11.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"react": "^18.3.0 || ^19.0.0",
|
|
@@ -22,27 +22,26 @@ export const ShellFullHeightContext = createContext(null)
|
|
|
22
22
|
export const ShellTocCollapsedContext = createContext(null)
|
|
23
23
|
|
|
24
24
|
const NavColumn = ({ children }) => (
|
|
25
|
-
<aside className="hidden lg:block shrink-0 pt-6 md:pt-6 lg:pt-8">
|
|
26
|
-
|
|
27
|
-
{children}
|
|
28
|
-
</div>
|
|
25
|
+
<aside className="shell-sidebar-sticky hidden lg:block shrink-0 h-full min-h-0 overflow-y-auto overscroll-none pt-6 md:pt-6 lg:pt-8 pb-8">
|
|
26
|
+
{children}
|
|
29
27
|
</aside>
|
|
30
28
|
)
|
|
31
29
|
|
|
32
30
|
const MainColumn = ({ children, fullHeight }) => (
|
|
33
|
-
<main
|
|
31
|
+
<main
|
|
32
|
+
className={`w-full min-w-0 h-full min-h-0 ${fullHeight ? 'overflow-hidden flex flex-col' : 'overflow-y-auto overscroll-none'}`}
|
|
33
|
+
style={fullHeight ? undefined : { scrollbarGutter: 'stable' }}
|
|
34
|
+
>
|
|
34
35
|
{fullHeight
|
|
35
36
|
? children
|
|
36
|
-
: <div className="pt-6 md:pt-6 lg:pt-8 pb-
|
|
37
|
+
: <div className="pt-6 md:pt-6 lg:pt-8 pb-16">{children}</div>
|
|
37
38
|
}
|
|
38
39
|
</main>
|
|
39
40
|
)
|
|
40
41
|
|
|
41
42
|
const TocColumn = ({ children }) => (
|
|
42
|
-
<aside className="hidden lg:block shrink-0 pt-6 md:pt-6 lg:pt-8">
|
|
43
|
-
|
|
44
|
-
{children}
|
|
45
|
-
</div>
|
|
43
|
+
<aside className="shell-sidebar-sticky hidden lg:block shrink-0 h-full min-h-0 overflow-y-auto overscroll-none pt-6 md:pt-6 lg:pt-8 pb-8">
|
|
44
|
+
{children}
|
|
46
45
|
</aside>
|
|
47
46
|
)
|
|
48
47
|
|
|
@@ -150,10 +149,12 @@ const ShellLayout = ({ routes = [], basePath = '/', brandLogoSrc, brandLogoAlt =
|
|
|
150
149
|
tocCollapsed={tocCollapsed}
|
|
151
150
|
/>
|
|
152
151
|
|
|
152
|
+
{/* Three independent scroll regions: each rail scrolls its own overflow,
|
|
153
|
+
* main scrolls unless a page locks it (ShellFullHeightContext — embeds).
|
|
154
|
+
* overscroll-none stops chaining between regions and the edge bounce. */}
|
|
153
155
|
<div className="flex-1 overflow-hidden">
|
|
154
|
-
<div className=
|
|
155
|
-
<div className={`
|
|
156
|
-
<div className={`shell-content-grid grid gap-8 ${gridCols}${isFullHeight ? ' h-full' : ''}`} data-layout={layoutType}>
|
|
156
|
+
<div className="h-full w-full px-4 md:px-5 lg:px-6">
|
|
157
|
+
<div className={`shell-content-grid grid gap-8 ${gridCols} h-full min-h-0`} data-layout={layoutType}>
|
|
157
158
|
{showNav && (
|
|
158
159
|
<NavColumn>
|
|
159
160
|
{renderSidebar ? renderSidebar({}) : <ShellSidebar routes={routes} basePath={basePath} />}
|
|
@@ -176,7 +177,6 @@ const ShellLayout = ({ routes = [], basePath = '/', brandLogoSrc, brandLogoAlt =
|
|
|
176
177
|
</div>
|
|
177
178
|
</div>
|
|
178
179
|
</div>
|
|
179
|
-
</div>
|
|
180
180
|
|
|
181
181
|
<ShellDrawer
|
|
182
182
|
isOpen={isNavDrawerOpen}
|