plugin-build-guide-block 1.0.11 → 1.0.12

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 (40) hide show
  1. package/dist/client/index.js +1 -1
  2. package/dist/client/locale.d.ts +3 -0
  3. package/dist/client/models/UserGuideBlockModel.d.ts +3 -3
  4. package/dist/client/schemaSettings.d.ts +2 -0
  5. package/dist/client/schemas/spacesSchema.d.ts +41 -0
  6. package/dist/externalVersion.js +8 -8
  7. package/dist/locale/en-US.json +3 -0
  8. package/dist/locale/namespace.d.ts +6 -0
  9. package/dist/locale/namespace.js +36 -0
  10. package/dist/locale/vi-VN.json +3 -0
  11. package/dist/locale/zh-CN.json +3 -0
  12. package/dist/node_modules/marked/bin/main.js +279 -0
  13. package/dist/node_modules/marked/bin/marked.js +15 -0
  14. package/dist/node_modules/marked/lib/marked.cjs +1 -0
  15. package/dist/node_modules/marked/lib/marked.d.cts +657 -0
  16. package/dist/node_modules/marked/lib/marked.d.ts +657 -0
  17. package/dist/node_modules/marked/lib/marked.esm.js +2432 -0
  18. package/dist/node_modules/marked/lib/marked.umd.js +2456 -0
  19. package/dist/node_modules/marked/man/marked.1 +111 -0
  20. package/dist/node_modules/marked/marked.min.js +6 -0
  21. package/dist/node_modules/marked/package.json +1 -0
  22. package/dist/server/actions/build.js +66 -52
  23. package/dist/server/actions/getMarkdown.d.ts +2 -0
  24. package/dist/server/actions/getMarkdown.js +53 -0
  25. package/dist/server/collections/ai-build-guide-spaces.js +9 -0
  26. package/dist/server/plugin.js +8 -1
  27. package/package.json +51 -31
  28. package/src/client/locale.ts +18 -0
  29. package/src/client/plugin.tsx +52 -30
  30. package/src/client/schemaSettings.ts +75 -0
  31. package/src/client/schemas/spacesSchema.ts +42 -1
  32. package/src/locale/en-US.json +3 -0
  33. package/src/locale/namespace.ts +6 -0
  34. package/src/locale/vi-VN.json +3 -0
  35. package/src/locale/zh-CN.json +3 -0
  36. package/src/server/actions/build.ts +46 -33
  37. package/src/server/actions/getMarkdown.ts +26 -0
  38. package/src/server/collections/ai-build-guide-spaces.ts +9 -0
  39. package/src/server/plugin.ts +83 -76
  40. package/src/server/collections/.gitkeep +0 -0
