@shikijs/core 1.0.0-beta.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,2 @@
1
+ export { A as AnsiLanguage, o as Awaitable, B as BundledHighlighterOptions, $ as BundledLanguageInfo, a0 as BundledThemeInfo, y as CodeOptionsMeta, w as CodeOptionsMultipleThemes, v as CodeOptionsSingleTheme, x as CodeOptionsThemes, C as CodeToHastOptions, u as CodeToHastOptionsCommon, c as CodeToThemedTokensOptions, e as CodeToTokensWithThemesOptions, Z as DynamicImportLanguageRegistration, _ as DynamicImportThemeRegistration, F as FontStyle, I as Grammar, a as HighlighterCoreOptions, H as HighlighterGeneric, U as HtmlRendererOptions, Q as HtmlRendererOptionsCommon, I as IGrammar, m as IRawGrammar, L as LanguageInput, t as LanguageRegistration, M as MaybeArray, p as MaybeGetter, q as MaybeModule, P as PlainTextLanguage, m as RawGrammar, b as RequireKeys, s as ResolveBundleKey, g as ShikiInternal, O as ShikiTransformer, K as ShikiTransformerContext, j as ShikiTransformerContextCommon, J as ShikiTransformerContextMeta, a1 as ShikijiTransformer, a2 as ShikijiTransformerContext, a3 as ShikijiTransformerContextCommon, n as SpecialLanguage, S as SpecialTheme, r as StringLiteralUnion, T as ThemeInput, G as ThemeRegistration, l as ThemeRegistrationAny, D as ThemeRegistrationRaw, h as ThemeRegistrationResolved, d as ThemedToken, W as ThemedTokenExplanation, V as ThemedTokenScopeExplanation, f as ThemedTokenWithVariants, X as TokenBase, Y as TokenStyles, i as TokenizeWithThemeOptions, z as TransformerOptions } from './chunk-types.mjs';
2
+ import './chunk-index.mjs';
package/dist/types.mjs ADDED
@@ -0,0 +1,10 @@
1
+ var FontStyle;
2
+ (function (FontStyle) {
3
+ FontStyle[FontStyle["NotSet"] = -1] = "NotSet";
4
+ FontStyle[FontStyle["None"] = 0] = "None";
5
+ FontStyle[FontStyle["Italic"] = 1] = "Italic";
6
+ FontStyle[FontStyle["Bold"] = 2] = "Bold";
7
+ FontStyle[FontStyle["Underline"] = 4] = "Underline";
8
+ })(FontStyle || (FontStyle = {}));
9
+
10
+ export { FontStyle };
@@ -0,0 +1,5 @@
1
+ import { W as WebAssemblyInstantiator } from './chunk-index.mjs';
2
+
3
+ declare const getWasm: WebAssemblyInstantiator;
4
+
5
+ export { getWasm as default };
@@ -0,0 +1,7 @@
1
+ const getWasm = async (info) => {
2
+ // @ts-expect-error this will be compiled to ArrayBuffer
3
+ const binray = await import('./onig.mjs').then(m => m.default);
4
+ return WebAssembly.instantiate(binray, info).then(wasm => wasm.instance.exports);
5
+ };
6
+
7
+ export { getWasm as default };
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@shikijs/core",
3
+ "type": "module",
4
+ "version": "1.0.0-beta.0",
5
+ "description": "Core of Shiki",
6
+ "author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
7
+ "license": "MIT",
8
+ "homepage": "https://github.com/shikijs/shiki#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/shikijs/shiki.git",
12
+ "directory": "packages/core"
13
+ },
14
+ "bugs": "https://github.com/shikijs/shiki/issues",
15
+ "keywords": [
16
+ "shiki"
17
+ ],
18
+ "sideEffects": false,
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.mts",
22
+ "default": "./dist/index.mjs"
23
+ },
24
+ "./wasm-inlined": {
25
+ "types": "./dist/wasm-inlined.d.mts",
26
+ "default": "./dist/wasm-inlined.mjs"
27
+ },
28
+ "./textmate": {
29
+ "types": "./dist/textmate.d.mts",
30
+ "default": "./dist/textmate.mjs"
31
+ },
32
+ "./types": {
33
+ "types": "./dist/types.d.mts"
34
+ },
35
+ "./dist/*": "./dist/*",
36
+ "./*": "./dist/*"
37
+ },
38
+ "main": "./dist/index.mjs",
39
+ "module": "./dist/index.mjs",
40
+ "types": "./dist/index.d.mts",
41
+ "typesVersions": {
42
+ "*": {
43
+ "wasm": [
44
+ "./dist/wasm.d.mts"
45
+ ],
46
+ "types": [
47
+ "./dist/types.d.mts"
48
+ ],
49
+ "textmate": [
50
+ "./dist/textmate.d.mts"
51
+ ],
52
+ "*": [
53
+ "./dist/*",
54
+ "./*"
55
+ ]
56
+ }
57
+ },
58
+ "files": [
59
+ "dist"
60
+ ],
61
+ "devDependencies": {
62
+ "hast-util-to-html": "^9.0.0",
63
+ "vscode-oniguruma": "^1.7.0"
64
+ },
65
+ "scripts": {
66
+ "build": "rimraf dist && rollup -c",
67
+ "dev": "rollup -cw",
68
+ "test": "vitest"
69
+ }
70
+ }