@dungle-scrubs/tallow 0.9.4 → 0.9.7
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/cli.js +8 -5
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/interactive-mode-patch.d.ts +24 -12
- package/dist/interactive-mode-patch.d.ts.map +1 -1
- package/dist/interactive-mode-patch.js +229 -146
- package/dist/interactive-mode-patch.js.map +1 -1
- package/dist/interactive-reset.d.ts +49 -0
- package/dist/interactive-reset.d.ts.map +1 -0
- package/dist/interactive-reset.js +40 -0
- package/dist/interactive-reset.js.map +1 -0
- package/dist/pi-tui-editor-patch.d.ts +10 -0
- package/dist/pi-tui-editor-patch.d.ts.map +1 -0
- package/dist/pi-tui-editor-patch.js +159 -0
- package/dist/pi-tui-editor-patch.js.map +1 -0
- package/dist/pi-tui-patch.d.ts +2 -0
- package/dist/pi-tui-patch.d.ts.map +1 -0
- package/dist/pi-tui-patch.js +563 -0
- package/dist/pi-tui-patch.js.map +1 -0
- package/dist/pi-tui-settings-list-patch.d.ts +11 -0
- package/dist/pi-tui-settings-list-patch.d.ts.map +1 -0
- package/dist/pi-tui-settings-list-patch.js +38 -0
- package/dist/pi-tui-settings-list-patch.js.map +1 -0
- package/dist/process-cleanup.js +1 -1
- package/dist/process-cleanup.js.map +1 -1
- package/dist/reset-diagnostics.d.ts +69 -0
- package/dist/reset-diagnostics.d.ts.map +1 -0
- package/dist/reset-diagnostics.js +41 -0
- package/dist/reset-diagnostics.js.map +1 -0
- package/dist/sdk.d.ts +7 -23
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +211 -174
- package/dist/sdk.js.map +1 -1
- package/dist/workspace-transition-interactive.d.ts +1 -0
- package/dist/workspace-transition-interactive.d.ts.map +1 -1
- package/dist/workspace-transition-interactive.js +8 -18
- package/dist/workspace-transition-interactive.js.map +1 -1
- package/extensions/__integration__/audit-findings.test.ts +4 -5
- package/extensions/_icons/index.ts +2 -4
- package/extensions/_shared/__tests__/image-metadata.test.ts +33 -0
- package/extensions/_shared/__tests__/shell-policy.test.ts +19 -0
- package/extensions/_shared/__tests__/terminal-links.test.ts +18 -0
- package/extensions/_shared/image-metadata.ts +99 -0
- package/extensions/_shared/inline-preview.ts +1 -1
- package/extensions/_shared/shell-policy.ts +121 -1
- package/extensions/_shared/terminal-links.ts +22 -0
- package/extensions/ask-user-question-tool/index.ts +0 -3
- package/extensions/clear/__tests__/clear.test.ts +269 -2
- package/extensions/command-expansion/index.ts +9 -3
- package/extensions/context-files/index.ts +5 -1
- package/extensions/context-fork/__tests__/context-fork.test.ts +94 -1
- package/extensions/context-fork/extension.json +1 -1
- package/extensions/context-fork/frontmatter-index.ts +6 -1
- package/extensions/context-fork/index.ts +32 -0
- package/extensions/edit-tool-enhanced/index.ts +2 -1
- package/extensions/git-status/__tests__/git-status.test.ts +65 -2
- package/extensions/git-status/index.ts +268 -98
- package/extensions/hooks/index.ts +33 -11
- package/extensions/loop/index.ts +14 -1
- package/extensions/lsp/index.ts +64 -13
- package/extensions/lsp/package.json +2 -2
- package/extensions/minimal-skill-display/index.ts +7 -1
- package/extensions/random-spinner/index.ts +7 -642
- package/extensions/read-tool-enhanced/index.ts +13 -10
- package/extensions/render-stabilizer/__tests__/render-stabilizer.test.ts +2 -3
- package/extensions/render-stabilizer/index.ts +6 -6
- package/extensions/rewind/__tests__/session-files.test.ts +115 -0
- package/extensions/rewind/__tests__/snapshots.test.ts +23 -0
- package/extensions/rewind/index.ts +5 -0
- package/extensions/rewind/session-files.ts +138 -0
- package/extensions/rewind/snapshots.ts +104 -5
- package/extensions/skill-commands/index.ts +6 -1
- package/extensions/slash-command-bridge/__tests__/slash-command-bridge.test.ts +26 -0
- package/extensions/slash-command-bridge/index.ts +14 -2
- package/extensions/subagent-tool/model-resolver.ts +274 -7
- package/extensions/subagent-tool/schema.ts +1 -2
- package/extensions/tasks/commands/register-tasks-extension.ts +9 -9
- package/extensions/teams-tool/tools/register-extension.ts +1 -3
- package/extensions/teams-tool/tools/teammate-tools.ts +1 -2
- package/extensions/web-search-tool/index.ts +2 -1
- package/extensions/wezterm-pane-control/index.ts +1 -2
- package/extensions/write-tool-enhanced/index.ts +2 -1
- package/node_modules/@mariozechner/pi-tui/README.md +56 -34
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts +18 -13
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js +182 -113
- package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js +3 -3
- package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts +45 -36
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.js +489 -325
- package/node_modules/@mariozechner/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts +1 -99
- package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/image.js +17 -192
- package/node_modules/@mariozechner/pi-tui/dist/components/image.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/input.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/input.js +57 -60
- package/node_modules/@mariozechner/pi-tui/dist/components/input.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts +2 -69
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.js +5 -102
- package/node_modules/@mariozechner/pi-tui/dist/components/loader.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js +111 -53
- package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts +19 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js +78 -67
- package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts +1 -25
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js +13 -50
- package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts +8 -10
- package/node_modules/@mariozechner/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/index.js +6 -9
- package/node_modules/@mariozechner/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts +108 -238
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js +108 -365
- package/node_modules/@mariozechner/pi-tui/dist/keybindings.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts +33 -48
- package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/keys.js +239 -155
- package/node_modules/@mariozechner/pi-tui/dist/keys.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts +14 -94
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js +44 -186
- package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts +13 -58
- package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js +78 -111
- package/node_modules/@mariozechner/pi-tui/dist/terminal.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts +24 -110
- package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/tui.js +188 -435
- package/node_modules/@mariozechner/pi-tui/dist/tui.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts +0 -18
- package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts.map +1 -1
- package/node_modules/@mariozechner/pi-tui/dist/utils.js +251 -119
- package/node_modules/@mariozechner/pi-tui/dist/utils.js.map +1 -1
- package/node_modules/@mariozechner/pi-tui/package.json +6 -6
- package/node_modules/@mariozechner/pi-tui/src/__tests__/__snapshots__/render.test.ts.snap +3 -40
- package/node_modules/@mariozechner/pi-tui/src/__tests__/image-component.test.ts +71 -81
- package/node_modules/@mariozechner/pi-tui/src/__tests__/render.test.ts +0 -33
- package/node_modules/@mariozechner/pi-tui/src/__tests__/terminal-image.test.ts +93 -334
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-render-scheduling.test.ts +1 -1
- package/node_modules/@mariozechner/pi-tui/src/__tests__/utils.test.ts +11 -196
- package/node_modules/@mariozechner/pi-tui/src/autocomplete.ts +228 -142
- package/node_modules/@mariozechner/pi-tui/src/components/cancellable-loader.ts +3 -3
- package/node_modules/@mariozechner/pi-tui/src/components/editor.ts +624 -390
- package/node_modules/@mariozechner/pi-tui/src/components/image.ts +17 -227
- package/node_modules/@mariozechner/pi-tui/src/components/input.ts +71 -63
- package/node_modules/@mariozechner/pi-tui/src/components/loader.ts +5 -137
- package/node_modules/@mariozechner/pi-tui/src/components/markdown.ts +143 -52
- package/node_modules/@mariozechner/pi-tui/src/components/select-list.ts +136 -70
- package/node_modules/@mariozechner/pi-tui/src/components/settings-list.ts +12 -51
- package/node_modules/@mariozechner/pi-tui/src/index.ts +17 -36
- package/node_modules/@mariozechner/pi-tui/src/keybindings.ts +148 -421
- package/node_modules/@mariozechner/pi-tui/src/keys.ts +253 -181
- package/node_modules/@mariozechner/pi-tui/src/terminal-image.ts +51 -252
- package/node_modules/@mariozechner/pi-tui/src/terminal.ts +78 -133
- package/node_modules/@mariozechner/pi-tui/src/tui.ts +202 -478
- package/node_modules/@mariozechner/pi-tui/src/utils.ts +289 -125
- package/node_modules/@mariozechner/pi-tui/tsconfig.build.json +1 -0
- package/package.json +13 -13
- package/packages/tallow-tui/node_modules/@types/mime-types/README.md +8 -2
- package/packages/tallow-tui/node_modules/@types/mime-types/index.d.ts +6 -0
- package/packages/tallow-tui/node_modules/@types/mime-types/package.json +9 -3
- package/packages/tallow-tui/node_modules/get-east-asian-width/lookup-data.js +18 -0
- package/packages/tallow-tui/node_modules/get-east-asian-width/lookup.js +116 -384
- package/packages/tallow-tui/node_modules/get-east-asian-width/package.json +5 -4
- package/packages/tallow-tui/node_modules/get-east-asian-width/utilities.js +24 -0
- package/packages/tallow-tui/node_modules/marked/README.md +5 -4
- package/packages/tallow-tui/node_modules/marked/bin/main.js +10 -8
- package/packages/tallow-tui/node_modules/marked/bin/marked.js +2 -1
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.ts +156 -125
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js +67 -2179
- package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js.map +3 -3
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js +67 -2201
- package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js.map +3 -3
- package/packages/tallow-tui/node_modules/marked/man/marked.1 +4 -2
- package/packages/tallow-tui/node_modules/marked/man/marked.1.md +2 -1
- package/packages/tallow-tui/node_modules/marked/package.json +26 -34
- package/skills/tallow-expert/SKILL.md +3 -5
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts +0 -32
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.js +0 -46
- package/node_modules/@mariozechner/pi-tui/dist/border-styles.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts +0 -52
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js +0 -89
- package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts +0 -14
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts.map +0 -1
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js +0 -55
- package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js.map +0 -1
- package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-change-listener.test.ts +0 -121
- package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-ghost-text.test.ts +0 -112
- package/node_modules/@mariozechner/pi-tui/src/__tests__/mouse-events.test.ts +0 -134
- package/node_modules/@mariozechner/pi-tui/src/__tests__/settings-list.test.ts +0 -81
- package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-diff-regression.test.ts +0 -555
- package/node_modules/@mariozechner/pi-tui/src/border-styles.ts +0 -60
- package/node_modules/@mariozechner/pi-tui/src/components/bordered-box.ts +0 -113
- package/node_modules/@mariozechner/pi-tui/src/test-utils/capability-env.ts +0 -56
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs +0 -2211
- package/packages/tallow-tui/node_modules/marked/lib/marked.cjs.map +0 -7
- package/packages/tallow-tui/node_modules/marked/lib/marked.d.cts +0 -728
- package/packages/tallow-tui/node_modules/marked/marked.min.js +0 -69
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
export type MarkedToken = (Tokens.Blockquote | Tokens.Br | Tokens.Code | Tokens.Codespan | Tokens.Def | Tokens.Del | Tokens.Em | Tokens.Escape | Tokens.Heading | Tokens.Hr | Tokens.HTML | Tokens.Image | Tokens.Link | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.Space | Tokens.Strong | Tokens.Table | Tokens.Tag | Tokens.Text);
|
|
3
|
+
export type MarkedToken = (Tokens.Blockquote | Tokens.Br | Tokens.Checkbox | Tokens.Code | Tokens.Codespan | Tokens.Def | Tokens.Del | Tokens.Em | Tokens.Escape | Tokens.Heading | Tokens.Hr | Tokens.HTML | Tokens.Image | Tokens.Link | Tokens.List | Tokens.ListItem | Tokens.Paragraph | Tokens.Space | Tokens.Strong | Tokens.Table | Tokens.Tag | Tokens.Text);
|
|
4
4
|
export type Token = (MarkedToken | Tokens.Generic);
|
|
5
5
|
export declare namespace Tokens {
|
|
6
6
|
interface Blockquote {
|
|
@@ -14,6 +14,8 @@ export declare namespace Tokens {
|
|
|
14
14
|
raw: string;
|
|
15
15
|
}
|
|
16
16
|
interface Checkbox {
|
|
17
|
+
type: "checkbox";
|
|
18
|
+
raw: string;
|
|
17
19
|
checked: boolean;
|
|
18
20
|
}
|
|
19
21
|
interface Code {
|
|
@@ -140,8 +142,8 @@ export declare namespace Tokens {
|
|
|
140
142
|
header: boolean;
|
|
141
143
|
align: "center" | "left" | "right" | null;
|
|
142
144
|
}
|
|
143
|
-
interface TableRow {
|
|
144
|
-
text:
|
|
145
|
+
interface TableRow<P = string> {
|
|
146
|
+
text: P;
|
|
145
147
|
}
|
|
146
148
|
interface Tag {
|
|
147
149
|
type: "html";
|
|
@@ -166,74 +168,76 @@ export type TokensList = Token[] & {
|
|
|
166
168
|
/**
|
|
167
169
|
* Renderer
|
|
168
170
|
*/
|
|
169
|
-
declare class _Renderer {
|
|
170
|
-
options: MarkedOptions
|
|
171
|
-
parser: _Parser
|
|
172
|
-
constructor(options?: MarkedOptions);
|
|
173
|
-
space(token: Tokens.Space):
|
|
174
|
-
code({ text, lang, escaped }: Tokens.Code):
|
|
175
|
-
blockquote({ tokens }: Tokens.Blockquote):
|
|
176
|
-
html({ text }: Tokens.HTML | Tokens.Tag):
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
171
|
+
declare class _Renderer<ParserOutput = string, RendererOutput = string> {
|
|
172
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
173
|
+
parser: _Parser<ParserOutput, RendererOutput>;
|
|
174
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
175
|
+
space(token: Tokens.Space): RendererOutput;
|
|
176
|
+
code({ text, lang, escaped }: Tokens.Code): RendererOutput;
|
|
177
|
+
blockquote({ tokens }: Tokens.Blockquote): RendererOutput;
|
|
178
|
+
html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
|
|
179
|
+
def(token: Tokens.Def): RendererOutput;
|
|
180
|
+
heading({ tokens, depth }: Tokens.Heading): RendererOutput;
|
|
181
|
+
hr(token: Tokens.Hr): RendererOutput;
|
|
182
|
+
list(token: Tokens.List): RendererOutput;
|
|
183
|
+
listitem(item: Tokens.ListItem): RendererOutput;
|
|
184
|
+
checkbox({ checked }: Tokens.Checkbox): RendererOutput;
|
|
185
|
+
paragraph({ tokens }: Tokens.Paragraph): RendererOutput;
|
|
186
|
+
table(token: Tokens.Table): RendererOutput;
|
|
187
|
+
tablerow({ text }: Tokens.TableRow<ParserOutput>): RendererOutput;
|
|
188
|
+
tablecell(token: Tokens.TableCell): RendererOutput;
|
|
186
189
|
/**
|
|
187
190
|
* span level renderer
|
|
188
191
|
*/
|
|
189
|
-
strong({ tokens }: Tokens.Strong):
|
|
190
|
-
em({ tokens }: Tokens.Em):
|
|
191
|
-
codespan({ text }: Tokens.Codespan):
|
|
192
|
-
br(token: Tokens.Br):
|
|
193
|
-
del({ tokens }: Tokens.Del):
|
|
194
|
-
link({ href, title, tokens }: Tokens.Link):
|
|
195
|
-
image({ href, title, text, tokens }: Tokens.Image):
|
|
196
|
-
text(token: Tokens.Text | Tokens.Escape):
|
|
192
|
+
strong({ tokens }: Tokens.Strong): RendererOutput;
|
|
193
|
+
em({ tokens }: Tokens.Em): RendererOutput;
|
|
194
|
+
codespan({ text }: Tokens.Codespan): RendererOutput;
|
|
195
|
+
br(token: Tokens.Br): RendererOutput;
|
|
196
|
+
del({ tokens }: Tokens.Del): RendererOutput;
|
|
197
|
+
link({ href, title, tokens }: Tokens.Link): RendererOutput;
|
|
198
|
+
image({ href, title, text, tokens }: Tokens.Image): RendererOutput;
|
|
199
|
+
text(token: Tokens.Text | Tokens.Escape): RendererOutput;
|
|
197
200
|
}
|
|
198
201
|
/**
|
|
199
202
|
* TextRenderer
|
|
200
203
|
* returns only the textual part of the token
|
|
201
204
|
*/
|
|
202
|
-
declare class _TextRenderer {
|
|
203
|
-
strong({ text }: Tokens.Strong):
|
|
204
|
-
em({ text }: Tokens.Em):
|
|
205
|
-
codespan({ text }: Tokens.Codespan):
|
|
206
|
-
del({ text }: Tokens.Del):
|
|
207
|
-
html({ text }: Tokens.HTML | Tokens.Tag):
|
|
208
|
-
text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag):
|
|
209
|
-
link({ text }: Tokens.Link):
|
|
210
|
-
image({ text }: Tokens.Image):
|
|
211
|
-
br():
|
|
205
|
+
declare class _TextRenderer<RendererOutput = string> {
|
|
206
|
+
strong({ text }: Tokens.Strong): RendererOutput;
|
|
207
|
+
em({ text }: Tokens.Em): RendererOutput;
|
|
208
|
+
codespan({ text }: Tokens.Codespan): RendererOutput;
|
|
209
|
+
del({ text }: Tokens.Del): RendererOutput;
|
|
210
|
+
html({ text }: Tokens.HTML | Tokens.Tag): RendererOutput;
|
|
211
|
+
text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag): RendererOutput;
|
|
212
|
+
link({ text }: Tokens.Link): RendererOutput;
|
|
213
|
+
image({ text }: Tokens.Image): RendererOutput;
|
|
214
|
+
br(): RendererOutput;
|
|
215
|
+
checkbox({ raw }: Tokens.Checkbox): RendererOutput;
|
|
212
216
|
}
|
|
213
217
|
/**
|
|
214
218
|
* Parsing & Compiling
|
|
215
219
|
*/
|
|
216
|
-
declare class _Parser {
|
|
217
|
-
options: MarkedOptions
|
|
218
|
-
renderer: _Renderer
|
|
219
|
-
textRenderer: _TextRenderer
|
|
220
|
-
constructor(options?: MarkedOptions);
|
|
220
|
+
declare class _Parser<ParserOutput = string, RendererOutput = string> {
|
|
221
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
222
|
+
renderer: _Renderer<ParserOutput, RendererOutput>;
|
|
223
|
+
textRenderer: _TextRenderer<RendererOutput>;
|
|
224
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
221
225
|
/**
|
|
222
226
|
* Static Parse Method
|
|
223
227
|
*/
|
|
224
|
-
static parse(tokens: Token[], options?: MarkedOptions):
|
|
228
|
+
static parse<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
225
229
|
/**
|
|
226
230
|
* Static Parse Inline Method
|
|
227
231
|
*/
|
|
228
|
-
static parseInline(tokens: Token[], options?: MarkedOptions):
|
|
232
|
+
static parseInline<ParserOutput = string, RendererOutput = string>(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
229
233
|
/**
|
|
230
234
|
* Parse Loop
|
|
231
235
|
*/
|
|
232
|
-
parse(tokens: Token[]
|
|
236
|
+
parse(tokens: Token[]): ParserOutput;
|
|
233
237
|
/**
|
|
234
238
|
* Parse Inline Tokens
|
|
235
239
|
*/
|
|
236
|
-
parseInline(tokens: Token[], renderer?: _Renderer | _TextRenderer):
|
|
240
|
+
parseInline(tokens: Token[], renderer?: _Renderer<ParserOutput, RendererOutput> | _TextRenderer<RendererOutput>): ParserOutput;
|
|
237
241
|
}
|
|
238
242
|
declare const other: {
|
|
239
243
|
codeRemoveIndent: RegExp;
|
|
@@ -252,10 +256,10 @@ declare const other: {
|
|
|
252
256
|
blockquoteStart: RegExp;
|
|
253
257
|
blockquoteSetextReplace: RegExp;
|
|
254
258
|
blockquoteSetextReplace2: RegExp;
|
|
255
|
-
listReplaceTabs: RegExp;
|
|
256
259
|
listReplaceNesting: RegExp;
|
|
257
260
|
listIsTask: RegExp;
|
|
258
261
|
listReplaceTask: RegExp;
|
|
262
|
+
listTaskCheckbox: RegExp;
|
|
259
263
|
anyLine: RegExp;
|
|
260
264
|
hrefBrackets: RegExp;
|
|
261
265
|
tableDelimiter: RegExp;
|
|
@@ -276,7 +280,6 @@ declare const other: {
|
|
|
276
280
|
escapeReplace: RegExp;
|
|
277
281
|
escapeTestNoEncode: RegExp;
|
|
278
282
|
escapeReplaceNoEncode: RegExp;
|
|
279
|
-
unescapeTest: RegExp;
|
|
280
283
|
caret: RegExp;
|
|
281
284
|
percentDecode: RegExp;
|
|
282
285
|
findPipe: RegExp;
|
|
@@ -292,6 +295,7 @@ declare const other: {
|
|
|
292
295
|
fencesBeginRegex: (indent: number) => RegExp;
|
|
293
296
|
headingBeginRegex: (indent: number) => RegExp;
|
|
294
297
|
htmlBeginRegex: (indent: number) => RegExp;
|
|
298
|
+
blockquoteBeginRegex: (indent: number) => RegExp;
|
|
295
299
|
};
|
|
296
300
|
declare const blockNormal: {
|
|
297
301
|
blockquote: RegExp;
|
|
@@ -317,6 +321,8 @@ declare const inlineNormal: {
|
|
|
317
321
|
br: RegExp;
|
|
318
322
|
code: RegExp;
|
|
319
323
|
del: RegExp;
|
|
324
|
+
delLDelim: RegExp;
|
|
325
|
+
delRDelim: RegExp;
|
|
320
326
|
emStrongLDelim: RegExp;
|
|
321
327
|
emStrongRDelimAst: RegExp;
|
|
322
328
|
emStrongRDelimUnd: RegExp;
|
|
@@ -339,11 +345,11 @@ export interface Rules {
|
|
|
339
345
|
/**
|
|
340
346
|
* Tokenizer
|
|
341
347
|
*/
|
|
342
|
-
declare class _Tokenizer {
|
|
343
|
-
options: MarkedOptions
|
|
348
|
+
declare class _Tokenizer<ParserOutput = string, RendererOutput = string> {
|
|
349
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
344
350
|
rules: Rules;
|
|
345
|
-
lexer: _Lexer
|
|
346
|
-
constructor(options?: MarkedOptions);
|
|
351
|
+
lexer: _Lexer<ParserOutput, RendererOutput>;
|
|
352
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
347
353
|
space(src: string): Tokens.Space | undefined;
|
|
348
354
|
code(src: string): Tokens.Code | undefined;
|
|
349
355
|
fences(src: string): Tokens.Code | undefined;
|
|
@@ -364,16 +370,17 @@ declare class _Tokenizer {
|
|
|
364
370
|
emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
|
|
365
371
|
codespan(src: string): Tokens.Codespan | undefined;
|
|
366
372
|
br(src: string): Tokens.Br | undefined;
|
|
367
|
-
del(src: string): Tokens.Del | undefined;
|
|
373
|
+
del(src: string, maskedSrc: string, prevChar?: string): Tokens.Del | undefined;
|
|
368
374
|
autolink(src: string): Tokens.Link | undefined;
|
|
369
375
|
url(src: string): Tokens.Link | undefined;
|
|
370
376
|
inlineText(src: string): Tokens.Text | undefined;
|
|
371
377
|
}
|
|
372
|
-
declare class _Hooks {
|
|
373
|
-
options: MarkedOptions
|
|
378
|
+
declare class _Hooks<ParserOutput = string, RendererOutput = string> {
|
|
379
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
374
380
|
block?: boolean;
|
|
375
|
-
constructor(options?: MarkedOptions);
|
|
381
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
376
382
|
static passThroughHooks: Set<string>;
|
|
383
|
+
static passThroughHooksRespectAsync: Set<string>;
|
|
377
384
|
/**
|
|
378
385
|
* Process markdown before marked
|
|
379
386
|
*/
|
|
@@ -381,19 +388,23 @@ declare class _Hooks {
|
|
|
381
388
|
/**
|
|
382
389
|
* Process HTML after marked is finished
|
|
383
390
|
*/
|
|
384
|
-
postprocess(html:
|
|
391
|
+
postprocess(html: ParserOutput): ParserOutput;
|
|
385
392
|
/**
|
|
386
393
|
* Process all tokens before walk tokens
|
|
387
394
|
*/
|
|
388
395
|
processAllTokens(tokens: Token[] | TokensList): Token[] | TokensList;
|
|
396
|
+
/**
|
|
397
|
+
* Mask contents that should not be interpreted as em/strong delimiters
|
|
398
|
+
*/
|
|
399
|
+
emStrongMask(src: string): string;
|
|
389
400
|
/**
|
|
390
401
|
* Provide function to tokenize markdown
|
|
391
402
|
*/
|
|
392
|
-
provideLexer(): typeof _Lexer.lexInline;
|
|
403
|
+
provideLexer(block?: boolean | undefined): typeof _Lexer.lexInline;
|
|
393
404
|
/**
|
|
394
405
|
* Provide function to parse tokens
|
|
395
406
|
*/
|
|
396
|
-
provideParser():
|
|
407
|
+
provideParser(block?: boolean | undefined): (tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput> | undefined) => ParserOutput;
|
|
397
408
|
}
|
|
398
409
|
export interface TokenizerThis {
|
|
399
410
|
lexer: _Lexer;
|
|
@@ -407,28 +418,28 @@ export interface TokenizerExtension {
|
|
|
407
418
|
tokenizer: TokenizerExtensionFunction;
|
|
408
419
|
childTokens?: string[];
|
|
409
420
|
}
|
|
410
|
-
export interface RendererThis {
|
|
411
|
-
parser: _Parser
|
|
421
|
+
export interface RendererThis<ParserOutput = string, RendererOutput = string> {
|
|
422
|
+
parser: _Parser<ParserOutput, RendererOutput>;
|
|
412
423
|
}
|
|
413
|
-
export type RendererExtensionFunction = (this: RendererThis, token: Tokens.Generic) =>
|
|
414
|
-
export interface RendererExtension {
|
|
424
|
+
export type RendererExtensionFunction<ParserOutput = string, RendererOutput = string> = (this: RendererThis<ParserOutput, RendererOutput>, token: Tokens.Generic) => RendererOutput | false | undefined;
|
|
425
|
+
export interface RendererExtension<ParserOutput = string, RendererOutput = string> {
|
|
415
426
|
name: string;
|
|
416
|
-
renderer: RendererExtensionFunction
|
|
427
|
+
renderer: RendererExtensionFunction<ParserOutput, RendererOutput>;
|
|
417
428
|
}
|
|
418
|
-
export type TokenizerAndRendererExtension = TokenizerExtension | RendererExtension | (TokenizerExtension & RendererExtension);
|
|
419
|
-
export type HooksApi = Omit<_Hooks, "constructor" | "options" | "block">;
|
|
420
|
-
export type HooksObject = {
|
|
421
|
-
[K in keyof HooksApi]?: (this: _Hooks, ...args: Parameters<HooksApi[K]>) => ReturnType<HooksApi[K]> | Promise<ReturnType<HooksApi[K]>>;
|
|
429
|
+
export type TokenizerAndRendererExtension<ParserOutput = string, RendererOutput = string> = TokenizerExtension | RendererExtension<ParserOutput, RendererOutput> | (TokenizerExtension & RendererExtension<ParserOutput, RendererOutput>);
|
|
430
|
+
export type HooksApi<ParserOutput = string, RendererOutput = string> = Omit<_Hooks<ParserOutput, RendererOutput>, "constructor" | "options" | "block">;
|
|
431
|
+
export type HooksObject<ParserOutput = string, RendererOutput = string> = {
|
|
432
|
+
[K in keyof HooksApi<ParserOutput, RendererOutput>]?: (this: _Hooks<ParserOutput, RendererOutput>, ...args: Parameters<HooksApi<ParserOutput, RendererOutput>[K]>) => ReturnType<HooksApi<ParserOutput, RendererOutput>[K]> | Promise<ReturnType<HooksApi<ParserOutput, RendererOutput>[K]>>;
|
|
422
433
|
};
|
|
423
|
-
export type RendererApi = Omit<_Renderer, "constructor" | "options" | "parser">;
|
|
424
|
-
export type RendererObject = {
|
|
425
|
-
[K in keyof RendererApi]?: (this: _Renderer, ...args: Parameters<RendererApi[K]>) => ReturnType<RendererApi[K]> | false;
|
|
434
|
+
export type RendererApi<ParserOutput = string, RendererOutput = string> = Omit<_Renderer<ParserOutput, RendererOutput>, "constructor" | "options" | "parser">;
|
|
435
|
+
export type RendererObject<ParserOutput = string, RendererOutput = string> = {
|
|
436
|
+
[K in keyof RendererApi<ParserOutput, RendererOutput>]?: (this: _Renderer<ParserOutput, RendererOutput>, ...args: Parameters<RendererApi<ParserOutput, RendererOutput>[K]>) => ReturnType<RendererApi<ParserOutput, RendererOutput>[K]> | false;
|
|
426
437
|
};
|
|
427
|
-
export type TokenizerApi = Omit<_Tokenizer, "constructor" | "options" | "rules" | "lexer">;
|
|
428
|
-
export type TokenizerObject = {
|
|
429
|
-
[K in keyof TokenizerApi]?: (this: _Tokenizer, ...args: Parameters<TokenizerApi[K]>) => ReturnType<TokenizerApi[K]> | false;
|
|
438
|
+
export type TokenizerApi<ParserOutput = string, RendererOutput = string> = Omit<_Tokenizer<ParserOutput, RendererOutput>, "constructor" | "options" | "rules" | "lexer">;
|
|
439
|
+
export type TokenizerObject<ParserOutput = string, RendererOutput = string> = {
|
|
440
|
+
[K in keyof TokenizerApi<ParserOutput, RendererOutput>]?: (this: _Tokenizer<ParserOutput, RendererOutput>, ...args: Parameters<TokenizerApi<ParserOutput, RendererOutput>[K]>) => ReturnType<TokenizerApi<ParserOutput, RendererOutput>[K]> | false;
|
|
430
441
|
};
|
|
431
|
-
export interface MarkedExtension {
|
|
442
|
+
export interface MarkedExtension<ParserOutput = string, RendererOutput = string> {
|
|
432
443
|
/**
|
|
433
444
|
* True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
|
|
434
445
|
*/
|
|
@@ -440,7 +451,7 @@ export interface MarkedExtension {
|
|
|
440
451
|
/**
|
|
441
452
|
* Add tokenizers and renderers to marked
|
|
442
453
|
*/
|
|
443
|
-
extensions?: TokenizerAndRendererExtension[] | null;
|
|
454
|
+
extensions?: TokenizerAndRendererExtension<ParserOutput, RendererOutput>[] | null;
|
|
444
455
|
/**
|
|
445
456
|
* Enable GitHub flavored markdown.
|
|
446
457
|
*/
|
|
@@ -450,10 +461,11 @@ export interface MarkedExtension {
|
|
|
450
461
|
* preprocess is called to process markdown before sending it to marked.
|
|
451
462
|
* processAllTokens is called with the TokensList before walkTokens.
|
|
452
463
|
* postprocess is called to process html after marked has finished parsing.
|
|
464
|
+
* emStrongMask is called to mask contents that should not be interpreted as em/strong delimiters.
|
|
453
465
|
* provideLexer is called to provide a function to tokenize markdown.
|
|
454
466
|
* provideParser is called to provide a function to parse tokens.
|
|
455
467
|
*/
|
|
456
|
-
hooks?: HooksObject | null;
|
|
468
|
+
hooks?: HooksObject<ParserOutput, RendererOutput> | null;
|
|
457
469
|
/**
|
|
458
470
|
* Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
|
|
459
471
|
*/
|
|
@@ -463,7 +475,7 @@ export interface MarkedExtension {
|
|
|
463
475
|
*
|
|
464
476
|
* An object containing functions to render tokens to HTML.
|
|
465
477
|
*/
|
|
466
|
-
renderer?: RendererObject | null;
|
|
478
|
+
renderer?: RendererObject<ParserOutput, RendererOutput> | null;
|
|
467
479
|
/**
|
|
468
480
|
* Shows an HTML error message when rendering fails.
|
|
469
481
|
*/
|
|
@@ -480,27 +492,27 @@ export interface MarkedExtension {
|
|
|
480
492
|
*/
|
|
481
493
|
walkTokens?: ((token: Token) => void | Promise<void>) | null;
|
|
482
494
|
}
|
|
483
|
-
export interface MarkedOptions extends Omit<MarkedExtension, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
|
|
495
|
+
export interface MarkedOptions<ParserOutput = string, RendererOutput = string> extends Omit<MarkedExtension<ParserOutput, RendererOutput>, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
|
|
484
496
|
/**
|
|
485
497
|
* Hooks are methods that hook into some part of marked.
|
|
486
498
|
*/
|
|
487
|
-
hooks?: _Hooks | null;
|
|
499
|
+
hooks?: _Hooks<ParserOutput, RendererOutput> | null;
|
|
488
500
|
/**
|
|
489
501
|
* Type: object Default: new Renderer()
|
|
490
502
|
*
|
|
491
503
|
* An object containing functions to render tokens to HTML.
|
|
492
504
|
*/
|
|
493
|
-
renderer?: _Renderer | null;
|
|
505
|
+
renderer?: _Renderer<ParserOutput, RendererOutput> | null;
|
|
494
506
|
/**
|
|
495
507
|
* The tokenizer defines how to turn markdown text into tokens.
|
|
496
508
|
*/
|
|
497
|
-
tokenizer?: _Tokenizer | null;
|
|
509
|
+
tokenizer?: _Tokenizer<ParserOutput, RendererOutput> | null;
|
|
498
510
|
/**
|
|
499
511
|
* Custom extensions
|
|
500
512
|
*/
|
|
501
513
|
extensions?: null | {
|
|
502
514
|
renderers: {
|
|
503
|
-
[name: string]: RendererExtensionFunction
|
|
515
|
+
[name: string]: RendererExtensionFunction<ParserOutput, RendererOutput>;
|
|
504
516
|
};
|
|
505
517
|
childTokens: {
|
|
506
518
|
[name: string]: string[];
|
|
@@ -518,17 +530,20 @@ export interface MarkedOptions extends Omit<MarkedExtension, "hooks" | "renderer
|
|
|
518
530
|
/**
|
|
519
531
|
* Block Lexer
|
|
520
532
|
*/
|
|
521
|
-
declare class _Lexer {
|
|
533
|
+
declare class _Lexer<ParserOutput = string, RendererOutput = string> {
|
|
522
534
|
tokens: TokensList;
|
|
523
|
-
options: MarkedOptions
|
|
535
|
+
options: MarkedOptions<ParserOutput, RendererOutput>;
|
|
524
536
|
state: {
|
|
525
537
|
inLink: boolean;
|
|
526
538
|
inRawBlock: boolean;
|
|
527
539
|
top: boolean;
|
|
528
540
|
};
|
|
541
|
+
inlineQueue: {
|
|
542
|
+
src: string;
|
|
543
|
+
tokens: Token[];
|
|
544
|
+
}[];
|
|
529
545
|
private tokenizer;
|
|
530
|
-
|
|
531
|
-
constructor(options?: MarkedOptions);
|
|
546
|
+
constructor(options?: MarkedOptions<ParserOutput, RendererOutput>);
|
|
532
547
|
/**
|
|
533
548
|
* Expose Rules
|
|
534
549
|
*/
|
|
@@ -561,6 +576,8 @@ declare class _Lexer {
|
|
|
561
576
|
br: RegExp;
|
|
562
577
|
code: RegExp;
|
|
563
578
|
del: RegExp;
|
|
579
|
+
delLDelim: RegExp;
|
|
580
|
+
delRDelim: RegExp;
|
|
564
581
|
emStrongLDelim: RegExp;
|
|
565
582
|
emStrongRDelimAst: RegExp;
|
|
566
583
|
emStrongRDelimUnd: RegExp;
|
|
@@ -574,19 +591,19 @@ declare class _Lexer {
|
|
|
574
591
|
text: RegExp;
|
|
575
592
|
url: RegExp;
|
|
576
593
|
};
|
|
577
|
-
gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "
|
|
578
|
-
breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "
|
|
579
|
-
pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "
|
|
594
|
+
gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
595
|
+
breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
596
|
+
pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "tag" | "escape" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "delLDelim" | "delRDelim" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
|
|
580
597
|
};
|
|
581
598
|
};
|
|
582
599
|
/**
|
|
583
600
|
* Static Lex Method
|
|
584
601
|
*/
|
|
585
|
-
static lex(src: string, options?: MarkedOptions): TokensList;
|
|
602
|
+
static lex<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
|
|
586
603
|
/**
|
|
587
604
|
* Static Lex Inline Method
|
|
588
605
|
*/
|
|
589
|
-
static lexInline(src: string, options?: MarkedOptions): Token[];
|
|
606
|
+
static lexInline<ParserOutput = string, RendererOutput = string>(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): Token[];
|
|
590
607
|
/**
|
|
591
608
|
* Preprocessing
|
|
592
609
|
*/
|
|
@@ -605,45 +622,59 @@ declare class _Lexer {
|
|
|
605
622
|
/**
|
|
606
623
|
* Gets the original marked default options.
|
|
607
624
|
*/
|
|
608
|
-
declare function _getDefaults(): MarkedOptions
|
|
609
|
-
declare let _defaults: MarkedOptions
|
|
625
|
+
declare function _getDefaults<ParserOutput = string, RendererOutput = string>(): MarkedOptions<ParserOutput, RendererOutput>;
|
|
626
|
+
declare let _defaults: MarkedOptions<any, any>;
|
|
610
627
|
export type MaybePromise = void | Promise<void>;
|
|
611
|
-
export declare class Marked {
|
|
612
|
-
defaults: MarkedOptions
|
|
613
|
-
options: (opt: MarkedOptions) => this;
|
|
628
|
+
export declare class Marked<ParserOutput = string, RendererOutput = string> {
|
|
629
|
+
defaults: MarkedOptions<ParserOutput, RendererOutput>;
|
|
630
|
+
options: (opt: MarkedOptions<ParserOutput, RendererOutput>) => this;
|
|
614
631
|
parse: {
|
|
615
|
-
(src: string, options: MarkedOptions & {
|
|
632
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
616
633
|
async: true;
|
|
617
|
-
}): Promise<
|
|
618
|
-
(src: string, options: MarkedOptions & {
|
|
634
|
+
}): Promise<ParserOutput>;
|
|
635
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
619
636
|
async: false;
|
|
620
|
-
}):
|
|
621
|
-
(src: string, options?: MarkedOptions | null):
|
|
637
|
+
}): ParserOutput;
|
|
638
|
+
(src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
|
|
622
639
|
};
|
|
623
640
|
parseInline: {
|
|
624
|
-
(src: string, options: MarkedOptions & {
|
|
641
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
625
642
|
async: true;
|
|
626
|
-
}): Promise<
|
|
627
|
-
(src: string, options: MarkedOptions & {
|
|
643
|
+
}): Promise<ParserOutput>;
|
|
644
|
+
(src: string, options: MarkedOptions<ParserOutput, RendererOutput> & {
|
|
628
645
|
async: false;
|
|
629
|
-
}):
|
|
630
|
-
(src: string, options?: MarkedOptions | null):
|
|
646
|
+
}): ParserOutput;
|
|
647
|
+
(src: string, options?: MarkedOptions<ParserOutput, RendererOutput> | null): ParserOutput | Promise<ParserOutput>;
|
|
648
|
+
};
|
|
649
|
+
Parser: {
|
|
650
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Parser<ParserOutput, RendererOutput>;
|
|
651
|
+
parse<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
|
|
652
|
+
parseInline<ParserOutput_1 = string, RendererOutput_1 = string>(tokens: Token[], options?: MarkedOptions<ParserOutput_1, RendererOutput_1>): ParserOutput_1;
|
|
653
|
+
};
|
|
654
|
+
Renderer: {
|
|
655
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Renderer<ParserOutput, RendererOutput>;
|
|
656
|
+
};
|
|
657
|
+
TextRenderer: {
|
|
658
|
+
new (): _TextRenderer<RendererOutput>;
|
|
631
659
|
};
|
|
632
|
-
Parser: typeof _Parser;
|
|
633
|
-
Renderer: typeof _Renderer;
|
|
634
|
-
TextRenderer: typeof _TextRenderer;
|
|
635
660
|
Lexer: typeof _Lexer;
|
|
636
|
-
Tokenizer:
|
|
637
|
-
|
|
638
|
-
|
|
661
|
+
Tokenizer: {
|
|
662
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Tokenizer<ParserOutput, RendererOutput>;
|
|
663
|
+
};
|
|
664
|
+
Hooks: {
|
|
665
|
+
new (options?: MarkedOptions<ParserOutput, RendererOutput> | undefined): _Hooks<ParserOutput, RendererOutput>;
|
|
666
|
+
passThroughHooks: Set<string>;
|
|
667
|
+
passThroughHooksRespectAsync: Set<string>;
|
|
668
|
+
};
|
|
669
|
+
constructor(...args: MarkedExtension<ParserOutput, RendererOutput>[]);
|
|
639
670
|
/**
|
|
640
671
|
* Run callback for every token
|
|
641
672
|
*/
|
|
642
673
|
walkTokens(tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]): MaybePromise[];
|
|
643
|
-
use(...args: MarkedExtension[]): this;
|
|
644
|
-
setOptions(opt: MarkedOptions): this;
|
|
645
|
-
lexer(src: string, options?: MarkedOptions): TokensList;
|
|
646
|
-
parser(tokens: Token[], options?: MarkedOptions):
|
|
674
|
+
use(...args: MarkedExtension<ParserOutput, RendererOutput>[]): this;
|
|
675
|
+
setOptions(opt: MarkedOptions<ParserOutput, RendererOutput>): this;
|
|
676
|
+
lexer(src: string, options?: MarkedOptions<ParserOutput, RendererOutput>): TokensList;
|
|
677
|
+
parser(tokens: Token[], options?: MarkedOptions<ParserOutput, RendererOutput>): ParserOutput;
|
|
647
678
|
private parseMarkdown;
|
|
648
679
|
private onError;
|
|
649
680
|
}
|
|
@@ -675,17 +706,17 @@ export declare namespace marked {
|
|
|
675
706
|
var options: (options: MarkedOptions) => typeof marked;
|
|
676
707
|
var setOptions: (options: MarkedOptions) => typeof marked;
|
|
677
708
|
var getDefaults: typeof _getDefaults;
|
|
678
|
-
var defaults: MarkedOptions
|
|
709
|
+
var defaults: MarkedOptions<any, any>;
|
|
679
710
|
var use: (...args: MarkedExtension[]) => typeof marked;
|
|
680
711
|
var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
|
|
681
712
|
var parseInline: {
|
|
682
|
-
(src: string, options: MarkedOptions & {
|
|
713
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
683
714
|
async: true;
|
|
684
715
|
}): Promise<string>;
|
|
685
|
-
(src: string, options: MarkedOptions & {
|
|
716
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
686
717
|
async: false;
|
|
687
718
|
}): string;
|
|
688
|
-
(src: string, options?: MarkedOptions | null): string | Promise<string>;
|
|
719
|
+
(src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
|
|
689
720
|
};
|
|
690
721
|
var Parser: typeof _Parser;
|
|
691
722
|
var parser: typeof _Parser.parse;
|
|
@@ -702,13 +733,13 @@ export declare const setOptions: (options: MarkedOptions) => typeof marked;
|
|
|
702
733
|
export declare const use: (...args: MarkedExtension[]) => typeof marked;
|
|
703
734
|
export declare const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
|
|
704
735
|
export declare const parseInline: {
|
|
705
|
-
(src: string, options: MarkedOptions & {
|
|
736
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
706
737
|
async: true;
|
|
707
738
|
}): Promise<string>;
|
|
708
|
-
(src: string, options: MarkedOptions & {
|
|
739
|
+
(src: string, options: MarkedOptions<string, string> & {
|
|
709
740
|
async: false;
|
|
710
741
|
}): string;
|
|
711
|
-
(src: string, options?: MarkedOptions | null): string | Promise<string>;
|
|
742
|
+
(src: string, options?: MarkedOptions<string, string> | null | undefined): string | Promise<string>;
|
|
712
743
|
};
|
|
713
744
|
export declare const parse: typeof marked;
|
|
714
745
|
export declare const parser: typeof _Parser.parse;
|