comarkserv 0.1.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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +389 -0
  3. package/dist/THIRD_PARTY_LICENSES.md +932 -0
  4. package/dist/build-CsToYJrU.mjs +2 -0
  5. package/dist/build-Cv5aO0CB.mjs +205 -0
  6. package/dist/cli.d.mts +1 -0
  7. package/dist/cli.mjs +894 -0
  8. package/dist/cloudflared-6f_lzz4F.mjs +181 -0
  9. package/dist/dist-B-IALNns.mjs +2 -0
  10. package/dist/dist-BK-bpLWg.mjs +2 -0
  11. package/dist/dist-BQzCbTko.mjs +1693 -0
  12. package/dist/dist-BWcWG5YB.mjs +671 -0
  13. package/dist/dist-BiVw4ojz.mjs +592 -0
  14. package/dist/dist-BnmL9jeq.mjs +538 -0
  15. package/dist/dist-BtedNLrc.mjs +276 -0
  16. package/dist/dist-BvdNTrap.mjs +2710 -0
  17. package/dist/dist-ByijHttv.mjs +69 -0
  18. package/dist/dist-C2E4zSX1.mjs +347 -0
  19. package/dist/dist-CWYRQLUT.mjs +2 -0
  20. package/dist/dist-CXQ7eTfT.mjs +417 -0
  21. package/dist/dist-CfsjQ0o8.mjs +905 -0
  22. package/dist/dist-CsTXDvwi.mjs +300 -0
  23. package/dist/dist-CtONMLh4.mjs +283 -0
  24. package/dist/dist-DMftjyxU.mjs +370 -0
  25. package/dist/dist-Dr9uTCX7.mjs +2 -0
  26. package/dist/dist-Dxvc11TH.mjs +339 -0
  27. package/dist/dist-GmbcGEAc.mjs +3 -0
  28. package/dist/dist-V1rkISnf.mjs +220 -0
  29. package/dist/dist-ZoN94PJ0.mjs +76 -0
  30. package/dist/dist-fh99cWMN.mjs +524 -0
  31. package/dist/editor-CHDyOp-8.mjs +721 -0
  32. package/dist/index.d.mts +301 -0
  33. package/dist/index.mjs +6 -0
  34. package/dist/languages-C0kEygG_.mjs +119 -0
  35. package/dist/markdown-BqKed1Vq.mjs +710 -0
  36. package/dist/markdown-DWuqfzps.mjs +2 -0
  37. package/dist/rolldown-runtime-CMFfr-1z.mjs +26 -0
  38. package/dist/server-Dkjk_D1Y.mjs +2628 -0
  39. package/dist/terminal-aKr5Xlp3.mjs +169 -0
  40. package/dist/themes-mEufQ_3e.mjs +2194 -0
  41. package/dist/twinkleplop.production-Coccf2Q9.mjs +2 -0
  42. package/dist/twinkleplop.production-DekYmX6O.mjs +4697 -0
  43. package/dist/twinkleplop.tokens-CgBUTCSg.mjs +76 -0
  44. package/package.json +133 -0
