shiki 3.22.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __exportAll = (all, no_symbols) => {
7
+ let target = {};
8
+ for (var name in all) {
9
+ __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ }
14
+ if (!no_symbols) {
15
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
16
+ }
17
+ return target;
18
+ };
19
+ var __copyProps = (to, from, except, desc) => {
20
+ if (from && typeof from === "object" || typeof from === "function") {
21
+ for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
22
+ key = keys[i];
23
+ if (!__hasOwnProp.call(to, key) && key !== except) {
24
+ __defProp(to, key, {
25
+ get: ((k) => from[k]).bind(null, key),
26
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
27
+ });
28
+ }
29
+ }
30
+ }
31
+ return to;
32
+ };
33
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
34
+
35
+ //#endregion
36
+ export { __reExport as n, __exportAll as t };
@@ -1 +1 @@
1
- export * from '@shikijs/core';
1
+ export * from "@shikijs/core";
@@ -1,4 +1,13 @@
1
- import { setDefaultWasmLoader } from '@shikijs/engine-oniguruma';
2
- export * from '@shikijs/core';
1
+ import { setDefaultWasmLoader } from "@shikijs/engine-oniguruma";
3
2
 
4
- setDefaultWasmLoader(() => import('shiki/wasm'));
3
+ export * from "@shikijs/core"
4
+
5
+ //#region src/core-unwasm.ts
6
+ /**
7
+ * In environments where WebAssembly can be treated as native ESM and https://github.com/unjs/unwasm,
8
+ * We add the wasm file as the dependency so users don't need to call `loadWasm` manually.
9
+ */
10
+ setDefaultWasmLoader(() => import("shiki/wasm"));
11
+
12
+ //#endregion
13
+ export { };
package/dist/core.d.mts CHANGED
@@ -1,5 +1,2 @@
1
- export * from '@shikijs/core';
2
- import '@shikijs/engine-oniguruma/wasm-inlined';
3
- import '@shikijs/engine-javascript';
4
- import '@shikijs/engine-oniguruma';
5
- import '@shikijs/vscode-textmate';
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
+ export * from "@shikijs/core";
package/dist/core.mjs CHANGED
@@ -1 +1,5 @@
1
- export * from '@shikijs/core';
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
+
3
+ export * from "@shikijs/core"
4
+
5
+ export { };
@@ -1 +1 @@
1
- export * from '@shikijs/engine-javascript';
1
+ export * from "@shikijs/engine-javascript";
@@ -1 +1,3 @@
1
- export * from '@shikijs/engine-javascript';
1
+ export * from "@shikijs/engine-javascript"
2
+
3
+ export { };
@@ -1 +1 @@
1
- export * from '@shikijs/engine-oniguruma';
1
+ export * from "@shikijs/engine-oniguruma";
@@ -1 +1,11 @@
1
- export * from '@shikijs/engine-oniguruma';
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
+
3
+ export * from "@shikijs/engine-oniguruma"
4
+
5
+ //#region src/engine-oniguruma.ts
6
+ var engine_oniguruma_exports = /* @__PURE__ */ __exportAll({});
7
+ import * as import__shikijs_engine_oniguruma from "@shikijs/engine-oniguruma";
8
+ __reExport(engine_oniguruma_exports, import__shikijs_engine_oniguruma);
9
+
10
+ //#endregion
11
+ export { engine_oniguruma_exports as t };
package/dist/index.d.mts CHANGED
@@ -1,10 +1,15 @@
1
- export { Highlighter, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter } from './bundle-full.mjs';
2
- export { BuiltinLanguage, BuiltinTheme } from './types.mjs';
3
- export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
4
- export { createOnigurumaEngine, loadWasm } from '@shikijs/engine-oniguruma';
5
- export * from '@shikijs/core';
6
- export { BundledLanguage, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo } from './langs.mjs';
7
- export { BundledTheme, bundledThemes, bundledThemesInfo } from './themes.mjs';
8
- import 'hast';
9
- import '@shikijs/types';
10
- import '@shikijs/core/types';
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
+ import { a as bundledLanguagesInfo, i as bundledLanguagesBase, n as bundledLanguages, r as bundledLanguagesAlias, t as BundledLanguage } from "./langs-bundle-full-C-zczmvu.mjs";
3
+ import { BundledTheme, bundledThemes, bundledThemesInfo } from "./themes.mjs";
4
+ import { Highlighter, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter, t as bundle_full_d_exports } from "./bundle-full.mjs";
5
+ import { BuiltinLanguage, BuiltinTheme } from "./types.mjs";
6
+ import { createOnigurumaEngine, loadWasm } from "@shikijs/engine-oniguruma";
7
+ import { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from "@shikijs/engine-javascript";
8
+ export * from "@shikijs/core";
9
+
10
+ //#region src/index.d.ts
11
+ declare namespace index_d_exports {
12
+ export { BuiltinLanguage, BuiltinTheme, BundledLanguage, BundledTheme, Highlighter, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, bundledThemes, bundledThemesInfo, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, createJavaScriptRegexEngine, createOnigurumaEngine, defaultJavaScriptRegexConstructor, getLastGrammarState, getSingletonHighlighter, loadWasm };
13
+ }
14
+ //#endregion
15
+ export { type BuiltinLanguage, type BuiltinTheme, BundledLanguage, BundledTheme, Highlighter, bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, bundledThemes, bundledThemesInfo, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, createJavaScriptRegexEngine, createOnigurumaEngine, defaultJavaScriptRegexConstructor, getLastGrammarState, getSingletonHighlighter, loadWasm };
package/dist/index.mjs CHANGED
@@ -1,6 +1,34 @@
1
- export { codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter } from './bundle-full.mjs';
2
- export { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from '@shikijs/engine-javascript';
3
- export { createOnigurumaEngine, loadWasm } from '@shikijs/engine-oniguruma';
4
- export * from '@shikijs/core';
5
- export { bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo } from './langs.mjs';
6
- export { bundledThemes, bundledThemesInfo } from './themes.mjs';
1
+ import { n as __reExport, t as __exportAll } from "./chunk-CtajNgzt.mjs";
2
+ import { i as bundledLanguagesInfo, n as bundledLanguagesAlias, r as bundledLanguagesBase, t as bundledLanguages } from "./langs-bundle-full-CQWtMIqW.mjs";
3
+ import { bundledThemes, bundledThemesInfo } from "./themes.mjs";
4
+ import { codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, getLastGrammarState, getSingletonHighlighter, t as bundle_full_exports } from "./bundle-full.mjs";
5
+ import { createOnigurumaEngine, loadWasm } from "@shikijs/engine-oniguruma";
6
+ import { createJavaScriptRegexEngine, defaultJavaScriptRegexConstructor } from "@shikijs/engine-javascript";
7
+
8
+ export * from "@shikijs/core"
9
+
10
+ //#region src/index.ts
11
+ var src_exports = /* @__PURE__ */ __exportAll({
12
+ bundledLanguages: () => bundledLanguages,
13
+ bundledLanguagesAlias: () => bundledLanguagesAlias,
14
+ bundledLanguagesBase: () => bundledLanguagesBase,
15
+ bundledLanguagesInfo: () => bundledLanguagesInfo,
16
+ bundledThemes: () => bundledThemes,
17
+ bundledThemesInfo: () => bundledThemesInfo,
18
+ codeToHast: () => codeToHast,
19
+ codeToHtml: () => codeToHtml,
20
+ codeToTokens: () => codeToTokens,
21
+ codeToTokensBase: () => codeToTokensBase,
22
+ codeToTokensWithThemes: () => codeToTokensWithThemes,
23
+ createHighlighter: () => createHighlighter,
24
+ createJavaScriptRegexEngine: () => createJavaScriptRegexEngine,
25
+ createOnigurumaEngine: () => createOnigurumaEngine,
26
+ defaultJavaScriptRegexConstructor: () => defaultJavaScriptRegexConstructor,
27
+ getLastGrammarState: () => getLastGrammarState,
28
+ getSingletonHighlighter: () => getSingletonHighlighter,
29
+ loadWasm: () => loadWasm
30
+ });
31
+ __reExport(src_exports, bundle_full_exports);
32
+
33
+ //#endregion
34
+ export { bundledLanguages, bundledLanguagesAlias, bundledLanguagesBase, bundledLanguagesInfo, bundledThemes, bundledThemesInfo, codeToHast, codeToHtml, codeToTokens, codeToTokensBase, codeToTokensWithThemes, createHighlighter, createJavaScriptRegexEngine, createOnigurumaEngine, defaultJavaScriptRegexConstructor, getLastGrammarState, getSingletonHighlighter, loadWasm };
@@ -0,0 +1 @@
1
+ import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
@@ -0,0 +1 @@
1
+ export { default } from '@shikijs/langs/bird'
@@ -0,0 +1 @@
1
+ import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
@@ -0,0 +1 @@
1
+ export { default } from '@shikijs/langs/bird2'
@@ -0,0 +1 @@
1
+ import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
@@ -0,0 +1 @@
1
+ export { default } from '@shikijs/langs/just'
@@ -0,0 +1 @@
1
+ import { LanguageRegistration } from '@shikijs/core';declare const reg: LanguageRegistration[];export default reg
@@ -0,0 +1 @@
1
+ export { default } from '@shikijs/langs/nextflow-groovy'
@@ -0,0 +1,14 @@
1
+ import { BundledLanguageInfo, DynamicImportLanguageRegistration } from "@shikijs/types";
2
+
3
+ //#region src/langs-bundle-full.d.ts
4
+ declare const bundledLanguagesInfo: BundledLanguageInfo[];
5
+ declare const bundledLanguagesBase: {
6
+ [k: string]: DynamicImportLanguageRegistration;
7
+ };
8
+ declare const bundledLanguagesAlias: {
9
+ [k: string]: DynamicImportLanguageRegistration;
10
+ };
11
+ type BundledLanguage = '1c' | '1c-query' | 'abap' | 'actionscript-3' | 'ada' | 'adoc' | 'angular-html' | 'angular-ts' | 'apache' | 'apex' | 'apl' | 'applescript' | 'ara' | 'asciidoc' | 'asm' | 'astro' | 'awk' | 'ballerina' | 'bash' | 'bat' | 'batch' | 'be' | 'beancount' | 'berry' | 'bibtex' | 'bicep' | 'bird' | 'bird2' | 'blade' | 'bsl' | 'c' | 'c#' | 'c++' | 'c3' | 'cadence' | 'cairo' | 'cdc' | 'cjs' | 'clarity' | 'clj' | 'clojure' | 'closure-templates' | 'cmake' | 'cmd' | 'cobol' | 'codeowners' | 'codeql' | 'coffee' | 'coffeescript' | 'common-lisp' | 'console' | 'coq' | 'cpp' | 'cql' | 'crystal' | 'cs' | 'csharp' | 'css' | 'csv' | 'cts' | 'cue' | 'cypher' | 'd' | 'dart' | 'dax' | 'desktop' | 'diff' | 'docker' | 'dockerfile' | 'dotenv' | 'dream-maker' | 'edge' | 'elisp' | 'elixir' | 'elm' | 'emacs-lisp' | 'erb' | 'erl' | 'erlang' | 'f' | 'f#' | 'f03' | 'f08' | 'f18' | 'f77' | 'f90' | 'f95' | 'fennel' | 'fish' | 'fluent' | 'for' | 'fortran-fixed-form' | 'fortran-free-form' | 'fs' | 'fsharp' | 'fsl' | 'ftl' | 'gd' | 'gdresource' | 'gdscript' | 'gdshader' | 'genie' | 'gherkin' | 'git-commit' | 'git-rebase' | 'gjs' | 'gleam' | 'glimmer-js' | 'glimmer-ts' | 'glsl' | 'gn' | 'gnuplot' | 'go' | 'gql' | 'graphql' | 'groovy' | 'gts' | 'hack' | 'haml' | 'handlebars' | 'haskell' | 'haxe' | 'hbs' | 'hcl' | 'hjson' | 'hlsl' | 'hs' | 'html' | 'html-derivative' | 'http' | 'hurl' | 'hxml' | 'hy' | 'imba' | 'ini' | 'jade' | 'java' | 'javascript' | 'jinja' | 'jison' | 'jl' | 'js' | 'json' | 'json5' | 'jsonc' | 'jsonl' | 'jsonnet' | 'jssm' | 'jsx' | 'julia' | 'just' | 'kdl' | 'kotlin' | 'kql' | 'kt' | 'kts' | 'kusto' | 'latex' | 'lean' | 'lean4' | 'less' | 'liquid' | 'lisp' | 'lit' | 'llvm' | 'log' | 'logo' | 'lua' | 'luau' | 'make' | 'makefile' | 'markdown' | 'marko' | 'matlab' | 'mbt' | 'mbti' | 'md' | 'mdc' | 'mdx' | 'mediawiki' | 'mermaid' | 'mips' | 'mipsasm' | 'mjs' | 'mmd' | 'mojo' | 'moonbit' | 'move' | 'mts' | 'nar' | 'narrat' | 'nextflow' | 'nextflow-groovy' | 'nf' | 'nginx' | 'nim' | 'nix' | 'nu' | 'nushell' | 'objc' | 'objective-c' | 'objective-cpp' | 'ocaml' | 'odin' | 'openscad' | 'pascal' | 'perl' | 'perl6' | 'php' | 'pkl' | 'plsql' | 'po' | 'polar' | 'postcss' | 'pot' | 'potx' | 'powerquery' | 'powershell' | 'prisma' | 'prolog' | 'properties' | 'proto' | 'protobuf' | 'ps' | 'ps1' | 'pug' | 'puppet' | 'purescript' | 'py' | 'python' | 'ql' | 'qml' | 'qmldir' | 'qss' | 'r' | 'racket' | 'raku' | 'razor' | 'rb' | 'reg' | 'regex' | 'regexp' | 'rel' | 'riscv' | 'ron' | 'rosmsg' | 'rs' | 'rst' | 'ruby' | 'rust' | 'sas' | 'sass' | 'scad' | 'scala' | 'scheme' | 'scss' | 'sdbl' | 'sh' | 'shader' | 'shaderlab' | 'shell' | 'shellscript' | 'shellsession' | 'smalltalk' | 'solidity' | 'soy' | 'sparql' | 'spl' | 'splunk' | 'sql' | 'ssh-config' | 'stata' | 'styl' | 'stylus' | 'surql' | 'surrealql' | 'svelte' | 'swift' | 'system-verilog' | 'systemd' | 'talon' | 'talonscript' | 'tasl' | 'tcl' | 'templ' | 'terraform' | 'tex' | 'tf' | 'tfvars' | 'toml' | 'tres' | 'ts' | 'ts-tags' | 'tscn' | 'tsp' | 'tsv' | 'tsx' | 'turtle' | 'twig' | 'typ' | 'typescript' | 'typespec' | 'typst' | 'v' | 'vala' | 'vb' | 'verilog' | 'vhdl' | 'vim' | 'viml' | 'vimscript' | 'vue' | 'vue-html' | 'vue-vine' | 'vy' | 'vyper' | 'wasm' | 'wenyan' | 'wgsl' | 'wiki' | 'wikitext' | 'wit' | 'wl' | 'wolfram' | 'xml' | 'xsl' | 'yaml' | 'yml' | 'zenscript' | 'zig' | 'zsh' | '文言';
12
+ declare const bundledLanguages: Record<BundledLanguage, DynamicImportLanguageRegistration>;
13
+ //#endregion
14
+ export { bundledLanguagesInfo as a, bundledLanguagesBase as i, bundledLanguages as n, bundledLanguagesAlias as r, BundledLanguage as t };