@kolkrabbi/kol-workshop 0.41.1 → 0.41.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-workshop",
3
- "version": "0.41.1",
3
+ "version": "0.41.2",
4
4
  "private": false,
5
5
  "description": "Docs viewer, shell and tag system",
6
6
  "license": "MIT",
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "d3": "^7.9.0",
16
- "@kolkrabbi/kol-markdown": "^0.2.0",
17
16
  "@kolkrabbi/kol-brand": "^0.2.0",
17
+ "@kolkrabbi/kol-markdown": "^0.2.0",
18
18
  "@kolkrabbi/kol-search": "^0.3.0"
19
19
  },
20
20
  "peerDependencies": {
@@ -28,9 +28,9 @@
28
28
  "react-router-dom": "^6.0.0 || ^7.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@kolkrabbi/kol-component": "^0.311.1",
32
- "@kolkrabbi/kol-framework": "^0.62.1",
31
+ "@kolkrabbi/kol-component": "^0.311.2",
33
32
  "@kolkrabbi/kol-icons": "^0.52.0",
33
+ "@kolkrabbi/kol-framework": "^0.62.2",
34
34
  "@kolkrabbi/kol-theme": "^0.196.0"
35
35
  },
36
36
  "files": [
@@ -11,12 +11,12 @@ import { Asset } from '@kolkrabbi/kol-brand/svg'
11
11
  // Pages can register right-rail TOC content via this context.
12
12
  // Usage: const setTocContent = useContext(ShellTocContext)
13
13
  // useLayoutEffect(() => { setTocContent(<MyToc />) ; return () => setTocContent(null) }, [])
14
- export const ShellTocContext = createContext(null)
14
+ export const ShellTocContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellTocContext')] ??= createContext(null))
15
15
 
16
16
  // Pages that need to fill the viewport (e.g. iframe embeds) can opt into full-height mode.
17
17
  // Usage: const setFullHeight = useContext(ShellFullHeightContext)
18
18
  // useLayoutEffect(() => { setFullHeight(true) ; return () => setFullHeight(false) }, [setFullHeight])
19
- export const ShellFullHeightContext = createContext(null)
19
+ export const ShellFullHeightContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellFullHeightContext')] ??= createContext(null))
20
20
 
21
21
  // WIDTH IS THE PAGE'S DECISION (user, 2026-08-26 — "there isnt one size fits
22
22
  // all … what I want is consistency, sometimes that is done by left align …
@@ -29,12 +29,12 @@ export const ShellFullHeightContext = createContext(null)
29
29
  // hero, a wall that should use the room it is given
30
30
  // Usage: const setContentWidth = useContext(ShellContentWidthContext)
31
31
  // useLayoutEffect(() => { setContentWidth('none') ; return () => setContentWidth('canvas') }, [setContentWidth])
32
- export const ShellContentWidthContext = createContext(null)
32
+ export const ShellContentWidthContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellContentWidthContext')] ??= createContext(null))
33
33
 
34
34
  // Pages can request the right sidebar to start collapsed.
35
35
  // Usage: const setTocCollapsed = useContext(ShellTocCollapsedContext)
36
36
  // useLayoutEffect(() => { setTocCollapsed(true) ; return () => setTocCollapsed(false) }, [setTocCollapsed])
37
- export const ShellTocCollapsedContext = createContext(null)
37
+ export const ShellTocCollapsedContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellTocCollapsedContext')] ??= createContext(null))
38
38
 
39
39
  // THE LEFT RAIL IS THE PAGE'S CALL TOO (2026-09-01). The TOC had this seam and
40
40
  // the nav did not, so a landing page could shed one rail and not the other —
@@ -43,7 +43,7 @@ export const ShellTocCollapsedContext = createContext(null)
43
43
  // the header's own toggles keep working on top of it.
44
44
  // Usage: const setNavCollapsed = useContext(ShellNavCollapsedContext)
45
45
  // useLayoutEffect(() => { setNavCollapsed(true) ; return () => setNavCollapsed(false) }, [setNavCollapsed])
46
- export const ShellNavCollapsedContext = createContext(null)
46
+ export const ShellNavCollapsedContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellNavCollapsedContext')] ??= createContext(null))
47
47
 
48
48
  /* THE PAGE TELLS THE RAIL WHAT IT IS ABOUT (2026-09-28, user: "the purpose of
49
49
  * the right sidebar is to list that pages content and context"). The right
@@ -54,7 +54,7 @@ export const ShellNavCollapsedContext = createContext(null)
54
54
  * const meta = usePageMetaValue() — in a rail
55
55
  * Cleared on unmount, so a page that says nothing gets an empty context, never
56
56
  * the previous page's. */
57
- const ShellPageMetaContext = createContext({ meta: null, setMeta: null })
57
+ const ShellPageMetaContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellPageMetaContext')] ??= createContext({ meta: null, setMeta: null }))
58
58
 
59
59
  export function usePageMeta(meta) {
60
60
  const { setMeta } = useContext(ShellPageMetaContext)
@@ -32,7 +32,7 @@ export const RAIL_FOLD_EVENT = 'kol-rail-fold'
32
32
  * provides the state; every ShellSidebar inside it reads it, so a consumer's rail takes the state
33
33
  * without passing a prop. Outside a provider a rail is `open`, as it always was. A third value,
34
34
  * `full`, is the whole-tree sheet's: an open rail with every fold open. */
35
- export const ShellRailModeContext = createContext('open')
35
+ export const ShellRailModeContext = (globalThis[Symbol.for('@kolkrabbi/kol-workshop/ShellRailModeContext')] ??= createContext('open'))
36
36
 
37
37
  const ShellSidebar = ({ routes = [], basePath = '/', onNavigate, label = 'Navigation', labelTo, collapsed, onToggle, defaultCollapsed = false }) => {
38
38
  const location = useLocation()