@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.
Files changed (212) hide show
  1. package/dist/cli.js +8 -5
  2. package/dist/cli.js.map +1 -1
  3. package/dist/config.d.ts +1 -1
  4. package/dist/config.js +1 -1
  5. package/dist/interactive-mode-patch.d.ts +24 -12
  6. package/dist/interactive-mode-patch.d.ts.map +1 -1
  7. package/dist/interactive-mode-patch.js +229 -146
  8. package/dist/interactive-mode-patch.js.map +1 -1
  9. package/dist/interactive-reset.d.ts +49 -0
  10. package/dist/interactive-reset.d.ts.map +1 -0
  11. package/dist/interactive-reset.js +40 -0
  12. package/dist/interactive-reset.js.map +1 -0
  13. package/dist/pi-tui-editor-patch.d.ts +10 -0
  14. package/dist/pi-tui-editor-patch.d.ts.map +1 -0
  15. package/dist/pi-tui-editor-patch.js +159 -0
  16. package/dist/pi-tui-editor-patch.js.map +1 -0
  17. package/dist/pi-tui-patch.d.ts +2 -0
  18. package/dist/pi-tui-patch.d.ts.map +1 -0
  19. package/dist/pi-tui-patch.js +563 -0
  20. package/dist/pi-tui-patch.js.map +1 -0
  21. package/dist/pi-tui-settings-list-patch.d.ts +11 -0
  22. package/dist/pi-tui-settings-list-patch.d.ts.map +1 -0
  23. package/dist/pi-tui-settings-list-patch.js +38 -0
  24. package/dist/pi-tui-settings-list-patch.js.map +1 -0
  25. package/dist/process-cleanup.js +1 -1
  26. package/dist/process-cleanup.js.map +1 -1
  27. package/dist/reset-diagnostics.d.ts +69 -0
  28. package/dist/reset-diagnostics.d.ts.map +1 -0
  29. package/dist/reset-diagnostics.js +41 -0
  30. package/dist/reset-diagnostics.js.map +1 -0
  31. package/dist/sdk.d.ts +7 -23
  32. package/dist/sdk.d.ts.map +1 -1
  33. package/dist/sdk.js +211 -174
  34. package/dist/sdk.js.map +1 -1
  35. package/dist/workspace-transition-interactive.d.ts +1 -0
  36. package/dist/workspace-transition-interactive.d.ts.map +1 -1
  37. package/dist/workspace-transition-interactive.js +8 -18
  38. package/dist/workspace-transition-interactive.js.map +1 -1
  39. package/extensions/__integration__/audit-findings.test.ts +4 -5
  40. package/extensions/_icons/index.ts +2 -4
  41. package/extensions/_shared/__tests__/image-metadata.test.ts +33 -0
  42. package/extensions/_shared/__tests__/shell-policy.test.ts +19 -0
  43. package/extensions/_shared/__tests__/terminal-links.test.ts +18 -0
  44. package/extensions/_shared/image-metadata.ts +99 -0
  45. package/extensions/_shared/inline-preview.ts +1 -1
  46. package/extensions/_shared/shell-policy.ts +121 -1
  47. package/extensions/_shared/terminal-links.ts +22 -0
  48. package/extensions/ask-user-question-tool/index.ts +0 -3
  49. package/extensions/clear/__tests__/clear.test.ts +269 -2
  50. package/extensions/command-expansion/index.ts +9 -3
  51. package/extensions/context-files/index.ts +5 -1
  52. package/extensions/context-fork/__tests__/context-fork.test.ts +94 -1
  53. package/extensions/context-fork/extension.json +1 -1
  54. package/extensions/context-fork/frontmatter-index.ts +6 -1
  55. package/extensions/context-fork/index.ts +32 -0
  56. package/extensions/edit-tool-enhanced/index.ts +2 -1
  57. package/extensions/git-status/__tests__/git-status.test.ts +65 -2
  58. package/extensions/git-status/index.ts +268 -98
  59. package/extensions/hooks/index.ts +33 -11
  60. package/extensions/loop/index.ts +14 -1
  61. package/extensions/lsp/index.ts +64 -13
  62. package/extensions/lsp/package.json +2 -2
  63. package/extensions/minimal-skill-display/index.ts +7 -1
  64. package/extensions/random-spinner/index.ts +7 -642
  65. package/extensions/read-tool-enhanced/index.ts +13 -10
  66. package/extensions/render-stabilizer/__tests__/render-stabilizer.test.ts +2 -3
  67. package/extensions/render-stabilizer/index.ts +6 -6
  68. package/extensions/rewind/__tests__/session-files.test.ts +115 -0
  69. package/extensions/rewind/__tests__/snapshots.test.ts +23 -0
  70. package/extensions/rewind/index.ts +5 -0
  71. package/extensions/rewind/session-files.ts +138 -0
  72. package/extensions/rewind/snapshots.ts +104 -5
  73. package/extensions/skill-commands/index.ts +6 -1
  74. package/extensions/slash-command-bridge/__tests__/slash-command-bridge.test.ts +26 -0
  75. package/extensions/slash-command-bridge/index.ts +14 -2
  76. package/extensions/subagent-tool/model-resolver.ts +274 -7
  77. package/extensions/subagent-tool/schema.ts +1 -2
  78. package/extensions/tasks/commands/register-tasks-extension.ts +9 -9
  79. package/extensions/teams-tool/tools/register-extension.ts +1 -3
  80. package/extensions/teams-tool/tools/teammate-tools.ts +1 -2
  81. package/extensions/web-search-tool/index.ts +2 -1
  82. package/extensions/wezterm-pane-control/index.ts +1 -2
  83. package/extensions/write-tool-enhanced/index.ts +2 -1
  84. package/node_modules/@mariozechner/pi-tui/README.md +56 -34
  85. package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts +18 -13
  86. package/node_modules/@mariozechner/pi-tui/dist/autocomplete.d.ts.map +1 -1
  87. package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js +182 -113
  88. package/node_modules/@mariozechner/pi-tui/dist/autocomplete.js.map +1 -1
  89. package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js +3 -3
  90. package/node_modules/@mariozechner/pi-tui/dist/components/cancellable-loader.js.map +1 -1
  91. package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts +45 -36
  92. package/node_modules/@mariozechner/pi-tui/dist/components/editor.d.ts.map +1 -1
  93. package/node_modules/@mariozechner/pi-tui/dist/components/editor.js +489 -325
  94. package/node_modules/@mariozechner/pi-tui/dist/components/editor.js.map +1 -1
  95. package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts +1 -99
  96. package/node_modules/@mariozechner/pi-tui/dist/components/image.d.ts.map +1 -1
  97. package/node_modules/@mariozechner/pi-tui/dist/components/image.js +17 -192
  98. package/node_modules/@mariozechner/pi-tui/dist/components/image.js.map +1 -1
  99. package/node_modules/@mariozechner/pi-tui/dist/components/input.d.ts.map +1 -1
  100. package/node_modules/@mariozechner/pi-tui/dist/components/input.js +57 -60
  101. package/node_modules/@mariozechner/pi-tui/dist/components/input.js.map +1 -1
  102. package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts +2 -69
  103. package/node_modules/@mariozechner/pi-tui/dist/components/loader.d.ts.map +1 -1
  104. package/node_modules/@mariozechner/pi-tui/dist/components/loader.js +5 -102
  105. package/node_modules/@mariozechner/pi-tui/dist/components/loader.js.map +1 -1
  106. package/node_modules/@mariozechner/pi-tui/dist/components/markdown.d.ts.map +1 -1
  107. package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js +111 -53
  108. package/node_modules/@mariozechner/pi-tui/dist/components/markdown.js.map +1 -1
  109. package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts +19 -1
  110. package/node_modules/@mariozechner/pi-tui/dist/components/select-list.d.ts.map +1 -1
  111. package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js +78 -67
  112. package/node_modules/@mariozechner/pi-tui/dist/components/select-list.js.map +1 -1
  113. package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts +1 -25
  114. package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.d.ts.map +1 -1
  115. package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js +13 -50
  116. package/node_modules/@mariozechner/pi-tui/dist/components/settings-list.js.map +1 -1
  117. package/node_modules/@mariozechner/pi-tui/dist/index.d.ts +8 -10
  118. package/node_modules/@mariozechner/pi-tui/dist/index.d.ts.map +1 -1
  119. package/node_modules/@mariozechner/pi-tui/dist/index.js +6 -9
  120. package/node_modules/@mariozechner/pi-tui/dist/index.js.map +1 -1
  121. package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts +108 -238
  122. package/node_modules/@mariozechner/pi-tui/dist/keybindings.d.ts.map +1 -1
  123. package/node_modules/@mariozechner/pi-tui/dist/keybindings.js +108 -365
  124. package/node_modules/@mariozechner/pi-tui/dist/keybindings.js.map +1 -1
  125. package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts +33 -48
  126. package/node_modules/@mariozechner/pi-tui/dist/keys.d.ts.map +1 -1
  127. package/node_modules/@mariozechner/pi-tui/dist/keys.js +239 -155
  128. package/node_modules/@mariozechner/pi-tui/dist/keys.js.map +1 -1
  129. package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts +14 -94
  130. package/node_modules/@mariozechner/pi-tui/dist/terminal-image.d.ts.map +1 -1
  131. package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js +44 -186
  132. package/node_modules/@mariozechner/pi-tui/dist/terminal-image.js.map +1 -1
  133. package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts +13 -58
  134. package/node_modules/@mariozechner/pi-tui/dist/terminal.d.ts.map +1 -1
  135. package/node_modules/@mariozechner/pi-tui/dist/terminal.js +78 -111
  136. package/node_modules/@mariozechner/pi-tui/dist/terminal.js.map +1 -1
  137. package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts +24 -110
  138. package/node_modules/@mariozechner/pi-tui/dist/tui.d.ts.map +1 -1
  139. package/node_modules/@mariozechner/pi-tui/dist/tui.js +188 -435
  140. package/node_modules/@mariozechner/pi-tui/dist/tui.js.map +1 -1
  141. package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts +0 -18
  142. package/node_modules/@mariozechner/pi-tui/dist/utils.d.ts.map +1 -1
  143. package/node_modules/@mariozechner/pi-tui/dist/utils.js +251 -119
  144. package/node_modules/@mariozechner/pi-tui/dist/utils.js.map +1 -1
  145. package/node_modules/@mariozechner/pi-tui/package.json +6 -6
  146. package/node_modules/@mariozechner/pi-tui/src/__tests__/__snapshots__/render.test.ts.snap +3 -40
  147. package/node_modules/@mariozechner/pi-tui/src/__tests__/image-component.test.ts +71 -81
  148. package/node_modules/@mariozechner/pi-tui/src/__tests__/render.test.ts +0 -33
  149. package/node_modules/@mariozechner/pi-tui/src/__tests__/terminal-image.test.ts +93 -334
  150. package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-render-scheduling.test.ts +1 -1
  151. package/node_modules/@mariozechner/pi-tui/src/__tests__/utils.test.ts +11 -196
  152. package/node_modules/@mariozechner/pi-tui/src/autocomplete.ts +228 -142
  153. package/node_modules/@mariozechner/pi-tui/src/components/cancellable-loader.ts +3 -3
  154. package/node_modules/@mariozechner/pi-tui/src/components/editor.ts +624 -390
  155. package/node_modules/@mariozechner/pi-tui/src/components/image.ts +17 -227
  156. package/node_modules/@mariozechner/pi-tui/src/components/input.ts +71 -63
  157. package/node_modules/@mariozechner/pi-tui/src/components/loader.ts +5 -137
  158. package/node_modules/@mariozechner/pi-tui/src/components/markdown.ts +143 -52
  159. package/node_modules/@mariozechner/pi-tui/src/components/select-list.ts +136 -70
  160. package/node_modules/@mariozechner/pi-tui/src/components/settings-list.ts +12 -51
  161. package/node_modules/@mariozechner/pi-tui/src/index.ts +17 -36
  162. package/node_modules/@mariozechner/pi-tui/src/keybindings.ts +148 -421
  163. package/node_modules/@mariozechner/pi-tui/src/keys.ts +253 -181
  164. package/node_modules/@mariozechner/pi-tui/src/terminal-image.ts +51 -252
  165. package/node_modules/@mariozechner/pi-tui/src/terminal.ts +78 -133
  166. package/node_modules/@mariozechner/pi-tui/src/tui.ts +202 -478
  167. package/node_modules/@mariozechner/pi-tui/src/utils.ts +289 -125
  168. package/node_modules/@mariozechner/pi-tui/tsconfig.build.json +1 -0
  169. package/package.json +13 -13
  170. package/packages/tallow-tui/node_modules/@types/mime-types/README.md +8 -2
  171. package/packages/tallow-tui/node_modules/@types/mime-types/index.d.ts +6 -0
  172. package/packages/tallow-tui/node_modules/@types/mime-types/package.json +9 -3
  173. package/packages/tallow-tui/node_modules/get-east-asian-width/lookup-data.js +18 -0
  174. package/packages/tallow-tui/node_modules/get-east-asian-width/lookup.js +116 -384
  175. package/packages/tallow-tui/node_modules/get-east-asian-width/package.json +5 -4
  176. package/packages/tallow-tui/node_modules/get-east-asian-width/utilities.js +24 -0
  177. package/packages/tallow-tui/node_modules/marked/README.md +5 -4
  178. package/packages/tallow-tui/node_modules/marked/bin/main.js +10 -8
  179. package/packages/tallow-tui/node_modules/marked/bin/marked.js +2 -1
  180. package/packages/tallow-tui/node_modules/marked/lib/marked.d.ts +156 -125
  181. package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js +67 -2179
  182. package/packages/tallow-tui/node_modules/marked/lib/marked.esm.js.map +3 -3
  183. package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js +67 -2201
  184. package/packages/tallow-tui/node_modules/marked/lib/marked.umd.js.map +3 -3
  185. package/packages/tallow-tui/node_modules/marked/man/marked.1 +4 -2
  186. package/packages/tallow-tui/node_modules/marked/man/marked.1.md +2 -1
  187. package/packages/tallow-tui/node_modules/marked/package.json +26 -34
  188. package/skills/tallow-expert/SKILL.md +3 -5
  189. package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts +0 -32
  190. package/node_modules/@mariozechner/pi-tui/dist/border-styles.d.ts.map +0 -1
  191. package/node_modules/@mariozechner/pi-tui/dist/border-styles.js +0 -46
  192. package/node_modules/@mariozechner/pi-tui/dist/border-styles.js.map +0 -1
  193. package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts +0 -52
  194. package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.d.ts.map +0 -1
  195. package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js +0 -89
  196. package/node_modules/@mariozechner/pi-tui/dist/components/bordered-box.js.map +0 -1
  197. package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts +0 -14
  198. package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.d.ts.map +0 -1
  199. package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js +0 -55
  200. package/node_modules/@mariozechner/pi-tui/dist/test-utils/capability-env.js.map +0 -1
  201. package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-change-listener.test.ts +0 -121
  202. package/node_modules/@mariozechner/pi-tui/src/__tests__/editor-ghost-text.test.ts +0 -112
  203. package/node_modules/@mariozechner/pi-tui/src/__tests__/mouse-events.test.ts +0 -134
  204. package/node_modules/@mariozechner/pi-tui/src/__tests__/settings-list.test.ts +0 -81
  205. package/node_modules/@mariozechner/pi-tui/src/__tests__/tui-diff-regression.test.ts +0 -555
  206. package/node_modules/@mariozechner/pi-tui/src/border-styles.ts +0 -60
  207. package/node_modules/@mariozechner/pi-tui/src/components/bordered-box.ts +0 -113
  208. package/node_modules/@mariozechner/pi-tui/src/test-utils/capability-env.ts +0 -56
  209. package/packages/tallow-tui/node_modules/marked/lib/marked.cjs +0 -2211
  210. package/packages/tallow-tui/node_modules/marked/lib/marked.cjs.map +0 -7
  211. package/packages/tallow-tui/node_modules/marked/lib/marked.d.cts +0 -728
  212. package/packages/tallow-tui/node_modules/marked/marked.min.js +0 -69
