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