@kolkrabbi/kol-workshop 0.2.1 → 0.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kolkrabbi/kol-workshop",
3
- "version": "0.2.1",
3
+ "version": "0.3.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",
@@ -14,10 +14,10 @@
14
14
  "dependencies": {
15
15
  "d3": "^7.9.0",
16
16
  "@kolkrabbi/kol-brand": "^0.1.2",
17
+ "@kolkrabbi/kol-framework": "0.6.4",
17
18
  "@kolkrabbi/kol-icons": "0.8.10",
18
- "@kolkrabbi/kol-framework": "0.6.2",
19
- "@kolkrabbi/kol-theme": "0.12.0",
20
- "@kolkrabbi/kol-component": "0.12.19"
19
+ "@kolkrabbi/kol-component": "0.13.1",
20
+ "@kolkrabbi/kol-theme": "0.12.1"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": "^18.3.0 || ^19.0.0",
@@ -46,7 +46,7 @@ const TocColumn = ({ children }) => (
46
46
  </aside>
47
47
  )
48
48
 
49
- const ShellLayout = ({ routes = [], basePath = '/', brandLogoSrc, brandLogoAlt = '', renderSidebar, searchItems, defaultTocContent, isActive: isActiveProp }) => {
49
+ const ShellLayout = ({ routes = [], basePath = '/', brand: brandProp, brandLogoSrc, brandLogoAlt = '', renderSidebar, searchItems, defaultTocContent, isActive: isActiveProp, actions }) => {
50
50
  const [isNavDrawerOpen, setIsNavDrawerOpen] = useState(false)
51
51
  const [navCollapsed, setNavCollapsed] = useState(false)
52
52
  const [tocCollapsed, setTocCollapsed] = useState(false)
@@ -104,7 +104,10 @@ const ShellLayout = ({ routes = [], basePath = '/', brandLogoSrc, brandLogoAlt =
104
104
  navigate(item.href)
105
105
  }
106
106
  }
107
- const brand = brandLogoSrc ? (
107
+ /* `brand` takes any node — a consumer that isn't the workshop needs its own
108
+ * wordmark, and brandLogoSrc only ever accepted an <img>. Falls back to the
109
+ * logo-src form, then to the KOLKRABBI + WORKSHOP pair. */
110
+ const brand = brandProp ?? (brandLogoSrc ? (
108
111
  <Link to={basePath} className="shell-header-logo flex items-center text-emphasis">
109
112
  <img src={brandLogoSrc} alt={brandLogoAlt} className="h-6 w-auto" />
110
113
  </Link>
@@ -120,11 +123,16 @@ const ShellLayout = ({ routes = [], basePath = '/', brandLogoSrc, brandLogoAlt =
120
123
  <Asset name="wordmark-workshop" title="Workshop" className="inline-flex [&>svg]:h-6 [&>svg]:w-auto" />
121
124
  </Link>
122
125
  </>
123
- )
126
+ ))
127
+ /* Consumer `actions` sit BEFORE the search trigger in row 1 — a showcase
128
+ * needs its own controls (repo link, etc.) beside the shell's. */
124
129
  const searchTrigger = (
125
- <Tooltip label="Search">
126
- <Button variant="ghost" quiet iconOnly="search" iconSize={18} onClick={() => setIsSearchOpen(true)} aria-label="Search" />
127
- </Tooltip>
130
+ <>
131
+ {actions}
132
+ <Tooltip label="Search">
133
+ <Button variant="ghost" quiet iconOnly="search" iconSize={18} onClick={() => setIsSearchOpen(true)} aria-label="Search" />
134
+ </Tooltip>
135
+ </>
128
136
  )
129
137
 
130
138
  /* searchItems ({ id, label, href, sectionLabel?, tags?, headings?, keywords? })