@kolkrabbi/kol-framework 0.62.0 → 0.62.2
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/Layout.jsx +1 -1
- package/src/SideNav.jsx +1 -1
- package/src/SiteLayout.jsx +2 -2
- package/src/website/CursorContext.jsx +2 -2
- package/src/website/CursorOverlay.jsx +1 -1
- package/src/website/CursorTrail.jsx +1 -1
- package/src/website/Navbar.jsx +1 -1
- package/src/website/WebsiteLayout.jsx +5 -5
- package/src/website/WorkViewContext.jsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-framework",
|
|
3
|
-
"version": "0.62.
|
|
3
|
+
"version": "0.62.2",
|
|
4
4
|
"description": "Site shell and page layout",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"framer-motion": "^12.0.0",
|
|
29
29
|
"gsap": "^3.13.0",
|
|
30
|
+
"@kolkrabbi/kol-component": "^0.311.2",
|
|
30
31
|
"@kolkrabbi/kol-markdown": "0.2.0",
|
|
31
|
-
"@kolkrabbi/kol-icons": "^0.52.0"
|
|
32
|
-
"@kolkrabbi/kol-component": "^0.311.0"
|
|
32
|
+
"@kolkrabbi/kol-icons": "^0.52.0"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"src",
|
package/src/Layout.jsx
CHANGED
package/src/SideNav.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHref, useLocation, useNavigate } from 'react-router-dom'
|
|
2
2
|
import { NavRail } from '@kolkrabbi/kol-component'
|
|
3
|
-
import ThemeToggle from './ThemeToggle'
|
|
3
|
+
import ThemeToggle from './ThemeToggle.jsx'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* SideNav — The grouped navigation rail. `NavRail variant="site"` under its old name (2026-10-22, the one nav rail).
|
package/src/SiteLayout.jsx
CHANGED
|
@@ -7,12 +7,12 @@ import { Button, ModalProvider } from '@kolkrabbi/kol-component'
|
|
|
7
7
|
* Usage: const setTocContent = useContext(ShellTocContext)
|
|
8
8
|
* useLayoutEffect(() => { setTocContent(<MyToc />); return () => setTocContent(null) }, [])
|
|
9
9
|
* No page registered + no defaultTocContent prop → no rail, layout unchanged. */
|
|
10
|
-
export const ShellTocContext = createContext(null)
|
|
10
|
+
export const ShellTocContext = (globalThis[Symbol.for('@kolkrabbi/kol-framework/ShellTocContext')] ??= createContext(null))
|
|
11
11
|
|
|
12
12
|
/* Pages can suppress the TOC rail (e.g. hide an app-level defaultTocContent).
|
|
13
13
|
* Usage: const setTocCollapsed = useContext(ShellTocCollapsedContext)
|
|
14
14
|
* useLayoutEffect(() => { setTocCollapsed(true); return () => setTocCollapsed(false) }, [setTocCollapsed]) */
|
|
15
|
-
export const ShellTocCollapsedContext = createContext(null)
|
|
15
|
+
export const ShellTocCollapsedContext = (globalThis[Symbol.for('@kolkrabbi/kol-framework/ShellTocCollapsedContext')] ??= createContext(null))
|
|
16
16
|
|
|
17
17
|
/* `getActivePage` — inert since the 2026-08-09 SideNav port (the two-level
|
|
18
18
|
* elder model derives the active category from the route). No longer
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
|
|
3
|
-
const CursorContext = React.createContext({
|
|
3
|
+
const CursorContext = (globalThis[Symbol.for('@kolkrabbi/kol-framework/CursorContext')] ??= React.createContext({
|
|
4
4
|
position: { x: 0, y: 0 },
|
|
5
5
|
visible: false,
|
|
6
6
|
setVisible: () => {},
|
|
7
7
|
cardHover: null,
|
|
8
8
|
setCardHover: () => {},
|
|
9
9
|
clearCardHover: () => {}
|
|
10
|
-
})
|
|
10
|
+
}))
|
|
11
11
|
|
|
12
12
|
export function CursorProvider({ children }) {
|
|
13
13
|
// Initialize cursor at center of viewport
|
package/src/website/Navbar.jsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react'
|
|
2
2
|
import { Link, useLocation } from 'react-router-dom'
|
|
3
|
-
import TakeoverMenu from './TakeoverMenu'
|
|
3
|
+
import TakeoverMenu from './TakeoverMenu.jsx'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Navbar — ONE top bar, one structure, every route and every breakpoint.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Outlet, useLocation } from 'react-router-dom'
|
|
2
|
-
import Navbar from './Navbar'
|
|
3
|
-
import { Footer } from './Footer'
|
|
4
|
-
import { CursorProvider } from './CursorContext'
|
|
5
|
-
import { WorkViewProvider } from './WorkViewContext'
|
|
6
|
-
import CursorOverlay from './CursorOverlay'
|
|
2
|
+
import Navbar from './Navbar.jsx'
|
|
3
|
+
import { Footer } from './Footer.jsx'
|
|
4
|
+
import { CursorProvider } from './CursorContext.jsx'
|
|
5
|
+
import { WorkViewProvider } from './WorkViewContext.jsx'
|
|
6
|
+
import CursorOverlay from './CursorOverlay.jsx'
|
|
7
7
|
/* kol-component's AsciiCursor — the evolved twin of the site's copy (touch and reduced-motion gated); one, not two */
|
|
8
8
|
import { AsciiCursor } from '@kolkrabbi/kol-component'
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createContext, useContext, useState } from 'react'
|
|
2
2
|
|
|
3
|
-
const WorkViewContext = createContext(null)
|
|
3
|
+
const WorkViewContext = (globalThis[Symbol.for('@kolkrabbi/kol-framework/WorkViewContext')] ??= createContext(null))
|
|
4
4
|
|
|
5
5
|
export function WorkViewProvider({ children }) {
|
|
6
6
|
const [viewMode, setViewMode] = useState('list')
|