@@ -1,728 +0,0 @@
1
- // Generated by dts-bundle-generator v9.5.1
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);
4
- export type Token = (MarkedToken | Tokens.Generic);
5
- export declare namespace Tokens {
6
- interface Blockquote {
7
- type: "blockquote";
8
- raw: string;
9
- text: string;
10
- tokens: Token[];
11
- }
12
- interface Br {
13
- type: "br";
14
- raw: string;
15
- }
16
- interface Checkbox {
17
- checked: boolean;
18
- }
19
- interface Code {
20
- type: "code";
21
- raw: string;
22
- codeBlockStyle?: "indented";
23
- lang?: string;
24
- text: string;
25
- escaped?: boolean;
26
- }
27
- interface Codespan {
28
- type: "codespan";
29
- raw: string;
30
- text: string;
31
- }
32
- interface Def {
33
- type: "def";
34
- raw: string;
35
- tag: string;
36
- href: string;
37
- title: string;
38
- }
39
- interface Del {
40
- type: "del";
41
- raw: string;
42
- text: string;
43
- tokens: Token[];
44
- }
45
- interface Em {
46
- type: "em";
47
- raw: string;
48
- text: string;
49
- tokens: Token[];
50
- }
51
- interface Escape {
52
- type: "escape";
53
- raw: string;
54
- text: string;
55
- }
56
- interface Generic {
57
- [index: string]: any;
58
- type: string;
59
- raw: string;
60
- tokens?: Token[];
61
- }
62
- interface Heading {
63
- type: "heading";
64
- raw: string;
65
- depth: number;
66
- text: string;
67
- tokens: Token[];
68
- }
69
- interface Hr {
70
- type: "hr";
71
- raw: string;
72
- }
73
- interface HTML {
74
- type: "html";
75
- raw: string;
76
- pre: boolean;
77
- text: string;
78
- block: boolean;
79
- }
80
- interface Image {
81
- type: "image";
82
- raw: string;
83
- href: string;
84
- title: string | null;
85
- text: string;
86
- tokens: Token[];
87
- }
88
- interface Link {
89
- type: "link";
90
- raw: string;
91
- href: string;
92
- title?: string | null;
93
- text: string;
94
- tokens: Token[];
95
- }
96
- interface List {
97
- type: "list";
98
- raw: string;
99
- ordered: boolean;
100
- start: number | "";
101
- loose: boolean;
102
- items: ListItem[];
103
- }
104
- interface ListItem {
105
- type: "list_item";
106
- raw: string;
107
- task: boolean;
108
- checked?: boolean;
109
- loose: boolean;
110
- text: string;
111
- tokens: Token[];
112
- }
113
- interface Paragraph {
114
- type: "paragraph";
115
- raw: string;
116
- pre?: boolean;
117
- text: string;
118
- tokens: Token[];
119
- }
120
- interface Space {
121
- type: "space";
122
- raw: string;
123
- }
124
- interface Strong {
125
- type: "strong";
126
- raw: string;
127
- text: string;
128
- tokens: Token[];
129
- }
130
- interface Table {
131
- type: "table";
132
- raw: string;
133
- align: Array<"center" | "left" | "right" | null>;
134
- header: TableCell[];
135
- rows: TableCell[][];
136
- }
137
- interface TableCell {
138
- text: string;
139
- tokens: Token[];
140
- header: boolean;
141
- align: "center" | "left" | "right" | null;
142
- }
143
- interface TableRow {
144
- text: string;
145
- }
146
- interface Tag {
147
- type: "html";
148
- raw: string;
149
- inLink: boolean;
150
- inRawBlock: boolean;
151
- text: string;
152
- block: boolean;
153
- }
154
- interface Text {
155
- type: "text";
156
- raw: string;
157
- text: string;
158
- tokens?: Token[];
159
- escaped?: boolean;
160
- }
161
- }
162
- export type Links = Record<string, Pick<Tokens.Link | Tokens.Image, "href" | "title">>;
163
- export type TokensList = Token[] & {
164
- links: Links;
165
- };
166
- /**
167
- * Renderer
168
- */
169
- declare class _Renderer {
170
- options: MarkedOptions;
171
- parser: _Parser;
172
- constructor(options?: MarkedOptions);
173
- space(token: Tokens.Space): string;
174
- code({ text, lang, escaped }: Tokens.Code): string;
175
- blockquote({ tokens }: Tokens.Blockquote): string;
176
- html({ text }: Tokens.HTML | Tokens.Tag): string;
177
- heading({ tokens, depth }: Tokens.Heading): string;
178
- hr(token: Tokens.Hr): string;
179
- list(token: Tokens.List): string;
180
- listitem(item: Tokens.ListItem): string;
181
- checkbox({ checked }: Tokens.Checkbox): string;
182
- paragraph({ tokens }: Tokens.Paragraph): string;
183
- table(token: Tokens.Table): string;
184
- tablerow({ text }: Tokens.TableRow): string;
185
- tablecell(token: Tokens.TableCell): string;
186
- /**
187
- * span level renderer
188
- */
189
- strong({ tokens }: Tokens.Strong): string;
190
- em({ tokens }: Tokens.Em): string;
191
- codespan({ text }: Tokens.Codespan): string;
192
- br(token: Tokens.Br): string;
193
- del({ tokens }: Tokens.Del): string;
194
- link({ href, title, tokens }: Tokens.Link): string;
195
- image({ href, title, text, tokens }: Tokens.Image): string;
196
- text(token: Tokens.Text | Tokens.Escape): string;
197
- }
198
- /**
199
- * TextRenderer
200
- * returns only the textual part of the token
201
- */
202
- declare class _TextRenderer {
203
- strong({ text }: Tokens.Strong): string;
204
- em({ text }: Tokens.Em): string;
205
- codespan({ text }: Tokens.Codespan): string;
206
- del({ text }: Tokens.Del): string;
207
- html({ text }: Tokens.HTML | Tokens.Tag): string;
208
- text({ text }: Tokens.Text | Tokens.Escape | Tokens.Tag): string;
209
- link({ text }: Tokens.Link): string;
210
- image({ text }: Tokens.Image): string;
211
- br(): string;
212
- }
213
- /**
214
- * Parsing & Compiling
215
- */
216
- declare class _Parser {
217
- options: MarkedOptions;
218
- renderer: _Renderer;
219
- textRenderer: _TextRenderer;
220
- constructor(options?: MarkedOptions);
221
- /**
222
- * Static Parse Method
223
- */
224
- static parse(tokens: Token[], options?: MarkedOptions): string;
225
- /**
226
- * Static Parse Inline Method
227
- */
228
- static parseInline(tokens: Token[], options?: MarkedOptions): string;
229
- /**
230
- * Parse Loop
231
- */
232
- parse(tokens: Token[], top?: boolean): string;
233
- /**
234
- * Parse Inline Tokens
235
- */
236
- parseInline(tokens: Token[], renderer?: _Renderer | _TextRenderer): string;
237
- }
238
- declare const other: {
239
- codeRemoveIndent: RegExp;
240
- outputLinkReplace: RegExp;
241
- indentCodeCompensation: RegExp;
242
- beginningSpace: RegExp;
243
- endingHash: RegExp;
244
- startingSpaceChar: RegExp;
245
- endingSpaceChar: RegExp;
246
- nonSpaceChar: RegExp;
247
- newLineCharGlobal: RegExp;
248
- tabCharGlobal: RegExp;
249
- multipleSpaceGlobal: RegExp;
250
- blankLine: RegExp;
251
- doubleBlankLine: RegExp;
252
- blockquoteStart: RegExp;
253
- blockquoteSetextReplace: RegExp;
254
- blockquoteSetextReplace2: RegExp;
255
- listReplaceTabs: RegExp;
256
- listReplaceNesting: RegExp;
257
- listIsTask: RegExp;
258
- listReplaceTask: RegExp;
259
- anyLine: RegExp;
260
- hrefBrackets: RegExp;
261
- tableDelimiter: RegExp;
262
- tableAlignChars: RegExp;
263
- tableRowBlankLine: RegExp;
264
- tableAlignRight: RegExp;
265
- tableAlignCenter: RegExp;
266
- tableAlignLeft: RegExp;
267
- startATag: RegExp;
268
- endATag: RegExp;
269
- startPreScriptTag: RegExp;
270
- endPreScriptTag: RegExp;
271
- startAngleBracket: RegExp;
272
- endAngleBracket: RegExp;
273
- pedanticHrefTitle: RegExp;
274
- unicodeAlphaNumeric: RegExp;
275
- escapeTest: RegExp;
276
- escapeReplace: RegExp;
277
- escapeTestNoEncode: RegExp;
278
- escapeReplaceNoEncode: RegExp;
279
- unescapeTest: RegExp;
280
- caret: RegExp;
281
- percentDecode: RegExp;
282
- findPipe: RegExp;
283
- splitPipe: RegExp;
284
- slashPipe: RegExp;
285
- carriageReturn: RegExp;
286
- spaceLine: RegExp;
287
- notSpaceStart: RegExp;
288
- endingNewline: RegExp;
289
- listItemRegex: (bull: string) => RegExp;
290
- nextBulletRegex: (indent: number) => RegExp;
291
- hrRegex: (indent: number) => RegExp;
292
- fencesBeginRegex: (indent: number) => RegExp;
293
- headingBeginRegex: (indent: number) => RegExp;
294
- htmlBeginRegex: (indent: number) => RegExp;
295
- };
296
- declare const blockNormal: {
297
- blockquote: RegExp;
298
- code: RegExp;
299
- def: RegExp;
300
- fences: RegExp;
301
- heading: RegExp;
302
- hr: RegExp;
303
- html: RegExp;
304
- lheading: RegExp;
305
- list: RegExp;
306
- newline: RegExp;
307
- paragraph: RegExp;
308
- table: RegExp;
309
- text: RegExp;
310
- };
311
- export type BlockKeys = keyof typeof blockNormal;
312
- declare const inlineNormal: {
313
- _backpedal: RegExp;
314
- anyPunctuation: RegExp;
315
- autolink: RegExp;
316
- blockSkip: RegExp;
317
- br: RegExp;
318
- code: RegExp;
319
- del: RegExp;
320
- emStrongLDelim: RegExp;
321
- emStrongRDelimAst: RegExp;
322
- emStrongRDelimUnd: RegExp;
323
- escape: RegExp;
324
- link: RegExp;
325
- nolink: RegExp;
326
- punctuation: RegExp;
327
- reflink: RegExp;
328
- reflinkSearch: RegExp;
329
- tag: RegExp;
330
- text: RegExp;
331
- url: RegExp;
332
- };
333
- export type InlineKeys = keyof typeof inlineNormal;
334
- export interface Rules {
335
- other: typeof other;
336
- block: Record<BlockKeys, RegExp>;
337
- inline: Record<InlineKeys, RegExp>;
338
- }
339
- /**
340
- * Tokenizer
341
- */
342
- declare class _Tokenizer {
343
- options: MarkedOptions;
344
- rules: Rules;
345
- lexer: _Lexer;
346
- constructor(options?: MarkedOptions);
347
- space(src: string): Tokens.Space | undefined;
348
- code(src: string): Tokens.Code | undefined;
349
- fences(src: string): Tokens.Code | undefined;
350
- heading(src: string): Tokens.Heading | undefined;
351
- hr(src: string): Tokens.Hr | undefined;
352
- blockquote(src: string): Tokens.Blockquote | undefined;
353
- list(src: string): Tokens.List | undefined;
354
- html(src: string): Tokens.HTML | undefined;
355
- def(src: string): Tokens.Def | undefined;
356
- table(src: string): Tokens.Table | undefined;
357
- lheading(src: string): Tokens.Heading | undefined;
358
- paragraph(src: string): Tokens.Paragraph | undefined;
359
- text(src: string): Tokens.Text | undefined;
360
- escape(src: string): Tokens.Escape | undefined;
361
- tag(src: string): Tokens.Tag | undefined;
362
- link(src: string): Tokens.Link | Tokens.Image | undefined;
363
- reflink(src: string, links: Links): Tokens.Link | Tokens.Image | Tokens.Text | undefined;
364
- emStrong(src: string, maskedSrc: string, prevChar?: string): Tokens.Em | Tokens.Strong | undefined;
365
- codespan(src: string): Tokens.Codespan | undefined;
366
- br(src: string): Tokens.Br | undefined;
367
- del(src: string): Tokens.Del | undefined;
368
- autolink(src: string): Tokens.Link | undefined;
369
- url(src: string): Tokens.Link | undefined;
370
- inlineText(src: string): Tokens.Text | undefined;
371
- }
372
- declare class _Hooks {
373
- options: MarkedOptions;
374
- block?: boolean;
375
- constructor(options?: MarkedOptions);
376
- static passThroughHooks: Set<string>;
377
- /**
378
- * Process markdown before marked
379
- */
380
- preprocess(markdown: string): string;
381
- /**
382
- * Process HTML after marked is finished
383
- */
384
- postprocess(html: string): string;
385
- /**
386
- * Process all tokens before walk tokens
387
- */
388
- processAllTokens(tokens: Token[] | TokensList): Token[] | TokensList;
389
- /**
390
- * Provide function to tokenize markdown
391
- */
392
- provideLexer(): typeof _Lexer.lexInline;
393
- /**
394
- * Provide function to parse tokens
395
- */
396
- provideParser(): typeof _Parser.parse;
397
- }
398
- export interface TokenizerThis {
399
- lexer: _Lexer;
400
- }
401
- export type TokenizerExtensionFunction = (this: TokenizerThis, src: string, tokens: Token[] | TokensList) => Tokens.Generic | undefined;
402
- export type TokenizerStartFunction = (this: TokenizerThis, src: string) => number | void;
403
- export interface TokenizerExtension {
404
- name: string;
405
- level: "block" | "inline";
406
- start?: TokenizerStartFunction;
407
- tokenizer: TokenizerExtensionFunction;
408
- childTokens?: string[];
409
- }
410
- export interface RendererThis {
411
- parser: _Parser;
412
- }
413
- export type RendererExtensionFunction = (this: RendererThis, token: Tokens.Generic) => string | false | undefined;
414
- export interface RendererExtension {
415
- name: string;
416
- renderer: RendererExtensionFunction;
417
- }
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]>>;
422
- };
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;
426
- };
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;
430
- };
431
- export interface MarkedExtension {
432
- /**
433
- * True will tell marked to await any walkTokens functions before parsing the tokens and returning an HTML string.
434
- */
435
- async?: boolean;
436
- /**
437
- * Enable GFM line breaks. This option requires the gfm option to be true.
438
- */
439
- breaks?: boolean;
440
- /**
441
- * Add tokenizers and renderers to marked
442
- */
443
- extensions?: TokenizerAndRendererExtension[] | null;
444
- /**
445
- * Enable GitHub flavored markdown.
446
- */
447
- gfm?: boolean;
448
- /**
449
- * Hooks are methods that hook into some part of marked.
450
- * preprocess is called to process markdown before sending it to marked.
451
- * processAllTokens is called with the TokensList before walkTokens.
452
- * postprocess is called to process html after marked has finished parsing.
453
- * provideLexer is called to provide a function to tokenize markdown.
454
- * provideParser is called to provide a function to parse tokens.
455
- */
456
- hooks?: HooksObject | null;
457
- /**
458
- * Conform to obscure parts of markdown.pl as much as possible. Don't fix any of the original markdown bugs or poor behavior.
459
- */
460
- pedantic?: boolean;
461
- /**
462
- * Type: object Default: new Renderer()
463
- *
464
- * An object containing functions to render tokens to HTML.
465
- */
466
- renderer?: RendererObject | null;
467
- /**
468
- * Shows an HTML error message when rendering fails.
469
- */
470
- silent?: boolean;
471
- /**
472
- * The tokenizer defines how to turn markdown text into tokens.
473
- */
474
- tokenizer?: TokenizerObject | null;
475
- /**
476
- * The walkTokens function gets called with every token.
477
- * Child tokens are called before moving on to sibling tokens.
478
- * Each token is passed by reference so updates are persisted when passed to the parser.
479
- * The return value of the function is ignored.
480
- */
481
- walkTokens?: ((token: Token) => void | Promise<void>) | null;
482
- }
483
- export interface MarkedOptions extends Omit<MarkedExtension, "hooks" | "renderer" | "tokenizer" | "extensions" | "walkTokens"> {
484
- /**
485
- * Hooks are methods that hook into some part of marked.
486
- */
487
- hooks?: _Hooks | null;
488
- /**
489
- * Type: object Default: new Renderer()
490
- *
491
- * An object containing functions to render tokens to HTML.
492
- */
493
- renderer?: _Renderer | null;
494
- /**
495
- * The tokenizer defines how to turn markdown text into tokens.
496
- */
497
- tokenizer?: _Tokenizer | null;
498
- /**
499
- * Custom extensions
500
- */
501
- extensions?: null | {
502
- renderers: {
503
- [name: string]: RendererExtensionFunction;
504
- };
505
- childTokens: {
506
- [name: string]: string[];
507
- };
508
- inline?: TokenizerExtensionFunction[];
509
- block?: TokenizerExtensionFunction[];
510
- startInline?: TokenizerStartFunction[];
511
- startBlock?: TokenizerStartFunction[];
512
- };
513
- /**
514
- * walkTokens function returns array of values for Promise.all
515
- */
516
- walkTokens?: null | ((token: Token) => void | Promise<void> | (void | Promise<void>)[]);
517
- }
518
- /**
519
- * Block Lexer
520
- */
521
- declare class _Lexer {
522
- tokens: TokensList;
523
- options: MarkedOptions;
524
- state: {
525
- inLink: boolean;
526
- inRawBlock: boolean;
527
- top: boolean;
528
- };
529
- private tokenizer;
530
- private inlineQueue;
531
- constructor(options?: MarkedOptions);
532
- /**
533
- * Expose Rules
534
- */
535
- static get rules(): {
536
- block: {
537
- normal: {
538
- blockquote: RegExp;
539
- code: RegExp;
540
- def: RegExp;
541
- fences: RegExp;
542
- heading: RegExp;
543
- hr: RegExp;
544
- html: RegExp;
545
- lheading: RegExp;
546
- list: RegExp;
547
- newline: RegExp;
548
- paragraph: RegExp;
549
- table: RegExp;
550
- text: RegExp;
551
- };
552
- gfm: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
553
- pedantic: Record<"code" | "blockquote" | "hr" | "html" | "table" | "text" | "def" | "heading" | "list" | "paragraph" | "fences" | "lheading" | "newline", RegExp>;
554
- };
555
- inline: {
556
- normal: {
557
- _backpedal: RegExp;
558
- anyPunctuation: RegExp;
559
- autolink: RegExp;
560
- blockSkip: RegExp;
561
- br: RegExp;
562
- code: RegExp;
563
- del: RegExp;
564
- emStrongLDelim: RegExp;
565
- emStrongRDelimAst: RegExp;
566
- emStrongRDelimUnd: RegExp;
567
- escape: RegExp;
568
- link: RegExp;
569
- nolink: RegExp;
570
- punctuation: RegExp;
571
- reflink: RegExp;
572
- reflinkSearch: RegExp;
573
- tag: RegExp;
574
- text: RegExp;
575
- url: RegExp;
576
- };
577
- gfm: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
578
- breaks: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
579
- pedantic: Record<"link" | "code" | "url" | "br" | "del" | "text" | "escape" | "tag" | "reflink" | "nolink" | "_backpedal" | "anyPunctuation" | "autolink" | "blockSkip" | "emStrongLDelim" | "emStrongRDelimAst" | "emStrongRDelimUnd" | "punctuation" | "reflinkSearch", RegExp>;
580
- };
581
- };
582
- /**
583
- * Static Lex Method
584
- */
585
- static lex(src: string, options?: MarkedOptions): TokensList;
586
- /**
587
- * Static Lex Inline Method
588
- */
589
- static lexInline(src: string, options?: MarkedOptions): Token[];
590
- /**
591
- * Preprocessing
592
- */
593
- lex(src: string): TokensList;
594
- /**
595
- * Lexing
596
- */
597
- blockTokens(src: string, tokens?: Token[], lastParagraphClipped?: boolean): Token[];
598
- blockTokens(src: string, tokens?: TokensList, lastParagraphClipped?: boolean): TokensList;
599
- inline(src: string, tokens?: Token[]): Token[];
600
- /**
601
- * Lexing/Compiling
602
- */
603
- inlineTokens(src: string, tokens?: Token[]): Token[];
604
- }
605
- /**
606
- * Gets the original marked default options.
607
- */
608
- declare function _getDefaults(): MarkedOptions;
609
- declare let _defaults: MarkedOptions;
610
- export type MaybePromise = void | Promise<void>;
611
- export declare class Marked {
612
- defaults: MarkedOptions;
613
- options: (opt: MarkedOptions) => this;
614
- parse: {
615
- (src: string, options: MarkedOptions & {
616
- async: true;
617
- }): Promise<string>;
618
- (src: string, options: MarkedOptions & {
619
- async: false;
620
- }): string;
621
- (src: string, options?: MarkedOptions | null): string | Promise<string>;
622
- };
623
- parseInline: {
624
- (src: string, options: MarkedOptions & {
625
- async: true;
626
- }): Promise<string>;
627
- (src: string, options: MarkedOptions & {
628
- async: false;
629
- }): string;
630
- (src: string, options?: MarkedOptions | null): string | Promise<string>;
631
- };
632
- Parser: typeof _Parser;
633
- Renderer: typeof _Renderer;
634
- TextRenderer: typeof _TextRenderer;
635
- Lexer: typeof _Lexer;
636
- Tokenizer: typeof _Tokenizer;
637
- Hooks: typeof _Hooks;
638
- constructor(...args: MarkedExtension[]);
639
- /**
640
- * Run callback for every token
641
- */
642
- 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): string;
647
- private parseMarkdown;
648
- private onError;
649
- }
650
- /**
651
- * Compiles markdown to HTML asynchronously.
652
- *
653
- * @param src String of markdown source to be compiled
654
- * @param options Hash of options, having async: true
655
- * @return Promise of string of compiled HTML
656
- */
657
- export declare function marked(src: string, options: MarkedOptions & {
658
- async: true;
659
- }): Promise<string>;
660
- /**
661
- * Compiles markdown to HTML.
662
- *
663
- * @param src String of markdown source to be compiled
664
- * @param options Optional hash of options
665
- * @return String of compiled HTML. Will be a Promise of string if async is set to true by any extensions.
666
- */
667
- export declare function marked(src: string, options: MarkedOptions & {
668
- async: false;
669
- }): string;
670
- export declare function marked(src: string, options: MarkedOptions & {
671
- async: true;
672
- }): Promise<string>;
673
- export declare function marked(src: string, options?: MarkedOptions | null): string | Promise<string>;
674
- export declare namespace marked {
675
- var options: (options: MarkedOptions) => typeof marked;
676
- var setOptions: (options: MarkedOptions) => typeof marked;
677
- var getDefaults: typeof _getDefaults;
678
- var defaults: MarkedOptions;
679
- var use: (...args: MarkedExtension[]) => typeof marked;
680
- var walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
681
- var parseInline: {
682
- (src: string, options: MarkedOptions & {
683
- async: true;
684
- }): Promise<string>;
685
- (src: string, options: MarkedOptions & {
686
- async: false;
687
- }): string;
688
- (src: string, options?: MarkedOptions | null): string | Promise<string>;
689
- };
690
- var Parser: typeof _Parser;
691
- var parser: typeof _Parser.parse;
692
- var Renderer: typeof _Renderer;
693
- var TextRenderer: typeof _TextRenderer;
694
- var Lexer: typeof _Lexer;
695
- var lexer: typeof _Lexer.lex;
696
- var Tokenizer: typeof _Tokenizer;
697
- var Hooks: typeof _Hooks;
698
- var parse: typeof marked;
699
- }
700
- export declare const options: (options: MarkedOptions) => typeof marked;
701
- export declare const setOptions: (options: MarkedOptions) => typeof marked;
702
- export declare const use: (...args: MarkedExtension[]) => typeof marked;
703
- export declare const walkTokens: (tokens: Token[] | TokensList, callback: (token: Token) => MaybePromise | MaybePromise[]) => MaybePromise[];
704
- export declare const parseInline: {
705
- (src: string, options: MarkedOptions & {
706
- async: true;
707
- }): Promise<string>;
708
- (src: string, options: MarkedOptions & {
709
- async: false;
710
- }): string;
711
- (src: string, options?: MarkedOptions | null): string | Promise<string>;
712
- };
713
- export declare const parse: typeof marked;
714
- export declare const parser: typeof _Parser.parse;
715
- export declare const lexer: typeof _Lexer.lex;
716
-
717
- export {
718
- _Hooks as Hooks,
719
- _Lexer as Lexer,
720
- _Parser as Parser,
721
- _Renderer as Renderer,
722
- _TextRenderer as TextRenderer,
723
- _Tokenizer as Tokenizer,
724
- _defaults as defaults,
725
- _getDefaults as getDefaults,
726
- };
727
-
728
- export {};