@kolkrabbi/kol-framework 0.62.1 → 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
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.
|
|
31
|
-
"@kolkrabbi/kol-
|
|
32
|
-
"@kolkrabbi/kol-
|
|
30
|
+
"@kolkrabbi/kol-component": "^0.311.2",
|
|
31
|
+
"@kolkrabbi/kol-markdown": "0.2.0",
|
|
32
|
+
"@kolkrabbi/kol-icons": "^0.52.0"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"src",
|
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
|
|
@@ -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')
|