mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 15:10:03 +00:00
41 lines
3 KiB
TypeScript
41 lines
3 KiB
TypeScript
import { R as Root } from './types/index.d.mjs';
|
|
import * as shikiji_core from 'shikiji-core';
|
|
import { BundledLanguageInfo, DynamicImportLanguageRegistration, HighlighterGeneric } from 'shikiji-core';
|
|
export * from 'shikiji-core';
|
|
import { BundledTheme } from './themes.mjs';
|
|
export { bundledThemes, bundledThemesInfo } from './themes.mjs';
|
|
export { default as getWasmInlined } from 'shikiji/wasm';
|
|
|
|
/**
|
|
* Generated by scripts/prepare.ts
|
|
*/
|
|
|
|
declare const bundledLanguagesInfo: BundledLanguageInfo[];
|
|
declare const bundledLanguagesBase: {
|
|
[k: string]: DynamicImportLanguageRegistration;
|
|
};
|
|
declare const bundledLanguagesAlias: {
|
|
[k: string]: DynamicImportLanguageRegistration;
|
|
};
|
|
type BundledLanguage = 'angular-html' | 'angular-ts' | 'astro' | 'bash' | 'blade' | 'c' | 'c++' | 'coffee' | 'coffeescript' | 'cpp' | 'css' | 'glsl' | 'gql' | 'graphql' | 'haml' | 'handlebars' | 'hbs' | 'html' | 'http' | 'imba' | 'jade' | 'java' | 'javascript' | 'jinja' | 'jison' | 'js' | 'json' | 'json5' | 'jsonc' | 'jsonl' | 'jsx' | 'julia' | 'less' | 'lua' | 'markdown' | 'marko' | 'md' | 'mdc' | 'mdx' | 'php' | 'postcss' | 'pug' | 'py' | 'python' | 'r' | 'rb' | 'ruby' | 'sass' | 'scss' | 'sh' | 'shell' | 'shellscript' | 'sql' | 'styl' | 'stylus' | 'svelte' | 'toml' | 'ts' | 'tsx' | 'typescript' | 'vue' | 'vue-html' | 'wasm' | 'wgsl' | 'xml' | 'yaml' | 'yml' | 'zsh';
|
|
declare const bundledLanguages: Record<BundledLanguage, DynamicImportLanguageRegistration>;
|
|
|
|
type Highlighter = HighlighterGeneric<BundledLanguage, BundledTheme>;
|
|
/**
|
|
* Initiate a highlighter instance and load the specified languages and themes.
|
|
* Later it can be used synchronously to highlight code.
|
|
*
|
|
* Importing this function will bundle all languages and themes.
|
|
* @see https://shikiji.netlify.app/guide/bundles#shikiji-bundle-web
|
|
*
|
|
* For granular control over the bundle, check:
|
|
* @see https://shikiji.netlify.app/guide/install#fine-grained-bundle
|
|
*/
|
|
declare const getHighlighter: shikiji_core.GetHighlighterFactory<BundledLanguage, BundledTheme>;
|
|
declare const codeToHtml: (code: string, options: shikiji_core.CodeToHastOptions<BundledLanguage, BundledTheme>) => Promise<string>;
|
|
declare const codeToHast: (code: string, options: shikiji_core.CodeToHastOptions<BundledLanguage, BundledTheme>) => Promise<Root>;
|
|
declare const codeToThemedTokens: (code: string, options: shikiji_core.RequireKeys<shikiji_core.CodeToThemedTokensOptions<BundledLanguage, BundledTheme>, "lang" | "theme">) => Promise<shikiji_core.ThemedToken[][]>;
|
|
declare const codeToTokensWithThemes: (code: string, options: shikiji_core.RequireKeys<shikiji_core.CodeToTokensWithThemesOptions<BundledLanguage, BundledTheme>, "lang" | "themes">) => Promise<shikiji_core.ThemedTokenWithVariants[][]>;
|
|
declare const getSingletonHighlighter: () => Promise<HighlighterGeneric<BundledLanguage, BundledTheme>>;
|
|
|
|
export { type BundledLanguage, BundledTheme, type Highlighter, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, codeToHast, codeToHtml, codeToThemedTokens, codeToTokensWithThemes, getHighlighter, getSingletonHighlighter };
|