chrome-devtools-frontend 1.0.1636056 → 1.0.1640418

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