shiki-codegen 2.4.2 → 3.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shiki-codegen",
3
3
  "type": "module",
4
- "version": "2.4.2",
4
+ "version": "3.0.0",
5
5
  "description": "Codegen for fine-grained Shiki bundles.",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -18,14 +18,8 @@
18
18
  ],
19
19
  "sideEffects": false,
20
20
  "exports": {
21
- ".": {
22
- "types": "./dist/index.d.mts",
23
- "default": "./dist/index.mjs"
24
- },
25
- "./cli": {
26
- "types": "./dist/cli.d.mts",
27
- "default": "./dist/cli.mjs"
28
- }
21
+ ".": "./dist/index.mjs",
22
+ "./cli": "./dist/cli.mjs"
29
23
  },
30
24
  "main": "./dist/index.mjs",
31
25
  "module": "./dist/index.mjs",
@@ -40,7 +34,7 @@
40
34
  "dependencies": {
41
35
  "cac": "^6.7.14",
42
36
  "prettier": "^3.5.1",
43
- "shiki": "2.4.2"
37
+ "shiki": "3.0.0"
44
38
  },
45
39
  "scripts": {
46
40
  "build": "unbuild",
package/dist/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }
package/dist/index.d.ts DELETED
@@ -1,50 +0,0 @@
1
- import { Options } from 'prettier';
2
- import { BundledLanguage, BundledTheme } from 'shiki';
3
-
4
- interface ShikiCodegenOptions {
5
- /**
6
- * The header to add to the generated code.
7
- *
8
- * @default '/* Generate by @shikijs/codegen *\/'
9
- */
10
- header?: string;
11
- /**
12
- * The languages to bundle.
13
- */
14
- langs: readonly BundledLanguage[];
15
- /**
16
- * The themes to bundle.
17
- */
18
- themes: readonly BundledTheme[];
19
- /**
20
- * The engine to use for syntax highlighting.
21
- */
22
- engine: 'oniguruma' | 'javascript' | 'javascript-raw';
23
- /**
24
- * Use precompiled grammars.
25
- * Only available when `engine` is set to `javascript` or `javascript-raw`.
26
- */
27
- precompiled?: boolean;
28
- /**
29
- * Whether to generate TypeScript code.
30
- *
31
- * @default true
32
- */
33
- typescript?: boolean;
34
- /**
35
- * Generate shorthands for the highlighter.
36
- *
37
- * @default true
38
- */
39
- shorthands?: boolean;
40
- /**
41
- * Use Prettier to format the generated code.
42
- */
43
- format?: boolean | Options;
44
- }
45
- interface ShikiCodegenResult {
46
- code: string;
47
- }
48
- declare function codegen(options: ShikiCodegenOptions): Promise<ShikiCodegenResult>;
49
-
50
- export { type ShikiCodegenOptions, type ShikiCodegenResult, codegen };