@shikijs/core 1.16.3 → 1.17.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.
- package/dist/index.d.mts +11 -252
- package/dist/index.d.ts +236 -0
- package/dist/index.mjs +1460 -5556
- package/dist/textmate.d.mts +1 -0
- package/dist/textmate.d.ts +1 -0
- package/dist/textmate.mjs +1 -0
- package/dist/types.d.mts +3 -766
- package/dist/types.d.ts +3 -0
- package/dist/types.mjs +1 -10
- package/dist/wasm-inlined.d.mts +1 -7
- package/dist/wasm-inlined.d.ts +1 -0
- package/dist/wasm-inlined.mjs +1 -9
- package/package.json +7 -9
- package/dist/chunk-engines.d.mts +0 -60
- package/dist/onig.d.mts +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shikijs/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.17.0",
|
|
5
5
|
"description": "Core of Shiki",
|
|
6
6
|
"author": "Pine Wu <octref@gmail.com>; Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,18 +60,16 @@
|
|
|
60
60
|
"dist"
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@shikijs/vscode-textmate": "^9.2.
|
|
63
|
+
"@shikijs/vscode-textmate": "^9.2.2",
|
|
64
64
|
"@types/hast": "^3.0.4",
|
|
65
|
-
"oniguruma-to-js": "0.3.3",
|
|
66
|
-
"regex": "4.3.2"
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
65
|
"hast-util-to-html": "^9.0.2",
|
|
70
|
-
"
|
|
66
|
+
"@shikijs/engine-javascript": "1.17.0",
|
|
67
|
+
"@shikijs/engine-oniguruma": "1.17.0",
|
|
68
|
+
"@shikijs/types": "1.17.0"
|
|
71
69
|
},
|
|
72
70
|
"scripts": {
|
|
73
|
-
"build": "
|
|
74
|
-
"dev": "
|
|
71
|
+
"build": "unbuild",
|
|
72
|
+
"dev": "unbuild --stub",
|
|
75
73
|
"test": "vitest"
|
|
76
74
|
}
|
|
77
75
|
}
|
package/dist/chunk-engines.d.mts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { OnigScanner, OnigString } from '@shikijs/vscode-textmate';
|
|
2
|
-
|
|
3
|
-
type Awaitable<T> = T | Promise<T>;
|
|
4
|
-
type MaybeGetter<T> = Awaitable<MaybeModule<T>> | (() => Awaitable<MaybeModule<T>>);
|
|
5
|
-
type MaybeModule<T> = T | {
|
|
6
|
-
default: T;
|
|
7
|
-
};
|
|
8
|
-
type MaybeArray<T> = T | T[];
|
|
9
|
-
type RequireKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
10
|
-
interface Nothing {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* type StringLiteralUnion<'foo'> = 'foo' | string
|
|
14
|
-
* This has auto completion whereas `'foo' | string` doesn't
|
|
15
|
-
* Adapted from https://github.com/microsoft/TypeScript/issues/29729
|
|
16
|
-
*/
|
|
17
|
-
type StringLiteralUnion<T extends U, U = string> = T | (U & Nothing);
|
|
18
|
-
|
|
19
|
-
interface PatternScanner extends OnigScanner {
|
|
20
|
-
}
|
|
21
|
-
interface RegexEngineString extends OnigString {
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Engine for RegExp matching and scanning.
|
|
25
|
-
*/
|
|
26
|
-
interface RegexEngine {
|
|
27
|
-
createScanner: (patterns: string[]) => PatternScanner;
|
|
28
|
-
createString: (s: string) => RegexEngineString;
|
|
29
|
-
}
|
|
30
|
-
interface WebAssemblyInstantiator {
|
|
31
|
-
(importObject: Record<string, Record<string, WebAssembly.ImportValue>> | undefined): Promise<WebAssemblyInstance>;
|
|
32
|
-
}
|
|
33
|
-
type WebAssemblyInstance = WebAssembly.WebAssemblyInstantiatedSource | WebAssembly.Instance | WebAssembly.Instance['exports'];
|
|
34
|
-
type OnigurumaLoadOptions = {
|
|
35
|
-
instantiator: WebAssemblyInstantiator;
|
|
36
|
-
} | {
|
|
37
|
-
default: WebAssemblyInstantiator;
|
|
38
|
-
} | {
|
|
39
|
-
data: ArrayBufferView | ArrayBuffer | Response;
|
|
40
|
-
};
|
|
41
|
-
type LoadWasmOptionsPlain = OnigurumaLoadOptions | WebAssemblyInstantiator | ArrayBufferView | ArrayBuffer | Response;
|
|
42
|
-
type LoadWasmOptions = Awaitable<LoadWasmOptionsPlain> | (() => Awaitable<LoadWasmOptionsPlain>);
|
|
43
|
-
interface JavaScriptRegexEngineOptions {
|
|
44
|
-
/**
|
|
45
|
-
* Whether to allow invalid regex patterns.
|
|
46
|
-
*/
|
|
47
|
-
forgiving?: boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Cache for regex patterns.
|
|
50
|
-
*/
|
|
51
|
-
cache?: Map<string, RegExp | Error>;
|
|
52
|
-
/**
|
|
53
|
-
* Custom pattern to RegExp constructor.
|
|
54
|
-
*
|
|
55
|
-
* By default `oniguruma-to-js` is used.
|
|
56
|
-
*/
|
|
57
|
-
regexConstructor?: (pattern: string) => RegExp;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export type { Awaitable as A, JavaScriptRegexEngineOptions as J, LoadWasmOptions as L, MaybeArray as M, OnigurumaLoadOptions as O, PatternScanner as P, RequireKeys as R, StringLiteralUnion as S, WebAssemblyInstantiator as W, RegexEngine as a, MaybeGetter as b, RegexEngineString as c, WebAssemblyInstance as d, LoadWasmOptionsPlain as e, MaybeModule as f };
|
package/dist/onig.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
declare const binary: ArrayBuffer; export default binary;
|