@kolkrabbi/kol-component 0.14.0 → 0.14.1
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-component",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"description": "KOL design-system components — atoms through organisms, emitting canonical kol-* classes. Pairs with @kolkrabbi/kol-theme for styling.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -62,7 +62,10 @@ const syntaxTheme = (foregroundToken = 80) => ({
|
|
|
62
62
|
}
|
|
63
63
|
})
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
/* `bare` (2026-07-30): highlight + chip + copy WITHOUT the framed chrome — for
|
|
66
|
+
* hosts that already own the frame (PreviewCard's Code tab sat a full
|
|
67
|
+
* CodeBlock frame inside the kol-doc-figure border: frame-in-frame). */
|
|
68
|
+
export default function CodeBlock({ children, code: codeProp, language: languageProp, filename: filenameProp, value, bare = false }) {
|
|
66
69
|
const [copied, setCopied] = useState(false)
|
|
67
70
|
|
|
68
71
|
const code = String(value?.code ?? codeProp ?? children ?? '')
|
|
@@ -80,8 +83,8 @@ export default function CodeBlock({ children, code: codeProp, language: language
|
|
|
80
83
|
}
|
|
81
84
|
|
|
82
85
|
return (
|
|
83
|
-
<div className=
|
|
84
|
-
<div className=
|
|
86
|
+
<div className={bare ? '' : 'kol-codeblock-wrapper'}>
|
|
87
|
+
<div className={`kol-codeblock${bare ? ' kol-codeblock--bare' : ''}`}>
|
|
85
88
|
{(filename || (language && language !== 'text')) && (
|
|
86
89
|
<div className="kol-codeblock-filename">{filename || language}</div>
|
|
87
90
|
)}
|