@@ -0,0 +1,657 @@
1
+ // Generated by dts-bundle-generator v9.3.1
2
+
3
+ export type Token = (Tokens.Space | Tokens.Code | Tokens.Heading | Tokens.Table | Tokens.Hr | Tokens.Blockquote | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.HTML | Tokens.Text | Tokens.Def | Tokens.Escape | Tokens.Tag | Tokens.Image | Tokens.Link | Tokens.Strong | Tokens.Em | Tokens.Codespan | Tokens.Br | Tokens.Del | Tokens.Generic);
4
+ export declare namespace Tokens {
5
+ interface Space {
6
+ type: "space";
7
+ raw: string;
8
+ }
9
+ interface Code {
10
+ type: "code";
11
+ raw: string;
12
+ codeBlockStyle?: "indented" | undefined;
13
+ lang?: string | undefined;
14
+ text: string;
15
+ escaped?: boolean;
16
+ }
17
+ interface Heading {
18
+ type: "heading";
19
+ raw: string;
20
+ depth: number;
21
+ text: string;
22
+ tokens: Token[];
23
+ }
24
+ interface Table {
25
+ type: "table";
26
+ raw: string;
27
+ align: Array<"center" | "left" | "right" | null>;
28
+ header: TableCell[];
29
+ rows: TableCell[][];
30
+ }
31
+ interface TableCell {
32
+ text: string;
33
+ tokens: Token[];
34
+ }
35
+ interface Hr {
36
+ type: "hr";
37
+ raw: string;
38
+ }
39
+ interface Blockquote {
40
+ type: "blockquote";
41
+ raw: string;
42
+ text: string;
43
+ tokens: Token[];
44
+ }
45
+ interface List {
46
+ type: "list";
47
+ raw: string;
48
+ ordered: boolean;
49
+ start: number | "";
50
+ loose: boolean;
51
+ items: ListItem[];
52
+ }
53
+ interface ListItem {
54
+ type: "list_item";
55
+ raw: string;
56
+ task: boolean;
57
+ checked?: boolean | undefined;
58
+ loose: boolean;
59
+ text: string;
60
+ tokens: Token[];
61
+ }
62
+ interface Paragraph {
63
+ type: "paragraph";
64
+ raw: string;
65
+ pre?: boolean | undefined;
66
+ text: string;
67
+ tokens: Token[];
68
+ }
69
+ interface HTML {
70
+ type: "html";
71
+ raw: string;
72
+ pre: boolean;
73
+ text: string;
74
+ block: boolean;
75
+ }
76
+ interface Text {
77
+ type: "text";
78
+ raw: string;
79
+ text: string;
80
+ tokens?: Token[];
81
+ }
82
+ interface Def {
83
+ type: "def";
84
+ raw: string;
85
+ tag: string;
86
+ href: string;
87
+ title: string;
88
+ }
89
+ interface Escape {
90
+ type: "escape";
91
+ raw: string;
92
+ text: string;
93
+ }
94
+ interface Tag {
95
+ type: "text" | "html";
96
+ raw: string;
97
+ inLink: boolean;
98
+ inRawBlock: boolean;
99
+ text: string;
100
+ block: boolean;
101
+ }
102
+ interface Link {
103
+ type: "link";
104
+ raw: string;
105
+ href: string;
106
+ title?: string | null;
107
+ text: string;
108
+ tokens: Token[];
109
+ }
110
+ interface Image {
111
+ type: "image";
112
+ raw: string;
113
+ href: string;
114
+ title: string | null;
115
+ text: string;
116
+ }
117
+ interface Strong {
118
+ type: "strong";
119
+ raw: string;
120
+ text: string;
121
+ tokens: Token[];
122
+ }
123
+ interface Em {
124
+ type: "em";
125
+ raw: string;
126
+ text: string;
127
+ tokens: Token[];
128
+ }
129
+ interface Codespan {
130
+ type: "codespan";
131
+ raw: string;
132
+ text: string;
133
+ }
134
+ interface Br {
135
+ type: "br";
136
+ raw: string;
137
+ }
138
+ interface Del {
139
+ type: "del";
140
+ raw: string;
141
+ text: string;
142
+ tokens: Token[];
143
+ }
144
+ interface Generic {
145
+ [index: string]: any;
146
+ type: string;
147
+ raw: string;
148
+ tokens?: Token[] | undefined;
149
+ }
150
+ }
151
+ export type Links = Record<string, Pick<Tokens.Link | Tokens.Image, "href" | "title">>;
152
+ export type TokensList = Token[] & {
153
+ links: Links;
154
+ };
155
+ /**
156
+ * Renderer
157
+ */
158
+ declare class _Renderer {
159
+ options: MarkedOptions;
160
+ constructor(options?: MarkedOptions);
161
+ code(code: string, infostring: string | undefined, escaped: boolean): string;
162
+ blockquote(quote: string): string;
163
+ html(html: string, block?: boolean): string;
164
+ heading(text: string, level: number, raw: string): string;
165
+ hr(): string;
166
+ list(body: string, ordered: boolean, start: number | ""): string;
167
+ listitem(text: string, task: boolean, checked: boolean): string;
168
+ checkbox(checked: boolean): string;
169
+ paragraph(text: string): string;
170
+ table(header: string, body: string): string;
171
+ tablerow(content: string): string;
172
+ tablecell(content: string, flags: {
173
+ header: boolean;
174
+ align: "center" | "left" | "right" | null;
175
+ }): string;
176
+ /**
177
+ * span level renderer
178
+ */
179
+ strong(text: string): string;
180
+ em(text: string): string;
181
+ codespan(text: string): string;
182
+ br(): string;
183
+ del(text: string): string;
184
+ link(href: string, title: string | null | undefined, text: string): string;
185
+ image(href: string, title: string | null, text: string): string;
186
+ text(text: string): string;
187
+ }
188
+ /**
189
+ * TextRenderer
190
+ * returns only the textual part of the token
191
+ */
192
+ declare class _TextRenderer {
193
+ strong(text: string): string;
194
+ em(text: string): string;
195
+ codespan(text: string): string;
196
+ del(text: string): string;
197
+ html(text: string): string;
198
+ text(text: string): string;
199
+ link(href: string, title: string | null | undefined, text: string): string;
200
+ image(href: string, title: string | null, text: string): string;
201
+ br(): string;
202
+ }
203
+ /**
204
+ * Parsing & Compiling
205
+ */
206
+ declare class _Parser {
207
+ options: MarkedOptions;
208
+ renderer: _Renderer;
209
+ textRenderer: _TextRenderer;
210
+ constructor(options?: MarkedOptions);
211
+ /**
212
+ * Static Parse Method
213
+ */
214
+ static parse(tokens: Token[], options?: MarkedOptions): string;
215
+ /**
216
+ * Static Parse Inline Method
217
+ */
218
+ static parseInline(tokens: Token[], options?: MarkedOptions): string;
219
+ /**
220
+ * Parse Loop
221
+ */
222
+ parse(tokens: Token[], top?: boolean): string;
223
+ /**
224
+ * Parse Inline Tokens
225
+ */
226
+ parseInline(tokens: Token[], renderer?: _Renderer | _TextRenderer): string;
227
+ }
228
+ declare const blockNormal: {
229
+ blockquote: RegExp;
230
+ code: RegExp;
231
+ def: RegExp;
232
+ fences: RegExp;
233
+ heading: RegExp;
234
+ hr: RegExp;
235
+ html: RegExp;
236
+ lheading: RegExp;
237
+ list: RegExp;
238
+ newline: RegExp;
239
+ paragraph: RegExp;
240
+ table: RegExp;
241
+ text: RegExp;
242
+ };
243
+ export type BlockKeys = keyof typeof blockNormal;
244
+ declare const inlineNormal: {
245
+ _backpedal: RegExp;
246
+ anyPunctuation: RegExp;
247
+ autolink: RegExp;
248
+ blockSkip: RegExp;
249
+ br: RegExp;
250
+ code: RegExp;
251
+ del: RegExp;
252
+ emStrongLDelim: RegExp;
253
+ emStrongRDelimAst: RegExp;
254
+ emStrongRDelimUnd: RegExp;
255
+ escape: RegExp;
256
+ link: RegExp;
257
+ nolink: RegExp;
258
+ punctuation: RegExp;
259
+ reflink: RegExp;
260
+ reflinkSearch: RegExp;
261
+ tag: RegExp;
262
+ text: RegExp;
263
+ url: RegExp;
264
+ };
265
+ export type InlineKeys = keyof typeof inlineNormal;
266
+ /**
267
+ * exports
268
+ */
269
+ export declare const block: {
270
+ normal: {
271
+ blockquote: RegExp;
272
+ code: RegExp;
273
+ def: RegExp;
274
+ fences: RegExp;
275
+ heading: RegExp;
276
+ hr: RegExp;
277
+ html: RegExp;
278
+ lheading: RegExp;
279
+ list: RegExp;
280
+ newline: RegExp;
281
+ paragraph: RegExp;
282
+ table: RegExp;
283
+ text: RegExp;
284
+ };
285
+ gfm: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "heading" | "list" | "paragraph" | "def" | "fences" | "lheading" | "newline", RegExp>;
286
+ pedantic: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "heading" | "list" | "paragraph" | "def" | "fences" | "lheading" | "newline", RegExp>;
287
+ };
288
+ export declare const inline: {
289
+ normal: {
290
+ _backpedal: RegExp;
291
+ anyPunctuation: RegExp;
292
+ autolink: RegExp;
293
+ blockSkip: RegExp;
294
+ br: RegExp;
295
+ code: RegExp;
296
+ del: RegExp;
297
+ emStrongLDelim: RegExp;
298
+ emStrongRDelimAst: RegExp;
299
+ emStrongRDelimUnd: RegExp;
300
+ escape: RegExp;
301
+ link: RegExp;
302
+ nolink: RegExp;
303
+ punctuation: RegExp;
304
+ reflink: RegExp;
305
+ reflinkSearch: RegExp;
306
+ tag: RegExp;
307
+ text: RegExp;
308
+ url: RegExp;
309
+ };
310
+ gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
311
+ breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
312
+ pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
313
+ };
314
+ export interface Rules {
315
+ block: Record<BlockKeys, RegExp>;
316
+ inline: Record<InlineKeys, RegExp>;
317
+ }
318
+ /**
319
+ * Tokenizer
320
+ */
321
+ declare class _Tokenizer {
322
+ options: MarkedOptions;
323
+ rules: Rules;
324
+ lexer: _Lexer;
325
+ constructor(options?: MarkedOptions);
326
+ space(src: string): Tokens.Space | undefined;
327
+ code(src: string): Tokens.Code | undefined;
328
+ fences(src: string): Tokens.Code | undefined;
329
+ heading(src: string): Tokens.Heading | undefined;
330
+ hr(src: string): Tokens.Hr | undefined;
331
+ blockquote(src: string): Tokens.Blockquote | undefined;
332
+ list(src: string): Tokens.List | undefined;
333
+ html(src: string): Tokens.HTML | undefined;
334
+ def(src: string): Tokens.Def | undefined;
335
+ table(src: string): Tokens.Table | undefined;
336
+ lheading(src: string): Tokens.Heading | undefined;
337
+ paragraph(src: string): Tokens.Paragraph | undefined;
338
+ text(src: string): Tokens.Text | undefined;
339
+ escape(src: string): Tokens.Escape | undefined;
340
+ tag(src: string): Tokens.Tag | undefined;
341
+ link(src: string): Tokens.Link | Tokens.Image | undefined;
342
+ reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
343
+ emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
344
+ codespan(src: string): Tokens.Codespan | undefined;
345
+ br(src: string): Tokens.Br | undefined;
346
+ del(src: string): Tokens.Del | undefined;
347
+ autolink(src: string): Tokens.Link | undefined;
348
+ url(src: string): Tokens.Link | undefined;
349
+ inlineText(src: string): Tokens.Text | undefined;
350
+ }
351
+ declare class _Hooks {
352
+ options: MarkedOptions;
353
+ constructor(options?: MarkedOptions);
354
+ static passThroughHooks: Set<string>;
355
+ /**
356
+ * Process markdown before marked
357
+ */
358
+ preprocess(markdown: string): string;
359
+ /**
360
+ * Process HTML after marked is finished
361
+ */
362
+ postprocess(html: string): string;
363
+ /**
364
+ * Process all tokens before walk tokens
365
+ */
366
+ processAllTokens(tokens: Token[] | TokensList): Token[] | TokensList;
367
+ }
368
+ export interface TokenizerThis {
369
+ lexer: _Lexer;
370
+ }
371
+ export type TokenizerExtensionFunction = (this: TokenizerThis, src: string, tokens: Token[] | TokensList) => Tokens.Generic | undefined;
372
+ export type TokenizerStartFunction = (this: TokenizerThis, src: string) => number | void;
373
+ export interface TokenizerExtension {
374
+ name: string;
375
+ level: "block" | "inline";
376
+ start?: TokenizerStartFunction | undefined;
377
+ tokenizer: TokenizerExtensionFunction;
378
+ childTokens?: string[] | undefined;
379
+ }
380
+ export interface RendererThis {
381
+ parser: _Parser;
382
+ }
383
+ export type RendererExtensionFunction = (this: RendererThis, token: Tokens.Generic) => string | false | undefined;
384
+ export interface RendererExtension {
385
+ name: string;
386
+ renderer: RendererExtensionFunction;
387
+ }
388
+ export type TokenizerAndRendererExtension = TokenizerExtension | RendererExtension | (TokenizerExtension & RendererExtension);
389
+ export type HooksApi = Omit<_Hooks, "constructor" | "options">;
390
+ export type HooksObject = {
391
+ [K in keyof HooksApi]?: (...args: Parameters<HooksApi[K]>) => ReturnType<HooksApi[K]> | Promise<ReturnType<HooksApi[K]>>;
392
+ };
393
+ export type RendererApi = Omit<_Renderer, "constructor" | "options">;
394
+ export type RendererObject = {
395
+ [K in keyof RendererApi]?: (...args: Parameters<RendererApi[K]>) => ReturnType<RendererApi[K]> | false;
396
+ };
397
+ export type TokenizerApi = Omit<_Tokenizer, "constructor" | "options" | "rules" | "lexer">;
398
+ export type TokenizerObject = {
399
+ [K in keyof TokenizerApi]?: (...args: Parameters<TokenizerApi[K]>) => ReturnType<TokenizerApi[K]> | false;
400
+ };
401
+ export interface MarkedExtension {
402
+ /**
403
+ * True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
404
+ */
405
+ async?: boolean;
406
+ /**
407
+ * Enable GFM line breaks. This option requires the gfm option to be true.
408
+ */
409
+ breaks?: boolean | undefined;
410
+ /**
411
+ * Add tokenizers and renderers to marked
412
+ */
413
+ extensions?: TokenizerAndRendererExtension[] | undefined | null;
414
+ /**
415
+ * Enable GitHub flavored markdown.
416
+ */
417
+ gfm?: boolean | undefined;
418
+ /**
419
+ * Hooks are methods that hook into some part of marked.
420
+ * preprocess is called to process markdown before sending it to marked.
421
+ * processAllTokens is called with the TokensList before walkTokens.
422
+ * postprocess is called to process html after marked has finished parsing.
423
+ */
424
+ hooks?: HooksObject | undefined | null;
425
+ /**
426
+ * Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
427
+ */
428
+ pedantic?: boolean | undefined;
429
+ /**
430
+ * Type: object Default: new Renderer()
431
+ *
432
+ * An object containing functions to render tokens to HTML.
433
+ */
434
+ renderer?: RendererObject | undefined | null;
435
+ /**
436
+ * Shows an HTML error message when rendering fails.
437
+ */
438
+ silent?: boolean | undefined;
439
+ /**
440
+ * The tokenizer defines how to turn markdown text into tokens.
441
+ */
442
+ tokenizer?: TokenizerObject | undefined | null;
443
+ /**
444
+ * The walkTokens function gets called with every token.
445
+ * Child tokens are called before moving on to sibling tokens.
446
+ * Each token is passed by reference so updates are persisted when passed to the parser.
447
+ * The return value of the function is ignored.
448
+ */
449
+ walkTokens?: ((token: Token) => void | Promise<void>) | undefined | null;
450
+ }
451
+ export interface MarkedOptions extends Omit<MarkedExtension, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
452
+ /**
453
+ * Hooks are methods that hook into some part of marked.
454
+ */
455
+ hooks?: _Hooks | undefined | null;
456
+ /**
457
+ * Type: object Default: new Renderer()
458
+ *
459
+ * An object containing functions to render tokens to HTML.
460
+ */
461
+ renderer?: _Renderer | undefined | null;
462
+ /**
463
+ * The tokenizer defines how to turn markdown text into tokens.
464
+ */
465
+ tokenizer?: _Tokenizer | undefined | null;
466
+ /**
467
+ * Custom extensions
468
+ */
469
+ extensions?: null | {
470
+ renderers: {
471
+ [name: string]: RendererExtensionFunction;
472
+ };
473
+ childTokens: {
474
+ [name: string]: string[];
475
+ };
476
+ inline?: TokenizerExtensionFunction[];
477
+ block?: TokenizerExtensionFunction[];
478
+ startInline?: TokenizerStartFunction[];
479
+ startBlock?: TokenizerStartFunction[];
480
+ };
481
+ /**
482
+ * walkTokens function returns array of values for Promise.all
483
+ */
484
+ walkTokens?: null | ((token: Token) => void | Promise<void> | (void | Promise<void>)[]);
485
+ }
486
+ /**
487
+ * Block Lexer
488
+ */
489
+ declare class _Lexer {
490
+ tokens: TokensList;
491
+ options: MarkedOptions;
492
+ state: {
493
+ inLink: boolean;
494
+ inRawBlock: boolean;
495
+ top: boolean;
496
+ };
497
+ private tokenizer;
498
+ private inlineQueue;
499
+ constructor(options?: MarkedOptions);
500
+ /**
501
+ * Expose Rules
502
+ */
503
+ static get rules(): {
504
+ block: {
505
+ normal: {
506
+ blockquote: RegExp;
507
+ code: RegExp;
508
+ def: RegExp;
509
+ fences: RegExp;
510
+ heading: RegExp;
511
+ hr: RegExp;
512
+ html: RegExp;
513
+ lheading: RegExp;
514
+ list: RegExp;
515
+ newline: RegExp;
516
+ paragraph: RegExp;
517
+ table: RegExp;
518
+ text: RegExp;
519
+ };
520
+ gfm: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "heading" | "list" | "paragraph" | "def" | "fences" | "lheading" | "newline", RegExp>;
521
+ pedantic: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "heading" | "list" | "paragraph" | "def" | "fences" | "lheading" | "newline", RegExp>;
522
+ };
523
+ inline: {
524
+ normal: {
525
+ _backpedal: RegExp;
526
+ anyPunctuation: RegExp;
527
+ autolink: RegExp;
528
+ blockSkip: RegExp;
529
+ br: RegExp;
530
+ code: RegExp;
531
+ del: RegExp;
532
+ emStrongLDelim: RegExp;
533
+ emStrongRDelimAst: RegExp;
534
+ emStrongRDelimUnd: RegExp;
535
+ escape: RegExp;
536
+ link: RegExp;
537
+ nolink: RegExp;
538
+ punctuation: RegExp;
539
+ reflink: RegExp;
540
+ reflinkSearch: RegExp;
541
+ tag: RegExp;
542
+ text: RegExp;
543
+ url: RegExp;
544
+ };
545
+ gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
546
+ breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
547
+ pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "autolink" | "nolink" | "_backpedal" | "anyPunctuation" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
548
+ };
549
+ };
550
+ /**
551
+ * Static Lex Method
552
+ */
553
+ static lex(src: string, options?: MarkedOptions): TokensList;
554
+ /**
555
+ * Static Lex Inline Method
556
+ */
557
+ static lexInline(src: string, options?: MarkedOptions): Token[];
558
+ /**
559
+ * Preprocessing
560
+ */
561
+ lex(src: string): TokensList;
562
+ /**
563
+ * Lexing
564
+ */
565
+ blockTokens(src: string, tokens?: Token[]): Token[];
566
+ blockTokens(src: string, tokens?: TokensList): TokensList;
567
+ inline(src: string, tokens?: Token[]): Token[];
568
+ /**
569
+ * Lexing/Compiling
570
+ */
571
+ inlineTokens(src: string, tokens?: Token[]): Token[];
572
+ }
573
+ /**
574
+ * Gets the original marked default options.
575
+ */
576
+ declare function _getDefaults(): MarkedOptions;
577
+ declare let _defaults: MarkedOptions;
578
+ export type MaybePromise = void | Promise<void>;
579
+ export declare class Marked {
580
+ #private;
581
+ defaults: MarkedOptions;
582
+ options: (opt: MarkedOptions) => this;
583
+ parse: (src: string, options?: MarkedOptions | undefined | null) => string | Promise<string>;
584
+ parseInline: (src: string, options?: MarkedOptions | undefined | null) => string | Promise<string>;
585
+ Parser: typeof _Parser;
586
+ Renderer: typeof _Renderer;
587
+ TextRenderer: typeof _TextRenderer;
588
+ Lexer: typeof _Lexer;
589
+ Tokenizer: typeof _Tokenizer;
590
+ Hooks: typeof _Hooks;
591
+ constructor(...args: MarkedExtension[]);
592
+ /**
593
+ * Run callback for every token
594
+ */
595
+ walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]): MaybePromise[];
596
+ use(...args: MarkedExtension[]): this;
597
+ setOptions(opt: MarkedOptions): this;
598
+ lexer(src: string, options?: MarkedOptions): TokensList;
599
+ parser(tokens: Token[], options?: MarkedOptions): string;
600
+ }
601
+ /**
602
+ * Compiles markdown to HTML asynchronously.
603
+ *
604
+ * @param src String of markdown source to be compiled
605
+ * @param options Hash of options, having async: true
606
+ * @return Promise of string of compiled HTML
607
+ */
608
+ export declare function marked(src: string, options: MarkedOptions & {
609
+ async: true;
610
+ }): Promise<string>;
611
+ /**
612
+ * Compiles markdown to HTML.
613
+ *
614
+ * @param src String of markdown source to be compiled
615
+ * @param options Optional hash of options
616
+ * @return String of compiled HTML. Will be a Promise of string if async is set to true by any extensions.
617
+ */
618
+ export declare function marked(src: string, options?: MarkedOptions): string | Promise<string>;
619
+ export declare namespace marked {
620
+ var options: (options: MarkedOptions) => typeof marked;
621
+ var setOptions: (options: MarkedOptions) => typeof marked;
622
+ var getDefaults: typeof _getDefaults;
623
+ var defaults: MarkedOptions;
624
+ var use: (...args: MarkedExtension[]) => typeof marked;
625
+ var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
626
+ var parseInline: (src: string, options?: MarkedOptions | null | undefined) => string | Promise<string>;
627
+ var Parser: typeof _Parser;
628
+ var parser: typeof _Parser.parse;
629
+ var Renderer: typeof _Renderer;
630
+ var TextRenderer: typeof _TextRenderer;
631
+ var Lexer: typeof _Lexer;
632
+ var lexer: typeof _Lexer.lex;
633
+ var Tokenizer: typeof _Tokenizer;
634
+ var Hooks: typeof _Hooks;
635
+ var parse: typeof marked;
636
+ }
637
+ export declare const options: (options: MarkedOptions) => typeof marked;
638
+ export declare const setOptions: (options: MarkedOptions) => typeof marked;
639
+ export declare const use: (...args: MarkedExtension[]) => typeof marked;
640
+ export declare const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
641
+ export declare const parseInline: (src: string, options?: MarkedOptions | null | undefined) => string | Promise<string>;
642
+ export declare const parse: typeof marked;
643
+ export declare const parser: typeof _Parser.parse;
644
+ export declare const lexer: typeof _Lexer.lex;
645
+
646
+ export {
647
+ _Hooks as Hooks,
648
+ _Lexer as Lexer,
649
+ _Parser as Parser,
650
+ _Renderer as Renderer,
651
+ _TextRenderer as TextRenderer,
652
+ _Tokenizer as Tokenizer,
653
+ _defaults as defaults,
654
+ _getDefaults as getDefaults,
655
+ };
656
+
657
+ export {};