react-native-nitro-markdown 0.2.1 → 0.3.1
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/README.md +237 -103
- package/cpp/bindings/HybridMarkdownParser.cpp +2 -0
- package/cpp/core/MD4CParser.cpp +73 -39
- package/cpp/core/MarkdownTypes.hpp +6 -1
- package/cpp/md4c/md4c.c +79 -56
- package/cpp/md4c/md4c.h +7 -4
- package/lib/commonjs/MarkdownContext.js +3 -7
- package/lib/commonjs/MarkdownContext.js.map +1 -1
- package/lib/commonjs/default-markdown-renderer.js +4 -7
- package/lib/commonjs/default-markdown-renderer.js.map +1 -1
- package/lib/commonjs/headless.js +49 -1
- package/lib/commonjs/headless.js.map +1 -1
- package/lib/commonjs/index.js +35 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/markdown.js +100 -41
- package/lib/commonjs/markdown.js.map +1 -1
- package/lib/commonjs/renderers/blockquote.js +1 -1
- package/lib/commonjs/renderers/blockquote.js.map +1 -1
- package/lib/commonjs/renderers/code.js +15 -8
- package/lib/commonjs/renderers/code.js.map +1 -1
- package/lib/commonjs/renderers/heading.js +2 -1
- package/lib/commonjs/renderers/heading.js.map +1 -1
- package/lib/commonjs/renderers/horizontal-rule.js +4 -2
- package/lib/commonjs/renderers/horizontal-rule.js.map +1 -1
- package/lib/commonjs/renderers/image.js +39 -14
- package/lib/commonjs/renderers/image.js.map +1 -1
- package/lib/commonjs/renderers/link.js +1 -3
- package/lib/commonjs/renderers/link.js.map +1 -1
- package/lib/commonjs/renderers/list.js +12 -10
- package/lib/commonjs/renderers/list.js.map +1 -1
- package/lib/commonjs/renderers/math.js +33 -47
- package/lib/commonjs/renderers/math.js.map +1 -1
- package/lib/commonjs/renderers/paragraph.js +0 -6
- package/lib/commonjs/renderers/paragraph.js.map +1 -1
- package/lib/commonjs/renderers/table.js +127 -120
- package/lib/commonjs/renderers/table.js.map +1 -1
- package/lib/commonjs/theme.js +146 -13
- package/lib/commonjs/theme.js.map +1 -1
- package/lib/module/MarkdownContext.js +3 -8
- package/lib/module/MarkdownContext.js.map +1 -1
- package/lib/module/default-markdown-renderer.js +1 -4
- package/lib/module/default-markdown-renderer.js.map +1 -1
- package/lib/module/headless.js +46 -0
- package/lib/module/headless.js.map +1 -1
- package/lib/module/index.js +2 -20
- package/lib/module/index.js.map +1 -1
- package/lib/module/markdown.js +101 -42
- package/lib/module/markdown.js.map +1 -1
- package/lib/module/renderers/blockquote.js +1 -1
- package/lib/module/renderers/blockquote.js.map +1 -1
- package/lib/module/renderers/code.js +15 -8
- package/lib/module/renderers/code.js.map +1 -1
- package/lib/module/renderers/heading.js +2 -1
- package/lib/module/renderers/heading.js.map +1 -1
- package/lib/module/renderers/horizontal-rule.js +4 -2
- package/lib/module/renderers/horizontal-rule.js.map +1 -1
- package/lib/module/renderers/image.js +40 -15
- package/lib/module/renderers/image.js.map +1 -1
- package/lib/module/renderers/link.js +1 -3
- package/lib/module/renderers/link.js.map +1 -1
- package/lib/module/renderers/list.js +12 -10
- package/lib/module/renderers/list.js.map +1 -1
- package/lib/module/renderers/math.js +34 -48
- package/lib/module/renderers/math.js.map +1 -1
- package/lib/module/renderers/paragraph.js +0 -6
- package/lib/module/renderers/paragraph.js.map +1 -1
- package/lib/module/renderers/table.js +128 -121
- package/lib/module/renderers/table.js.map +1 -1
- package/lib/module/theme.js +144 -12
- package/lib/module/theme.js.map +1 -1
- package/lib/typescript/commonjs/MarkdownContext.d.ts +45 -6
- package/lib/typescript/commonjs/MarkdownContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/default-markdown-renderer.d.ts +1 -1
- package/lib/typescript/commonjs/default-markdown-renderer.d.ts.map +1 -1
- package/lib/typescript/commonjs/headless.d.ts +12 -1
- package/lib/typescript/commonjs/headless.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -16
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/markdown.d.ts +33 -2
- package/lib/typescript/commonjs/markdown.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/code.d.ts +6 -2
- package/lib/typescript/commonjs/renderers/code.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/heading.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/horizontal-rule.d.ts +6 -1
- package/lib/typescript/commonjs/renderers/horizontal-rule.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/image.d.ts +2 -0
- package/lib/typescript/commonjs/renderers/image.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/link.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/list.d.ts +4 -0
- package/lib/typescript/commonjs/renderers/list.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/math.d.ts +3 -4
- package/lib/typescript/commonjs/renderers/math.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/paragraph.d.ts +0 -5
- package/lib/typescript/commonjs/renderers/paragraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/table.d.ts +2 -0
- package/lib/typescript/commonjs/renderers/table.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/MarkdownSession.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme.d.ts +41 -28
- package/lib/typescript/commonjs/theme.d.ts.map +1 -1
- package/lib/typescript/module/MarkdownContext.d.ts +45 -6
- package/lib/typescript/module/MarkdownContext.d.ts.map +1 -1
- package/lib/typescript/module/default-markdown-renderer.d.ts +1 -1
- package/lib/typescript/module/default-markdown-renderer.d.ts.map +1 -1
- package/lib/typescript/module/headless.d.ts +12 -1
- package/lib/typescript/module/headless.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +4 -16
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/markdown.d.ts +33 -2
- package/lib/typescript/module/markdown.d.ts.map +1 -1
- package/lib/typescript/module/renderers/code.d.ts +6 -2
- package/lib/typescript/module/renderers/code.d.ts.map +1 -1
- package/lib/typescript/module/renderers/heading.d.ts.map +1 -1
- package/lib/typescript/module/renderers/horizontal-rule.d.ts +6 -1
- package/lib/typescript/module/renderers/horizontal-rule.d.ts.map +1 -1
- package/lib/typescript/module/renderers/image.d.ts +2 -0
- package/lib/typescript/module/renderers/image.d.ts.map +1 -1
- package/lib/typescript/module/renderers/link.d.ts.map +1 -1
- package/lib/typescript/module/renderers/list.d.ts +4 -0
- package/lib/typescript/module/renderers/list.d.ts.map +1 -1
- package/lib/typescript/module/renderers/math.d.ts +3 -4
- package/lib/typescript/module/renderers/math.d.ts.map +1 -1
- package/lib/typescript/module/renderers/paragraph.d.ts +0 -5
- package/lib/typescript/module/renderers/paragraph.d.ts.map +1 -1
- package/lib/typescript/module/renderers/table.d.ts +2 -0
- package/lib/typescript/module/renderers/table.d.ts.map +1 -1
- package/lib/typescript/module/specs/MarkdownSession.nitro.d.ts.map +1 -1
- package/lib/typescript/module/theme.d.ts +41 -28
- package/lib/typescript/module/theme.d.ts.map +1 -1
- package/nitrogen/generated/ios/NitroMarkdownAutolinking.swift +8 -7
- package/nitrogen/generated/ios/swift/HybridMarkdownSessionSpec.swift +2 -2
- package/package.json +1 -1
- package/src/MarkdownContext.ts +66 -9
- package/src/default-markdown-renderer.tsx +1 -6
- package/src/headless.ts +67 -2
- package/src/index.ts +24 -19
- package/src/markdown.tsx +158 -52
- package/src/renderers/blockquote.tsx +1 -2
- package/src/renderers/code.tsx +36 -12
- package/src/renderers/heading.tsx +1 -1
- package/src/renderers/horizontal-rule.tsx +7 -4
- package/src/renderers/image.tsx +59 -15
- package/src/renderers/link.tsx +1 -6
- package/src/renderers/list.tsx +15 -15
- package/src/renderers/math.tsx +28 -45
- package/src/renderers/paragraph.tsx +1 -8
- package/src/renderers/table.tsx +185 -160
- package/src/specs/MarkdownSession.nitro.ts +4 -6
- package/src/theme.ts +203 -12
package/lib/module/theme.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* Default theme configuration for the Markdown components.
|
|
5
|
-
* Optimized for a modern dark mode aesthetic.
|
|
6
|
-
*/
|
|
7
3
|
export const defaultMarkdownTheme = {
|
|
8
|
-
/** Colors used throughout the markdown renderer */
|
|
9
4
|
colors: {
|
|
10
5
|
text: "#e0e0e0",
|
|
11
6
|
textMuted: "#888",
|
|
@@ -13,6 +8,7 @@ export const defaultMarkdownTheme = {
|
|
|
13
8
|
link: "#60a5fa",
|
|
14
9
|
code: "#fbbf24",
|
|
15
10
|
codeBackground: "#1a1a2e",
|
|
11
|
+
codeLanguage: "#4ade80",
|
|
16
12
|
blockquote: "#3b82f6",
|
|
17
13
|
border: "#252525",
|
|
18
14
|
surface: "#151515",
|
|
@@ -24,7 +20,6 @@ export const defaultMarkdownTheme = {
|
|
|
24
20
|
tableRowEven: "#0f172a",
|
|
25
21
|
tableRowOdd: "#1e293b"
|
|
26
22
|
},
|
|
27
|
-
/** Standard spacing increments */
|
|
28
23
|
spacing: {
|
|
29
24
|
xs: 4,
|
|
30
25
|
s: 8,
|
|
@@ -32,7 +27,6 @@ export const defaultMarkdownTheme = {
|
|
|
32
27
|
l: 16,
|
|
33
28
|
xl: 24
|
|
34
29
|
},
|
|
35
|
-
/** Font sizes for different text elements */
|
|
36
30
|
fontSizes: {
|
|
37
31
|
xs: 12,
|
|
38
32
|
s: 14,
|
|
@@ -45,10 +39,148 @@ export const defaultMarkdownTheme = {
|
|
|
45
39
|
h4: 18,
|
|
46
40
|
h5: 16,
|
|
47
41
|
h6: 14
|
|
48
|
-
}
|
|
42
|
+
},
|
|
43
|
+
fontFamilies: {
|
|
44
|
+
regular: undefined,
|
|
45
|
+
heading: undefined,
|
|
46
|
+
mono: undefined
|
|
47
|
+
},
|
|
48
|
+
borderRadius: {
|
|
49
|
+
s: 4,
|
|
50
|
+
m: 8,
|
|
51
|
+
l: 12
|
|
52
|
+
},
|
|
53
|
+
showCodeLanguage: true
|
|
54
|
+
};
|
|
55
|
+
export const minimalMarkdownTheme = {
|
|
56
|
+
colors: {
|
|
57
|
+
text: undefined,
|
|
58
|
+
textMuted: undefined,
|
|
59
|
+
heading: undefined,
|
|
60
|
+
link: "#0066cc",
|
|
61
|
+
code: undefined,
|
|
62
|
+
codeBackground: "transparent",
|
|
63
|
+
codeLanguage: "#888888",
|
|
64
|
+
blockquote: "#cccccc",
|
|
65
|
+
border: "#cccccc",
|
|
66
|
+
surface: "transparent",
|
|
67
|
+
surfaceLight: "transparent",
|
|
68
|
+
accent: "#0066cc",
|
|
69
|
+
tableBorder: "#cccccc",
|
|
70
|
+
tableHeader: "transparent",
|
|
71
|
+
tableHeaderText: undefined,
|
|
72
|
+
tableRowEven: "transparent",
|
|
73
|
+
tableRowOdd: "transparent"
|
|
74
|
+
},
|
|
75
|
+
spacing: {
|
|
76
|
+
xs: 0,
|
|
77
|
+
s: 0,
|
|
78
|
+
m: 0,
|
|
79
|
+
l: 0,
|
|
80
|
+
xl: 0
|
|
81
|
+
},
|
|
82
|
+
fontSizes: {
|
|
83
|
+
xs: 12,
|
|
84
|
+
s: 14,
|
|
85
|
+
m: 16,
|
|
86
|
+
l: 18,
|
|
87
|
+
xl: 22,
|
|
88
|
+
h1: 32,
|
|
89
|
+
h2: 26,
|
|
90
|
+
h3: 22,
|
|
91
|
+
h4: 18,
|
|
92
|
+
h5: 16,
|
|
93
|
+
h6: 14
|
|
94
|
+
},
|
|
95
|
+
fontFamilies: {
|
|
96
|
+
regular: undefined,
|
|
97
|
+
heading: undefined,
|
|
98
|
+
mono: undefined
|
|
99
|
+
},
|
|
100
|
+
borderRadius: {
|
|
101
|
+
s: 0,
|
|
102
|
+
m: 0,
|
|
103
|
+
l: 0
|
|
104
|
+
},
|
|
105
|
+
showCodeLanguage: false
|
|
106
|
+
};
|
|
107
|
+
export const lightMarkdownTheme = {
|
|
108
|
+
colors: {
|
|
109
|
+
text: "#1a1a1a",
|
|
110
|
+
textMuted: "#6b7280",
|
|
111
|
+
heading: "#000000",
|
|
112
|
+
link: "#2563eb",
|
|
113
|
+
code: "#ea580c",
|
|
114
|
+
codeBackground: "#f3f4f6",
|
|
115
|
+
codeLanguage: "#10b981",
|
|
116
|
+
blockquote: "#3b82f6",
|
|
117
|
+
border: "#e5e7eb",
|
|
118
|
+
surface: "#ffffff",
|
|
119
|
+
surfaceLight: "#f9fafb",
|
|
120
|
+
accent: "#10b981",
|
|
121
|
+
tableBorder: "#e5e7eb",
|
|
122
|
+
tableHeader: "#f3f4f6",
|
|
123
|
+
tableHeaderText: "#6b7280",
|
|
124
|
+
tableRowEven: "#ffffff",
|
|
125
|
+
tableRowOdd: "#f9fafb"
|
|
126
|
+
},
|
|
127
|
+
spacing: {
|
|
128
|
+
xs: 4,
|
|
129
|
+
s: 8,
|
|
130
|
+
m: 12,
|
|
131
|
+
l: 16,
|
|
132
|
+
xl: 24
|
|
133
|
+
},
|
|
134
|
+
fontSizes: {
|
|
135
|
+
xs: 12,
|
|
136
|
+
s: 14,
|
|
137
|
+
m: 16,
|
|
138
|
+
l: 18,
|
|
139
|
+
xl: 22,
|
|
140
|
+
h1: 32,
|
|
141
|
+
h2: 26,
|
|
142
|
+
h3: 22,
|
|
143
|
+
h4: 18,
|
|
144
|
+
h5: 16,
|
|
145
|
+
h6: 14
|
|
146
|
+
},
|
|
147
|
+
fontFamilies: {
|
|
148
|
+
regular: undefined,
|
|
149
|
+
heading: undefined,
|
|
150
|
+
mono: undefined
|
|
151
|
+
},
|
|
152
|
+
borderRadius: {
|
|
153
|
+
s: 4,
|
|
154
|
+
m: 8,
|
|
155
|
+
l: 12
|
|
156
|
+
},
|
|
157
|
+
showCodeLanguage: true
|
|
158
|
+
};
|
|
159
|
+
export const darkMarkdownTheme = defaultMarkdownTheme;
|
|
160
|
+
export const mergeThemes = (base, partial) => {
|
|
161
|
+
if (!partial) return base;
|
|
162
|
+
return {
|
|
163
|
+
colors: {
|
|
164
|
+
...base.colors,
|
|
165
|
+
...partial.colors
|
|
166
|
+
},
|
|
167
|
+
spacing: {
|
|
168
|
+
...base.spacing,
|
|
169
|
+
...partial.spacing
|
|
170
|
+
},
|
|
171
|
+
fontSizes: {
|
|
172
|
+
...base.fontSizes,
|
|
173
|
+
...partial.fontSizes
|
|
174
|
+
},
|
|
175
|
+
fontFamilies: {
|
|
176
|
+
...base.fontFamilies,
|
|
177
|
+
...partial.fontFamilies
|
|
178
|
+
},
|
|
179
|
+
borderRadius: {
|
|
180
|
+
...base.borderRadius,
|
|
181
|
+
...partial.borderRadius
|
|
182
|
+
},
|
|
183
|
+
showCodeLanguage: partial.showCodeLanguage ?? base.showCodeLanguage
|
|
184
|
+
};
|
|
49
185
|
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Type definition for the Markdown theme.
|
|
53
|
-
*/
|
|
54
186
|
//# sourceMappingURL=theme.js.map
|
package/lib/module/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["defaultMarkdownTheme","colors","text","textMuted","heading","link","code","codeBackground","blockquote","border","surface","surfaceLight","accent","tableBorder","tableHeader","tableHeaderText","tableRowEven","tableRowOdd","spacing","xs","s","m","l","xl","fontSizes","h1","h2","h3","h4","h5","h6"],"sourceRoot":"../../src","sources":["theme.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["defaultMarkdownTheme","colors","text","textMuted","heading","link","code","codeBackground","codeLanguage","blockquote","border","surface","surfaceLight","accent","tableBorder","tableHeader","tableHeaderText","tableRowEven","tableRowOdd","spacing","xs","s","m","l","xl","fontSizes","h1","h2","h3","h4","h5","h6","fontFamilies","regular","undefined","mono","borderRadius","showCodeLanguage","minimalMarkdownTheme","lightMarkdownTheme","darkMarkdownTheme","mergeThemes","base","partial"],"sourceRoot":"../../src","sources":["theme.ts"],"mappings":";;AAwDA,OAAO,MAAMA,oBAAmC,GAAG;EACjDC,MAAM,EAAE;IACNC,IAAI,EAAE,SAAS;IACfC,SAAS,EAAE,MAAM;IACjBC,OAAO,EAAE,SAAS;IAClBC,IAAI,EAA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GAAGiB,IAAI,CAACjB,SAAS;MAAE,GAAGkB,OAAO,CAAClB;IAAU,CAAC;IACtDO,YAAY,EAAE;MAAE,GAAGU,IAAI,CAACV,YAAY;MAAE,GAAGW,OAAO,CAACX;IAAa,CAAC;IAC/DI,YAAY,EAAE;MAAE,GAAGM,IAAI,CAACN,YAAY;MAAE,GAAGO,OAAO,CAACP;IAAa,CAAC;IAC/DC,gBAAgB,EAAEM,OAAO,CAACN,gBAAgB,IAAIK,IAAI,CAACL;EACrD,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode, type ComponentType } from "react";
|
|
2
|
-
import { type MarkdownTheme } from "./theme";
|
|
2
|
+
import { type MarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
3
3
|
import type { MarkdownNode } from "./headless";
|
|
4
4
|
export interface NodeRendererProps {
|
|
5
5
|
node: MarkdownNode;
|
|
@@ -7,19 +7,58 @@ export interface NodeRendererProps {
|
|
|
7
7
|
inListItem: boolean;
|
|
8
8
|
parentIsText?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface BaseCustomRendererProps {
|
|
11
11
|
node: MarkdownNode;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
Renderer: ComponentType<NodeRendererProps>;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
export interface EnhancedRendererProps extends BaseCustomRendererProps {
|
|
16
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
|
+
href?: string;
|
|
18
|
+
title?: string;
|
|
19
|
+
url?: string;
|
|
20
|
+
alt?: string;
|
|
21
|
+
content?: string;
|
|
22
|
+
language?: string;
|
|
23
|
+
ordered?: boolean;
|
|
24
|
+
start?: number;
|
|
25
|
+
checked?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface HeadingRendererProps extends BaseCustomRendererProps {
|
|
28
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
29
|
+
}
|
|
30
|
+
export interface LinkRendererProps extends BaseCustomRendererProps {
|
|
31
|
+
href: string;
|
|
32
|
+
title?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ImageRendererProps extends BaseCustomRendererProps {
|
|
35
|
+
url: string;
|
|
36
|
+
alt?: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface CodeBlockRendererProps extends BaseCustomRendererProps {
|
|
40
|
+
content: string;
|
|
41
|
+
language?: string;
|
|
42
|
+
}
|
|
43
|
+
export interface InlineCodeRendererProps extends BaseCustomRendererProps {
|
|
44
|
+
content: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ListRendererProps extends BaseCustomRendererProps {
|
|
47
|
+
ordered: boolean;
|
|
48
|
+
start?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface TaskListItemRendererProps extends BaseCustomRendererProps {
|
|
51
|
+
checked: boolean;
|
|
52
|
+
}
|
|
53
|
+
export interface CustomRendererProps extends EnhancedRendererProps {
|
|
54
|
+
}
|
|
55
|
+
export type CustomRenderer = (props: EnhancedRendererProps) => ReactNode | undefined;
|
|
19
56
|
export type CustomRenderers = Partial<Record<MarkdownNode["type"], CustomRenderer>>;
|
|
20
57
|
export interface MarkdownContextValue {
|
|
21
58
|
renderers: CustomRenderers;
|
|
22
59
|
theme: MarkdownTheme;
|
|
60
|
+
styles?: NodeStyleOverrides;
|
|
61
|
+
stylingStrategy: StylingStrategy;
|
|
23
62
|
}
|
|
24
63
|
export declare const MarkdownContext: import("react").Context<MarkdownContextValue>;
|
|
25
64
|
export declare const useMarkdownContext: () => MarkdownContextValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContext.d.ts","sourceRoot":"","sources":["../../../src/MarkdownContext.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"MarkdownContext.d.ts","sourceRoot":"","sources":["../../../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OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"default-markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/default-markdown-renderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhD,OAAO,EAAE,KAAK,YAAY,EAAkB,MAAM,YAAY,CAAC;AAa/D,UAAU,qBAAqB;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAiBD,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,qBAAqB,CA8M7D,CAAC"}
|
|
@@ -46,5 +46,16 @@ export declare function parseMarkdown(text: string): MarkdownNode;
|
|
|
46
46
|
* @returns The root node of the parsed AST
|
|
47
47
|
*/
|
|
48
48
|
export declare function parseMarkdownWithOptions(text: string, options: ParserOptions): MarkdownNode;
|
|
49
|
-
export { MarkdownParser };
|
|
49
|
+
export type { MarkdownParser };
|
|
50
|
+
/**
|
|
51
|
+
* Extract text content from a markdown node recursively.
|
|
52
|
+
* Useful for getting plain text from code blocks, headings, etc.
|
|
53
|
+
* @param node - The markdown node to extract text from
|
|
54
|
+
* @returns The concatenated text content
|
|
55
|
+
*/
|
|
56
|
+
export declare const getTextContent: (node: MarkdownNode) => string;
|
|
57
|
+
/**
|
|
58
|
+
* recursively extracts plain text from the AST, normalizing spacing.
|
|
59
|
+
*/
|
|
60
|
+
export declare const getFlattenedText: (node: MarkdownNode) => string;
|
|
50
61
|
//# sourceMappingURL=headless.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headless.d.ts","sourceRoot":"","sources":["../../../src/headless.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,M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;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAGxD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,YAAY,CAGd;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,YAAY,KAAG,MAGnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,YAAY,KAAG,MAkDrD,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
export * from "./headless";
|
|
2
|
-
/** Low-level renderer component for custom implementations */
|
|
3
2
|
export { DefaultMarkdownRenderer } from "./default-markdown-renderer";
|
|
4
|
-
/**
|
|
5
|
-
* High-level Markdown component with optional custom renderers.
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <Markdown>{'# Hello World'}</Markdown>
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
3
|
export { Markdown } from "./markdown";
|
|
12
|
-
/**
|
|
13
|
-
* Markdown component that supports streaming updates.
|
|
14
|
-
*/
|
|
15
4
|
export { MarkdownStream } from "./markdown-stream";
|
|
16
|
-
export { useMarkdownContext } from "./MarkdownContext";
|
|
17
|
-
export type { CustomRenderer, CustomRenderers, CustomRendererProps, NodeRendererProps, } from "./MarkdownContext";
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
export type { MarkdownTheme } from "./theme";
|
|
5
|
+
export { useMarkdownContext, MarkdownContext } from "./MarkdownContext";
|
|
6
|
+
export type { CustomRenderer, CustomRenderers, CustomRendererProps, NodeRendererProps, BaseCustomRendererProps, EnhancedRendererProps, HeadingRendererProps, LinkRendererProps, ImageRendererProps, CodeBlockRendererProps, InlineCodeRendererProps, ListRendererProps, TaskListItemRendererProps, MarkdownContextValue, } from "./MarkdownContext";
|
|
7
|
+
export { defaultMarkdownTheme, lightMarkdownTheme, darkMarkdownTheme, minimalMarkdownTheme, mergeThemes, } from "./theme";
|
|
8
|
+
export type { MarkdownTheme, PartialMarkdownTheme, NodeStyleOverrides, StylingStrategy, } from "./theme";
|
|
21
9
|
export { Heading } from "./renderers/heading";
|
|
22
10
|
export { Paragraph } from "./renderers/paragraph";
|
|
23
11
|
export { Link } from "./renderers/link";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACxE,YAAY,EACV,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,WAAW,GACZ,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type PartialMarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
2
2
|
import { type FC } from "react";
|
|
3
3
|
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
import { type MarkdownNode } from "./headless";
|
|
4
5
|
import type { ParserOptions } from "./Markdown.nitro";
|
|
5
6
|
import { type CustomRenderers } from "./MarkdownContext";
|
|
6
7
|
export interface MarkdownProps {
|
|
@@ -12,14 +13,44 @@ export interface MarkdownProps {
|
|
|
12
13
|
* Parser options to enable GFM or Math support.
|
|
13
14
|
*/
|
|
14
15
|
options?: ParserOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Callback fired when parsing begins.
|
|
18
|
+
*/
|
|
19
|
+
onParsingInProgress?: () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Callback fired when parsing completes.
|
|
22
|
+
*/
|
|
23
|
+
onParseComplete?: (result: {
|
|
24
|
+
raw: string;
|
|
25
|
+
ast: MarkdownNode;
|
|
26
|
+
text: string;
|
|
27
|
+
}) => void;
|
|
15
28
|
/**
|
|
16
29
|
* Custom renderers for specific markdown node types.
|
|
30
|
+
* Each renderer receives { node, children, Renderer } plus type-specific props.
|
|
17
31
|
*/
|
|
18
32
|
renderers?: CustomRenderers;
|
|
19
33
|
/**
|
|
20
34
|
* Custom theme to override default styles.
|
|
21
35
|
*/
|
|
22
|
-
theme?:
|
|
36
|
+
theme?: PartialMarkdownTheme;
|
|
37
|
+
/**
|
|
38
|
+
* Style overrides for specific node types.
|
|
39
|
+
* Applied after internal styles, allowing fine-grained customization.
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <Markdown styles={{ heading: { color: 'red' }, code_block: { borderRadius: 0 } }}>
|
|
43
|
+
* {content}
|
|
44
|
+
* </Markdown>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
styles?: NodeStyleOverrides;
|
|
48
|
+
/**
|
|
49
|
+
* Styling strategy for the component.
|
|
50
|
+
* - "opinionated": Full styling with colors, spacing, and visual effects (default)
|
|
51
|
+
* - "minimal": Bare minimum styling for a clean slate
|
|
52
|
+
*/
|
|
53
|
+
stylingStrategy?: StylingStrategy;
|
|
23
54
|
/**
|
|
24
55
|
* Optional style for the container view.
|
|
25
56
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AACjB,OAAO,EAA2B,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AACnE,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,KAAK,eAAe,EAErB,MAAM,mBAAmB,CAAC;AAa3B,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE;QACzB,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,YAAY,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;KACd,KAAK,IAAI,CAAC;IACX;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;;;OAIG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAkEtC,CAAC"}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { ReactNode, type FC } from "react";
|
|
2
2
|
import { type ViewStyle, type TextStyle } from "react-native";
|
|
3
|
+
import type { MarkdownNode } from "../headless";
|
|
3
4
|
interface CodeBlockProps {
|
|
4
5
|
language?: string;
|
|
5
|
-
content
|
|
6
|
+
content?: string;
|
|
7
|
+
node?: MarkdownNode;
|
|
6
8
|
style?: ViewStyle;
|
|
7
9
|
}
|
|
8
10
|
export declare const CodeBlock: FC<CodeBlockProps>;
|
|
9
11
|
interface InlineCodeProps {
|
|
10
|
-
|
|
12
|
+
content?: string;
|
|
13
|
+
node?: MarkdownNode;
|
|
14
|
+
children?: ReactNode;
|
|
11
15
|
style?: TextStyle;
|
|
12
16
|
}
|
|
13
17
|
export declare const InlineCode: FC<InlineCodeProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/renderers/code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/renderers/code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,UAAU,cAAc;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmDxC,CAAC;AAEF,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8B1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/renderers/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/renderers/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAuDpC,CAAC"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
|
-
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
3
|
+
interface HorizontalRuleProps {
|
|
4
|
+
style?: ViewStyle;
|
|
5
|
+
}
|
|
6
|
+
export declare const HorizontalRule: FC<HorizontalRuleProps>;
|
|
7
|
+
export {};
|
|
3
8
|
//# sourceMappingURL=horizontal-rule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"horizontal-rule.d.ts","sourceRoot":"","sources":["../../../../src/renderers/horizontal-rule.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"horizontal-rule.d.ts","sourceRoot":"","sources":["../../../../src/renderers/horizontal-rule.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,UAAU,mBAAmB;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAclD,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type FC, type ComponentType } from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
2
3
|
import type { NodeRendererProps } from "../MarkdownContext";
|
|
3
4
|
interface ImageProps {
|
|
4
5
|
url: string;
|
|
5
6
|
title?: string;
|
|
6
7
|
alt?: string;
|
|
7
8
|
Renderer?: ComponentType<NodeRendererProps>;
|
|
9
|
+
style?: ViewStyle;
|
|
8
10
|
}
|
|
9
11
|
export declare const Image: FC<ImageProps>;
|
|
10
12
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/renderers/image.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/renderers/image.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACP,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAmB5D,UAAU,UAAU;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC5C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CA8JhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/renderers/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzE,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/renderers/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAA6B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzE,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAsB9B,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ReactNode, type FC } from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
2
3
|
interface ListProps {
|
|
3
4
|
ordered: boolean;
|
|
4
5
|
start?: number;
|
|
5
6
|
depth: number;
|
|
6
7
|
children: ReactNode;
|
|
8
|
+
style?: ViewStyle;
|
|
7
9
|
}
|
|
8
10
|
export declare const List: FC<ListProps>;
|
|
9
11
|
interface ListItemProps {
|
|
@@ -11,11 +13,13 @@ interface ListItemProps {
|
|
|
11
13
|
index: number;
|
|
12
14
|
ordered: boolean;
|
|
13
15
|
start: number;
|
|
16
|
+
style?: ViewStyle;
|
|
14
17
|
}
|
|
15
18
|
export declare const ListItem: FC<ListItemProps>;
|
|
16
19
|
interface TaskListItemProps {
|
|
17
20
|
children: ReactNode;
|
|
18
21
|
checked: boolean;
|
|
22
|
+
style?: ViewStyle;
|
|
19
23
|
}
|
|
20
24
|
export declare const TaskListItem: FC<TaskListItemProps>;
|
|
21
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/renderers/list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/renderers/list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAA0B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGtE,UAAU,SAAS;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAoB9B,CAAC;AAEF,UAAU,aAAa;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwCtC,CAAC;AAEF,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAkC9C,CAAC"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
2
3
|
interface MathInlineProps {
|
|
3
4
|
content?: string;
|
|
5
|
+
style?: ViewStyle;
|
|
4
6
|
}
|
|
5
7
|
export declare const MathInline: FC<MathInlineProps>;
|
|
6
8
|
interface MathBlockProps {
|
|
7
9
|
content?: string;
|
|
10
|
+
style?: ViewStyle;
|
|
8
11
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Block math renderer.
|
|
11
|
-
* Uses react-native-mathjax-svg if installed, otherwise shows raw LaTeX.
|
|
12
|
-
*/
|
|
13
12
|
export declare const MathBlock: FC<MathBlockProps>;
|
|
14
13
|
export {};
|
|
15
14
|
//# sourceMappingURL=math.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/renderers/math.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../../src/renderers/math.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAsB,MAAM,OAAO,CAAC;AAC7D,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAoBtB,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAuDD,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2B1C,CAAC;AAEF,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA0BxC,CAAC"}
|
|
@@ -5,11 +5,6 @@ interface ParagraphProps {
|
|
|
5
5
|
inListItem?: boolean;
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
9
|
-
* Paragraph component that supports mixed content (Text and View elements).
|
|
10
|
-
* Uses View with flexDirection: 'row' and flexWrap: 'wrap' to allow inline flow
|
|
11
|
-
* of both text and non-text elements (like inline math).
|
|
12
|
-
*/
|
|
13
8
|
export declare const Paragraph: FC<ParagraphProps>;
|
|
14
9
|
export {};
|
|
15
10
|
//# sourceMappingURL=paragraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../src/renderers/paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../src/renderers/paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,UAAU,cAAc;IACtB,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmCxC,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type FC, type ComponentType } from "react";
|
|
2
|
+
import { type ViewStyle } from "react-native";
|
|
2
3
|
import type { MarkdownNode } from "../headless";
|
|
3
4
|
import { type NodeRendererProps } from "../MarkdownContext";
|
|
4
5
|
interface TableRendererProps {
|
|
5
6
|
node: MarkdownNode;
|
|
6
7
|
Renderer: ComponentType<NodeRendererProps>;
|
|
8
|
+
style?: ViewStyle;
|
|
7
9
|
}
|
|
8
10
|
export declare const TableRenderer: FC<TableRendererProps>;
|
|
9
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/renderers/table.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/renderers/table.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EACP,KAAK,aAAa,EAEnB,MAAM,OAAO,CAAC;AACf,OAAO,EAOL,KAAK,SAAS,EAEf,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAsB,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAwChF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC3C,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB;AAYD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAmLhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownSession.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/MarkdownSession.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"MarkdownSession.nitro.d.ts","sourceRoot":"","sources":["../../../../src/specs/MarkdownSession.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,eAAgB,SAAQ,YAAY,CAAC;IACpD,GAAG,EAAE,OAAO,CAAC;IACb,OAAO,EAAE,QAAQ,CAAC;CACnB,CAAC;IACA,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,IAAI,IAAI,CAAC;IACd,UAAU,IAAI,MAAM,CAAC;IAErB,iBAAiB,EAAE,MAAM,CAAC;IAE1B,WAAW,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC;CAC/C"}
|