@shikijs/colorized-brackets 3.23.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.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { ShikiTransformer } from 'shiki';
1
+ import { ShikiTransformer } from "shiki";
2
2
 
3
+ //#region src/types.d.ts
3
4
  /**
4
5
  * Colorized brackets plugin config
5
6
  *
@@ -9,10 +10,10 @@ import { ShikiTransformer } from 'shiki';
9
10
  * @property explicitTrigger - if true, the transformer only runs for code blocks with the `colorize-brackets` meta string
10
11
  */
11
12
  interface TransformerColorizedBracketsOptions {
12
- themes: Record<string, string[]>;
13
- bracketPairs: BracketPair[];
14
- langs: Record<string, ColorizedBracketsLangConfig>;
15
- explicitTrigger?: boolean;
13
+ themes: Record<string, string[]>;
14
+ bracketPairs: BracketPair[];
15
+ langs: Record<string, ColorizedBracketsLangConfig>;
16
+ explicitTrigger?: boolean;
16
17
  }
17
18
  /**
18
19
  * Language-specific config
@@ -21,8 +22,8 @@ interface TransformerColorizedBracketsOptions {
21
22
  * @property bracketPairs - language-specific bracket pairs; if not defined, it uses the bracket from the base config
22
23
  */
23
24
  interface ColorizedBracketsLangConfig {
24
- themes?: Record<string, string[]>;
25
- bracketPairs?: BracketPair[];
25
+ themes?: Record<string, string[]>;
26
+ bracketPairs?: BracketPair[];
26
27
  }
27
28
  /**
28
29
  * Defines opening and closing brackets, and allowed Textmate scopes
@@ -33,12 +34,13 @@ interface ColorizedBracketsLangConfig {
33
34
  * @property scopesDenyList - if defined, brackets will not be colored if any of their scopes match a scope from this list
34
35
  */
35
36
  interface BracketPair {
36
- opener: string;
37
- closer: string;
38
- scopesAllowList?: string[];
39
- scopesDenyList?: string[];
37
+ opener: string;
38
+ closer: string;
39
+ scopesAllowList?: string[];
40
+ scopesDenyList?: string[];
40
41
  }
41
-
42
+ //#endregion
43
+ //#region src/index.d.ts
42
44
  /**
43
45
  * Creates a new bracket colorizer transformer
44
46
  *
@@ -58,5 +60,5 @@ interface BracketPair {
58
60
  * @returns Shiki transformer
59
61
  */
60
62
  declare function transformerColorizedBrackets(options?: Partial<TransformerColorizedBracketsOptions>): ShikiTransformer;
61
-
62
- export { transformerColorizedBrackets };
63
+ //#endregion
64
+ export { transformerColorizedBrackets };