@kolkrabbi/kol-workshop 0.1.8 → 0.1.9
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 +4 -4
- package/src/docs/DocKit.jsx +21 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kolkrabbi/kol-workshop",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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,10 +13,10 @@
|
|
|
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",
|
|
19
16
|
"@kolkrabbi/kol-brand": "^0.1.2",
|
|
17
|
+
"@kolkrabbi/kol-component": "0.12.3",
|
|
18
|
+
"@kolkrabbi/kol-framework": "0.5.6",
|
|
19
|
+
"@kolkrabbi/kol-theme": "0.11.11",
|
|
20
20
|
"@kolkrabbi/kol-icons": "0.8.3"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
package/src/docs/DocKit.jsx
CHANGED
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
* DocFigure — framed content container + optional caption
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
+
import { Table } from '@kolkrabbi/kol-component'
|
|
14
|
+
|
|
13
15
|
export function DocHeader({ eyebrow, title, lede, children }) {
|
|
14
16
|
return (
|
|
15
17
|
<header className="flex flex-col gap-3">
|
|
@@ -31,29 +33,29 @@ export function DocSection({ id, title, lede, children }) {
|
|
|
31
33
|
)
|
|
32
34
|
}
|
|
33
35
|
|
|
36
|
+
/* DocTable — a PRESET over the kol-component Table (the one table; 2026-07-28
|
|
37
|
+
* user ruling: no parallel table markup). Fixed props-table columns, doc cell
|
|
38
|
+
* classes through Table's per-column seams, doc chrome via the .kol-doc-table
|
|
39
|
+
* class on Table's wrapper (the descendant rules out-specify Table's cell
|
|
40
|
+
* defaults). The .kol-doc-figure frame supplies the border. */
|
|
41
|
+
const PROPS_COLUMNS = [
|
|
42
|
+
{ accessor: 'prop', header: 'Prop', className: 'kol-doc-table-value text-emphasis' },
|
|
43
|
+
{ accessor: 'type', header: 'Type', className: 'kol-doc-table-value kol-doc-table-value--wrap text-meta' },
|
|
44
|
+
{ accessor: 'def', header: 'Default', className: 'kol-doc-table-value text-meta' },
|
|
45
|
+
{ accessor: 'desc', header: 'Description' },
|
|
46
|
+
]
|
|
47
|
+
|
|
34
48
|
export function DocTable({ rows }) {
|
|
35
49
|
if (!rows?.length) return null
|
|
36
50
|
return (
|
|
37
51
|
<div className="kol-doc-figure overflow-x-auto">
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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>
|
|
52
|
+
<Table
|
|
53
|
+
variant="simple"
|
|
54
|
+
caption="Props"
|
|
55
|
+
columns={PROPS_COLUMNS}
|
|
56
|
+
rows={rows.map((r) => ({ id: r.prop, ...r }))}
|
|
57
|
+
className="kol-doc-table"
|
|
58
|
+
/>
|
|
57
59
|
</div>
|
|
58
60
|
)
|
|
59
61
|
}
|