@shikijs/colorized-brackets 2.5.0 → 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.
Files changed (2) hide show
  1. package/package.json +3 -6
  2. package/dist/index.d.ts +0 -62
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shikijs/colorized-brackets",
3
3
  "type": "module",
4
- "version": "2.5.0",
4
+ "version": "3.0.0",
5
5
  "description": "Collective of common transformers transformers for Shiki",
6
6
  "author": "Michael Moore <mscottmoore@pm.me>",
7
7
  "license": "MIT",
@@ -18,10 +18,7 @@
18
18
  ],
19
19
  "sideEffects": false,
20
20
  "exports": {
21
- ".": {
22
- "types": "./dist/index.d.mts",
23
- "default": "./dist/index.mjs"
24
- }
21
+ ".": "./dist/index.mjs"
25
22
  },
26
23
  "main": "./dist/index.mjs",
27
24
  "module": "./dist/index.mjs",
@@ -30,7 +27,7 @@
30
27
  "dist"
31
28
  ],
32
29
  "dependencies": {
33
- "shiki": "2.5.0"
30
+ "shiki": "3.0.0"
34
31
  },
35
32
  "scripts": {
36
33
  "build": "unbuild",
package/dist/index.d.ts DELETED
@@ -1,62 +0,0 @@
1
- import { ShikiTransformer } from 'shiki';
2
-
3
- /**
4
- * Colorized brackets plugin config
5
- *
6
- * @property themes - a record of theme names to bracket CSS colors; the final color is the unexpected bracket color
7
- * @property bracketPairs - bracket pair definitions
8
- * @property langs - language-specific configs that are merged with the base config
9
- * @property explicitTrigger - if true, the transformer only runs for code blocks with the `colorize-brackets` meta string
10
- */
11
- interface TransformerColorizedBracketsOptions {
12
- themes: Record<string, string[]>;
13
- bracketPairs: BracketPair[];
14
- langs: Record<string, ColorizedBracketsLangConfig>;
15
- explicitTrigger?: boolean;
16
- }
17
- /**
18
- * Language-specific config
19
- *
20
- * @property themes - language-specific theme customizations; if not defined, it uses the theme customizations from the base config
21
- * @property bracketPairs - language-specific bracket pairs; if not defined, it uses the bracket from the base config
22
- */
23
- interface ColorizedBracketsLangConfig {
24
- themes?: Record<string, string[]>;
25
- bracketPairs?: BracketPair[];
26
- }
27
- /**
28
- * Defines opening and closing brackets, and allowed Textmate scopes
29
- *
30
- * @property opener - the string that opens a bracket pair; multi-character strings are not yet supported
31
- * @property closer - the string that closes a bracket pair; multi-character strings are not yet supported
32
- * @property scopesAllowList - if defined, brackets will only be colored if at least 1 of their scopes matches a scope from this list
33
- * @property scopesDenyList - if defined, brackets will not be colored if any of their scopes match a scope from this list
34
- */
35
- interface BracketPair {
36
- opener: string;
37
- closer: string;
38
- scopesAllowList?: string[];
39
- scopesDenyList?: string[];
40
- }
41
-
42
- /**
43
- * Creates a new bracket colorizer transformer
44
- *
45
- * @example basic usage
46
- * ```ts
47
- * const html = await shiki.codeToHtml(code, {
48
- * lang: 'ts',
49
- * theme: 'dark-plus',
50
- * transformers: [transformerColorizedBrackets()],
51
- * });
52
- * ```
53
- *
54
- * @param options
55
- * @param options.themes - custom themes; all Shiki built-in themes are supported without additional configuration
56
- * @param options.bracketPairs - bracket definitions; be default [], {}, (), and <> (TS-only)
57
- * @param options.langs - language-specific overrides for themes and bracketPairs
58
- * @returns Shiki transformer
59
- */
60
- declare function transformerColorizedBrackets(options?: Partial<TransformerColorizedBracketsOptions>): ShikiTransformer;
61
-
62
- export { transformerColorizedBrackets };