@uniweb/kit 0.5.8 → 0.5.10
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
|
@@ -104,12 +104,13 @@ async function loadShiki() {
|
|
|
104
104
|
|
|
105
105
|
shikiLoadPromise = (async () => {
|
|
106
106
|
try {
|
|
107
|
-
|
|
107
|
+
// Use shiki/bundle/full for access to all themes
|
|
108
|
+
const { createHighlighter } = await import('shiki/bundle/full')
|
|
108
109
|
|
|
109
|
-
// Create highlighter with
|
|
110
|
+
// Create highlighter with github-dark theme (bundled, looks good for code)
|
|
110
111
|
// Only load common languages initially, others load on-demand
|
|
111
112
|
shikiInstance = await createHighlighter({
|
|
112
|
-
themes: ['
|
|
113
|
+
themes: ['github-dark'],
|
|
113
114
|
langs: [
|
|
114
115
|
'javascript',
|
|
115
116
|
'typescript',
|
|
@@ -155,14 +156,14 @@ async function highlightCode(code, language, highlighter) {
|
|
|
155
156
|
// Language not available, fall back to plaintext
|
|
156
157
|
return highlighter.codeToHtml(code, {
|
|
157
158
|
lang: 'plaintext',
|
|
158
|
-
theme: '
|
|
159
|
+
theme: 'github-dark',
|
|
159
160
|
})
|
|
160
161
|
}
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
return highlighter.codeToHtml(code, {
|
|
164
165
|
lang: lang === 'plaintext' ? 'text' : lang,
|
|
165
|
-
theme: '
|
|
166
|
+
theme: 'github-dark',
|
|
166
167
|
})
|
|
167
168
|
} catch (error) {
|
|
168
169
|
console.warn('[Code] Highlighting failed:', error)
|