Skip to content

Commit

Permalink
feat: update themes and grammars
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Jun 28, 2024
1 parent abe639d commit 02bf017
Show file tree
Hide file tree
Showing 10 changed files with 645 additions and 241 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"pinia": "^2.1.7",
"shiki": "workspace:*",
"unocss": "^0.61.0",
"unplugin-vue-components": "^0.27.1",
"unplugin-vue-components": "^0.27.2",
"vitepress": "^1.2.3",
"vue": "^3.4.30"
"vue": "^3.4.31"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"devDependencies": {
"@antfu/eslint-config": "^2.21.1",
"@antfu/ni": "^0.21.12",
"@antfu/utils": "^0.7.8",
"@antfu/utils": "^0.7.10",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-json": "^6.1.0",
Expand All @@ -30,7 +30,7 @@
"@shikijs/vitepress-twoslash": "workspace:*",
"@types/fs-extra": "^11.0.4",
"@types/hast": "^3.0.4",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@vitest/coverage-v8": "^1.6.0",
"ansi-sequence-parser": "^1.1.1",
"bumpp": "^9.4.1",
Expand All @@ -56,15 +56,15 @@
"rollup-plugin-typescript2": "^0.36.0",
"shiki": "workspace:*",
"simple-git-hooks": "^2.11.1",
"taze": "^0.13.8",
"taze": "^0.13.9",
"typescript": "^5.5.2",
"unbuild": "^2.0.0",
"vite": "^5.3.1",
"vite": "^5.3.2",
"vite-tsconfig-paths": "^4.3.2",
"vitepress-plugin-mermaid": "^2.0.16",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.22",
"wrangler": "^3.61.0"
"wrangler": "^3.62.0"
},
"resolutions": {
"@shikijs/compat": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/monaco/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
},
"devDependencies": {
"typescript": "^5.5.2",
"vite": "^5.3.1"
"vite": "^5.3.2"
}
}
4 changes: 2 additions & 2 deletions packages/shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
"@shikijs/core": "workspace:*"
},
"devDependencies": {
"tm-grammars": "^1.12.12",
"tm-themes": "^1.4.3",
"tm-grammars": "^1.13.0",
"tm-themes": "^1.5.0",
"vscode-oniguruma": "^1.7.0"
}
}
18 changes: 18 additions & 0 deletions packages/shiki/src/assets/langs-bundle-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
'name': 'Dream Maker',
'import': (() => import('./langs/dream-maker')) as DynamicImportLanguageRegistration
},
{
'id': 'edge',
'name': 'Edge',
'import': (() => import('./langs/edge')) as DynamicImportLanguageRegistration
},
{
'id': 'elixir',
'name': 'Elixir',
Expand Down Expand Up @@ -628,6 +633,11 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
'name': 'Lua',
'import': (() => import('./langs/lua')) as DynamicImportLanguageRegistration
},
{
'id': 'luau',
'name': 'Luau',
'import': (() => import('./langs/luau')) as DynamicImportLanguageRegistration
},
{
'id': 'make',
'name': 'Makefile',
Expand Down Expand Up @@ -1043,6 +1053,11 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
'name': 'Tcl',
'import': (() => import('./langs/tcl')) as DynamicImportLanguageRegistration
},
{
'id': 'templ',
'name': 'Templ',
'import': (() => import('./langs/templ')) as DynamicImportLanguageRegistration
},
{
'id': 'terraform',
'name': 'Terraform',
Expand Down Expand Up @@ -1291,6 +1306,7 @@ export type BundledLanguage =
| 'docker'
| 'dockerfile'
| 'dream-maker'
| 'edge'
| 'elisp'
| 'elixir'
| 'elm'
Expand Down Expand Up @@ -1378,6 +1394,7 @@ export type BundledLanguage =
| 'log'
| 'logo'
| 'lua'
| 'luau'
| 'make'
| 'makefile'
| 'markdown'
Expand Down Expand Up @@ -1471,6 +1488,7 @@ export type BundledLanguage =
| 'systemd'
| 'tasl'
| 'tcl'
| 'templ'
| 'terraform'
| 'tex'
| 'tf'
Expand Down
6 changes: 6 additions & 0 deletions packages/shiki/src/assets/langs-bundle-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [
'name': 'CSS',
'import': (() => import('./langs/css')) as DynamicImportLanguageRegistration
},
{
'id': 'edge',
'name': 'Edge',
'import': (() => import('./langs/edge')) as DynamicImportLanguageRegistration
},
{
'id': 'glsl',
'name': 'GLSL',
Expand Down Expand Up @@ -330,6 +335,7 @@ export type BundledLanguage =
| 'coffeescript'
| 'cpp'
| 'css'
| 'edge'
| 'glsl'
| 'gql'
| 'graphql'
Expand Down
7 changes: 7 additions & 0 deletions packages/shiki/src/assets/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ export const bundledThemesInfo: BundledThemeInfo[] = [
"type": "dark",
"import": (() => import('./themes/houston')) as unknown as DynamicImportThemeRegistration
},
{
"id": "laserwave",
"displayName": "LaserWave",
"type": "dark",
"import": (() => import('./themes/laserwave')) as unknown as DynamicImportThemeRegistration
},
{
"id": "light-plus",
"displayName": "Light Plus",
Expand Down Expand Up @@ -291,6 +297,7 @@ export type BundledTheme =
| 'github-light'
| 'github-light-default'
| 'houston'
| 'laserwave'
| 'light-plus'
| 'material-theme'
| 'material-theme-darker'
Expand Down
4 changes: 2 additions & 2 deletions packages/shiki/test/bundle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ it('bundle-full', async () => {
}))

expect(highlighter.getLoadedLanguages().length)
.toMatchInlineSnapshot(`293`)
.toMatchInlineSnapshot(`296`)
})

it('bundle-web', async () => {
Expand All @@ -17,5 +17,5 @@ it('bundle-web', async () => {
}))

expect(highlighter.getLoadedLanguages().length)
.toMatchInlineSnapshot(`81`)
.toMatchInlineSnapshot(`82`)
})
2 changes: 1 addition & 1 deletion packages/vitepress-twoslash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
"shiki": "workspace:*",
"twoslash": "^0.2.9",
"twoslash-vue": "^0.2.9",
"vue": "^3.4.30"
"vue": "^3.4.31"
}
}
Loading

0 comments on commit 02bf017

Please sign in to comment.