@@ -0,0 +1,301 @@
1
+ import { ComarkPlugin, ConditionalNodeHandler, Node, NodeHandler } from "comark";
2
+ import { TocLink } from "comark/plugins/toc";
3
+ //#region src/markdown.d.ts
4
+ interface MarkdownRendererOptions {
5
+ /** Show line numbers on all code blocks. */
6
+ lineNumbers?: boolean;
7
+ /** More Comark plugins. They run after the built-in plugins. */
8
+ plugins?: ComarkPlugin[];
9
+ /** More Comark components. A component with a built-in name replaces the built-in one. */
10
+ components?: Record<string, NodeHandler | ConditionalNodeHandler>;
11
+ /** Changes the `href` of each link. The static build uses it to change `.md` links to `.html`. */
12
+ transformLink?: (href: string) => string;
13
+ }
14
+ interface MarkdownFeatures {
15
+ math: boolean;
16
+ mermaid: boolean;
17
+ }
18
+ interface RenderedMarkdown {
19
+ html: string;
20
+ title: string | undefined;
21
+ description: string | undefined;
22
+ frontmatter: Record<string, unknown>;
23
+ toc: TocLink[];
24
+ features: MarkdownFeatures;
25
+ }
26
+ interface RenderOptions {
27
+ /** Changes the `href` of each link for this call. It replaces the `transformLink` of the renderer. */
28
+ transformLink?: (href: string) => string;
29
+ }
30
+ type MarkdownRenderer = (source: string, options?: RenderOptions) => Promise<RenderedMarkdown>;
31
+ export declare function createMarkdownRenderer(options?: MarkdownRendererOptions): MarkdownRenderer;
32
+ //#endregion
33
+ //#region src/theme-parse.d.ts
34
+ /** A color theme with the 16 base16 slots, from `base00` to `base0F`. */
35
+ interface Palette {
36
+ id: string;
37
+ name: string;
38
+ variant: "light" | "dark";
39
+ /** The 16 slots as `#rrggbb`, from `base00` to `base0F`. */
40
+ colors: string[];
41
+ /** An accent color. Omarchy themes have one. Other themes use `base0D`. */
42
+ accent?: string;
43
+ }
44
+ /**
45
+ * Reads a base16 or base24 scheme (YAML) or an Omarchy `colors.toml`.
46
+ * Returns `undefined` when the text is not a complete scheme.
47
+ *
48
+ * The colors go into CSS, and the text can come from the network, so the
49
+ * function accepts only hex colors. The browser gets this function with
50
+ * `toString()`, so it must not use anything from outside its body.
51
+ */
52
+ export declare function parseTheme(text: string, id: string, fallbackName: string): Palette | undefined;
53
+ //#endregion
54
+ //#region src/themes.d.ts
55
+ /** The remote theme sources. Each theme is one file in a GitHub repository. */
56
+ export declare const THEME_SOURCES: {
57
+ readonly base16: {
58
+ readonly repo: "tinted-theming/schemes";
59
+ readonly dir: "base16/";
60
+ readonly suffix: ".yaml";
61
+ };
62
+ readonly base24: {
63
+ readonly repo: "tinted-theming/schemes";
64
+ readonly dir: "base24/";
65
+ readonly suffix: ".yaml";
66
+ };
67
+ readonly omarchy: {
68
+ readonly repo: "basecamp/omarchy";
69
+ readonly dir: "themes/";
70
+ readonly suffix: "/colors.toml";
71
+ };
72
+ };
73
+ type ThemeSource = keyof typeof THEME_SOURCES;
74
+ interface CatalogEntry {
75
+ /** The value for `--theme`, such as `base16:nord`. */
76
+ id: string;
77
+ name: string;
78
+ source: ThemeSource | "omarchy-live";
79
+ /** The URL of the theme file. */
80
+ url: string;
81
+ }
82
+ interface ThemeStoreOptions {
83
+ /** The directory for downloaded themes and listings. @default ~/.cache/comarkserv/themes */
84
+ cacheDir?: string;
85
+ fetch?: (input: string) => Promise<Response>;
86
+ now?: () => number;
87
+ /** The `colors.toml` of the current Omarchy theme. */
88
+ omarchyPath?: string;
89
+ }
90
+ interface ThemeStore {
91
+ /** Lists the themes of all remote sources. `urlFor` gives the URL of each entry. @default the raw GitHub URL */
92
+ catalog: (urlFor?: (source: ThemeSource, id: string) => string) => Promise<CatalogEntry[]>;
93
+ /** Returns the text of a remote theme, or `undefined` when it does not exist. */
94
+ raw: (source: ThemeSource, id: string) => Promise<string | undefined>;
95
+ /**
96
+ * Loads the theme for a `--theme` value. Returns `undefined` for the built-in GitHub theme.
97
+ * Rejects with a message when it cannot load the theme.
98
+ */
99
+ load: (spec: string, cwd?: string) => Promise<Palette | undefined>;
100
+ }
101
+ /** The `colors.toml` of the current Omarchy theme. `omarchy-theme-set` replaces it on each change. */
102
+ export declare const OMARCHY_CURRENT: string;
103
+ export declare function createThemeStore(options?: ThemeStoreOptions): ThemeStore;
104
+ //#endregion
105
+ //#region src/build.d.ts
106
+ interface BuildOptions extends MarkdownRendererOptions {
107
+ /** The directory to build. @default process.cwd() */
108
+ root?: string;
109
+ /** The directory for the site. The build deletes an earlier build in it. @default "dist" */
110
+ outDir?: string;
111
+ /** Include dotfiles. `.well-known` is always included. @default false */
112
+ dotfiles?: boolean;
113
+ /** The default theme, as for the server. A theme that does not load stops the build. @default "github" */
114
+ theme?: string;
115
+ /** Write the theme catalog, so the theme picker of the site can list all themes. @default true */
116
+ themeCatalog?: boolean;
117
+ /** The store that loads and caches the themes. */
118
+ themeStore?: ThemeStore;
119
+ }
120
+ interface BuildResult {
121
+ outDir: string;
122
+ /** The number of HTML pages that the build wrote. */
123
+ pages: number;
124
+ /** The number of other files that the build copied. */
125
+ files: number;
126
+ ms: number;
127
+ /** Problems that did not stop the build. */
128
+ warnings: string[];
129
+ }
130
+ /** Changes the path of a markdown file to the path of its HTML page. */
131
+ export declare function toHtmlPath(path: string): string;
132
+ /**
133
+ * Returns a link transform for a page in `directory` (from the root, `""` for the root).
134
+ * Links to markdown files go to their HTML pages, and links to directories go to their `index.html`.
135
+ */
136
+ export declare function staticLinkTransform(directory: string): (href: string) => string;
137
+ /** Builds a static HTML site from a directory. */
138
+ export declare function build(options?: BuildOptions): Promise<BuildResult>;
139
+ //#endregion
140
+ //#region src/editor.d.ts
141
+ /** Opens a file in the editor of the user, at a line when one is given. */
142
+ type OpenEditor = (file: string, line?: number) => Promise<void>;
143
+ //#endregion
144
+ //#region src/share.d.ts
145
+ interface ShareStatus {
146
+ state: "off" | "starting" | "on";
147
+ /** The public URL, when the state is "on". */
148
+ url?: string;
149
+ /** True when cloudflared is not installed, so the user must accept the Cloudflare license first. */
150
+ needsConsent: boolean;
151
+ /** The error of the last start that failed. */
152
+ error?: string;
153
+ }
154
+ interface ShareService {
155
+ status: () => ShareStatus;
156
+ /** Starts the tunnel to `origin`, or returns the URL of the tunnel that runs. */
157
+ start: (options: {
158
+ origin: string;
159
+ accept?: boolean;
160
+ }) => Promise<string>;
161
+ stop: () => Promise<void>;
162
+ subscribe: (listener: (status: ShareStatus) => void) => () => void;
163
+ }
164
+ //#endregion
165
+ //#region src/handler.d.ts
166
+ /** The URL prefix of the files and endpoints of comarkserv itself. */
167
+ export declare const INTERNAL_PREFIX = "/__comarkserv/";
168
+ interface ComarkservOptions extends MarkdownRendererOptions {
169
+ /** The directory to serve. @default process.cwd() */
170
+ root?: string;
171
+ /** Watch the files and update open pages when they change. @default true */
172
+ livereload?: boolean;
173
+ /** Serve and list dotfiles, such as `.github/`. `.well-known` is always served. @default false */
174
+ dotfiles?: boolean;
175
+ /** The maximum number of rendered pages in memory. @default 500 */
176
+ cacheSize?: number;
177
+ /**
178
+ * The default theme: `github`, `base16:<id>`, `base24:<id>`, `omarchy:<id>`, `omarchy`
179
+ * (the current Omarchy theme, live), a scheme file or a URL. @default "github"
180
+ */
181
+ theme?: string;
182
+ /** The store that loads and caches the themes. Replace it to use another cache or no network. */
183
+ themeStore?: ThemeStore;
184
+ /** The `colors.toml` of the current Omarchy theme. @default ~/.local/state/omarchy/current/theme/colors.toml */
185
+ omarchyPath?: string;
186
+ /**
187
+ * Show an Edit button that opens the file in the editor of the user. Turn it off
188
+ * when other machines can reach the server. @default true
189
+ */
190
+ editor?: boolean;
191
+ /** Replaces the function that opens a file in the editor. */
192
+ openEditor?: OpenEditor;
193
+ /** Show a Share button that shares the pages at a public URL, through a Cloudflare tunnel. @default true */
194
+ share?: boolean;
195
+ /** Replaces the service that starts and stops the tunnel. */
196
+ shareService?: ShareService;
197
+ }
198
+ interface ComarkservHandler {
199
+ /** The absolute path of the served directory. */
200
+ readonly root: string;
201
+ /** The request handler. Give it to srvx, or to any server that uses web `Request` and `Response`. */
202
+ fetch: (request: Request) => Promise<Response>;
203
+ /** Loads the markdown renderer before the first request needs it. */
204
+ warmup: () => Promise<void>;
205
+ /** The tunnel for sharing, or `undefined` when sharing is off. */
206
+ readonly share: ShareService | undefined;
207
+ /** Stops the file watcher, the tunnel and the live reload streams. */
208
+ close: () => Promise<void>;
209
+ }
210
+ export declare function createHandler(options?: ComarkservOptions): ComarkservHandler;
211
+ //#endregion
212
+ //#region src/languages.d.ts
213
+ type LanguageId = "bash" | "css" | "go" | "html" | "javascript" | "json" | "markdown" | "python" | "rust" | "sql" | "svelte" | "toml" | "tsx" | "typescript" | "yaml";
214
+ /** A grammar: it returns the highlighted HTML of the code. */
215
+ type Highlighter = (code: string) => string;
216
+ export declare const supportedLanguages: readonly LanguageId[];
217
+ /** Fence names that are not a canonical language id. */
218
+ export declare const languageAliases: Readonly<Record<string, LanguageId>>;
219
+ /** Returns the canonical language id for a fence name, or `undefined` for an unknown name. */
220
+ export declare function resolveLanguage(name: string | undefined): LanguageId | undefined;
221
+ /** Loads a grammar. Concurrent and later calls share one import. */
222
+ export declare function loadLanguage(id: LanguageId): Promise<Highlighter>;
223
+ //#endregion
224
+ //#region src/highlight.d.ts
225
+ interface CodeHighlighterOptions {
226
+ /** Show line numbers on all code blocks. A fence can override this with `:line-numbers` or `:no-line-numbers`. */
227
+ lineNumbers?: boolean;
228
+ }
229
+ interface CodeHighlighter {
230
+ /** Loads, in parallel, the grammars that the nodes use. */
231
+ preload: (nodes: Node[]) => Promise<void>;
232
+ /** Comark components that highlight code blocks and `code{:lang}` inline code. */
233
+ components: Record<string, NodeHandler | ConditionalNodeHandler>;
234
+ }
235
+ /** Returns the ids of the known grammars that code blocks and inline code in the nodes use. */
236
+ export declare function collectLanguages(nodes: Node[]): Set<LanguageId>;
237
+ export declare function createCodeHighlighter(options?: CodeHighlighterOptions): CodeHighlighter;
238
+ //#endregion
239
+ //#region src/search.d.ts
240
+ interface SearchHeading {
241
+ id: string;
242
+ text: string;
243
+ depth: number;
244
+ /** The line of the heading in the source file, from 1. */
245
+ line: number;
246
+ }
247
+ interface SearchEntry {
248
+ /** The URL path of the page, from the site root. */
249
+ url: string;
250
+ title: string;
251
+ headings: SearchHeading[];
252
+ }
253
+ interface Outline {
254
+ title: string | undefined;
255
+ headings: SearchHeading[];
256
+ }
257
+ /** Reads the title and the headings of a markdown source, with no full parse. */
258
+ export declare function extractOutline(source: string): Outline;
259
+ interface SearchIndexOptions {
260
+ root: string;
261
+ dotfiles: boolean;
262
+ /** Changes the path of a file, from the root with a leading `/`, to the URL of its page. */
263
+ toUrl?: (path: string) => string;
264
+ /** More glob patterns to skip. */
265
+ ignore?: readonly string[];
266
+ }
267
+ interface SearchIndex {
268
+ /** Returns the entries. The first call reads all markdown files. Later calls read only the changed files. */
269
+ get: () => Promise<SearchEntry[]>;
270
+ /** Marks paths as changed. Use the URL paths from the file watcher. */
271
+ invalidate: (paths: string[]) => void;
272
+ }
273
+ export declare function createSearchIndex(options: SearchIndexOptions): SearchIndex;
274
+ //#endregion
275
+ //#region src/server.d.ts
276
+ interface ServeOptions extends ComarkservOptions {
277
+ /** The port to listen on. @default 8642 */
278
+ port?: number;
279
+ /** The host to listen on. Use `0.0.0.0` to accept connections from the network. @default "localhost" */
280
+ host?: string;
281
+ /** Fail when the port is in use. When false, the server uses the next free port. @default false */
282
+ strictPort?: boolean;
283
+ /** Print a line for each request. @default false */
284
+ log?: boolean;
285
+ }
286
+ interface ComarkservServer {
287
+ /** The URL of the server, with a trailing slash. */
288
+ url: string;
289
+ port: number;
290
+ host: string;
291
+ handler: ComarkservHandler;
292
+ /** Stops the server, the file watcher and the open connections. */
293
+ close: () => Promise<void>;
294
+ }
295
+ export declare const DEFAULT_PORT = 8642;
296
+ /** Returns the first free port from `start`. With `strict`, it rejects when `start` is in use. */
297
+ export declare function findPort(start: number, host: string, strict: boolean): Promise<number>;
298
+ /** Starts a comarkserv server with srvx. */
299
+ export declare function startServer(options?: ServeOptions): Promise<ComarkservServer>;
300
+ //#endregion
301
+ export type { BuildOptions, BuildResult, CatalogEntry, CodeHighlighter, CodeHighlighterOptions, ComarkservHandler, ComarkservOptions, ComarkservServer, Highlighter, LanguageId, MarkdownFeatures, MarkdownRenderer, MarkdownRendererOptions, Palette, RenderOptions, RenderedMarkdown, SearchEntry, SearchHeading, SearchIndex, SearchIndexOptions, ServeOptions, ThemeSource, ThemeStore, ThemeStoreOptions, TocLink };
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import { C as parseTheme, n as THEME_SOURCES, o as createSearchIndex, r as createThemeStore, s as extractOutline, t as OMARCHY_CURRENT } from "./themes-mEufQ_3e.mjs";
2
+ import { a as resolveLanguage, n as languageAliases, o as supportedLanguages, r as loadLanguage } from "./languages-C0kEygG_.mjs";
3
+ import { n as collectLanguages, r as createCodeHighlighter, t as createMarkdownRenderer } from "./markdown-BqKed1Vq.mjs";
4
+ import { i as toHtmlPath, n as build, r as staticLinkTransform } from "./build-Cv5aO0CB.mjs";
5
+ import { a as createHandler, i as INTERNAL_PREFIX, n as findPort, r as startServer, t as DEFAULT_PORT } from "./server-Dkjk_D1Y.mjs";
6
+ export { DEFAULT_PORT, INTERNAL_PREFIX, OMARCHY_CURRENT, THEME_SOURCES, build, collectLanguages, createCodeHighlighter, createHandler, createMarkdownRenderer, createSearchIndex, createThemeStore, extractOutline, findPort, languageAliases, loadLanguage, parseTheme, resolveLanguage, startServer, staticLinkTransform, supportedLanguages, toHtmlPath };
@@ -0,0 +1,119 @@
1
+ import { escapeHtml } from "comark/utils";
2
+ //#region src/nodes.ts
3
+ function isElement(node) {
4
+ return Array.isArray(node) && typeof node[0] === "string";
5
+ }
6
+ /** Returns the child nodes of an element. */
7
+ function childrenOf(node) {
8
+ return node.slice(2);
9
+ }
10
+ /** Returns an attribute value when it is a string that is not empty. */
11
+ function stringAttr(attrs, name) {
12
+ const value = attrs[name];
13
+ return typeof value === "string" && value !== "" ? value : void 0;
14
+ }
15
+ /** Renders source text that failed to render, with the error message above it. */
16
+ function errorBlock(source, error) {
17
+ const message = error instanceof Error ? error.message : String(error);
18
+ return `<figure class="cms-code-error"><figcaption>${escapeHtml(message)}</figcaption><pre class="twinkleplop"><code>${escapeHtml(source)}</code></pre></figure>`;
19
+ }
20
+ //#endregion
21
+ //#region src/languages.ts
22
+ const loaders = {
23
+ bash: () => import("./dist-BnmL9jeq.mjs"),
24
+ css: () => import("./dist-Dr9uTCX7.mjs"),
25
+ go: () => import("./dist-Dxvc11TH.mjs"),
26
+ html: () => import("./dist-BK-bpLWg.mjs"),
27
+ javascript: () => import("./dist-B-IALNns.mjs"),
28
+ json: () => import("./dist-ByijHttv.mjs"),
29
+ markdown: () => import("./dist-CtONMLh4.mjs"),
30
+ python: () => import("./dist-BiVw4ojz.mjs"),
31
+ rust: () => import("./dist-fh99cWMN.mjs"),
32
+ sql: () => import("./dist-C2E4zSX1.mjs"),
33
+ svelte: () => import("./dist-V1rkISnf.mjs"),
34
+ toml: () => import("./dist-CsTXDvwi.mjs"),
35
+ tsx: () => import("./dist-BtedNLrc.mjs"),
36
+ typescript: () => import("./dist-GmbcGEAc.mjs"),
37
+ yaml: () => import("./dist-CXQ7eTfT.mjs")
38
+ };
39
+ const supportedLanguages = Object.keys(loaders);
40
+ /** Fence names that are not a canonical language id. */
41
+ const languageAliases = {
42
+ sh: "bash",
43
+ shell: "bash",
44
+ shellscript: "bash",
45
+ zsh: "bash",
46
+ console: "bash",
47
+ golang: "go",
48
+ htm: "html",
49
+ xhtml: "html",
50
+ vue: "html",
51
+ js: "javascript",
52
+ mjs: "javascript",
53
+ cjs: "javascript",
54
+ jsonc: "json",
55
+ json5: "json",
56
+ jsonl: "json",
57
+ md: "markdown",
58
+ mdc: "markdown",
59
+ comark: "markdown",
60
+ py: "python",
61
+ python3: "python",
62
+ rs: "rust",
63
+ mysql: "sql",
64
+ postgres: "sql",
65
+ postgresql: "sql",
66
+ pgsql: "sql",
67
+ sqlite: "sql",
68
+ jsx: "tsx",
69
+ ts: "typescript",
70
+ mts: "typescript",
71
+ cts: "typescript",
72
+ yml: "yaml"
73
+ };
74
+ function isLanguageId(name) {
75
+ return Object.hasOwn(loaders, name);
76
+ }
77
+ /** Returns the canonical language id for a fence name, or `undefined` for an unknown name. */
78
+ function resolveLanguage(name) {
79
+ const key = name?.trim().toLowerCase();
80
+ if (!key) return void 0;
81
+ if (isLanguageId(key)) return key;
82
+ return Object.hasOwn(languageAliases, key) ? languageAliases[key] : void 0;
83
+ }
84
+ const pending = /* @__PURE__ */ new Map();
85
+ const loaded = /* @__PURE__ */ new Map();
86
+ /** Loads a grammar. Concurrent and later calls share one import. */
87
+ function loadLanguage(id) {
88
+ let promise = pending.get(id);
89
+ if (!promise) {
90
+ promise = loaders[id]().then((module) => {
91
+ const highlight = module.language();
92
+ loaded.set(id, highlight);
93
+ return highlight;
94
+ });
95
+ promise.catch(() => pending.delete(id));
96
+ pending.set(id, promise);
97
+ }
98
+ return promise;
99
+ }
100
+ const tokenizers = /* @__PURE__ */ new Map();
101
+ /** Loads the tokenizer of a grammar, for output that is not HTML, such as a terminal. */
102
+ function loadTokenizer(id) {
103
+ let promise = tokenizers.get(id);
104
+ if (!promise) {
105
+ promise = Promise.all([loaders[id](), import("./twinkleplop.production-Coccf2Q9.mjs")]).then(([module, core]) => {
106
+ const tokenize = module.tokenize();
107
+ return (code) => core.tokens_to_named(tokenize(code), code);
108
+ });
109
+ promise.catch(() => tokenizers.delete(id));
110
+ tokenizers.set(id, promise);
111
+ }
112
+ return promise;
113
+ }
114
+ /** Returns a grammar that is already loaded, without a load. */
115
+ function getLoadedLanguage(id) {
116
+ return loaded.get(id);
117
+ }
118
+ //#endregion
119
+ export { resolveLanguage as a, errorBlock as c, loadTokenizer as i, isElement as l, languageAliases as n, supportedLanguages as o, loadLanguage as r, childrenOf as s, getLoadedLanguage as t, stringAttr as u };