@kolkrabbi/kol-workshop 0.1.7 → 0.1.8

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.1.7",
3
+ "version": "0.1.8",
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",
@@ -13,11 +13,11 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "d3": "^7.9.0",
16
+ "@kolkrabbi/kol-component": "0.12.3",
17
+ "@kolkrabbi/kol-theme": "0.11.9",
18
+ "@kolkrabbi/kol-framework": "0.5.5",
16
19
  "@kolkrabbi/kol-brand": "^0.1.2",
17
- "@kolkrabbi/kol-icons": "0.7.0",
18
- "@kolkrabbi/kol-component": "0.12.0",
19
- "@kolkrabbi/kol-framework": "0.5.0",
20
- "@kolkrabbi/kol-theme": "0.11.1"
20
+ "@kolkrabbi/kol-icons": "0.8.3"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": "^18.3.0 || ^19.0.0",
@@ -0,0 +1,68 @@
1
+ /**
2
+ * DocKit — the Doc* composer family over the kol-theme `.kol-doc-*` role set
3
+ * (theme ≥ 0.11.9). The packaged successors of the showcase-local doc kit
4
+ * (2026-07-28 doc+card sets epic): thin composers, zero styling of their own —
5
+ * every text rule lives in kol-type-roles.css.
6
+ *
7
+ * DocHeader — eyebrow → h1 → lede page header
8
+ * DocSection — anchored section: rule + h2 + optional lede + content
9
+ * DocTable — the props table (Prop / Type / Default / Description)
10
+ * DocFigure — framed content container + optional caption
11
+ */
12
+
13
+ export function DocHeader({ eyebrow, title, lede, children }) {
14
+ return (
15
+ <header className="flex flex-col gap-3">
16
+ {eyebrow && <p className="kol-doc-eyebrow">{eyebrow}</p>}
17
+ <h1 className="kol-doc-heading">{title}</h1>
18
+ {lede && <p className="kol-doc-lede">{lede}</p>}
19
+ {children}
20
+ </header>
21
+ )
22
+ }
23
+
24
+ export function DocSection({ id, title, lede, children }) {
25
+ return (
26
+ <section id={id} className="flex flex-col gap-4 border-t border-fg-08 pt-8 scroll-mt-20">
27
+ {title && <h2 className="kol-doc-section-title">{title}</h2>}
28
+ {lede && <p className="kol-doc-body max-w-[65ch]">{lede}</p>}
29
+ {children}
30
+ </section>
31
+ )
32
+ }
33
+
34
+ export function DocTable({ rows }) {
35
+ if (!rows?.length) return null
36
+ return (
37
+ <div className="kol-doc-figure overflow-x-auto">
38
+ <table className="kol-doc-table">
39
+ <thead>
40
+ <tr>
41
+ {['Prop', 'Type', 'Default', 'Description'].map((h) => (
42
+ <th key={h}>{h}</th>
43
+ ))}
44
+ </tr>
45
+ </thead>
46
+ <tbody>
47
+ {rows.map((r) => (
48
+ <tr key={r.prop}>
49
+ <td className="kol-doc-table-value text-emphasis">{r.prop}</td>
50
+ <td className="kol-doc-table-value !whitespace-normal text-meta">{r.type}</td>
51
+ <td className="kol-doc-table-value text-meta">{r.def}</td>
52
+ <td>{r.desc}</td>
53
+ </tr>
54
+ ))}
55
+ </tbody>
56
+ </table>
57
+ </div>
58
+ )
59
+ }
60
+
61
+ export function DocFigure({ caption, className = '', children }) {
62
+ return (
63
+ <figure className={`kol-doc-figure ${className}`}>
64
+ {children}
65
+ {caption && <figcaption className="kol-doc-caption border-t border-fg-08 px-4 py-2.5">{caption}</figcaption>}
66
+ </figure>
67
+ )
68
+ }
package/src/docs/index.js CHANGED
@@ -12,3 +12,4 @@ export { default as DocsArticle } from './DocsArticle.jsx'
12
12
  export { default as DocsHeader } from './DocsHeader.jsx'
13
13
  export { default as DocsFrontmatter } from './DocsFrontmatter.jsx'
14
14
  export { renderInlineTokens } from './render-tokens.jsx'
15
+ export { DocHeader, DocSection, DocTable, DocFigure } from './DocKit.jsx'