diff --git a/packages/langs/README.md b/packages/langs/README.md new file mode 100644 index 000000000..40b2f3f18 --- /dev/null +++ b/packages/langs/README.md @@ -0,0 +1,7 @@ +# @shikijs/langs + +TextMate grammars for Shiki. + +## License + +MIT diff --git a/packages/langs/package.json b/packages/langs/package.json new file mode 100644 index 000000000..d7d6e8beb --- /dev/null +++ b/packages/langs/package.json @@ -0,0 +1,355 @@ +{ + "name": "@shikijs/langs", + "type": "module", + "version": "1.24.4", + "description": "TextMate grammars for Shiki in ESM", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/shikijs/shiki#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/shikijs/shiki.git", + "directory": "packages/langs" + }, + "bugs": "https://github.com/shikijs/shiki/issues", + "keywords": [ + "shiki", + "textmate-grammars" + ], + "sideEffects": false, + "exports": { + ".": "./dist/index.mjs", + "./abap": "./dist/abap.mjs", + "./actionscript-3": "./dist/actionscript-3.mjs", + "./ada": "./dist/ada.mjs", + "./angular-expression": "./dist/angular-expression.mjs", + "./angular-html": "./dist/angular-html.mjs", + "./angular-inline-style": "./dist/angular-inline-style.mjs", + "./angular-inline-template": "./dist/angular-inline-template.mjs", + "./angular-let-declaration": "./dist/angular-let-declaration.mjs", + "./angular-template-blocks": "./dist/angular-template-blocks.mjs", + "./angular-template": "./dist/angular-template.mjs", + "./angular-ts": "./dist/angular-ts.mjs", + "./apache": "./dist/apache.mjs", + "./apex": "./dist/apex.mjs", + "./apl": "./dist/apl.mjs", + "./applescript": "./dist/applescript.mjs", + "./ara": "./dist/ara.mjs", + "./adoc": "./dist/adoc.mjs", + "./asciidoc": "./dist/asciidoc.mjs", + "./asm": "./dist/asm.mjs", + "./astro": "./dist/astro.mjs", + "./awk": "./dist/awk.mjs", + "./ballerina": "./dist/ballerina.mjs", + "./batch": "./dist/batch.mjs", + "./bat": "./dist/bat.mjs", + "./beancount": "./dist/beancount.mjs", + "./be": "./dist/be.mjs", + "./berry": "./dist/berry.mjs", + "./bibtex": "./dist/bibtex.mjs", + "./bicep": "./dist/bicep.mjs", + "./blade": "./dist/blade.mjs", + "./1c": "./dist/1c.mjs", + "./bsl": "./dist/bsl.mjs", + "./c": "./dist/c.mjs", + "./cdc": "./dist/cdc.mjs", + "./cadence": "./dist/cadence.mjs", + "./cairo": "./dist/cairo.mjs", + "./clarity": "./dist/clarity.mjs", + "./clj": "./dist/clj.mjs", + "./clojure": "./dist/clojure.mjs", + "./cmake": "./dist/cmake.mjs", + "./cobol": "./dist/cobol.mjs", + "./codeowners": "./dist/codeowners.mjs", + "./ql": "./dist/ql.mjs", + "./codeql": "./dist/codeql.mjs", + "./coffeescript": "./dist/coffeescript.mjs", + "./coffee": "./dist/coffee.mjs", + "./lisp": "./dist/lisp.mjs", + "./common-lisp": "./dist/common-lisp.mjs", + "./coq": "./dist/coq.mjs", + "./cpp-macro": "./dist/cpp-macro.mjs", + "./cpp": "./dist/cpp.mjs", + "./crystal": "./dist/crystal.mjs", + "./cs": "./dist/cs.mjs", + "./csharp": "./dist/csharp.mjs", + "./css": "./dist/css.mjs", + "./csv": "./dist/csv.mjs", + "./cue": "./dist/cue.mjs", + "./cql": "./dist/cql.mjs", + "./cypher": "./dist/cypher.mjs", + "./d": "./dist/d.mjs", + "./dart": "./dist/dart.mjs", + "./dax": "./dist/dax.mjs", + "./desktop": "./dist/desktop.mjs", + "./diff": "./dist/diff.mjs", + "./dockerfile": "./dist/dockerfile.mjs", + "./docker": "./dist/docker.mjs", + "./dotenv": "./dist/dotenv.mjs", + "./dream-maker": "./dist/dream-maker.mjs", + "./edge": "./dist/edge.mjs", + "./elixir": "./dist/elixir.mjs", + "./elm": "./dist/elm.mjs", + "./elisp": "./dist/elisp.mjs", + "./emacs-lisp": "./dist/emacs-lisp.mjs", + "./erb": "./dist/erb.mjs", + "./erl": "./dist/erl.mjs", + "./erlang": "./dist/erlang.mjs", + "./es-tag-css": "./dist/es-tag-css.mjs", + "./es-tag-glsl": "./dist/es-tag-glsl.mjs", + "./es-tag-html": "./dist/es-tag-html.mjs", + "./es-tag-sql": "./dist/es-tag-sql.mjs", + "./es-tag-xml": "./dist/es-tag-xml.mjs", + "./fennel": "./dist/fennel.mjs", + "./fish": "./dist/fish.mjs", + "./ftl": "./dist/ftl.mjs", + "./fluent": "./dist/fluent.mjs", + "./f": "./dist/f.mjs", + "./for": "./dist/for.mjs", + "./f77": "./dist/f77.mjs", + "./fortran-fixed-form": "./dist/fortran-fixed-form.mjs", + "./f90": "./dist/f90.mjs", + "./f95": "./dist/f95.mjs", + "./f03": "./dist/f03.mjs", + "./f08": "./dist/f08.mjs", + "./f18": "./dist/f18.mjs", + "./fortran-free-form": "./dist/fortran-free-form.mjs", + "./fs": "./dist/fs.mjs", + "./fsharp": "./dist/fsharp.mjs", + "./gdresource": "./dist/gdresource.mjs", + "./gdscript": "./dist/gdscript.mjs", + "./gdshader": "./dist/gdshader.mjs", + "./genie": "./dist/genie.mjs", + "./gherkin": "./dist/gherkin.mjs", + "./git-commit": "./dist/git-commit.mjs", + "./git-rebase": "./dist/git-rebase.mjs", + "./gleam": "./dist/gleam.mjs", + "./gjs": "./dist/gjs.mjs", + "./glimmer-js": "./dist/glimmer-js.mjs", + "./gts": "./dist/gts.mjs", + "./glimmer-ts": "./dist/glimmer-ts.mjs", + "./glsl": "./dist/glsl.mjs", + "./gnuplot": "./dist/gnuplot.mjs", + "./go": "./dist/go.mjs", + "./gql": "./dist/gql.mjs", + "./graphql": "./dist/graphql.mjs", + "./groovy": "./dist/groovy.mjs", + "./hack": "./dist/hack.mjs", + "./haml": "./dist/haml.mjs", + "./hbs": "./dist/hbs.mjs", + "./handlebars": "./dist/handlebars.mjs", + "./hs": "./dist/hs.mjs", + "./haskell": "./dist/haskell.mjs", + "./haxe": "./dist/haxe.mjs", + "./hcl": "./dist/hcl.mjs", + "./hjson": "./dist/hjson.mjs", + "./hlsl": "./dist/hlsl.mjs", + "./html-derivative": "./dist/html-derivative.mjs", + "./html": "./dist/html.mjs", + "./http": "./dist/http.mjs", + "./hxml": "./dist/hxml.mjs", + "./hy": "./dist/hy.mjs", + "./imba": "./dist/imba.mjs", + "./properties": "./dist/properties.mjs", + "./ini": "./dist/ini.mjs", + "./java": "./dist/java.mjs", + "./js": "./dist/js.mjs", + "./javascript": "./dist/javascript.mjs", + "./jinja-html": "./dist/jinja-html.mjs", + "./jinja": "./dist/jinja.mjs", + "./jison": "./dist/jison.mjs", + "./json": "./dist/json.mjs", + "./json5": "./dist/json5.mjs", + "./jsonc": "./dist/jsonc.mjs", + "./jsonl": "./dist/jsonl.mjs", + "./jsonnet": "./dist/jsonnet.mjs", + "./fsl": "./dist/fsl.mjs", + "./jssm": "./dist/jssm.mjs", + "./jsx": "./dist/jsx.mjs", + "./jl": "./dist/jl.mjs", + "./julia": "./dist/julia.mjs", + "./kt": "./dist/kt.mjs", + "./kts": "./dist/kts.mjs", + "./kotlin": "./dist/kotlin.mjs", + "./kql": "./dist/kql.mjs", + "./kusto": "./dist/kusto.mjs", + "./latex": "./dist/latex.mjs", + "./lean4": "./dist/lean4.mjs", + "./lean": "./dist/lean.mjs", + "./less": "./dist/less.mjs", + "./liquid": "./dist/liquid.mjs", + "./log": "./dist/log.mjs", + "./logo": "./dist/logo.mjs", + "./lua": "./dist/lua.mjs", + "./luau": "./dist/luau.mjs", + "./makefile": "./dist/makefile.mjs", + "./make": "./dist/make.mjs", + "./markdown-vue": "./dist/markdown-vue.mjs", + "./md": "./dist/md.mjs", + "./markdown": "./dist/markdown.mjs", + "./marko": "./dist/marko.mjs", + "./matlab": "./dist/matlab.mjs", + "./mdc": "./dist/mdc.mjs", + "./mdx": "./dist/mdx.mjs", + "./mmd": "./dist/mmd.mjs", + "./mermaid": "./dist/mermaid.mjs", + "./mips": "./dist/mips.mjs", + "./mipsasm": "./dist/mipsasm.mjs", + "./mojo": "./dist/mojo.mjs", + "./move": "./dist/move.mjs", + "./nar": "./dist/nar.mjs", + "./narrat": "./dist/narrat.mjs", + "./nf": "./dist/nf.mjs", + "./nextflow": "./dist/nextflow.mjs", + "./nginx": "./dist/nginx.mjs", + "./nim": "./dist/nim.mjs", + "./nix": "./dist/nix.mjs", + "./nu": "./dist/nu.mjs", + "./nushell": "./dist/nushell.mjs", + "./objc": "./dist/objc.mjs", + "./objective-c": "./dist/objective-c.mjs", + "./objective-cpp": "./dist/objective-cpp.mjs", + "./ocaml": "./dist/ocaml.mjs", + "./pascal": "./dist/pascal.mjs", + "./perl": "./dist/perl.mjs", + "./php": "./dist/php.mjs", + "./plsql": "./dist/plsql.mjs", + "./pot": "./dist/pot.mjs", + "./potx": "./dist/potx.mjs", + "./po": "./dist/po.mjs", + "./postcss": "./dist/postcss.mjs", + "./powerquery": "./dist/powerquery.mjs", + "./ps": "./dist/ps.mjs", + "./ps1": "./dist/ps1.mjs", + "./powershell": "./dist/powershell.mjs", + "./prisma": "./dist/prisma.mjs", + "./prolog": "./dist/prolog.mjs", + "./protobuf": "./dist/protobuf.mjs", + "./proto": "./dist/proto.mjs", + "./jade": "./dist/jade.mjs", + "./pug": "./dist/pug.mjs", + "./puppet": "./dist/puppet.mjs", + "./purescript": "./dist/purescript.mjs", + "./py": "./dist/py.mjs", + "./python": "./dist/python.mjs", + "./qml": "./dist/qml.mjs", + "./qmldir": "./dist/qmldir.mjs", + "./qss": "./dist/qss.mjs", + "./r": "./dist/r.mjs", + "./racket": "./dist/racket.mjs", + "./perl6": "./dist/perl6.mjs", + "./raku": "./dist/raku.mjs", + "./razor": "./dist/razor.mjs", + "./reg": "./dist/reg.mjs", + "./regex": "./dist/regex.mjs", + "./regexp": "./dist/regexp.mjs", + "./rel": "./dist/rel.mjs", + "./riscv": "./dist/riscv.mjs", + "./rst": "./dist/rst.mjs", + "./rb": "./dist/rb.mjs", + "./ruby": "./dist/ruby.mjs", + "./rs": "./dist/rs.mjs", + "./rust": "./dist/rust.mjs", + "./sas": "./dist/sas.mjs", + "./sass": "./dist/sass.mjs", + "./scala": "./dist/scala.mjs", + "./scheme": "./dist/scheme.mjs", + "./scss": "./dist/scss.mjs", + "./1c-query": "./dist/1c-query.mjs", + "./sdbl": "./dist/sdbl.mjs", + "./shader": "./dist/shader.mjs", + "./shaderlab": "./dist/shaderlab.mjs", + "./bash": "./dist/bash.mjs", + "./sh": "./dist/sh.mjs", + "./shell": "./dist/shell.mjs", + "./zsh": "./dist/zsh.mjs", + "./shellscript": "./dist/shellscript.mjs", + "./console": "./dist/console.mjs", + "./shellsession": "./dist/shellsession.mjs", + "./smalltalk": "./dist/smalltalk.mjs", + "./solidity": "./dist/solidity.mjs", + "./closure-templates": "./dist/closure-templates.mjs", + "./soy": "./dist/soy.mjs", + "./sparql": "./dist/sparql.mjs", + "./spl": "./dist/spl.mjs", + "./splunk": "./dist/splunk.mjs", + "./sql": "./dist/sql.mjs", + "./ssh-config": "./dist/ssh-config.mjs", + "./stata": "./dist/stata.mjs", + "./styl": "./dist/styl.mjs", + "./stylus": "./dist/stylus.mjs", + "./svelte": "./dist/svelte.mjs", + "./swift": "./dist/swift.mjs", + "./system-verilog": "./dist/system-verilog.mjs", + "./systemd": "./dist/systemd.mjs", + "./talon": "./dist/talon.mjs", + "./talonscript": "./dist/talonscript.mjs", + "./tasl": "./dist/tasl.mjs", + "./tcl": "./dist/tcl.mjs", + "./templ": "./dist/templ.mjs", + "./tf": "./dist/tf.mjs", + "./tfvars": "./dist/tfvars.mjs", + "./terraform": "./dist/terraform.mjs", + "./tex": "./dist/tex.mjs", + "./toml": "./dist/toml.mjs", + "./lit": "./dist/lit.mjs", + "./ts-tags": "./dist/ts-tags.mjs", + "./tsv": "./dist/tsv.mjs", + "./tsx": "./dist/tsx.mjs", + "./turtle": "./dist/turtle.mjs", + "./twig": "./dist/twig.mjs", + "./ts": "./dist/ts.mjs", + "./typescript": "./dist/typescript.mjs", + "./tsp": "./dist/tsp.mjs", + "./typespec": "./dist/typespec.mjs", + "./typ": "./dist/typ.mjs", + "./typst": "./dist/typst.mjs", + "./v": "./dist/v.mjs", + "./vala": "./dist/vala.mjs", + "./cmd": "./dist/cmd.mjs", + "./vb": "./dist/vb.mjs", + "./verilog": "./dist/verilog.mjs", + "./vhdl": "./dist/vhdl.mjs", + "./vim": "./dist/vim.mjs", + "./vimscript": "./dist/vimscript.mjs", + "./viml": "./dist/viml.mjs", + "./vue-directives": "./dist/vue-directives.mjs", + "./vue-html": "./dist/vue-html.mjs", + "./vue-interpolations": "./dist/vue-interpolations.mjs", + "./vue-sfc-style-variable-injection": "./dist/vue-sfc-style-variable-injection.mjs", + "./vue": "./dist/vue.mjs", + "./vy": "./dist/vy.mjs", + "./vyper": "./dist/vyper.mjs", + "./wasm": "./dist/wasm.mjs", + "./wenyan": "./dist/wenyan.mjs", + "./wgsl": "./dist/wgsl.mjs", + "./mediawiki": "./dist/mediawiki.mjs", + "./wiki": "./dist/wiki.mjs", + "./wikitext": "./dist/wikitext.mjs", + "./wl": "./dist/wl.mjs", + "./wolfram": "./dist/wolfram.mjs", + "./xml": "./dist/xml.mjs", + "./xsl": "./dist/xsl.mjs", + "./yml": "./dist/yml.mjs", + "./yaml": "./dist/yaml.mjs", + "./zenscript": "./dist/zenscript.mjs", + "./zig": "./dist/zig.mjs" + }, + "main": "./dist/index.mjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", + "files": [ + "dist" + ], + "scripts": { + "prepare": "esno scripts/prepare.ts", + "build": "pnpm prepare", + "prepublishOnly": "nr prepare" + }, + "dependencies": { + "@shikijs/types": "workspace:*" + }, + "devDependencies": { + "tm-grammars": "^1.21.10" + } +} diff --git a/packages/shiki/scripts/prepare/langs.ts b/packages/langs/scripts/langs.ts similarity index 82% rename from packages/shiki/scripts/prepare/langs.ts rename to packages/langs/scripts/langs.ts index b6b86067f..12424447d 100644 --- a/packages/shiki/scripts/prepare/langs.ts +++ b/packages/langs/scripts/langs.ts @@ -2,7 +2,6 @@ import type { LanguageRegistration } from '@shikijs/core' import fg from 'fast-glob' import fs from 'fs-extra' import { grammars, injections } from 'tm-grammars' -import { COMMENT_HEAD } from './constants' /** * Document-like languages that have embedded langs @@ -60,6 +59,7 @@ export async function prepareLangs() { allLangFiles.sort() const resolvedLangs: LanguageRegistration[] = [] + const exportedFileNames: string[] = [] for (const file of allLangFiles) { const content = await fs.readJSON(file) @@ -101,7 +101,7 @@ export async function prepareLangs() { ].join(',\n') || '' await fs.writeFile( - `./src/langs/${lang.name}.mjs`, + `./dist/${lang.name}.mjs`, `${deps.map(i => `import ${i.replace(/\W/g, '_')} from './${i}.mjs'`).join('\n')} const lang = Object.freeze(JSON.parse(${JSON.stringify(JSON.stringify(json))})) @@ -115,7 +115,7 @@ export default [\n${depsStr}\n] if (isInvalidFilename(alias)) continue await fs.writeFile( - `./src/langs/${alias}.mjs`, + `./dist/${alias}.mjs`, `/* Alias ${alias} for ${lang.name} */ export { default } from './${lang.name}.mjs' `, @@ -126,9 +126,10 @@ export { default } from './${lang.name}.mjs' for (const name of [...json.aliases || [], lang.name]) { if (isInvalidFilename(name)) continue + exportedFileNames.push(name) await fs.writeFile( - `./src/langs/${name}.d.mts`, - `import type { LanguageRegistration } from '@shikijs/core' + `./dist/${name}.d.mts`, + `import type { LanguageRegistration } from '@shikijs/types' const langs: LanguageRegistration [] export default langs `, @@ -137,6 +138,35 @@ export default langs } } + await fs.writeFile( + './dist/index.mjs', + `// Generated by scripts/prepare.ts + +export const languageNames = [ +${resolvedLangs.map(i => JSON.stringify(i.name)).join(',\n')} +] +`, + 'utf-8', + ) + + await fs.writeFile( + './dist/index.d.mts', + `export const languageNames: string[]`, + 'utf-8', + ) + + const packageJson = JSON.parse(await fs.readFile('./package.json', 'utf-8')) + packageJson.exports = { + '.': './dist/index.mjs', + ...Object.fromEntries( + exportedFileNames.map(i => [ + `./${i}`, + `./dist/${i}.mjs`, + ]), + ), + } + await fs.writeFile('./package.json', `${JSON.stringify(packageJson, null, 2)}\n`, 'utf-8') + async function writeLanguageBundleIndex( fileName: string, ids: string[], @@ -166,16 +196,18 @@ export default langs id: i.name, name: i.displayName || i.name, aliases: i.aliases, - import: `__(() => import('./langs/${i.name}.mjs')) as DynamicImportLanguageRegistration__`, + import: `__(() => import('@shikijs/langs/${i.name}')) as DynamicImportLanguageRegistration__`, }) as const) .sort((a, b) => a.id.localeCompare(b.id)) const type = info.flatMap(i => [...i.aliases || [], i.id]).sort().map(i => ` | '${i}'`).join('\n') + const COMMENT_HEAD = '// Generated by packages/langs/scripts/prepare.ts' + await fs.writeFile( - `src/${fileName}.ts`, + `../shiki/src/${fileName}.ts`, `${COMMENT_HEAD} -import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/core' +import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/types' export const bundledLanguagesInfo: BundledLanguageInfo[] = ${JSON.stringify(info, null, 2).replace(/"__|__"/g, '').replace(/"/g, '\'')} diff --git a/packages/langs/scripts/prepare.ts b/packages/langs/scripts/prepare.ts new file mode 100644 index 000000000..a6cda0ba9 --- /dev/null +++ b/packages/langs/scripts/prepare.ts @@ -0,0 +1,6 @@ +import fs from 'fs-extra' +import { prepareLangs } from './langs' + +await fs.ensureDir('./dist') +await fs.emptyDir('./dist') +await prepareLangs() diff --git a/packages/shiki/package.json b/packages/shiki/package.json index c1fa8b684..6d852a424 100644 --- a/packages/shiki/package.json +++ b/packages/shiki/package.json @@ -124,6 +124,8 @@ "@shikijs/core": "workspace:*", "@shikijs/engine-javascript": "workspace:*", "@shikijs/engine-oniguruma": "workspace:*", + "@shikijs/langs": "workspace:*", + "@shikijs/themes": "workspace:*", "@shikijs/types": "workspace:*", "@shikijs/vscode-textmate": "catalog:", "@types/hast": "catalog:" diff --git a/packages/shiki/scripts/prepare.ts b/packages/shiki/scripts/prepare.ts index 07a7ee092..0766174ea 100644 --- a/packages/shiki/scripts/prepare.ts +++ b/packages/shiki/scripts/prepare.ts @@ -1,10 +1,34 @@ +import { languageNames } from '@shikijs/langs' +import { themeNames } from '@shikijs/themes' import fs from 'fs-extra' -import { prepareLangs } from './prepare/langs' -import { prepareTheme } from './prepare/themes' await fs.ensureDir('./src/langs') await fs.emptyDir('./src/langs') await fs.ensureDir('./src/themes') await fs.emptyDir('./src/themes') -await prepareLangs() -await prepareTheme() + +for (const lang of languageNames) { + await fs.writeFile( + `./src/langs/${lang}.mjs`, + `export { default } from '@shikijs/langs/${lang}'\n`, + 'utf-8', + ) + await fs.writeFile( + `./src/langs/${lang}.d.mts`, + `export { default } from '@shikijs/langs/${lang}'\n`, + 'utf-8', + ) +} + +for (const theme of themeNames) { + await fs.writeFile( + `./src/themes/${theme}.mjs`, + `export { default } from '@shikijs/themes/${theme}'\n`, + 'utf-8', + ) + await fs.writeFile( + `./src/themes/${theme}.d.mts`, + `export { default } from '@shikijs/themes/${theme}'\n`, + 'utf-8', + ) +} diff --git a/packages/shiki/scripts/prepare/constants.ts b/packages/shiki/scripts/prepare/constants.ts deleted file mode 100644 index 7610b3db4..000000000 --- a/packages/shiki/scripts/prepare/constants.ts +++ /dev/null @@ -1 +0,0 @@ -export const COMMENT_HEAD = `// Generated by scripts/prepare.ts` diff --git a/packages/shiki/src/langs-bundle-full.ts b/packages/shiki/src/langs-bundle-full.ts index 64391defc..49a496b6e 100644 --- a/packages/shiki/src/langs-bundle-full.ts +++ b/packages/shiki/src/langs-bundle-full.ts @@ -1,56 +1,56 @@ -// Generated by scripts/prepare.ts -import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/core' +// Generated by packages/langs/scripts/prepare.ts +import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/types' export const bundledLanguagesInfo: BundledLanguageInfo[] = [ { 'id': 'abap', 'name': 'ABAP', - 'import': (() => import('./langs/abap.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/abap')) as DynamicImportLanguageRegistration }, { 'id': 'actionscript-3', 'name': 'ActionScript', - 'import': (() => import('./langs/actionscript-3.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/actionscript-3')) as DynamicImportLanguageRegistration }, { 'id': 'ada', 'name': 'Ada', - 'import': (() => import('./langs/ada.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ada')) as DynamicImportLanguageRegistration }, { 'id': 'angular-html', 'name': 'Angular HTML', - 'import': (() => import('./langs/angular-html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/angular-html')) as DynamicImportLanguageRegistration }, { 'id': 'angular-ts', 'name': 'Angular TypeScript', - 'import': (() => import('./langs/angular-ts.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/angular-ts')) as DynamicImportLanguageRegistration }, { 'id': 'apache', 'name': 'Apache Conf', - 'import': (() => import('./langs/apache.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/apache')) as DynamicImportLanguageRegistration }, { 'id': 'apex', 'name': 'Apex', - 'import': (() => import('./langs/apex.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/apex')) as DynamicImportLanguageRegistration }, { 'id': 'apl', 'name': 'APL', - 'import': (() => import('./langs/apl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/apl')) as DynamicImportLanguageRegistration }, { 'id': 'applescript', 'name': 'AppleScript', - 'import': (() => import('./langs/applescript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/applescript')) as DynamicImportLanguageRegistration }, { 'id': 'ara', 'name': 'Ara', - 'import': (() => import('./langs/ara.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ara')) as DynamicImportLanguageRegistration }, { 'id': 'asciidoc', @@ -58,27 +58,27 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'adoc' ], - 'import': (() => import('./langs/asciidoc.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/asciidoc')) as DynamicImportLanguageRegistration }, { 'id': 'asm', 'name': 'Assembly', - 'import': (() => import('./langs/asm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/asm')) as DynamicImportLanguageRegistration }, { 'id': 'astro', 'name': 'Astro', - 'import': (() => import('./langs/astro.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/astro')) as DynamicImportLanguageRegistration }, { 'id': 'awk', 'name': 'AWK', - 'import': (() => import('./langs/awk.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/awk')) as DynamicImportLanguageRegistration }, { 'id': 'ballerina', 'name': 'Ballerina', - 'import': (() => import('./langs/ballerina.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ballerina')) as DynamicImportLanguageRegistration }, { 'id': 'bat', @@ -86,12 +86,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'batch' ], - 'import': (() => import('./langs/bat.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/bat')) as DynamicImportLanguageRegistration }, { 'id': 'beancount', 'name': 'Beancount', - 'import': (() => import('./langs/beancount.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/beancount')) as DynamicImportLanguageRegistration }, { 'id': 'berry', @@ -99,22 +99,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'be' ], - 'import': (() => import('./langs/berry.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/berry')) as DynamicImportLanguageRegistration }, { 'id': 'bibtex', 'name': 'BibTeX', - 'import': (() => import('./langs/bibtex.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/bibtex')) as DynamicImportLanguageRegistration }, { 'id': 'bicep', 'name': 'Bicep', - 'import': (() => import('./langs/bicep.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/bicep')) as DynamicImportLanguageRegistration }, { 'id': 'blade', 'name': 'Blade', - 'import': (() => import('./langs/blade.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/blade')) as DynamicImportLanguageRegistration }, { 'id': 'bsl', @@ -122,12 +122,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ '1c' ], - 'import': (() => import('./langs/bsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/bsl')) as DynamicImportLanguageRegistration }, { 'id': 'c', 'name': 'C', - 'import': (() => import('./langs/c.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/c')) as DynamicImportLanguageRegistration }, { 'id': 'cadence', @@ -135,17 +135,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'cdc' ], - 'import': (() => import('./langs/cadence.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cadence')) as DynamicImportLanguageRegistration }, { 'id': 'cairo', 'name': 'Cairo', - 'import': (() => import('./langs/cairo.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cairo')) as DynamicImportLanguageRegistration }, { 'id': 'clarity', 'name': 'Clarity', - 'import': (() => import('./langs/clarity.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/clarity')) as DynamicImportLanguageRegistration }, { 'id': 'clojure', @@ -153,22 +153,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'clj' ], - 'import': (() => import('./langs/clojure.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/clojure')) as DynamicImportLanguageRegistration }, { 'id': 'cmake', 'name': 'CMake', - 'import': (() => import('./langs/cmake.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cmake')) as DynamicImportLanguageRegistration }, { 'id': 'cobol', 'name': 'COBOL', - 'import': (() => import('./langs/cobol.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cobol')) as DynamicImportLanguageRegistration }, { 'id': 'codeowners', 'name': 'CODEOWNERS', - 'import': (() => import('./langs/codeowners.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/codeowners')) as DynamicImportLanguageRegistration }, { 'id': 'codeql', @@ -176,7 +176,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'ql' ], - 'import': (() => import('./langs/codeql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/codeql')) as DynamicImportLanguageRegistration }, { 'id': 'coffee', @@ -184,7 +184,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'coffeescript' ], - 'import': (() => import('./langs/coffee.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/coffee')) as DynamicImportLanguageRegistration }, { 'id': 'common-lisp', @@ -192,12 +192,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'lisp' ], - 'import': (() => import('./langs/common-lisp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/common-lisp')) as DynamicImportLanguageRegistration }, { 'id': 'coq', 'name': 'Coq', - 'import': (() => import('./langs/coq.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/coq')) as DynamicImportLanguageRegistration }, { 'id': 'cpp', @@ -205,12 +205,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'c++' ], - 'import': (() => import('./langs/cpp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cpp')) as DynamicImportLanguageRegistration }, { 'id': 'crystal', 'name': 'Crystal', - 'import': (() => import('./langs/crystal.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/crystal')) as DynamicImportLanguageRegistration }, { 'id': 'csharp', @@ -219,22 +219,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'c#', 'cs' ], - 'import': (() => import('./langs/csharp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/csharp')) as DynamicImportLanguageRegistration }, { 'id': 'css', 'name': 'CSS', - 'import': (() => import('./langs/css.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/css')) as DynamicImportLanguageRegistration }, { 'id': 'csv', 'name': 'CSV', - 'import': (() => import('./langs/csv.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/csv')) as DynamicImportLanguageRegistration }, { 'id': 'cue', 'name': 'CUE', - 'import': (() => import('./langs/cue.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cue')) as DynamicImportLanguageRegistration }, { 'id': 'cypher', @@ -242,32 +242,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'cql' ], - 'import': (() => import('./langs/cypher.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cypher')) as DynamicImportLanguageRegistration }, { 'id': 'd', 'name': 'D', - 'import': (() => import('./langs/d.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/d')) as DynamicImportLanguageRegistration }, { 'id': 'dart', 'name': 'Dart', - 'import': (() => import('./langs/dart.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/dart')) as DynamicImportLanguageRegistration }, { 'id': 'dax', 'name': 'DAX', - 'import': (() => import('./langs/dax.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/dax')) as DynamicImportLanguageRegistration }, { 'id': 'desktop', 'name': 'Desktop', - 'import': (() => import('./langs/desktop.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/desktop')) as DynamicImportLanguageRegistration }, { 'id': 'diff', 'name': 'Diff', - 'import': (() => import('./langs/diff.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/diff')) as DynamicImportLanguageRegistration }, { 'id': 'docker', @@ -275,32 +275,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'dockerfile' ], - 'import': (() => import('./langs/docker.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/docker')) as DynamicImportLanguageRegistration }, { 'id': 'dotenv', 'name': 'dotEnv', - 'import': (() => import('./langs/dotenv.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/dotenv')) as DynamicImportLanguageRegistration }, { 'id': 'dream-maker', 'name': 'Dream Maker', - 'import': (() => import('./langs/dream-maker.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/dream-maker')) as DynamicImportLanguageRegistration }, { 'id': 'edge', 'name': 'Edge', - 'import': (() => import('./langs/edge.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/edge')) as DynamicImportLanguageRegistration }, { 'id': 'elixir', 'name': 'Elixir', - 'import': (() => import('./langs/elixir.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/elixir')) as DynamicImportLanguageRegistration }, { 'id': 'elm', 'name': 'Elm', - 'import': (() => import('./langs/elm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/elm')) as DynamicImportLanguageRegistration }, { 'id': 'emacs-lisp', @@ -308,12 +308,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'elisp' ], - 'import': (() => import('./langs/emacs-lisp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/emacs-lisp')) as DynamicImportLanguageRegistration }, { 'id': 'erb', 'name': 'ERB', - 'import': (() => import('./langs/erb.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/erb')) as DynamicImportLanguageRegistration }, { 'id': 'erlang', @@ -321,17 +321,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'erl' ], - 'import': (() => import('./langs/erlang.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/erlang')) as DynamicImportLanguageRegistration }, { 'id': 'fennel', 'name': 'Fennel', - 'import': (() => import('./langs/fennel.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fennel')) as DynamicImportLanguageRegistration }, { 'id': 'fish', 'name': 'Fish', - 'import': (() => import('./langs/fish.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fish')) as DynamicImportLanguageRegistration }, { 'id': 'fluent', @@ -339,7 +339,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'ftl' ], - 'import': (() => import('./langs/fluent.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fluent')) as DynamicImportLanguageRegistration }, { 'id': 'fortran-fixed-form', @@ -349,7 +349,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'for', 'f77' ], - 'import': (() => import('./langs/fortran-fixed-form.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fortran-fixed-form')) as DynamicImportLanguageRegistration }, { 'id': 'fortran-free-form', @@ -361,7 +361,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'f08', 'f18' ], - 'import': (() => import('./langs/fortran-free-form.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fortran-free-form')) as DynamicImportLanguageRegistration }, { 'id': 'fsharp', @@ -370,47 +370,47 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'f#', 'fs' ], - 'import': (() => import('./langs/fsharp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/fsharp')) as DynamicImportLanguageRegistration }, { 'id': 'gdresource', 'name': 'GDResource', - 'import': (() => import('./langs/gdresource.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gdresource')) as DynamicImportLanguageRegistration }, { 'id': 'gdscript', 'name': 'GDScript', - 'import': (() => import('./langs/gdscript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gdscript')) as DynamicImportLanguageRegistration }, { 'id': 'gdshader', 'name': 'GDShader', - 'import': (() => import('./langs/gdshader.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gdshader')) as DynamicImportLanguageRegistration }, { 'id': 'genie', 'name': 'Genie', - 'import': (() => import('./langs/genie.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/genie')) as DynamicImportLanguageRegistration }, { 'id': 'gherkin', 'name': 'Gherkin', - 'import': (() => import('./langs/gherkin.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gherkin')) as DynamicImportLanguageRegistration }, { 'id': 'git-commit', 'name': 'Git Commit Message', - 'import': (() => import('./langs/git-commit.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/git-commit')) as DynamicImportLanguageRegistration }, { 'id': 'git-rebase', 'name': 'Git Rebase Message', - 'import': (() => import('./langs/git-rebase.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/git-rebase')) as DynamicImportLanguageRegistration }, { 'id': 'gleam', 'name': 'Gleam', - 'import': (() => import('./langs/gleam.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gleam')) as DynamicImportLanguageRegistration }, { 'id': 'glimmer-js', @@ -418,7 +418,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'gjs' ], - 'import': (() => import('./langs/glimmer-js.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/glimmer-js')) as DynamicImportLanguageRegistration }, { 'id': 'glimmer-ts', @@ -426,22 +426,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'gts' ], - 'import': (() => import('./langs/glimmer-ts.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/glimmer-ts')) as DynamicImportLanguageRegistration }, { 'id': 'glsl', 'name': 'GLSL', - 'import': (() => import('./langs/glsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/glsl')) as DynamicImportLanguageRegistration }, { 'id': 'gnuplot', 'name': 'Gnuplot', - 'import': (() => import('./langs/gnuplot.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/gnuplot')) as DynamicImportLanguageRegistration }, { 'id': 'go', 'name': 'Go', - 'import': (() => import('./langs/go.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/go')) as DynamicImportLanguageRegistration }, { 'id': 'graphql', @@ -449,22 +449,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'gql' ], - 'import': (() => import('./langs/graphql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/graphql')) as DynamicImportLanguageRegistration }, { 'id': 'groovy', 'name': 'Groovy', - 'import': (() => import('./langs/groovy.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/groovy')) as DynamicImportLanguageRegistration }, { 'id': 'hack', 'name': 'Hack', - 'import': (() => import('./langs/hack.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hack')) as DynamicImportLanguageRegistration }, { 'id': 'haml', 'name': 'Ruby Haml', - 'import': (() => import('./langs/haml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/haml')) as DynamicImportLanguageRegistration }, { 'id': 'handlebars', @@ -472,7 +472,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'hbs' ], - 'import': (() => import('./langs/handlebars.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/handlebars')) as DynamicImportLanguageRegistration }, { 'id': 'haskell', @@ -480,57 +480,57 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'hs' ], - 'import': (() => import('./langs/haskell.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/haskell')) as DynamicImportLanguageRegistration }, { 'id': 'haxe', 'name': 'Haxe', - 'import': (() => import('./langs/haxe.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/haxe')) as DynamicImportLanguageRegistration }, { 'id': 'hcl', 'name': 'HashiCorp HCL', - 'import': (() => import('./langs/hcl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hcl')) as DynamicImportLanguageRegistration }, { 'id': 'hjson', 'name': 'Hjson', - 'import': (() => import('./langs/hjson.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hjson')) as DynamicImportLanguageRegistration }, { 'id': 'hlsl', 'name': 'HLSL', - 'import': (() => import('./langs/hlsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hlsl')) as DynamicImportLanguageRegistration }, { 'id': 'html', 'name': 'HTML', - 'import': (() => import('./langs/html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/html')) as DynamicImportLanguageRegistration }, { 'id': 'html-derivative', 'name': 'HTML (Derivative)', - 'import': (() => import('./langs/html-derivative.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/html-derivative')) as DynamicImportLanguageRegistration }, { 'id': 'http', 'name': 'HTTP', - 'import': (() => import('./langs/http.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/http')) as DynamicImportLanguageRegistration }, { 'id': 'hxml', 'name': 'HXML', - 'import': (() => import('./langs/hxml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hxml')) as DynamicImportLanguageRegistration }, { 'id': 'hy', 'name': 'Hy', - 'import': (() => import('./langs/hy.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/hy')) as DynamicImportLanguageRegistration }, { 'id': 'imba', 'name': 'Imba', - 'import': (() => import('./langs/imba.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/imba')) as DynamicImportLanguageRegistration }, { 'id': 'ini', @@ -538,12 +538,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'properties' ], - 'import': (() => import('./langs/ini.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ini')) as DynamicImportLanguageRegistration }, { 'id': 'java', 'name': 'Java', - 'import': (() => import('./langs/java.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/java')) as DynamicImportLanguageRegistration }, { 'id': 'javascript', @@ -551,42 +551,42 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'js' ], - 'import': (() => import('./langs/javascript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/javascript')) as DynamicImportLanguageRegistration }, { 'id': 'jinja', 'name': 'Jinja', - 'import': (() => import('./langs/jinja.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jinja')) as DynamicImportLanguageRegistration }, { 'id': 'jison', 'name': 'Jison', - 'import': (() => import('./langs/jison.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jison')) as DynamicImportLanguageRegistration }, { 'id': 'json', 'name': 'JSON', - 'import': (() => import('./langs/json.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/json')) as DynamicImportLanguageRegistration }, { 'id': 'json5', 'name': 'JSON5', - 'import': (() => import('./langs/json5.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/json5')) as DynamicImportLanguageRegistration }, { 'id': 'jsonc', 'name': 'JSON with Comments', - 'import': (() => import('./langs/jsonc.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsonc')) as DynamicImportLanguageRegistration }, { 'id': 'jsonl', 'name': 'JSON Lines', - 'import': (() => import('./langs/jsonl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsonl')) as DynamicImportLanguageRegistration }, { 'id': 'jsonnet', 'name': 'Jsonnet', - 'import': (() => import('./langs/jsonnet.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsonnet')) as DynamicImportLanguageRegistration }, { 'id': 'jssm', @@ -594,12 +594,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'fsl' ], - 'import': (() => import('./langs/jssm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jssm')) as DynamicImportLanguageRegistration }, { 'id': 'jsx', 'name': 'JSX', - 'import': (() => import('./langs/jsx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsx')) as DynamicImportLanguageRegistration }, { 'id': 'julia', @@ -607,7 +607,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'jl' ], - 'import': (() => import('./langs/julia.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/julia')) as DynamicImportLanguageRegistration }, { 'id': 'kotlin', @@ -616,7 +616,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'kt', 'kts' ], - 'import': (() => import('./langs/kotlin.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/kotlin')) as DynamicImportLanguageRegistration }, { 'id': 'kusto', @@ -624,12 +624,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'kql' ], - 'import': (() => import('./langs/kusto.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/kusto')) as DynamicImportLanguageRegistration }, { 'id': 'latex', 'name': 'LaTeX', - 'import': (() => import('./langs/latex.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/latex')) as DynamicImportLanguageRegistration }, { 'id': 'lean', @@ -637,37 +637,37 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'lean4' ], - 'import': (() => import('./langs/lean.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/lean')) as DynamicImportLanguageRegistration }, { 'id': 'less', 'name': 'Less', - 'import': (() => import('./langs/less.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/less')) as DynamicImportLanguageRegistration }, { 'id': 'liquid', 'name': 'Liquid', - 'import': (() => import('./langs/liquid.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/liquid')) as DynamicImportLanguageRegistration }, { 'id': 'log', 'name': 'Log file', - 'import': (() => import('./langs/log.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/log')) as DynamicImportLanguageRegistration }, { 'id': 'logo', 'name': 'Logo', - 'import': (() => import('./langs/logo.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/logo')) as DynamicImportLanguageRegistration }, { 'id': 'lua', 'name': 'Lua', - 'import': (() => import('./langs/lua.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/lua')) as DynamicImportLanguageRegistration }, { 'id': 'luau', 'name': 'Luau', - 'import': (() => import('./langs/luau.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/luau')) as DynamicImportLanguageRegistration }, { 'id': 'make', @@ -675,7 +675,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'makefile' ], - 'import': (() => import('./langs/make.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/make')) as DynamicImportLanguageRegistration }, { 'id': 'markdown', @@ -683,27 +683,27 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'md' ], - 'import': (() => import('./langs/markdown.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/markdown')) as DynamicImportLanguageRegistration }, { 'id': 'marko', 'name': 'Marko', - 'import': (() => import('./langs/marko.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/marko')) as DynamicImportLanguageRegistration }, { 'id': 'matlab', 'name': 'MATLAB', - 'import': (() => import('./langs/matlab.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/matlab')) as DynamicImportLanguageRegistration }, { 'id': 'mdc', 'name': 'MDC', - 'import': (() => import('./langs/mdc.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mdc')) as DynamicImportLanguageRegistration }, { 'id': 'mdx', 'name': 'MDX', - 'import': (() => import('./langs/mdx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mdx')) as DynamicImportLanguageRegistration }, { 'id': 'mermaid', @@ -711,7 +711,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'mmd' ], - 'import': (() => import('./langs/mermaid.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mermaid')) as DynamicImportLanguageRegistration }, { 'id': 'mipsasm', @@ -719,17 +719,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'mips' ], - 'import': (() => import('./langs/mipsasm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mipsasm')) as DynamicImportLanguageRegistration }, { 'id': 'mojo', 'name': 'Mojo', - 'import': (() => import('./langs/mojo.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mojo')) as DynamicImportLanguageRegistration }, { 'id': 'move', 'name': 'Move', - 'import': (() => import('./langs/move.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/move')) as DynamicImportLanguageRegistration }, { 'id': 'narrat', @@ -737,7 +737,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'nar' ], - 'import': (() => import('./langs/narrat.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/narrat')) as DynamicImportLanguageRegistration }, { 'id': 'nextflow', @@ -745,22 +745,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'nf' ], - 'import': (() => import('./langs/nextflow.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/nextflow')) as DynamicImportLanguageRegistration }, { 'id': 'nginx', 'name': 'Nginx', - 'import': (() => import('./langs/nginx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/nginx')) as DynamicImportLanguageRegistration }, { 'id': 'nim', 'name': 'Nim', - 'import': (() => import('./langs/nim.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/nim')) as DynamicImportLanguageRegistration }, { 'id': 'nix', 'name': 'Nix', - 'import': (() => import('./langs/nix.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/nix')) as DynamicImportLanguageRegistration }, { 'id': 'nushell', @@ -768,7 +768,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'nu' ], - 'import': (() => import('./langs/nushell.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/nushell')) as DynamicImportLanguageRegistration }, { 'id': 'objective-c', @@ -776,37 +776,37 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'objc' ], - 'import': (() => import('./langs/objective-c.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/objective-c')) as DynamicImportLanguageRegistration }, { 'id': 'objective-cpp', 'name': 'Objective-C++', - 'import': (() => import('./langs/objective-cpp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/objective-cpp')) as DynamicImportLanguageRegistration }, { 'id': 'ocaml', 'name': 'OCaml', - 'import': (() => import('./langs/ocaml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ocaml')) as DynamicImportLanguageRegistration }, { 'id': 'pascal', 'name': 'Pascal', - 'import': (() => import('./langs/pascal.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/pascal')) as DynamicImportLanguageRegistration }, { 'id': 'perl', 'name': 'Perl', - 'import': (() => import('./langs/perl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/perl')) as DynamicImportLanguageRegistration }, { 'id': 'php', 'name': 'PHP', - 'import': (() => import('./langs/php.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/php')) as DynamicImportLanguageRegistration }, { 'id': 'plsql', 'name': 'PL/SQL', - 'import': (() => import('./langs/plsql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/plsql')) as DynamicImportLanguageRegistration }, { 'id': 'po', @@ -815,17 +815,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'pot', 'potx' ], - 'import': (() => import('./langs/po.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/po')) as DynamicImportLanguageRegistration }, { 'id': 'postcss', 'name': 'PostCSS', - 'import': (() => import('./langs/postcss.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/postcss')) as DynamicImportLanguageRegistration }, { 'id': 'powerquery', 'name': 'PowerQuery', - 'import': (() => import('./langs/powerquery.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/powerquery')) as DynamicImportLanguageRegistration }, { 'id': 'powershell', @@ -834,17 +834,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'ps', 'ps1' ], - 'import': (() => import('./langs/powershell.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/powershell')) as DynamicImportLanguageRegistration }, { 'id': 'prisma', 'name': 'Prisma', - 'import': (() => import('./langs/prisma.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/prisma')) as DynamicImportLanguageRegistration }, { 'id': 'prolog', 'name': 'Prolog', - 'import': (() => import('./langs/prolog.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/prolog')) as DynamicImportLanguageRegistration }, { 'id': 'proto', @@ -852,7 +852,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'protobuf' ], - 'import': (() => import('./langs/proto.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/proto')) as DynamicImportLanguageRegistration }, { 'id': 'pug', @@ -860,17 +860,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'jade' ], - 'import': (() => import('./langs/pug.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/pug')) as DynamicImportLanguageRegistration }, { 'id': 'puppet', 'name': 'Puppet', - 'import': (() => import('./langs/puppet.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/puppet')) as DynamicImportLanguageRegistration }, { 'id': 'purescript', 'name': 'PureScript', - 'import': (() => import('./langs/purescript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/purescript')) as DynamicImportLanguageRegistration }, { 'id': 'python', @@ -878,32 +878,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'py' ], - 'import': (() => import('./langs/python.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/python')) as DynamicImportLanguageRegistration }, { 'id': 'qml', 'name': 'QML', - 'import': (() => import('./langs/qml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/qml')) as DynamicImportLanguageRegistration }, { 'id': 'qmldir', 'name': 'QML Directory', - 'import': (() => import('./langs/qmldir.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/qmldir')) as DynamicImportLanguageRegistration }, { 'id': 'qss', 'name': 'Qt Style Sheets', - 'import': (() => import('./langs/qss.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/qss')) as DynamicImportLanguageRegistration }, { 'id': 'r', 'name': 'R', - 'import': (() => import('./langs/r.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/r')) as DynamicImportLanguageRegistration }, { 'id': 'racket', 'name': 'Racket', - 'import': (() => import('./langs/racket.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/racket')) as DynamicImportLanguageRegistration }, { 'id': 'raku', @@ -911,17 +911,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'perl6' ], - 'import': (() => import('./langs/raku.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/raku')) as DynamicImportLanguageRegistration }, { 'id': 'razor', 'name': 'ASP.NET Razor', - 'import': (() => import('./langs/razor.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/razor')) as DynamicImportLanguageRegistration }, { 'id': 'reg', 'name': 'Windows Registry Script', - 'import': (() => import('./langs/reg.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/reg')) as DynamicImportLanguageRegistration }, { 'id': 'regexp', @@ -929,22 +929,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'regex' ], - 'import': (() => import('./langs/regexp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/regexp')) as DynamicImportLanguageRegistration }, { 'id': 'rel', 'name': 'Rel', - 'import': (() => import('./langs/rel.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/rel')) as DynamicImportLanguageRegistration }, { 'id': 'riscv', 'name': 'RISC-V', - 'import': (() => import('./langs/riscv.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/riscv')) as DynamicImportLanguageRegistration }, { 'id': 'rst', 'name': 'reStructuredText', - 'import': (() => import('./langs/rst.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/rst')) as DynamicImportLanguageRegistration }, { 'id': 'ruby', @@ -952,7 +952,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'rb' ], - 'import': (() => import('./langs/ruby.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ruby')) as DynamicImportLanguageRegistration }, { 'id': 'rust', @@ -960,32 +960,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'rs' ], - 'import': (() => import('./langs/rust.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/rust')) as DynamicImportLanguageRegistration }, { 'id': 'sas', 'name': 'SAS', - 'import': (() => import('./langs/sas.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sas')) as DynamicImportLanguageRegistration }, { 'id': 'sass', 'name': 'Sass', - 'import': (() => import('./langs/sass.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sass')) as DynamicImportLanguageRegistration }, { 'id': 'scala', 'name': 'Scala', - 'import': (() => import('./langs/scala.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/scala')) as DynamicImportLanguageRegistration }, { 'id': 'scheme', 'name': 'Scheme', - 'import': (() => import('./langs/scheme.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/scheme')) as DynamicImportLanguageRegistration }, { 'id': 'scss', 'name': 'SCSS', - 'import': (() => import('./langs/scss.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/scss')) as DynamicImportLanguageRegistration }, { 'id': 'sdbl', @@ -993,7 +993,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ '1c-query' ], - 'import': (() => import('./langs/sdbl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sdbl')) as DynamicImportLanguageRegistration }, { 'id': 'shaderlab', @@ -1001,7 +1001,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'shader' ], - 'import': (() => import('./langs/shaderlab.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/shaderlab')) as DynamicImportLanguageRegistration }, { 'id': 'shellscript', @@ -1012,7 +1012,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'shell', 'zsh' ], - 'import': (() => import('./langs/shellscript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/shellscript')) as DynamicImportLanguageRegistration }, { 'id': 'shellsession', @@ -1020,17 +1020,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'console' ], - 'import': (() => import('./langs/shellsession.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/shellsession')) as DynamicImportLanguageRegistration }, { 'id': 'smalltalk', 'name': 'Smalltalk', - 'import': (() => import('./langs/smalltalk.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/smalltalk')) as DynamicImportLanguageRegistration }, { 'id': 'solidity', 'name': 'Solidity', - 'import': (() => import('./langs/solidity.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/solidity')) as DynamicImportLanguageRegistration }, { 'id': 'soy', @@ -1038,12 +1038,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'closure-templates' ], - 'import': (() => import('./langs/soy.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/soy')) as DynamicImportLanguageRegistration }, { 'id': 'sparql', 'name': 'SPARQL', - 'import': (() => import('./langs/sparql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sparql')) as DynamicImportLanguageRegistration }, { 'id': 'splunk', @@ -1051,22 +1051,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'spl' ], - 'import': (() => import('./langs/splunk.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/splunk')) as DynamicImportLanguageRegistration }, { 'id': 'sql', 'name': 'SQL', - 'import': (() => import('./langs/sql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sql')) as DynamicImportLanguageRegistration }, { 'id': 'ssh-config', 'name': 'SSH Config', - 'import': (() => import('./langs/ssh-config.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ssh-config')) as DynamicImportLanguageRegistration }, { 'id': 'stata', 'name': 'Stata', - 'import': (() => import('./langs/stata.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/stata')) as DynamicImportLanguageRegistration }, { 'id': 'stylus', @@ -1074,27 +1074,27 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'styl' ], - 'import': (() => import('./langs/stylus.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/stylus')) as DynamicImportLanguageRegistration }, { 'id': 'svelte', 'name': 'Svelte', - 'import': (() => import('./langs/svelte.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/svelte')) as DynamicImportLanguageRegistration }, { 'id': 'swift', 'name': 'Swift', - 'import': (() => import('./langs/swift.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/swift')) as DynamicImportLanguageRegistration }, { 'id': 'system-verilog', 'name': 'SystemVerilog', - 'import': (() => import('./langs/system-verilog.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/system-verilog')) as DynamicImportLanguageRegistration }, { 'id': 'systemd', 'name': 'Systemd Units', - 'import': (() => import('./langs/systemd.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/systemd')) as DynamicImportLanguageRegistration }, { 'id': 'talonscript', @@ -1102,22 +1102,22 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'talon' ], - 'import': (() => import('./langs/talonscript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/talonscript')) as DynamicImportLanguageRegistration }, { 'id': 'tasl', 'name': 'Tasl', - 'import': (() => import('./langs/tasl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tasl')) as DynamicImportLanguageRegistration }, { 'id': 'tcl', 'name': 'Tcl', - 'import': (() => import('./langs/tcl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tcl')) as DynamicImportLanguageRegistration }, { 'id': 'templ', 'name': 'Templ', - 'import': (() => import('./langs/templ.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/templ')) as DynamicImportLanguageRegistration }, { 'id': 'terraform', @@ -1126,17 +1126,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'tf', 'tfvars' ], - 'import': (() => import('./langs/terraform.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/terraform')) as DynamicImportLanguageRegistration }, { 'id': 'tex', 'name': 'TeX', - 'import': (() => import('./langs/tex.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tex')) as DynamicImportLanguageRegistration }, { 'id': 'toml', 'name': 'TOML', - 'import': (() => import('./langs/toml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/toml')) as DynamicImportLanguageRegistration }, { 'id': 'ts-tags', @@ -1144,27 +1144,27 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'lit' ], - 'import': (() => import('./langs/ts-tags.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ts-tags')) as DynamicImportLanguageRegistration }, { 'id': 'tsv', 'name': 'TSV', - 'import': (() => import('./langs/tsv.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tsv')) as DynamicImportLanguageRegistration }, { 'id': 'tsx', 'name': 'TSX', - 'import': (() => import('./langs/tsx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tsx')) as DynamicImportLanguageRegistration }, { 'id': 'turtle', 'name': 'Turtle', - 'import': (() => import('./langs/turtle.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/turtle')) as DynamicImportLanguageRegistration }, { 'id': 'twig', 'name': 'Twig', - 'import': (() => import('./langs/twig.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/twig')) as DynamicImportLanguageRegistration }, { 'id': 'typescript', @@ -1172,7 +1172,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'ts' ], - 'import': (() => import('./langs/typescript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/typescript')) as DynamicImportLanguageRegistration }, { 'id': 'typespec', @@ -1180,7 +1180,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'tsp' ], - 'import': (() => import('./langs/typespec.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/typespec')) as DynamicImportLanguageRegistration }, { 'id': 'typst', @@ -1188,17 +1188,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'typ' ], - 'import': (() => import('./langs/typst.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/typst')) as DynamicImportLanguageRegistration }, { 'id': 'v', 'name': 'V', - 'import': (() => import('./langs/v.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/v')) as DynamicImportLanguageRegistration }, { 'id': 'vala', 'name': 'Vala', - 'import': (() => import('./langs/vala.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vala')) as DynamicImportLanguageRegistration }, { 'id': 'vb', @@ -1206,17 +1206,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'cmd' ], - 'import': (() => import('./langs/vb.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vb')) as DynamicImportLanguageRegistration }, { 'id': 'verilog', 'name': 'Verilog', - 'import': (() => import('./langs/verilog.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/verilog')) as DynamicImportLanguageRegistration }, { 'id': 'vhdl', 'name': 'VHDL', - 'import': (() => import('./langs/vhdl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vhdl')) as DynamicImportLanguageRegistration }, { 'id': 'viml', @@ -1225,17 +1225,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'vim', 'vimscript' ], - 'import': (() => import('./langs/viml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/viml')) as DynamicImportLanguageRegistration }, { 'id': 'vue', 'name': 'Vue', - 'import': (() => import('./langs/vue.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vue')) as DynamicImportLanguageRegistration }, { 'id': 'vue-html', 'name': 'Vue HTML', - 'import': (() => import('./langs/vue-html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vue-html')) as DynamicImportLanguageRegistration }, { 'id': 'vyper', @@ -1243,12 +1243,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'vy' ], - 'import': (() => import('./langs/vyper.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vyper')) as DynamicImportLanguageRegistration }, { 'id': 'wasm', 'name': 'WebAssembly', - 'import': (() => import('./langs/wasm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wasm')) as DynamicImportLanguageRegistration }, { 'id': 'wenyan', @@ -1256,12 +1256,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ '文言' ], - 'import': (() => import('./langs/wenyan.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wenyan')) as DynamicImportLanguageRegistration }, { 'id': 'wgsl', 'name': 'WGSL', - 'import': (() => import('./langs/wgsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wgsl')) as DynamicImportLanguageRegistration }, { 'id': 'wikitext', @@ -1270,7 +1270,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'mediawiki', 'wiki' ], - 'import': (() => import('./langs/wikitext.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wikitext')) as DynamicImportLanguageRegistration }, { 'id': 'wolfram', @@ -1278,17 +1278,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'wl' ], - 'import': (() => import('./langs/wolfram.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wolfram')) as DynamicImportLanguageRegistration }, { 'id': 'xml', 'name': 'XML', - 'import': (() => import('./langs/xml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/xml')) as DynamicImportLanguageRegistration }, { 'id': 'xsl', 'name': 'XSL', - 'import': (() => import('./langs/xsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/xsl')) as DynamicImportLanguageRegistration }, { 'id': 'yaml', @@ -1296,17 +1296,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'yml' ], - 'import': (() => import('./langs/yaml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/yaml')) as DynamicImportLanguageRegistration }, { 'id': 'zenscript', 'name': 'ZenScript', - 'import': (() => import('./langs/zenscript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/zenscript')) as DynamicImportLanguageRegistration }, { 'id': 'zig', 'name': 'Zig', - 'import': (() => import('./langs/zig.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/zig')) as DynamicImportLanguageRegistration } ] diff --git a/packages/shiki/src/langs-bundle-web.ts b/packages/shiki/src/langs-bundle-web.ts index fd4b8a3d7..f9774a87b 100644 --- a/packages/shiki/src/langs-bundle-web.ts +++ b/packages/shiki/src/langs-bundle-web.ts @@ -1,31 +1,31 @@ -// Generated by scripts/prepare.ts -import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/core' +// Generated by packages/langs/scripts/prepare.ts +import type { DynamicImportLanguageRegistration, BundledLanguageInfo } from '@shikijs/types' export const bundledLanguagesInfo: BundledLanguageInfo[] = [ { 'id': 'angular-html', 'name': 'Angular HTML', - 'import': (() => import('./langs/angular-html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/angular-html')) as DynamicImportLanguageRegistration }, { 'id': 'angular-ts', 'name': 'Angular TypeScript', - 'import': (() => import('./langs/angular-ts.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/angular-ts')) as DynamicImportLanguageRegistration }, { 'id': 'astro', 'name': 'Astro', - 'import': (() => import('./langs/astro.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/astro')) as DynamicImportLanguageRegistration }, { 'id': 'blade', 'name': 'Blade', - 'import': (() => import('./langs/blade.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/blade')) as DynamicImportLanguageRegistration }, { 'id': 'c', 'name': 'C', - 'import': (() => import('./langs/c.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/c')) as DynamicImportLanguageRegistration }, { 'id': 'coffee', @@ -33,7 +33,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'coffeescript' ], - 'import': (() => import('./langs/coffee.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/coffee')) as DynamicImportLanguageRegistration }, { 'id': 'cpp', @@ -41,17 +41,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'c++' ], - 'import': (() => import('./langs/cpp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/cpp')) as DynamicImportLanguageRegistration }, { 'id': 'css', 'name': 'CSS', - 'import': (() => import('./langs/css.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/css')) as DynamicImportLanguageRegistration }, { 'id': 'glsl', 'name': 'GLSL', - 'import': (() => import('./langs/glsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/glsl')) as DynamicImportLanguageRegistration }, { 'id': 'graphql', @@ -59,12 +59,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'gql' ], - 'import': (() => import('./langs/graphql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/graphql')) as DynamicImportLanguageRegistration }, { 'id': 'haml', 'name': 'Ruby Haml', - 'import': (() => import('./langs/haml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/haml')) as DynamicImportLanguageRegistration }, { 'id': 'handlebars', @@ -72,32 +72,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'hbs' ], - 'import': (() => import('./langs/handlebars.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/handlebars')) as DynamicImportLanguageRegistration }, { 'id': 'html', 'name': 'HTML', - 'import': (() => import('./langs/html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/html')) as DynamicImportLanguageRegistration }, { 'id': 'html-derivative', 'name': 'HTML (Derivative)', - 'import': (() => import('./langs/html-derivative.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/html-derivative')) as DynamicImportLanguageRegistration }, { 'id': 'http', 'name': 'HTTP', - 'import': (() => import('./langs/http.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/http')) as DynamicImportLanguageRegistration }, { 'id': 'imba', 'name': 'Imba', - 'import': (() => import('./langs/imba.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/imba')) as DynamicImportLanguageRegistration }, { 'id': 'java', 'name': 'Java', - 'import': (() => import('./langs/java.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/java')) as DynamicImportLanguageRegistration }, { 'id': 'javascript', @@ -105,42 +105,42 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'js' ], - 'import': (() => import('./langs/javascript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/javascript')) as DynamicImportLanguageRegistration }, { 'id': 'jinja', 'name': 'Jinja', - 'import': (() => import('./langs/jinja.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jinja')) as DynamicImportLanguageRegistration }, { 'id': 'jison', 'name': 'Jison', - 'import': (() => import('./langs/jison.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jison')) as DynamicImportLanguageRegistration }, { 'id': 'json', 'name': 'JSON', - 'import': (() => import('./langs/json.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/json')) as DynamicImportLanguageRegistration }, { 'id': 'json5', 'name': 'JSON5', - 'import': (() => import('./langs/json5.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/json5')) as DynamicImportLanguageRegistration }, { 'id': 'jsonc', 'name': 'JSON with Comments', - 'import': (() => import('./langs/jsonc.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsonc')) as DynamicImportLanguageRegistration }, { 'id': 'jsonl', 'name': 'JSON Lines', - 'import': (() => import('./langs/jsonl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsonl')) as DynamicImportLanguageRegistration }, { 'id': 'jsx', 'name': 'JSX', - 'import': (() => import('./langs/jsx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/jsx')) as DynamicImportLanguageRegistration }, { 'id': 'julia', @@ -148,12 +148,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'jl' ], - 'import': (() => import('./langs/julia.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/julia')) as DynamicImportLanguageRegistration }, { 'id': 'less', 'name': 'Less', - 'import': (() => import('./langs/less.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/less')) as DynamicImportLanguageRegistration }, { 'id': 'markdown', @@ -161,32 +161,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'md' ], - 'import': (() => import('./langs/markdown.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/markdown')) as DynamicImportLanguageRegistration }, { 'id': 'marko', 'name': 'Marko', - 'import': (() => import('./langs/marko.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/marko')) as DynamicImportLanguageRegistration }, { 'id': 'mdc', 'name': 'MDC', - 'import': (() => import('./langs/mdc.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mdc')) as DynamicImportLanguageRegistration }, { 'id': 'mdx', 'name': 'MDX', - 'import': (() => import('./langs/mdx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/mdx')) as DynamicImportLanguageRegistration }, { 'id': 'php', 'name': 'PHP', - 'import': (() => import('./langs/php.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/php')) as DynamicImportLanguageRegistration }, { 'id': 'postcss', 'name': 'PostCSS', - 'import': (() => import('./langs/postcss.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/postcss')) as DynamicImportLanguageRegistration }, { 'id': 'pug', @@ -194,7 +194,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'jade' ], - 'import': (() => import('./langs/pug.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/pug')) as DynamicImportLanguageRegistration }, { 'id': 'python', @@ -202,12 +202,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'py' ], - 'import': (() => import('./langs/python.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/python')) as DynamicImportLanguageRegistration }, { 'id': 'r', 'name': 'R', - 'import': (() => import('./langs/r.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/r')) as DynamicImportLanguageRegistration }, { 'id': 'regexp', @@ -215,17 +215,17 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'regex' ], - 'import': (() => import('./langs/regexp.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/regexp')) as DynamicImportLanguageRegistration }, { 'id': 'sass', 'name': 'Sass', - 'import': (() => import('./langs/sass.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sass')) as DynamicImportLanguageRegistration }, { 'id': 'scss', 'name': 'SCSS', - 'import': (() => import('./langs/scss.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/scss')) as DynamicImportLanguageRegistration }, { 'id': 'shellscript', @@ -236,12 +236,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'shell', 'zsh' ], - 'import': (() => import('./langs/shellscript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/shellscript')) as DynamicImportLanguageRegistration }, { 'id': 'sql', 'name': 'SQL', - 'import': (() => import('./langs/sql.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/sql')) as DynamicImportLanguageRegistration }, { 'id': 'stylus', @@ -249,12 +249,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'styl' ], - 'import': (() => import('./langs/stylus.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/stylus')) as DynamicImportLanguageRegistration }, { 'id': 'svelte', 'name': 'Svelte', - 'import': (() => import('./langs/svelte.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/svelte')) as DynamicImportLanguageRegistration }, { 'id': 'ts-tags', @@ -262,12 +262,12 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'lit' ], - 'import': (() => import('./langs/ts-tags.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/ts-tags')) as DynamicImportLanguageRegistration }, { 'id': 'tsx', 'name': 'TSX', - 'import': (() => import('./langs/tsx.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/tsx')) as DynamicImportLanguageRegistration }, { 'id': 'typescript', @@ -275,32 +275,32 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'ts' ], - 'import': (() => import('./langs/typescript.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/typescript')) as DynamicImportLanguageRegistration }, { 'id': 'vue', 'name': 'Vue', - 'import': (() => import('./langs/vue.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vue')) as DynamicImportLanguageRegistration }, { 'id': 'vue-html', 'name': 'Vue HTML', - 'import': (() => import('./langs/vue-html.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/vue-html')) as DynamicImportLanguageRegistration }, { 'id': 'wasm', 'name': 'WebAssembly', - 'import': (() => import('./langs/wasm.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wasm')) as DynamicImportLanguageRegistration }, { 'id': 'wgsl', 'name': 'WGSL', - 'import': (() => import('./langs/wgsl.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/wgsl')) as DynamicImportLanguageRegistration }, { 'id': 'xml', 'name': 'XML', - 'import': (() => import('./langs/xml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/xml')) as DynamicImportLanguageRegistration }, { 'id': 'yaml', @@ -308,7 +308,7 @@ export const bundledLanguagesInfo: BundledLanguageInfo[] = [ 'aliases': [ 'yml' ], - 'import': (() => import('./langs/yaml.mjs')) as DynamicImportLanguageRegistration + 'import': (() => import('@shikijs/langs/yaml')) as DynamicImportLanguageRegistration } ] diff --git a/packages/shiki/src/themes.ts b/packages/shiki/src/themes.ts index 8da62c149..9aad94cad 100644 --- a/packages/shiki/src/themes.ts +++ b/packages/shiki/src/themes.ts @@ -1,4 +1,4 @@ -// Generated by scripts/prepare.ts +// Generated by packages/themes/scripts/prepare.ts import type { DynamicImportThemeRegistration, BundledThemeInfo } from '@shikijs/core' export const bundledThemesInfo: BundledThemeInfo[] = [ @@ -6,325 +6,325 @@ export const bundledThemesInfo: BundledThemeInfo[] = [ "id": "andromeeda", "displayName": "Andromeeda", "type": "dark", - "import": (() => import('./themes/andromeeda.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/andromeeda')) as unknown as DynamicImportThemeRegistration }, { "id": "aurora-x", "displayName": "Aurora X", "type": "dark", - "import": (() => import('./themes/aurora-x.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/aurora-x')) as unknown as DynamicImportThemeRegistration }, { "id": "ayu-dark", "displayName": "Ayu Dark", "type": "dark", - "import": (() => import('./themes/ayu-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/ayu-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "catppuccin-frappe", "displayName": "Catppuccin Frappé", "type": "dark", - "import": (() => import('./themes/catppuccin-frappe.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/catppuccin-frappe')) as unknown as DynamicImportThemeRegistration }, { "id": "catppuccin-latte", "displayName": "Catppuccin Latte", "type": "light", - "import": (() => import('./themes/catppuccin-latte.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/catppuccin-latte')) as unknown as DynamicImportThemeRegistration }, { "id": "catppuccin-macchiato", "displayName": "Catppuccin Macchiato", "type": "dark", - "import": (() => import('./themes/catppuccin-macchiato.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/catppuccin-macchiato')) as unknown as DynamicImportThemeRegistration }, { "id": "catppuccin-mocha", "displayName": "Catppuccin Mocha", "type": "dark", - "import": (() => import('./themes/catppuccin-mocha.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/catppuccin-mocha')) as unknown as DynamicImportThemeRegistration }, { "id": "dark-plus", "displayName": "Dark Plus", "type": "dark", - "import": (() => import('./themes/dark-plus.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/dark-plus')) as unknown as DynamicImportThemeRegistration }, { "id": "dracula", "displayName": "Dracula Theme", "type": "dark", - "import": (() => import('./themes/dracula.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/dracula')) as unknown as DynamicImportThemeRegistration }, { "id": "dracula-soft", "displayName": "Dracula Theme Soft", "type": "dark", - "import": (() => import('./themes/dracula-soft.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/dracula-soft')) as unknown as DynamicImportThemeRegistration }, { "id": "everforest-dark", "displayName": "Everforest Dark", "type": "dark", - "import": (() => import('./themes/everforest-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/everforest-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "everforest-light", "displayName": "Everforest Light", "type": "light", - "import": (() => import('./themes/everforest-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/everforest-light')) as unknown as DynamicImportThemeRegistration }, { "id": "github-dark", "displayName": "GitHub Dark", "type": "dark", - "import": (() => import('./themes/github-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "github-dark-default", "displayName": "GitHub Dark Default", "type": "dark", - "import": (() => import('./themes/github-dark-default.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-dark-default')) as unknown as DynamicImportThemeRegistration }, { "id": "github-dark-dimmed", "displayName": "GitHub Dark Dimmed", "type": "dark", - "import": (() => import('./themes/github-dark-dimmed.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-dark-dimmed')) as unknown as DynamicImportThemeRegistration }, { "id": "github-dark-high-contrast", "displayName": "GitHub Dark High Contrast", "type": "dark", - "import": (() => import('./themes/github-dark-high-contrast.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-dark-high-contrast')) as unknown as DynamicImportThemeRegistration }, { "id": "github-light", "displayName": "GitHub Light", "type": "light", - "import": (() => import('./themes/github-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-light')) as unknown as DynamicImportThemeRegistration }, { "id": "github-light-default", "displayName": "GitHub Light Default", "type": "light", - "import": (() => import('./themes/github-light-default.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-light-default')) as unknown as DynamicImportThemeRegistration }, { "id": "github-light-high-contrast", "displayName": "GitHub Light High Contrast", "type": "light", - "import": (() => import('./themes/github-light-high-contrast.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/github-light-high-contrast')) as unknown as DynamicImportThemeRegistration }, { "id": "houston", "displayName": "Houston", "type": "dark", - "import": (() => import('./themes/houston.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/houston')) as unknown as DynamicImportThemeRegistration }, { "id": "kanagawa-dragon", "displayName": "Kanagawa Dragon", "type": "dark", - "import": (() => import('./themes/kanagawa-dragon.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/kanagawa-dragon')) as unknown as DynamicImportThemeRegistration }, { "id": "kanagawa-lotus", "displayName": "Kanagawa Lotus", "type": "light", - "import": (() => import('./themes/kanagawa-lotus.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/kanagawa-lotus')) as unknown as DynamicImportThemeRegistration }, { "id": "kanagawa-wave", "displayName": "Kanagawa Wave", "type": "dark", - "import": (() => import('./themes/kanagawa-wave.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/kanagawa-wave')) as unknown as DynamicImportThemeRegistration }, { "id": "laserwave", "displayName": "LaserWave", "type": "dark", - "import": (() => import('./themes/laserwave.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/laserwave')) as unknown as DynamicImportThemeRegistration }, { "id": "light-plus", "displayName": "Light Plus", "type": "light", - "import": (() => import('./themes/light-plus.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/light-plus')) as unknown as DynamicImportThemeRegistration }, { "id": "material-theme", "displayName": "Material Theme", "type": "dark", - "import": (() => import('./themes/material-theme.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/material-theme')) as unknown as DynamicImportThemeRegistration }, { "id": "material-theme-darker", "displayName": "Material Theme Darker", "type": "dark", - "import": (() => import('./themes/material-theme-darker.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/material-theme-darker')) as unknown as DynamicImportThemeRegistration }, { "id": "material-theme-lighter", "displayName": "Material Theme Lighter", "type": "light", - "import": (() => import('./themes/material-theme-lighter.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/material-theme-lighter')) as unknown as DynamicImportThemeRegistration }, { "id": "material-theme-ocean", "displayName": "Material Theme Ocean", "type": "dark", - "import": (() => import('./themes/material-theme-ocean.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/material-theme-ocean')) as unknown as DynamicImportThemeRegistration }, { "id": "material-theme-palenight", "displayName": "Material Theme Palenight", "type": "dark", - "import": (() => import('./themes/material-theme-palenight.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/material-theme-palenight')) as unknown as DynamicImportThemeRegistration }, { "id": "min-dark", "displayName": "Min Dark", "type": "dark", - "import": (() => import('./themes/min-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/min-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "min-light", "displayName": "Min Light", "type": "light", - "import": (() => import('./themes/min-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/min-light')) as unknown as DynamicImportThemeRegistration }, { "id": "monokai", "displayName": "Monokai", "type": "dark", - "import": (() => import('./themes/monokai.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/monokai')) as unknown as DynamicImportThemeRegistration }, { "id": "night-owl", "displayName": "Night Owl", "type": "dark", - "import": (() => import('./themes/night-owl.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/night-owl')) as unknown as DynamicImportThemeRegistration }, { "id": "nord", "displayName": "Nord", "type": "dark", - "import": (() => import('./themes/nord.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/nord')) as unknown as DynamicImportThemeRegistration }, { "id": "one-dark-pro", "displayName": "One Dark Pro", "type": "dark", - "import": (() => import('./themes/one-dark-pro.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/one-dark-pro')) as unknown as DynamicImportThemeRegistration }, { "id": "one-light", "displayName": "One Light", "type": "light", - "import": (() => import('./themes/one-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/one-light')) as unknown as DynamicImportThemeRegistration }, { "id": "plastic", "displayName": "Plastic", "type": "dark", - "import": (() => import('./themes/plastic.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/plastic')) as unknown as DynamicImportThemeRegistration }, { "id": "poimandres", "displayName": "Poimandres", "type": "dark", - "import": (() => import('./themes/poimandres.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/poimandres')) as unknown as DynamicImportThemeRegistration }, { "id": "red", "displayName": "Red", "type": "dark", - "import": (() => import('./themes/red.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/red')) as unknown as DynamicImportThemeRegistration }, { "id": "rose-pine", "displayName": "Rosé Pine", "type": "dark", - "import": (() => import('./themes/rose-pine.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/rose-pine')) as unknown as DynamicImportThemeRegistration }, { "id": "rose-pine-dawn", "displayName": "Rosé Pine Dawn", "type": "light", - "import": (() => import('./themes/rose-pine-dawn.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/rose-pine-dawn')) as unknown as DynamicImportThemeRegistration }, { "id": "rose-pine-moon", "displayName": "Rosé Pine Moon", "type": "dark", - "import": (() => import('./themes/rose-pine-moon.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/rose-pine-moon')) as unknown as DynamicImportThemeRegistration }, { "id": "slack-dark", "displayName": "Slack Dark", "type": "dark", - "import": (() => import('./themes/slack-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/slack-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "slack-ochin", "displayName": "Slack Ochin", "type": "light", - "import": (() => import('./themes/slack-ochin.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/slack-ochin')) as unknown as DynamicImportThemeRegistration }, { "id": "snazzy-light", "displayName": "Snazzy Light", "type": "light", - "import": (() => import('./themes/snazzy-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/snazzy-light')) as unknown as DynamicImportThemeRegistration }, { "id": "solarized-dark", "displayName": "Solarized Dark", "type": "dark", - "import": (() => import('./themes/solarized-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/solarized-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "solarized-light", "displayName": "Solarized Light", "type": "light", - "import": (() => import('./themes/solarized-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/solarized-light')) as unknown as DynamicImportThemeRegistration }, { "id": "synthwave-84", "displayName": "Synthwave '84", "type": "dark", - "import": (() => import('./themes/synthwave-84.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/synthwave-84')) as unknown as DynamicImportThemeRegistration }, { "id": "tokyo-night", "displayName": "Tokyo Night", "type": "dark", - "import": (() => import('./themes/tokyo-night.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/tokyo-night')) as unknown as DynamicImportThemeRegistration }, { "id": "vesper", "displayName": "Vesper", "type": "dark", - "import": (() => import('./themes/vesper.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/vesper')) as unknown as DynamicImportThemeRegistration }, { "id": "vitesse-black", "displayName": "Vitesse Black", "type": "dark", - "import": (() => import('./themes/vitesse-black.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/vitesse-black')) as unknown as DynamicImportThemeRegistration }, { "id": "vitesse-dark", "displayName": "Vitesse Dark", "type": "dark", - "import": (() => import('./themes/vitesse-dark.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/vitesse-dark')) as unknown as DynamicImportThemeRegistration }, { "id": "vitesse-light", "displayName": "Vitesse Light", "type": "light", - "import": (() => import('./themes/vitesse-light.mjs')) as unknown as DynamicImportThemeRegistration + "import": (() => import('@shikijs/themes/vitesse-light')) as unknown as DynamicImportThemeRegistration } ] diff --git a/packages/themes/README.md b/packages/themes/README.md new file mode 100644 index 000000000..24ceca16f --- /dev/null +++ b/packages/themes/README.md @@ -0,0 +1,7 @@ +# @shikijs/themes + +TextMate themes for Shiki. + +## License + +MIT diff --git a/packages/themes/package.json b/packages/themes/package.json new file mode 100644 index 000000000..00c25bfb1 --- /dev/null +++ b/packages/themes/package.json @@ -0,0 +1,94 @@ +{ + "name": "@shikijs/themes", + "type": "module", + "version": "1.24.4", + "description": "TextMate themes for Shiki in ESM", + "author": "Anthony Fu ", + "license": "MIT", + "homepage": "https://github.com/shikijs/shiki#readme", + "repository": { + "type": "git", + "url": "git+https://github.com/shikijs/shiki.git", + "directory": "packages/themes" + }, + "bugs": "https://github.com/shikijs/shiki/issues", + "keywords": [ + "shiki", + "textmate-themes" + ], + "sideEffects": false, + "exports": { + ".": "./dist/index.mjs", + "./andromeeda": "./dist/andromeeda.mjs", + "./aurora-x": "./dist/aurora-x.mjs", + "./ayu-dark": "./dist/ayu-dark.mjs", + "./catppuccin-frappe": "./dist/catppuccin-frappe.mjs", + "./catppuccin-latte": "./dist/catppuccin-latte.mjs", + "./catppuccin-macchiato": "./dist/catppuccin-macchiato.mjs", + "./catppuccin-mocha": "./dist/catppuccin-mocha.mjs", + "./dark-plus": "./dist/dark-plus.mjs", + "./dracula": "./dist/dracula.mjs", + "./dracula-soft": "./dist/dracula-soft.mjs", + "./everforest-dark": "./dist/everforest-dark.mjs", + "./everforest-light": "./dist/everforest-light.mjs", + "./github-dark": "./dist/github-dark.mjs", + "./github-dark-default": "./dist/github-dark-default.mjs", + "./github-dark-dimmed": "./dist/github-dark-dimmed.mjs", + "./github-dark-high-contrast": "./dist/github-dark-high-contrast.mjs", + "./github-light": "./dist/github-light.mjs", + "./github-light-default": "./dist/github-light-default.mjs", + "./github-light-high-contrast": "./dist/github-light-high-contrast.mjs", + "./houston": "./dist/houston.mjs", + "./kanagawa-dragon": "./dist/kanagawa-dragon.mjs", + "./kanagawa-lotus": "./dist/kanagawa-lotus.mjs", + "./kanagawa-wave": "./dist/kanagawa-wave.mjs", + "./laserwave": "./dist/laserwave.mjs", + "./light-plus": "./dist/light-plus.mjs", + "./material-theme": "./dist/material-theme.mjs", + "./material-theme-darker": "./dist/material-theme-darker.mjs", + "./material-theme-lighter": "./dist/material-theme-lighter.mjs", + "./material-theme-ocean": "./dist/material-theme-ocean.mjs", + "./material-theme-palenight": "./dist/material-theme-palenight.mjs", + "./min-dark": "./dist/min-dark.mjs", + "./min-light": "./dist/min-light.mjs", + "./monokai": "./dist/monokai.mjs", + "./night-owl": "./dist/night-owl.mjs", + "./nord": "./dist/nord.mjs", + "./one-dark-pro": "./dist/one-dark-pro.mjs", + "./one-light": "./dist/one-light.mjs", + "./plastic": "./dist/plastic.mjs", + "./poimandres": "./dist/poimandres.mjs", + "./red": "./dist/red.mjs", + "./rose-pine": "./dist/rose-pine.mjs", + "./rose-pine-dawn": "./dist/rose-pine-dawn.mjs", + "./rose-pine-moon": "./dist/rose-pine-moon.mjs", + "./slack-dark": "./dist/slack-dark.mjs", + "./slack-ochin": "./dist/slack-ochin.mjs", + "./snazzy-light": "./dist/snazzy-light.mjs", + "./solarized-dark": "./dist/solarized-dark.mjs", + "./solarized-light": "./dist/solarized-light.mjs", + "./synthwave-84": "./dist/synthwave-84.mjs", + "./tokyo-night": "./dist/tokyo-night.mjs", + "./vesper": "./dist/vesper.mjs", + "./vitesse-black": "./dist/vitesse-black.mjs", + "./vitesse-dark": "./dist/vitesse-dark.mjs", + "./vitesse-light": "./dist/vitesse-light.mjs" + }, + "main": "./dist/index.mjs", + "module": "./dist/index.mjs", + "types": "./dist/index.d.mts", + "files": [ + "dist" + ], + "scripts": { + "prepare": "esno scripts/prepare.ts", + "build": "pnpm prepare", + "prepublishOnly": "nr prepare" + }, + "dependencies": { + "@shikijs/types": "workspace:*" + }, + "devDependencies": { + "tm-themes": "catalog:" + } +} diff --git a/packages/themes/scripts/prepare.ts b/packages/themes/scripts/prepare.ts new file mode 100644 index 000000000..b0b4f03f0 --- /dev/null +++ b/packages/themes/scripts/prepare.ts @@ -0,0 +1,6 @@ +import fs from 'fs-extra' +import { prepareTheme } from './themes' + +await fs.ensureDir('./dist') +await fs.emptyDir('./dist') +await prepareTheme() diff --git a/packages/shiki/scripts/prepare/themes.ts b/packages/themes/scripts/themes.ts similarity index 58% rename from packages/shiki/scripts/prepare/themes.ts rename to packages/themes/scripts/themes.ts index 57749d82f..9e86b24bb 100644 --- a/packages/shiki/scripts/prepare/themes.ts +++ b/packages/themes/scripts/themes.ts @@ -1,6 +1,5 @@ import fs from 'fs-extra' import { themes as allThemes } from 'tm-themes' -import { COMMENT_HEAD } from './constants' export async function prepareTheme(): Promise { const themes = await Promise.all(allThemes @@ -8,7 +7,7 @@ export async function prepareTheme(): Promise { const theme = await fs.readJSON(`./node_modules/tm-themes/themes/${t.name}.json`) await fs.writeFile( - `./src/themes/${t.name}.mjs`, + `./dist/${t.name}.mjs`, `/* Theme: ${theme.name} */ export default Object.freeze(JSON.parse(${JSON.stringify(JSON.stringify(theme))})) `, @@ -16,7 +15,7 @@ export default Object.freeze(JSON.parse(${JSON.stringify(JSON.stringify(theme))} ) await fs.writeFile( - `./src/themes/${t.name}.d.mts`, + `./dist/${t.name}.d.mts`, `import type { ThemeRegistration } from '@shikijs/core' const theme: ThemeRegistration export default theme @@ -28,12 +27,41 @@ export default theme id: t.name, displayName: theme.displayName, type: theme.type, - import: `__(() => import('./themes/${t.name}.mjs')) as unknown as DynamicImportThemeRegistration__`, + import: `__(() => import('@shikijs/themes/${t.name}')) as unknown as DynamicImportThemeRegistration__`, } })) + + await fs.writeFile( + 'dist/index.mjs', + `export const themeNames = [ +${themes.map(i => ` '${i.id}',`).join('\n')} +] +`, + 'utf-8', + ) + + await fs.writeFile( + 'dist/index.d.mts', + `export const themeNames: readonly string[] +`, + 'utf-8', + ) + + const packageJson = JSON.parse(await fs.readFile('./package.json', 'utf-8')) + packageJson.exports = { + '.': './dist/index.mjs', + ...Object.fromEntries( + themes.map(i => [ + `./${i.id}`, + `./dist/${i.id}.mjs`, + ]), + ), + } + await fs.writeFile('./package.json', `${JSON.stringify(packageJson, null, 2)}\n`, 'utf-8') + await fs.writeFile( - 'src/themes.ts', - `${COMMENT_HEAD} + '../shiki/src/themes.ts', + `// Generated by packages/themes/scripts/prepare.ts import type { DynamicImportThemeRegistration, BundledThemeInfo } from '@shikijs/core' export const bundledThemesInfo: BundledThemeInfo[] = ${JSON.stringify(themes, null, 2).replace(/"__|__"/g, '')} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6b641c636..61068f499 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -570,6 +570,16 @@ importers: specifier: ^1.7.0 version: 1.7.0 + packages/langs: + dependencies: + '@shikijs/types': + specifier: workspace:* + version: link:../types + devDependencies: + tm-grammars: + specifier: ^1.21.10 + version: 1.21.10 + packages/markdown-it: dependencies: markdown-it: @@ -659,6 +669,12 @@ importers: '@shikijs/engine-oniguruma': specifier: workspace:* version: link:../engine-oniguruma + '@shikijs/langs': + specifier: workspace:* + version: link:../langs + '@shikijs/themes': + specifier: workspace:* + version: link:../themes '@shikijs/types': specifier: workspace:* version: link:../types @@ -682,6 +698,16 @@ importers: specifier: ^1.7.0 version: 1.7.0 + packages/themes: + dependencies: + '@shikijs/types': + specifier: workspace:* + version: link:../types + devDependencies: + tm-themes: + specifier: 'catalog:' + version: 1.9.5 + packages/transformers: dependencies: shiki: @@ -4805,6 +4831,9 @@ packages: resolution: {integrity: sha512-q5nmENpTHgiPVd1cJDDc9cVoYN5x4vCvwT3FMilvKPKneCBZAxn2YWQjDF0UMcE9k0Cay1gBiDfTMU0g+mPMQA==} engines: {node: '>=14.0.0'} + tm-grammars@1.21.10: + resolution: {integrity: sha512-0TSAeQ90vvh0xRGdLw/HZG3K4M9gE1rwhGDB29QtoA5h2eRRD8tlGwukBJKx/y23l9EDbMP3+2QFeJqMsVOgBQ==} + tm-grammars@1.21.9: resolution: {integrity: sha512-9kT/ehl3KPmxAeD0JVsCKpZOh+ANWj1RVvNFlsIU88ruUTF1XBWaFeFZUcgA5asJYiKtgD48ddb7VWQVOSOx+g==} @@ -9851,6 +9880,8 @@ snapshots: tinyspy@3.0.0: {} + tm-grammars@1.21.10: {} + tm-grammars@1.21.9: {} tm-themes@1.9.5: {}