@blcklab/yuirinx 0.1.1

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 (179) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +249 -0
  3. package/dist/cjs/core/index.cjs +572 -0
  4. package/dist/cjs/index.cjs +600 -0
  5. package/dist/cjs/languages/bash.cjs +145 -0
  6. package/dist/cjs/languages/c.cjs +177 -0
  7. package/dist/cjs/languages/cpp.cjs +235 -0
  8. package/dist/cjs/languages/csharp.cjs +223 -0
  9. package/dist/cjs/languages/css.cjs +94 -0
  10. package/dist/cjs/languages/dart.cjs +204 -0
  11. package/dist/cjs/languages/dockerfile.cjs +80 -0
  12. package/dist/cjs/languages/go.cjs +185 -0
  13. package/dist/cjs/languages/graphql.cjs +91 -0
  14. package/dist/cjs/languages/html.cjs +74 -0
  15. package/dist/cjs/languages/ini.cjs +54 -0
  16. package/dist/cjs/languages/java.cjs +202 -0
  17. package/dist/cjs/languages/javascript.cjs +262 -0
  18. package/dist/cjs/languages/json.cjs +60 -0
  19. package/dist/cjs/languages/jsx.cjs +263 -0
  20. package/dist/cjs/languages/kotlin.cjs +211 -0
  21. package/dist/cjs/languages/markdown.cjs +70 -0
  22. package/dist/cjs/languages/nginx.cjs +57 -0
  23. package/dist/cjs/languages/php.cjs +194 -0
  24. package/dist/cjs/languages/plaintext.cjs +34 -0
  25. package/dist/cjs/languages/python.cjs +200 -0
  26. package/dist/cjs/languages/ruby.cjs +117 -0
  27. package/dist/cjs/languages/rust.cjs +179 -0
  28. package/dist/cjs/languages/scss.cjs +98 -0
  29. package/dist/cjs/languages/shell.cjs +145 -0
  30. package/dist/cjs/languages/sql.cjs +150 -0
  31. package/dist/cjs/languages/svelte.cjs +74 -0
  32. package/dist/cjs/languages/swift.cjs +216 -0
  33. package/dist/cjs/languages/toml.cjs +63 -0
  34. package/dist/cjs/languages/tsx.cjs +264 -0
  35. package/dist/cjs/languages/typescript.cjs +263 -0
  36. package/dist/cjs/languages/vue.cjs +74 -0
  37. package/dist/cjs/languages/xml.cjs +77 -0
  38. package/dist/cjs/languages/yaml.cjs +65 -0
  39. package/dist/cjs/themes/index.cjs +222 -0
  40. package/dist/cjs/themes/yuirinx-aurora.cjs +90 -0
  41. package/dist/cjs/themes/yuirinx-noir.cjs +90 -0
  42. package/dist/cjs/themes/yuirinx-pearl.cjs +90 -0
  43. package/dist/esm/core/index.js +542 -0
  44. package/dist/esm/index.js +565 -0
  45. package/dist/esm/languages/bash.js +118 -0
  46. package/dist/esm/languages/c.js +150 -0
  47. package/dist/esm/languages/cpp.js +208 -0
  48. package/dist/esm/languages/csharp.js +196 -0
  49. package/dist/esm/languages/css.js +67 -0
  50. package/dist/esm/languages/dart.js +177 -0
  51. package/dist/esm/languages/dockerfile.js +53 -0
  52. package/dist/esm/languages/go.js +158 -0
  53. package/dist/esm/languages/graphql.js +64 -0
  54. package/dist/esm/languages/html.js +47 -0
  55. package/dist/esm/languages/ini.js +27 -0
  56. package/dist/esm/languages/java.js +175 -0
  57. package/dist/esm/languages/javascript.js +235 -0
  58. package/dist/esm/languages/json.js +33 -0
  59. package/dist/esm/languages/jsx.js +236 -0
  60. package/dist/esm/languages/kotlin.js +184 -0
  61. package/dist/esm/languages/markdown.js +43 -0
  62. package/dist/esm/languages/nginx.js +30 -0
  63. package/dist/esm/languages/php.js +167 -0
  64. package/dist/esm/languages/plaintext.js +9 -0
  65. package/dist/esm/languages/python.js +173 -0
  66. package/dist/esm/languages/ruby.js +90 -0
  67. package/dist/esm/languages/rust.js +152 -0
  68. package/dist/esm/languages/scss.js +71 -0
  69. package/dist/esm/languages/shell.js +118 -0
  70. package/dist/esm/languages/sql.js +123 -0
  71. package/dist/esm/languages/svelte.js +47 -0
  72. package/dist/esm/languages/swift.js +189 -0
  73. package/dist/esm/languages/toml.js +36 -0
  74. package/dist/esm/languages/tsx.js +237 -0
  75. package/dist/esm/languages/typescript.js +236 -0
  76. package/dist/esm/languages/vue.js +47 -0
  77. package/dist/esm/languages/xml.js +50 -0
  78. package/dist/esm/languages/yaml.js +38 -0
  79. package/dist/esm/themes/index.js +193 -0
  80. package/dist/esm/themes/yuirinx-aurora.js +65 -0
  81. package/dist/esm/themes/yuirinx-noir.js +65 -0
  82. package/dist/esm/themes/yuirinx-pearl.js +65 -0
  83. package/dist/types/core/create-highlighter.d.cts +3 -0
  84. package/dist/types/core/create-highlighter.d.ts +3 -0
  85. package/dist/types/core/errors.d.cts +6 -0
  86. package/dist/types/core/errors.d.ts +6 -0
  87. package/dist/types/core/escape.d.cts +2 -0
  88. package/dist/types/core/escape.d.ts +2 -0
  89. package/dist/types/core/grammar.d.cts +14 -0
  90. package/dist/types/core/grammar.d.ts +14 -0
  91. package/dist/types/core/index.d.cts +6 -0
  92. package/dist/types/core/index.d.ts +6 -0
  93. package/dist/types/core/renderer.d.cts +6 -0
  94. package/dist/types/core/renderer.d.ts +6 -0
  95. package/dist/types/core/tokenizer.d.cts +3 -0
  96. package/dist/types/core/tokenizer.d.ts +3 -0
  97. package/dist/types/core/types.d.cts +134 -0
  98. package/dist/types/core/types.d.ts +134 -0
  99. package/dist/types/index.d.cts +2 -0
  100. package/dist/types/index.d.ts +2 -0
  101. package/dist/types/languages/bash.d.cts +3 -0
  102. package/dist/types/languages/bash.d.ts +3 -0
  103. package/dist/types/languages/c.d.cts +2 -0
  104. package/dist/types/languages/c.d.ts +2 -0
  105. package/dist/types/languages/cpp.d.cts +2 -0
  106. package/dist/types/languages/cpp.d.ts +2 -0
  107. package/dist/types/languages/csharp.d.cts +2 -0
  108. package/dist/types/languages/csharp.d.ts +2 -0
  109. package/dist/types/languages/css.d.cts +2 -0
  110. package/dist/types/languages/css.d.ts +2 -0
  111. package/dist/types/languages/dart.d.cts +2 -0
  112. package/dist/types/languages/dart.d.ts +2 -0
  113. package/dist/types/languages/dockerfile.d.cts +3 -0
  114. package/dist/types/languages/dockerfile.d.ts +3 -0
  115. package/dist/types/languages/go.d.cts +2 -0
  116. package/dist/types/languages/go.d.ts +2 -0
  117. package/dist/types/languages/graphql.d.cts +3 -0
  118. package/dist/types/languages/graphql.d.ts +3 -0
  119. package/dist/types/languages/html.d.cts +2 -0
  120. package/dist/types/languages/html.d.ts +2 -0
  121. package/dist/types/languages/ini.d.cts +3 -0
  122. package/dist/types/languages/ini.d.ts +3 -0
  123. package/dist/types/languages/java.d.cts +2 -0
  124. package/dist/types/languages/java.d.ts +2 -0
  125. package/dist/types/languages/javascript.d.cts +2 -0
  126. package/dist/types/languages/javascript.d.ts +2 -0
  127. package/dist/types/languages/json.d.cts +3 -0
  128. package/dist/types/languages/json.d.ts +3 -0
  129. package/dist/types/languages/jsx.d.cts +2 -0
  130. package/dist/types/languages/jsx.d.ts +2 -0
  131. package/dist/types/languages/kotlin.d.cts +2 -0
  132. package/dist/types/languages/kotlin.d.ts +2 -0
  133. package/dist/types/languages/markdown.d.cts +3 -0
  134. package/dist/types/languages/markdown.d.ts +3 -0
  135. package/dist/types/languages/nginx.d.cts +3 -0
  136. package/dist/types/languages/nginx.d.ts +3 -0
  137. package/dist/types/languages/php.d.cts +3 -0
  138. package/dist/types/languages/php.d.ts +3 -0
  139. package/dist/types/languages/plaintext.d.cts +3 -0
  140. package/dist/types/languages/plaintext.d.ts +3 -0
  141. package/dist/types/languages/python.d.cts +3 -0
  142. package/dist/types/languages/python.d.ts +3 -0
  143. package/dist/types/languages/ruby.d.cts +3 -0
  144. package/dist/types/languages/ruby.d.ts +3 -0
  145. package/dist/types/languages/rust.d.cts +2 -0
  146. package/dist/types/languages/rust.d.ts +2 -0
  147. package/dist/types/languages/scss.d.cts +2 -0
  148. package/dist/types/languages/scss.d.ts +2 -0
  149. package/dist/types/languages/shell.d.cts +1 -0
  150. package/dist/types/languages/shell.d.ts +1 -0
  151. package/dist/types/languages/sql.d.cts +3 -0
  152. package/dist/types/languages/sql.d.ts +3 -0
  153. package/dist/types/languages/svelte.d.cts +2 -0
  154. package/dist/types/languages/svelte.d.ts +2 -0
  155. package/dist/types/languages/swift.d.cts +2 -0
  156. package/dist/types/languages/swift.d.ts +2 -0
  157. package/dist/types/languages/toml.d.cts +3 -0
  158. package/dist/types/languages/toml.d.ts +3 -0
  159. package/dist/types/languages/tsx.d.cts +2 -0
  160. package/dist/types/languages/tsx.d.ts +2 -0
  161. package/dist/types/languages/typescript.d.cts +2 -0
  162. package/dist/types/languages/typescript.d.ts +2 -0
  163. package/dist/types/languages/vue.d.cts +2 -0
  164. package/dist/types/languages/vue.d.ts +2 -0
  165. package/dist/types/languages/xml.d.cts +2 -0
  166. package/dist/types/languages/xml.d.ts +2 -0
  167. package/dist/types/languages/yaml.d.cts +3 -0
  168. package/dist/types/languages/yaml.d.ts +3 -0
  169. package/dist/types/singleton.d.cts +11 -0
  170. package/dist/types/singleton.d.ts +11 -0
  171. package/dist/types/themes/index.d.cts +3 -0
  172. package/dist/types/themes/index.d.ts +3 -0
  173. package/dist/types/themes/yuirinx-aurora.d.cts +3 -0
  174. package/dist/types/themes/yuirinx-aurora.d.ts +3 -0
  175. package/dist/types/themes/yuirinx-noir.d.cts +3 -0
  176. package/dist/types/themes/yuirinx-noir.d.ts +3 -0
  177. package/dist/types/themes/yuirinx-pearl.d.cts +3 -0
  178. package/dist/types/themes/yuirinx-pearl.d.ts +3 -0
  179. package/package.json +471 -0
