@affanhamid/markdown-renderer 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1050 -0
- package/dist/index.d.cts +21 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +1010 -0
- package/package.json +40 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CodeExecutionResult {
|
|
4
|
+
output: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
images?: string[];
|
|
7
|
+
}
|
|
8
|
+
interface MarkdownRendererProps {
|
|
9
|
+
markdown: string;
|
|
10
|
+
onRunCode?: (code: string, language: string) => Promise<CodeExecutionResult>;
|
|
11
|
+
executableLanguages?: string[];
|
|
12
|
+
}
|
|
13
|
+
declare function renderMarkdownToHtml(markdown: string, options?: {
|
|
14
|
+
executableLanguages?: string[];
|
|
15
|
+
}): string;
|
|
16
|
+
declare const MarkdownRenderer: ({ markdown, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function normalizeMathMarkdownDelimiters(markdown: string): string;
|
|
19
|
+
declare const MATH_MARKDOWN_RULES_APPENDIX = "Math formatting rules (must follow):\n- Inline math: use single-dollar delimiters like $...$.\n- Display math: use $$ delimiters on their own lines with nothing else on those lines.\n- Do not use \\(...\\) or \\[...\\] delimiters.\n- Do not place display-math $$...$$ inside bullets or table cells; use inline $...$ there.\n- Escape non-math currency dollars as \\$.";
|
|
20
|
+
|
|
21
|
+
export { type CodeExecutionResult, MATH_MARKDOWN_RULES_APPENDIX, MarkdownRenderer, type MarkdownRendererProps, normalizeMathMarkdownDelimiters, renderMarkdownToHtml };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface CodeExecutionResult {
|
|
4
|
+
output: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
images?: string[];
|
|
7
|
+
}
|
|
8
|
+
interface MarkdownRendererProps {
|
|
9
|
+
markdown: string;
|
|
10
|
+
onRunCode?: (code: string, language: string) => Promise<CodeExecutionResult>;
|
|
11
|
+
executableLanguages?: string[];
|
|
12
|
+
}
|
|
13
|
+
declare function renderMarkdownToHtml(markdown: string, options?: {
|
|
14
|
+
executableLanguages?: string[];
|
|
15
|
+
}): string;
|
|
16
|
+
declare const MarkdownRenderer: ({ markdown, onRunCode, executableLanguages, }: MarkdownRendererProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function normalizeMathMarkdownDelimiters(markdown: string): string;
|
|
19
|
+
declare const MATH_MARKDOWN_RULES_APPENDIX = "Math formatting rules (must follow):\n- Inline math: use single-dollar delimiters like $...$.\n- Display math: use $$ delimiters on their own lines with nothing else on those lines.\n- Do not use \\(...\\) or \\[...\\] delimiters.\n- Do not place display-math $$...$$ inside bullets or table cells; use inline $...$ there.\n- Escape non-math currency dollars as \\$.";
|
|
20
|
+
|
|
21
|
+
export { type CodeExecutionResult, MATH_MARKDOWN_RULES_APPENDIX, MarkdownRenderer, type MarkdownRendererProps, normalizeMathMarkdownDelimiters, renderMarkdownToHtml };
|