@@ -0,0 +1,134 @@
1
+ /** A registered language identifier or alias. */
2
+ export type LanguageId = string;
3
+ /** A registered theme identifier. */
4
+ export type ThemeId = string;
5
+ /** A semantic token classification such as `keyword` or `string.escape`. */
6
+ export type TokenType = string;
7
+ /** A named lexical state inside a grammar. */
8
+ export type StateName = string;
9
+ /** A source token. Offsets use JavaScript UTF-16 string indices. */
10
+ export interface Token {
11
+ readonly type: TokenType;
12
+ readonly value: string;
13
+ readonly start: number;
14
+ readonly end: number;
15
+ }
16
+ /** One active lexical state exposed to rule resolver callbacks. */
17
+ export interface TokenizerState {
18
+ readonly name: StateName;
19
+ readonly language: LanguageId;
20
+ }
21
+ /** Read-only context passed to dynamic grammar rule resolvers. */
22
+ export interface TokenizerContext {
23
+ readonly language: LanguageId;
24
+ readonly state: StateName;
25
+ readonly stack: readonly TokenizerState[];
26
+ readonly offset: number;
27
+ }
28
+ /** Static token type or a resolver based on the current regex match. */
29
+ export type TokenTypeResolver = TokenType | ((match: RegExpExecArray, context: TokenizerContext) => TokenType);
30
+ /** Static state name or a resolver based on the current regex match. */
31
+ export type StateResolver = StateName | ((match: RegExpExecArray, context: TokenizerContext) => StateName);
32
+ /** A matching grammar rule. Patterns are automatically made sticky. */
33
+ export interface MatchRule {
34
+ readonly pattern: RegExp;
35
+ readonly type?: TokenTypeResolver;
36
+ readonly push?: StateResolver;
37
+ readonly next?: StateResolver;
38
+ readonly pop?: boolean | number;
39
+ }
40
+ /** Includes another state’s rules at the current precedence position. */
41
+ export interface IncludeRule {
42
+ readonly include: StateName;
43
+ }
44
+ /** One ordered grammar rule. */
45
+ export type GrammarRule = MatchRule | IncludeRule;
46
+ /** A lexical state and its ordered rules. */
47
+ export interface GrammarState {
48
+ readonly rules: readonly GrammarRule[];
49
+ readonly fallbackType?: TokenType;
50
+ }
51
+ /** A complete language grammar. */
52
+ export interface Grammar {
53
+ readonly id: LanguageId;
54
+ readonly aliases?: readonly LanguageId[];
55
+ readonly initialState?: StateName;
56
+ readonly states: Readonly<Record<StateName, GrammarState>>;
57
+ }
58
+ /** Allowed visual style fields for a token. */
59
+ export interface TokenStyle {
60
+ readonly color?: string;
61
+ readonly backgroundColor?: string;
62
+ readonly fontStyle?: "normal" | "italic";
63
+ readonly fontWeight?: "normal" | "medium" | "semibold" | "bold";
64
+ readonly textDecoration?: "none" | "underline" | "line-through";
65
+ }
66
+ /** A serializable syntax highlighting theme. */
67
+ export interface Theme {
68
+ readonly id: ThemeId;
69
+ readonly name: string;
70
+ readonly type: "light" | "dark";
71
+ readonly foreground: string;
72
+ readonly background: string;
73
+ readonly selection?: string;
74
+ readonly lineHighlight?: string;
75
+ /** Curated colors used by the optional deterministic line-color fallback. */
76
+ readonly fallbackPalette?: readonly string[];
77
+ readonly tokens: Readonly<Record<TokenType, TokenStyle>>;
78
+ }
79
+ /** HTML rendering strategy. */
80
+ export type RenderMode = "inline" | "classes";
81
+ /** Behavior used when a requested language is unavailable. */
82
+ export type FallbackMode = "plaintext" | "color-lines";
83
+ /** Options for highlighting source code. */
84
+ export interface HighlightOptions {
85
+ readonly lang?: LanguageId | Grammar;
86
+ readonly theme?: ThemeId | Theme;
87
+ /** Unknown-language behavior. Defaults to `plaintext`. */
88
+ readonly fallback?: FallbackMode;
89
+ readonly mode?: RenderMode;
90
+ readonly wrap?: boolean;
91
+ readonly classPrefix?: string;
92
+ readonly preClass?: string;
93
+ readonly codeClass?: string;
94
+ }
95
+ /** Options for rendering an existing token array. */
96
+ export interface RenderOptions {
97
+ readonly theme?: ThemeId | Theme;
98
+ readonly mode?: RenderMode;
99
+ readonly wrap?: boolean;
100
+ readonly classPrefix?: string;
101
+ readonly language?: LanguageId;
102
+ readonly preClass?: string;
103
+ readonly codeClass?: string;
104
+ }
105
+ /** Options for converting a theme object to CSS classes. */
106
+ export interface ThemeCssOptions {
107
+ readonly selector?: string;
108
+ readonly classPrefix?: string;
109
+ readonly includeContainer?: boolean;
110
+ }
111
+ /** Initial configuration for an isolated highlighter. */
112
+ export interface HighlighterOptions {
113
+ readonly languages?: readonly Grammar[];
114
+ readonly themes?: readonly Theme[];
115
+ readonly defaultLanguage?: LanguageId;
116
+ readonly defaultTheme?: ThemeId;
117
+ /** Default behavior for unavailable language IDs. */
118
+ readonly defaultFallback?: FallbackMode;
119
+ readonly maxStateDepth?: number;
120
+ }
121
+ /** Isolated registry, tokenizer, and renderer facade. */
122
+ export interface Highlighter {
123
+ highlight(code: string, options: HighlightOptions): string;
124
+ tokenize(code: string, language: LanguageId | Grammar): Token[];
125
+ render(tokens: readonly Token[], options?: RenderOptions): string;
126
+ registerLanguage(grammar: Grammar): void;
127
+ registerTheme(theme: Theme): void;
128
+ hasLanguage(language: LanguageId): boolean;
129
+ hasTheme(theme: ThemeId): boolean;
130
+ getLanguage(language: LanguageId): Grammar | undefined;
131
+ getTheme(theme: ThemeId): Theme | undefined;
132
+ listLanguages(): readonly LanguageId[];
133
+ listThemes(): readonly ThemeId[];
134
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./core/index.cjs";
2
+ export { highlight, registerLanguage, registerTheme, render, tokenize, } from "./singleton.cjs";
@@ -0,0 +1,2 @@
1
+ export * from "./core/index.js";
2
+ export { highlight, registerLanguage, registerTheme, render, tokenize, } from "./singleton.js";
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Bash and POSIX-like shell grammar. */
3
+ export declare const bash: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Bash and POSIX-like shell grammar. */
3
+ export declare const bash: Grammar;
@@ -0,0 +1,2 @@
1
+ /** C grammar. */
2
+ export declare const c: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** C grammar. */
2
+ export declare const c: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Cpp grammar. */
2
+ export declare const cpp: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Cpp grammar. */
2
+ export declare const cpp: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Csharp grammar. */
2
+ export declare const csharp: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Csharp grammar. */
2
+ export declare const csharp: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** CSS grammar. */
2
+ export declare const css: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** CSS grammar. */
2
+ export declare const css: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Dart grammar. */
2
+ export declare const dart: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Dart grammar. */
2
+ export declare const dart: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Dockerfile grammar. */
3
+ export declare const dockerfile: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Dockerfile grammar. */
3
+ export declare const dockerfile: Grammar;
@@ -0,0 +1,2 @@
1
+ /** Go grammar. */
2
+ export declare const go: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Go grammar. */
2
+ export declare const go: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** GraphQL schema and operation grammar. */
3
+ export declare const graphql: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** GraphQL schema and operation grammar. */
3
+ export declare const graphql: Grammar;
@@ -0,0 +1,2 @@
1
+ /** HTML grammar. Embedded script/style bodies remain safely lexical/plain. */
2
+ export declare const html: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** HTML grammar. Embedded script/style bodies remain safely lexical/plain. */
2
+ export declare const html: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** INI and dotenv-style configuration grammar. */
3
+ export declare const ini: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** INI and dotenv-style configuration grammar. */
3
+ export declare const ini: Grammar;
@@ -0,0 +1,2 @@
1
+ /** Java grammar. */
2
+ export declare const java: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Java grammar. */
2
+ export declare const java: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** JavaScript grammar. */
2
+ export declare const javascript: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** JavaScript grammar. */
2
+ export declare const javascript: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** JSON grammar with property-name distinction. */
3
+ export declare const json: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** JSON grammar with property-name distinction. */
3
+ export declare const json: Grammar;
@@ -0,0 +1,2 @@
1
+ /** JSX grammar. */
2
+ export declare const jsx: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** JSX grammar. */
2
+ export declare const jsx: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Kotlin grammar. */
2
+ export declare const kotlin: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Kotlin grammar. */
2
+ export declare const kotlin: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Markdown grammar with fenced-code state handling. */
3
+ export declare const markdown: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Markdown grammar with fenced-code state handling. */
3
+ export declare const markdown: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Nginx configuration grammar. */
3
+ export declare const nginx: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Nginx configuration grammar. */
3
+ export declare const nginx: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** PHP lexical grammar. */
3
+ export declare const php: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** PHP lexical grammar. */
3
+ export declare const php: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Plain text fallback grammar. */
3
+ export declare const plaintext: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Plain text fallback grammar. */
3
+ export declare const plaintext: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Python grammar with triple-quoted string handling. */
3
+ export declare const python: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Python grammar with triple-quoted string handling. */
3
+ export declare const python: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** Ruby grammar. */
3
+ export declare const ruby: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** Ruby grammar. */
3
+ export declare const ruby: Grammar;
@@ -0,0 +1,2 @@
1
+ /** Rust grammar. */
2
+ export declare const rust: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Rust grammar. */
2
+ export declare const rust: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** SCSS grammar. */
2
+ export declare const scss: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** SCSS grammar. */
2
+ export declare const scss: import("../index.js").Grammar;
@@ -0,0 +1 @@
1
+ export { bash as shell } from "./bash.cjs";
@@ -0,0 +1 @@
1
+ export { bash as shell } from "./bash.js";
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** SQL grammar with common dialect keywords and functions. */
3
+ export declare const sql: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** SQL grammar with common dialect keywords and functions. */
3
+ export declare const sql: Grammar;
@@ -0,0 +1,2 @@
1
+ /** Svelte component markup grammar. */
2
+ export declare const svelte: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Svelte component markup grammar. */
2
+ export declare const svelte: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Swift grammar. */
2
+ export declare const swift: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Swift grammar. */
2
+ export declare const swift: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** TOML grammar. */
3
+ export declare const toml: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** TOML grammar. */
3
+ export declare const toml: Grammar;
@@ -0,0 +1,2 @@
1
+ /** TSX grammar. */
2
+ export declare const tsx: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** TSX grammar. */
2
+ export declare const tsx: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** TypeScript grammar. */
2
+ export declare const typescript: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** TypeScript grammar. */
2
+ export declare const typescript: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Vue single-file component markup grammar. */
2
+ export declare const vue: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** Vue single-file component markup grammar. */
2
+ export declare const vue: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** XML grammar. */
2
+ export declare const xml: import("../index.js").Grammar;
@@ -0,0 +1,2 @@
1
+ /** XML grammar. */
2
+ export declare const xml: import("../index.js").Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.cjs";
2
+ /** YAML grammar focused on configuration readability. */
3
+ export declare const yaml: Grammar;
@@ -0,0 +1,3 @@
1
+ import type { Grammar } from "../core/types.js";
2
+ /** YAML grammar focused on configuration readability. */
3
+ export declare const yaml: Grammar;
@@ -0,0 +1,11 @@
1
+ import type { Grammar, HighlightOptions, RenderOptions, Theme, Token } from "./core/types.cjs";
2
+ /** Highlights code through Yuirinx's convenience singleton registry. */
3
+ export declare function highlight(code: string, options: HighlightOptions): string;
4
+ /** Tokenizes code through Yuirinx's convenience singleton registry. */
5
+ export declare function tokenize(code: string, language: string | Grammar): Token[];
6
+ /** Renders tokens through Yuirinx's convenience singleton registry. */
7
+ export declare function render(tokens: readonly Token[], options?: RenderOptions): string;
8
+ /** Registers a language in the convenience singleton registry. */
9
+ export declare function registerLanguage(grammar: Grammar): void;
10
+ /** Registers a theme in the convenience singleton registry. */
11
+ export declare function registerTheme(theme: Theme): void;
@@ -0,0 +1,11 @@
1
+ import type { Grammar, HighlightOptions, RenderOptions, Theme, Token } from "./core/types.js";
2
+ /** Highlights code through Yuirinx's convenience singleton registry. */
3
+ export declare function highlight(code: string, options: HighlightOptions): string;
4
+ /** Tokenizes code through Yuirinx's convenience singleton registry. */
5
+ export declare function tokenize(code: string, language: string | Grammar): Token[];
6
+ /** Renders tokens through Yuirinx's convenience singleton registry. */
7
+ export declare function render(tokens: readonly Token[], options?: RenderOptions): string;
8
+ /** Registers a language in the convenience singleton registry. */
9
+ export declare function registerLanguage(grammar: Grammar): void;
10
+ /** Registers a theme in the convenience singleton registry. */
11
+ export declare function registerTheme(theme: Theme): void;
@@ -0,0 +1,3 @@
1
+ export { yuirinxAurora } from "./yuirinx-aurora.cjs";
2
+ export { yuirinxNoir } from "./yuirinx-noir.cjs";
3
+ export { yuirinxPearl } from "./yuirinx-pearl.cjs";
@@ -0,0 +1,3 @@
1
+ export { yuirinxAurora } from "./yuirinx-aurora.js";
2
+ export { yuirinxNoir } from "./yuirinx-noir.js";
3
+ export { yuirinxPearl } from "./yuirinx-pearl.js";
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.cjs";
2
+ /** Expressive showcase theme with aurora-inspired accents and balanced contrast. */
3
+ export declare const yuirinxAurora: Theme;
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.js";
2
+ /** Expressive showcase theme with aurora-inspired accents and balanced contrast. */
3
+ export declare const yuirinxAurora: Theme;
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.cjs";
2
+ /** Premium dark theme inspired by ink, glass, and restrained editor contrast. */
3
+ export declare const yuirinxNoir: Theme;
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.js";
2
+ /** Premium dark theme inspired by ink, glass, and restrained editor contrast. */
3
+ export declare const yuirinxNoir: Theme;
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.cjs";
2
+ /** Warm, refined light theme designed for documentation and screenshots. */
3
+ export declare const yuirinxPearl: Theme;
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../core/types.js";
2
+ /** Warm, refined light theme designed for documentation and screenshots. */
3
+ export declare const yuirinxPearl: Theme;