react-native-nitro-markdown 0.4.2 → 0.5.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/README.md +605 -318
- package/android/src/main/java/com/margelo/nitro/com/nitromarkdown/HybridMarkdownSession.kt +27 -8
- package/cpp/bindings/HybridMarkdownParser.cpp +216 -66
- package/cpp/bindings/HybridMarkdownParser.hpp +2 -0
- package/ios/HybridMarkdownSession.swift +33 -7
- package/lib/commonjs/MarkdownContext.js +2 -1
- package/lib/commonjs/MarkdownContext.js.map +1 -1
- package/lib/commonjs/headless.js +41 -5
- package/lib/commonjs/headless.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/markdown-stream.js +109 -13
- package/lib/commonjs/markdown-stream.js.map +1 -1
- package/lib/commonjs/markdown.js +215 -44
- package/lib/commonjs/markdown.js.map +1 -1
- package/lib/commonjs/renderers/code.js +4 -3
- package/lib/commonjs/renderers/code.js.map +1 -1
- package/lib/commonjs/renderers/heading.js +1 -1
- package/lib/commonjs/renderers/heading.js.map +1 -1
- package/lib/commonjs/renderers/image.js +7 -5
- package/lib/commonjs/renderers/image.js.map +1 -1
- package/lib/commonjs/renderers/link.js +15 -3
- package/lib/commonjs/renderers/link.js.map +1 -1
- package/lib/commonjs/renderers/list.js +2 -2
- package/lib/commonjs/renderers/list.js.map +1 -1
- package/lib/commonjs/renderers/table.js +126 -21
- package/lib/commonjs/renderers/table.js.map +1 -1
- package/lib/commonjs/use-markdown-stream.js +16 -14
- package/lib/commonjs/use-markdown-stream.js.map +1 -1
- package/lib/commonjs/utils/incremental-ast.js +153 -0
- package/lib/commonjs/utils/incremental-ast.js.map +1 -0
- package/lib/commonjs/utils/link-security.js +21 -0
- package/lib/commonjs/utils/link-security.js.map +1 -0
- package/lib/commonjs/utils/stream-timeline.js +62 -0
- package/lib/commonjs/utils/stream-timeline.js.map +1 -0
- package/lib/module/MarkdownContext.js +2 -1
- package/lib/module/MarkdownContext.js.map +1 -1
- package/lib/module/headless.js +37 -4
- package/lib/module/headless.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/markdown-stream.js +110 -14
- package/lib/module/markdown-stream.js.map +1 -1
- package/lib/module/markdown.js +217 -46
- package/lib/module/markdown.js.map +1 -1
- package/lib/module/renderers/blockquote.js.map +1 -1
- package/lib/module/renderers/code.js +4 -3
- package/lib/module/renderers/code.js.map +1 -1
- package/lib/module/renderers/heading.js +1 -1
- package/lib/module/renderers/heading.js.map +1 -1
- package/lib/module/renderers/image.js +7 -5
- package/lib/module/renderers/image.js.map +1 -1
- package/lib/module/renderers/link.js +15 -3
- package/lib/module/renderers/link.js.map +1 -1
- package/lib/module/renderers/list.js +2 -2
- package/lib/module/renderers/list.js.map +1 -1
- package/lib/module/renderers/paragraph.js.map +1 -1
- package/lib/module/renderers/table.js +127 -22
- package/lib/module/renderers/table.js.map +1 -1
- package/lib/module/use-markdown-stream.js +16 -14
- package/lib/module/use-markdown-stream.js.map +1 -1
- package/lib/module/utils/incremental-ast.js +147 -0
- package/lib/module/utils/incremental-ast.js.map +1 -0
- package/lib/module/utils/link-security.js +15 -0
- package/lib/module/utils/link-security.js.map +1 -0
- package/lib/module/utils/stream-timeline.js +56 -0
- package/lib/module/utils/stream-timeline.js.map +1 -0
- package/lib/typescript/commonjs/Markdown.nitro.d.ts +5 -3
- package/lib/typescript/commonjs/Markdown.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/MarkdownContext.d.ts +26 -25
- package/lib/typescript/commonjs/MarkdownContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/headless.d.ts +15 -2
- package/lib/typescript/commonjs/headless.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/markdown-stream.d.ts +7 -2
- package/lib/typescript/commonjs/markdown-stream.d.ts.map +1 -1
- package/lib/typescript/commonjs/markdown.d.ts +62 -5
- package/lib/typescript/commonjs/markdown.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/blockquote.d.ts +3 -3
- package/lib/typescript/commonjs/renderers/blockquote.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/code.d.ts +5 -5
- package/lib/typescript/commonjs/renderers/code.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/heading.d.ts +3 -3
- package/lib/typescript/commonjs/renderers/heading.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/horizontal-rule.d.ts +2 -2
- package/lib/typescript/commonjs/renderers/horizontal-rule.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/image.d.ts +2 -2
- package/lib/typescript/commonjs/renderers/image.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/link.d.ts +3 -3
- package/lib/typescript/commonjs/renderers/link.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/list.d.ts +7 -7
- package/lib/typescript/commonjs/renderers/list.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/math.d.ts +4 -4
- package/lib/typescript/commonjs/renderers/math.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/paragraph.d.ts +3 -3
- package/lib/typescript/commonjs/renderers/paragraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/renderers/table.d.ts +3 -3
- package/lib/typescript/commonjs/renderers/table.d.ts.map +1 -1
- package/lib/typescript/commonjs/specs/MarkdownSession.nitro.d.ts +5 -2
- package/lib/typescript/commonjs/specs/MarkdownSession.nitro.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme.d.ts +2 -2
- package/lib/typescript/commonjs/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/use-markdown-stream.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/incremental-ast.d.ts +12 -0
- package/lib/typescript/commonjs/utils/incremental-ast.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/link-security.d.ts +3 -0
- package/lib/typescript/commonjs/utils/link-security.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/stream-timeline.d.ts +11 -0
- package/lib/typescript/commonjs/utils/stream-timeline.d.ts.map +1 -0
- package/lib/typescript/module/Markdown.nitro.d.ts +5 -3
- package/lib/typescript/module/Markdown.nitro.d.ts.map +1 -1
- package/lib/typescript/module/MarkdownContext.d.ts +26 -25
- package/lib/typescript/module/MarkdownContext.d.ts.map +1 -1
- package/lib/typescript/module/headless.d.ts +15 -2
- package/lib/typescript/module/headless.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/markdown-stream.d.ts +7 -2
- package/lib/typescript/module/markdown-stream.d.ts.map +1 -1
- package/lib/typescript/module/markdown.d.ts +62 -5
- package/lib/typescript/module/markdown.d.ts.map +1 -1
- package/lib/typescript/module/renderers/blockquote.d.ts +3 -3
- package/lib/typescript/module/renderers/blockquote.d.ts.map +1 -1
- package/lib/typescript/module/renderers/code.d.ts +5 -5
- package/lib/typescript/module/renderers/code.d.ts.map +1 -1
- package/lib/typescript/module/renderers/heading.d.ts +3 -3
- package/lib/typescript/module/renderers/heading.d.ts.map +1 -1
- package/lib/typescript/module/renderers/horizontal-rule.d.ts +2 -2
- package/lib/typescript/module/renderers/horizontal-rule.d.ts.map +1 -1
- package/lib/typescript/module/renderers/image.d.ts +2 -2
- package/lib/typescript/module/renderers/image.d.ts.map +1 -1
- package/lib/typescript/module/renderers/link.d.ts +3 -3
- package/lib/typescript/module/renderers/link.d.ts.map +1 -1
- package/lib/typescript/module/renderers/list.d.ts +7 -7
- package/lib/typescript/module/renderers/list.d.ts.map +1 -1
- package/lib/typescript/module/renderers/math.d.ts +4 -4
- package/lib/typescript/module/renderers/math.d.ts.map +1 -1
- package/lib/typescript/module/renderers/paragraph.d.ts +3 -3
- package/lib/typescript/module/renderers/paragraph.d.ts.map +1 -1
- package/lib/typescript/module/renderers/table.d.ts +3 -3
- package/lib/typescript/module/renderers/table.d.ts.map +1 -1
- package/lib/typescript/module/specs/MarkdownSession.nitro.d.ts +5 -2
- package/lib/typescript/module/specs/MarkdownSession.nitro.d.ts.map +1 -1
- package/lib/typescript/module/theme.d.ts +2 -2
- package/lib/typescript/module/theme.d.ts.map +1 -1
- package/lib/typescript/module/use-markdown-stream.d.ts.map +1 -1
- package/lib/typescript/module/utils/incremental-ast.d.ts +12 -0
- package/lib/typescript/module/utils/incremental-ast.d.ts.map +1 -0
- package/lib/typescript/module/utils/link-security.d.ts +3 -0
- package/lib/typescript/module/utils/link-security.d.ts.map +1 -0
- package/lib/typescript/module/utils/stream-timeline.d.ts +11 -0
- package/lib/typescript/module/utils/stream-timeline.d.ts.map +1 -0
- package/nitrogen/generated/android/NitroMarkdownOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_double_double.hpp +75 -0
- package/nitrogen/generated/android/c++/JHybridMarkdownSessionSpec.cpp +18 -6
- package/nitrogen/generated/android/c++/JHybridMarkdownSessionSpec.hpp +4 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/com/nitromarkdown/Func_void_double_double.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/com/nitromarkdown/HybridMarkdownSessionSpec.kt +11 -3
- package/nitrogen/generated/ios/NitroMarkdown-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/NitroMarkdown-Swift-Cxx-Bridge.hpp +31 -0
- package/nitrogen/generated/ios/c++/HybridMarkdownSessionSpecSwift.hpp +20 -2
- package/nitrogen/generated/ios/swift/Func_void.swift +0 -1
- package/nitrogen/generated/ios/swift/Func_void_double_double.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridMarkdownSessionSpec.swift +4 -3
- package/nitrogen/generated/ios/swift/HybridMarkdownSessionSpec_cxx.swift +34 -10
- package/nitrogen/generated/shared/c++/HybridMarkdownParserSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridMarkdownParserSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/HybridMarkdownSessionSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridMarkdownSessionSpec.hpp +4 -2
- package/package.json +7 -5
- package/src/Markdown.nitro.ts +7 -3
- package/src/MarkdownContext.ts +31 -25
- package/src/headless.ts +44 -6
- package/src/index.ts +8 -0
- package/src/markdown-stream.tsx +159 -15
- package/src/markdown.tsx +406 -50
- package/src/renderers/blockquote.tsx +4 -4
- package/src/renderers/code.tsx +16 -10
- package/src/renderers/heading.tsx +4 -4
- package/src/renderers/horizontal-rule.tsx +3 -3
- package/src/renderers/image.tsx +11 -9
- package/src/renderers/link.tsx +25 -7
- package/src/renderers/list.tsx +9 -12
- package/src/renderers/math.tsx +4 -4
- package/src/renderers/paragraph.tsx +3 -3
- package/src/renderers/table.tsx +270 -98
- package/src/specs/MarkdownSession.nitro.ts +6 -2
- package/src/theme.ts +3 -3
- package/src/use-markdown-stream.ts +22 -16
- package/src/utils/incremental-ast.ts +224 -0
- package/src/utils/link-security.ts +22 -0
- package/src/utils/stream-timeline.ts +72 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const createTimestampTimeline = timestamps => {
|
|
4
|
+
if (!timestamps) {
|
|
5
|
+
return {
|
|
6
|
+
entries: [],
|
|
7
|
+
monotonic: true
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const entries = Object.keys(timestamps).map(Number).filter(index => Number.isFinite(index)).sort((a, b) => a - b).map(index => ({
|
|
11
|
+
index,
|
|
12
|
+
time: timestamps[index]
|
|
13
|
+
})).filter(entry => Number.isFinite(entry.time));
|
|
14
|
+
let monotonic = true;
|
|
15
|
+
for (let i = 1; i < entries.length; i += 1) {
|
|
16
|
+
if (entries[i].time < entries[i - 1].time) {
|
|
17
|
+
monotonic = false;
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
entries,
|
|
23
|
+
monotonic
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export const resolveHighlightPosition = (timeline, currentTimeMs) => {
|
|
27
|
+
const {
|
|
28
|
+
entries,
|
|
29
|
+
monotonic
|
|
30
|
+
} = timeline;
|
|
31
|
+
if (entries.length === 0) return 0;
|
|
32
|
+
if (!monotonic) {
|
|
33
|
+
let wordIndex = 0;
|
|
34
|
+
for (const entry of entries) {
|
|
35
|
+
if (currentTimeMs >= entry.time) {
|
|
36
|
+
wordIndex = entry.index + 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return wordIndex;
|
|
40
|
+
}
|
|
41
|
+
let left = 0;
|
|
42
|
+
let right = entries.length - 1;
|
|
43
|
+
let resolvedIndex = -1;
|
|
44
|
+
while (left <= right) {
|
|
45
|
+
const mid = left + right >> 1;
|
|
46
|
+
if (entries[mid].time <= currentTimeMs) {
|
|
47
|
+
resolvedIndex = mid;
|
|
48
|
+
left = mid + 1;
|
|
49
|
+
} else {
|
|
50
|
+
right = mid - 1;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (resolvedIndex === -1) return 0;
|
|
54
|
+
return entries[resolvedIndex].index + 1;
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=stream-timeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createTimestampTimeline","timestamps","entries","monotonic","Object","keys","map","Number","filter","index","isFinite","sort","a","b","time","entry","i","length","resolveHighlightPosition","timeline","currentTimeMs","wordIndex","left","right","resolvedIndex","mid"],"sourceRoot":"../../../src","sources":["utils/stream-timeline.ts"],"mappings":";;AAUA,OAAO,MAAMA,uBAAuB,GAClCC,UAAmC,IACb;EACtB,IAAI,CAACA,UAAU,EAAE;IACf,OAAO;MAAEC,OAAO,EAAE,EAAE;MAAEC,SAAS,EAAE;IAAK,CAAC;EACzC;EAEA,MAAMD,OAAO,GAAGE,MAAM,CAACC,IAAI,CAACJ,UAAU,CAAC,CACpCK,GAAG,CAACC,MAAM,CAAC,CACXC,MAAM,CAAEC,KAAK,IAAKF,MAAM,CAACG,QAAQ,CAACD,KAAK,CAAC,CAAC,CACzCE,IAAI,CAAC,CAACC,CAAC,EAAEC,CAAC,KAAKD,CAAC,GAAGC,CAAC,CAAC,CACrBP,GAAG,CAAEG,KAAK,KAAM;IACfA,KAAK;IACLK,IAAI,EAAEb,UAAU,CAACQ,KAAK;EACxB,CAAC,CAAC,CAAC,CACFD,MAAM,CAAEO,KAAK,IAAKR,MAAM,CAACG,QAAQ,CAACK,KAAK,CAACD,IAAI,CAAC,CAAC;EAEjD,IAAIX,SAAS,GAAG,IAAI;EACpB,KAAK,IAAIa,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGd,OAAO,CAACe,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IAC1C,IAAId,OAAO,CAACc,CAAC,CAAC,CAACF,IAAI,GAAGZ,OAAO,CAACc,CAAC,GAAG,CAAC,CAAC,CAACF,IAAI,EAAE;MACzCX,SAAS,GAAG,KAAK;MACjB;IACF;EACF;EAEA,OAAO;IAAED,OAAO;IAAEC;EAAU,CAAC;AAC/B,CAAC;AAED,OAAO,MAAMe,wBAAwB,GAAGA,CACtCC,QAA2B,EAC3BC,aAAqB,KACV;EACX,MAAM;IAAElB,OAAO;IAAEC;EAAU,CAAC,GAAGgB,QAAQ;EACvC,IAAIjB,OAAO,CAACe,MAAM,KAAK,CAAC,EAAE,OAAO,CAAC;EAElC,IAAI,CAACd,SAAS,EAAE;IACd,IAAIkB,SAAS,GAAG,CAAC;IACjB,KAAK,MAAMN,KAAK,IAAIb,OAAO,EAAE;MAC3B,IAAIkB,aAAa,IAAIL,KAAK,CAACD,IAAI,EAAE;QAC/BO,SAAS,GAAGN,KAAK,CAACN,KAAK,GAAG,CAAC;MAC7B;IACF;IACA,OAAOY,SAAS;EAClB;EAEA,IAAIC,IAAI,GAAG,CAAC;EACZ,IAAIC,KAAK,GAAGrB,OAAO,CAACe,MAAM,GAAG,CAAC;EAC9B,IAAIO,aAAa,GAAG,CAAC,CAAC;EAEtB,OAAOF,IAAI,IAAIC,KAAK,EAAE;IACpB,MAAME,GAAG,GAAIH,IAAI,GAAGC,KAAK,IAAK,CAAC;IAC/B,IAAIrB,OAAO,CAACuB,GAAG,CAAC,CAACX,IAAI,IAAIM,aAAa,EAAE;MACtCI,aAAa,GAAGC,GAAG;MACnBH,IAAI,GAAGG,GAAG,GAAG,CAAC;IAChB,CAAC,MAAM;MACLF,KAAK,GAAGE,GAAG,GAAG,CAAC;IACjB;EACF;EAEA,IAAID,aAAa,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC;EAClC,OAAOtB,OAAO,CAACsB,aAAa,CAAC,CAACf,KAAK,GAAG,CAAC;AACzC,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import type { HybridObject } from
|
|
1
|
+
import type { HybridObject } from "react-native-nitro-modules";
|
|
2
2
|
export interface ParserOptions {
|
|
3
3
|
gfm?: boolean;
|
|
4
4
|
math?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export interface MarkdownParser extends HybridObject<{
|
|
7
|
-
ios:
|
|
8
|
-
android:
|
|
7
|
+
ios: "c++";
|
|
8
|
+
android: "c++";
|
|
9
9
|
}> {
|
|
10
10
|
parse(text: string): string;
|
|
11
11
|
parseWithOptions(text: string, options: ParserOptions): string;
|
|
12
|
+
extractPlainText(text: string): string;
|
|
13
|
+
extractPlainTextWithOptions(text: string, options: ParserOptions): string;
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=Markdown.nitro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.nitro.d.ts","sourceRoot":"","sources":["../../../src/Markdown.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"Markdown.nitro.d.ts","sourceRoot":"","sources":["../../../src/Markdown.nitro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,MAAM,WAAW,aAAa;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY,CAAC;IACnD,GAAG,EAAE,KAAK,CAAC;IACX,OAAO,EAAE,KAAK,CAAC;CAChB,CAAC;IACA,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;IAC/D,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,2BAA2B,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC;CAC3E"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { type ReactNode, type ComponentType } from "react";
|
|
2
|
-
import { type MarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
3
2
|
import type { MarkdownNode } from "./headless";
|
|
4
|
-
|
|
3
|
+
import { type MarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
4
|
+
export type NodeRendererProps = {
|
|
5
5
|
node: MarkdownNode;
|
|
6
6
|
depth: number;
|
|
7
7
|
inListItem: boolean;
|
|
8
8
|
parentIsText?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export
|
|
9
|
+
};
|
|
10
|
+
export type BaseCustomRendererProps = {
|
|
11
11
|
node: MarkdownNode;
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
Renderer: ComponentType<NodeRendererProps>;
|
|
14
|
-
}
|
|
15
|
-
export
|
|
14
|
+
};
|
|
15
|
+
export type EnhancedRendererProps = {
|
|
16
16
|
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
17
|
href?: string;
|
|
18
18
|
title?: string;
|
|
@@ -23,43 +23,44 @@ export interface EnhancedRendererProps extends BaseCustomRendererProps {
|
|
|
23
23
|
ordered?: boolean;
|
|
24
24
|
start?: number;
|
|
25
25
|
checked?: boolean;
|
|
26
|
-
}
|
|
27
|
-
export
|
|
26
|
+
} & BaseCustomRendererProps;
|
|
27
|
+
export type HeadingRendererProps = {
|
|
28
28
|
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
29
|
-
}
|
|
30
|
-
export
|
|
29
|
+
} & BaseCustomRendererProps;
|
|
30
|
+
export type LinkRendererProps = {
|
|
31
31
|
href: string;
|
|
32
32
|
title?: string;
|
|
33
|
-
}
|
|
34
|
-
export
|
|
33
|
+
} & BaseCustomRendererProps;
|
|
34
|
+
export type ImageRendererProps = {
|
|
35
35
|
url: string;
|
|
36
36
|
alt?: string;
|
|
37
37
|
title?: string;
|
|
38
|
-
}
|
|
39
|
-
export
|
|
38
|
+
} & BaseCustomRendererProps;
|
|
39
|
+
export type CodeBlockRendererProps = {
|
|
40
40
|
content: string;
|
|
41
41
|
language?: string;
|
|
42
|
-
}
|
|
43
|
-
export
|
|
42
|
+
} & BaseCustomRendererProps;
|
|
43
|
+
export type InlineCodeRendererProps = {
|
|
44
44
|
content: string;
|
|
45
|
-
}
|
|
46
|
-
export
|
|
45
|
+
} & BaseCustomRendererProps;
|
|
46
|
+
export type ListRendererProps = {
|
|
47
47
|
ordered: boolean;
|
|
48
48
|
start?: number;
|
|
49
|
-
}
|
|
50
|
-
export
|
|
49
|
+
} & BaseCustomRendererProps;
|
|
50
|
+
export type TaskListItemRendererProps = {
|
|
51
51
|
checked: boolean;
|
|
52
|
-
}
|
|
53
|
-
export
|
|
54
|
-
|
|
52
|
+
} & BaseCustomRendererProps;
|
|
53
|
+
export type CustomRendererProps = {} & EnhancedRendererProps;
|
|
54
|
+
export type LinkPressHandler = (href: string) => void | boolean | Promise<void | boolean>;
|
|
55
55
|
export type CustomRenderer = (props: EnhancedRendererProps) => ReactNode | undefined;
|
|
56
56
|
export type CustomRenderers = Partial<Record<MarkdownNode["type"], CustomRenderer>>;
|
|
57
|
-
export
|
|
57
|
+
export type MarkdownContextValue = {
|
|
58
58
|
renderers: CustomRenderers;
|
|
59
59
|
theme: MarkdownTheme;
|
|
60
60
|
styles?: NodeStyleOverrides;
|
|
61
61
|
stylingStrategy: StylingStrategy;
|
|
62
|
-
|
|
62
|
+
onLinkPress?: LinkPressHandler;
|
|
63
|
+
};
|
|
63
64
|
export declare const MarkdownContext: import("react").Context<MarkdownContextValue>;
|
|
64
65
|
export declare const useMarkdownContext: () => MarkdownContextValue;
|
|
65
66
|
//# sourceMappingURL=MarkdownContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownContext.d.ts","sourceRoot":"","sources":["../../../src/MarkdownContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"MarkdownContext.d.ts","sourceRoot":"","sources":["../../../src/MarkdownContext.ts"],"names":[],"mappings":"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"}
|
|
@@ -4,7 +4,7 @@ export type { ParserOptions } from "./Markdown.nitro";
|
|
|
4
4
|
* Represents a node in the Markdown AST (Abstract Syntax Tree).
|
|
5
5
|
* Each node has a type and optional properties depending on the node type.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type MarkdownNode = {
|
|
8
8
|
/** The type of markdown element this node represents. Used to decide how to render the node. */
|
|
9
9
|
type: "document" | "heading" | "paragraph" | "text" | "bold" | "italic" | "strikethrough" | "link" | "image" | "code_inline" | "code_block" | "blockquote" | "horizontal_rule" | "line_break" | "soft_break" | "table" | "table_head" | "table_body" | "table_row" | "table_cell" | "list" | "list_item" | "task_list_item" | "math_inline" | "math_block" | "html_block" | "html_inline";
|
|
10
10
|
/** Text content for text, code, and similar nodes. */
|
|
@@ -29,9 +29,13 @@ export interface MarkdownNode {
|
|
|
29
29
|
isHeader?: boolean;
|
|
30
30
|
/** Text alignment for table cells: 'left', 'center', or 'right'. */
|
|
31
31
|
align?: string;
|
|
32
|
+
/** Source start offset in original markdown text (when provided by native parser). */
|
|
33
|
+
beg?: number;
|
|
34
|
+
/** Source end offset in original markdown text (when provided by native parser). */
|
|
35
|
+
end?: number;
|
|
32
36
|
/** Nested child nodes for hierarchical elements like paragraphs, lists, and tables. */
|
|
33
37
|
children?: MarkdownNode[];
|
|
34
|
-
}
|
|
38
|
+
};
|
|
35
39
|
export declare const MarkdownParserModule: MarkdownParser;
|
|
36
40
|
/**
|
|
37
41
|
* Parse markdown text into an AST.
|
|
@@ -46,6 +50,15 @@ export declare function parseMarkdown(text: string): MarkdownNode;
|
|
|
46
50
|
* @returns The root node of the parsed AST
|
|
47
51
|
*/
|
|
48
52
|
export declare function parseMarkdownWithOptions(text: string, options: ParserOptions): MarkdownNode;
|
|
53
|
+
/**
|
|
54
|
+
* Parse markdown and return flattened plain text directly from native parser.
|
|
55
|
+
* Useful for search/indexing flows that don't need full AST rendering.
|
|
56
|
+
*/
|
|
57
|
+
export declare function extractPlainText(text: string): string;
|
|
58
|
+
/**
|
|
59
|
+
* Parse markdown with options and return flattened plain text from native parser.
|
|
60
|
+
*/
|
|
61
|
+
export declare function extractPlainTextWithOptions(text: string, options: ParserOptions): string;
|
|
49
62
|
export type { MarkdownParser };
|
|
50
63
|
/**
|
|
51
64
|
* Extract text content from a markdown node recursively.
|
|
@@ -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,MAAM,
|
|
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,MAAM,MAAM,YAAY,GAAG;IACzB,gGAAgG;IAChG,IAAI,EACA,UAAU,GACV,SAAS,GACT,WAAW,GACX,MAAM,GACN,MAAM,GACN,QAAQ,GACR,eAAe,GACf,MAAM,GACN,OAAO,GACP,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,YAAY,GACZ,YAAY,GACZ,OAAO,GACP,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,YAAY,GACZ,MAAM,GACN,WAAW,GACX,gBAAgB,GAChB,aAAa,GACb,YAAY,GACZ,YAAY,GACZ,aAAa,CAAC;IAClB,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qDAAqD;IACrD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uFAAuF;IACvF,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,gBACkC,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,YAAY,CAOd;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMrD;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,aAAa,GACrB,MAAM,CAMR;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,8 +1,10 @@
|
|
|
1
1
|
export * from "./headless";
|
|
2
2
|
export { Markdown } from "./markdown";
|
|
3
|
+
export type { MarkdownProps, AstTransform, MarkdownPlugin, MarkdownVirtualizationOptions, } from "./markdown";
|
|
3
4
|
export { MarkdownStream } from "./markdown-stream";
|
|
5
|
+
export type { MarkdownStreamProps } from "./markdown-stream";
|
|
4
6
|
export { useMarkdownContext, MarkdownContext } from "./MarkdownContext";
|
|
5
|
-
export type { CustomRenderer, CustomRenderers, CustomRendererProps, NodeRendererProps, BaseCustomRendererProps, EnhancedRendererProps, HeadingRendererProps, LinkRendererProps, ImageRendererProps, CodeBlockRendererProps, InlineCodeRendererProps, ListRendererProps, TaskListItemRendererProps, MarkdownContextValue, } from "./MarkdownContext";
|
|
7
|
+
export type { CustomRenderer, CustomRenderers, CustomRendererProps, NodeRendererProps, BaseCustomRendererProps, EnhancedRendererProps, HeadingRendererProps, LinkRendererProps, ImageRendererProps, CodeBlockRendererProps, InlineCodeRendererProps, ListRendererProps, TaskListItemRendererProps, LinkPressHandler, MarkdownContextValue, } from "./MarkdownContext";
|
|
6
8
|
export { defaultMarkdownTheme, minimalMarkdownTheme, mergeThemes, } from "./theme";
|
|
7
9
|
export type { MarkdownTheme, PartialMarkdownTheme, NodeStyleOverrides, StylingStrategy, } from "./theme";
|
|
8
10
|
export { Heading } from "./renderers/heading";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,6BAA6B,GAC9B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,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,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,oBAAoB,EACpB,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,7 +1,7 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
2
|
import { type MarkdownProps } from "./markdown";
|
|
3
3
|
import type { MarkdownSession } from "./specs/MarkdownSession.nitro";
|
|
4
|
-
export
|
|
4
|
+
export type MarkdownStreamProps = {
|
|
5
5
|
/**
|
|
6
6
|
* The active MarkdownSession to stream content from.
|
|
7
7
|
*/
|
|
@@ -22,7 +22,12 @@ export interface MarkdownStreamProps extends Omit<MarkdownProps, "children"> {
|
|
|
22
22
|
* Useful when you want to prioritize user interactions over stream renders.
|
|
23
23
|
*/
|
|
24
24
|
useTransitionUpdates?: boolean;
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Enable incremental AST updates for append-only streams.
|
|
27
|
+
* Automatically falls back to full parse when updates are not safely mergeable.
|
|
28
|
+
*/
|
|
29
|
+
incrementalParsing?: boolean;
|
|
30
|
+
} & Omit<MarkdownProps, "children" | "sourceAst">;
|
|
26
31
|
/**
|
|
27
32
|
* A component that renders streaming Markdown from a MarkdownSession.
|
|
28
33
|
* It efficiently subscribes to session updates to minimize parent re-renders.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-stream.d.ts","sourceRoot":"","sources":["../../../src/markdown-stream.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"markdown-stream.d.ts","sourceRoot":"","sources":["../../../src/markdown-stream.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,EAAE,EACR,MAAM,OAAO,CAAC;AAEf,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AA0CrE,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC;IACpC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,WAAW,CAAC,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwKlD,CAAC"}
|
|
@@ -1,10 +1,31 @@
|
|
|
1
|
-
import { type PartialMarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
2
1
|
import { type FC } from "react";
|
|
3
|
-
import { type StyleProp, type ViewStyle } from "react-native";
|
|
2
|
+
import { type FlatListProps, type StyleProp, type ViewStyle } from "react-native";
|
|
4
3
|
import { type MarkdownNode } from "./headless";
|
|
5
4
|
import type { ParserOptions } from "./Markdown.nitro";
|
|
6
|
-
import { type CustomRenderers } from "./MarkdownContext";
|
|
7
|
-
|
|
5
|
+
import { type CustomRenderers, type LinkPressHandler } from "./MarkdownContext";
|
|
6
|
+
import { type PartialMarkdownTheme, type NodeStyleOverrides, type StylingStrategy } from "./theme";
|
|
7
|
+
export type AstTransform = (ast: MarkdownNode) => MarkdownNode;
|
|
8
|
+
export type MarkdownVirtualizationOptions = Pick<FlatListProps<MarkdownNode>, "initialNumToRender" | "maxToRenderPerBatch" | "windowSize" | "updateCellsBatchingPeriod" | "removeClippedSubviews">;
|
|
9
|
+
export type MarkdownPlugin = {
|
|
10
|
+
/**
|
|
11
|
+
* Optional plugin name used for diagnostics and debugging.
|
|
12
|
+
*/
|
|
13
|
+
name?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional plugin version metadata for diagnostics.
|
|
16
|
+
*/
|
|
17
|
+
version?: string | number;
|
|
18
|
+
/**
|
|
19
|
+
* Optional text preprocessor executed before native parsing.
|
|
20
|
+
* Should return a full markdown string.
|
|
21
|
+
*/
|
|
22
|
+
beforeParse?: (markdown: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Optional AST postprocessor executed after native parsing.
|
|
25
|
+
*/
|
|
26
|
+
afterParse?: AstTransform;
|
|
27
|
+
};
|
|
28
|
+
export type MarkdownProps = {
|
|
8
29
|
/**
|
|
9
30
|
* The markdown string to parse and render.
|
|
10
31
|
*/
|
|
@@ -13,6 +34,20 @@ export interface MarkdownProps {
|
|
|
13
34
|
* Parser options to enable GFM or Math support.
|
|
14
35
|
*/
|
|
15
36
|
options?: ParserOptions;
|
|
37
|
+
/**
|
|
38
|
+
* Optional parser plugins for preprocessing and AST postprocessing.
|
|
39
|
+
*/
|
|
40
|
+
plugins?: MarkdownPlugin[];
|
|
41
|
+
/**
|
|
42
|
+
* Optional pre-parsed AST.
|
|
43
|
+
* When provided, native parse is skipped and this tree is rendered instead.
|
|
44
|
+
*/
|
|
45
|
+
sourceAst?: MarkdownNode;
|
|
46
|
+
/**
|
|
47
|
+
* Optional transform applied after parsing and before rendering.
|
|
48
|
+
* The transformed AST is also returned in `onParseComplete`.
|
|
49
|
+
*/
|
|
50
|
+
astTransform?: AstTransform;
|
|
16
51
|
/**
|
|
17
52
|
* Callback fired when parsing begins.
|
|
18
53
|
*/
|
|
@@ -55,6 +90,28 @@ export interface MarkdownProps {
|
|
|
55
90
|
* Optional style for the container view.
|
|
56
91
|
*/
|
|
57
92
|
style?: StyleProp<ViewStyle>;
|
|
58
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Optional link press handler.
|
|
95
|
+
* Return false to prevent the default openURL behavior.
|
|
96
|
+
*/
|
|
97
|
+
onLinkPress?: LinkPressHandler;
|
|
98
|
+
/**
|
|
99
|
+
* Enables top-level block virtualization for very large markdown documents.
|
|
100
|
+
* Best used when Markdown is the primary scroll container on screen.
|
|
101
|
+
* - `true`: always virtualize when block threshold is met
|
|
102
|
+
* - `"auto"`: virtualize only when threshold is met (recommended for large docs)
|
|
103
|
+
* - `false`: disable virtualization (default)
|
|
104
|
+
*/
|
|
105
|
+
virtualize?: boolean | "auto";
|
|
106
|
+
/**
|
|
107
|
+
* Minimum number of top-level blocks before virtualization is activated.
|
|
108
|
+
* Helps avoid FlatList overhead on small documents.
|
|
109
|
+
*/
|
|
110
|
+
virtualizationMinBlocks?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Optional FlatList tuning for virtualization.
|
|
113
|
+
*/
|
|
114
|
+
virtualization?: MarkdownVirtualizationOptions;
|
|
115
|
+
};
|
|
59
116
|
export declare const Markdown: FC<MarkdownProps>;
|
|
60
117
|
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../../src/markdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,EAAE,EAIR,MAAM,OAAO,CAAC;AACf,OAAO,EAOL,KAAK,aAAa,EAClB,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,EACpB,KAAK,gBAAgB,EAEtB,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAKL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACrB,MAAM,SAAS,CAAC;AAOjB,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,YAAY,KAAK,YAAY,CAAC;AAC/D,MAAM,MAAM,6BAA6B,GAAG,IAAI,CAC9C,aAAa,CAAC,YAAY,CAAC,EACzB,oBAAoB,GACpB,qBAAqB,GACrB,YAAY,GACZ,2BAA2B,GAC3B,uBAAuB,CAC1B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC1B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC3C;;OAEG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B,CAAC;AAuJF,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;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;IAC7B;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,6BAA6B,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAqKtC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type ViewStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type BlockquoteProps = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
style?: ViewStyle;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
export declare const Blockquote: FC<BlockquoteProps>;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=blockquote.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../../../src/renderers/blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../../../src/renderers/blockquote.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,KAAK,eAAe,GAAG;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAoB1C,CAAC"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type ViewStyle, type TextStyle } from "react-native";
|
|
3
3
|
import type { MarkdownNode } from "../headless";
|
|
4
|
-
|
|
4
|
+
type CodeBlockProps = {
|
|
5
5
|
language?: string;
|
|
6
6
|
content?: string;
|
|
7
7
|
node?: MarkdownNode;
|
|
8
8
|
style?: ViewStyle;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export declare const CodeBlock: FC<CodeBlockProps>;
|
|
11
|
-
|
|
11
|
+
type InlineCodeProps = {
|
|
12
12
|
content?: string;
|
|
13
13
|
node?: MarkdownNode;
|
|
14
14
|
children?: ReactNode;
|
|
15
15
|
style?: TextStyle;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
17
|
export declare const InlineCode: FC<InlineCodeProps>;
|
|
18
18
|
export {};
|
|
19
19
|
//# sourceMappingURL=code.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/renderers/code.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/renderers/code.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAML,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,KAAK,cAAc,GAAG;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA4DxC,CAAC;AAEF,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA8B1C,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type TextStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type HeadingProps = {
|
|
4
4
|
level: number;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
style?: TextStyle;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare const Heading: FC<HeadingProps>;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=heading.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/renderers/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"heading.d.ts","sourceRoot":"","sources":["../../../../src/renderers/heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAG1E,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAYF,eAAO,MAAM,OAAO,EAAE,EAAE,CAAC,YAAY,CAmEpC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
2
|
import { type ViewStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type HorizontalRuleProps = {
|
|
4
4
|
style?: ViewStyle;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
6
|
export declare const HorizontalRule: FC<HorizontalRuleProps>;
|
|
7
7
|
export {};
|
|
8
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;AACzC,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhE,
|
|
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,KAAK,mBAAmB,GAAG;IACzB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAclD,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type FC, type ComponentType } from "react";
|
|
2
2
|
import { type ViewStyle } from "react-native";
|
|
3
3
|
import type { NodeRendererProps } from "../MarkdownContext";
|
|
4
|
-
|
|
4
|
+
type ImageProps = {
|
|
5
5
|
url: string;
|
|
6
6
|
title?: string;
|
|
7
7
|
alt?: string;
|
|
8
8
|
Renderer?: ComponentType<NodeRendererProps>;
|
|
9
9
|
style?: ViewStyle;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
export declare const Image: FC<ImageProps>;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -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,EAKL,KAAK,EAAE,EACP,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAkB5D,KAAK,UAAU,GAAG;IAChB,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,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAqKhC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type TextStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type LinkProps = {
|
|
4
4
|
href: string;
|
|
5
5
|
children: ReactNode;
|
|
6
6
|
style?: TextStyle;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare const Link: FC<LinkProps>;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/renderers/link.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/renderers/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAKL,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAOtB,KAAK,SAAS,GAAG;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAuC9B,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type ViewStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type ListProps = {
|
|
4
4
|
ordered: boolean;
|
|
5
5
|
start?: number;
|
|
6
6
|
depth: number;
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
style?: ViewStyle;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
export declare const List: FC<ListProps>;
|
|
11
|
-
|
|
11
|
+
type ListItemProps = {
|
|
12
12
|
children: ReactNode;
|
|
13
13
|
index: number;
|
|
14
14
|
ordered: boolean;
|
|
15
15
|
start: number;
|
|
16
16
|
style?: ViewStyle;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
18
|
export declare const ListItem: FC<ListItemProps>;
|
|
19
|
-
|
|
19
|
+
type TaskListItemProps = {
|
|
20
20
|
children: ReactNode;
|
|
21
21
|
checked: boolean;
|
|
22
22
|
style?: ViewStyle;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
export declare const TaskListItem: FC<TaskListItemProps>;
|
|
25
25
|
export {};
|
|
26
26
|
//# sourceMappingURL=list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/renderers/list.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../../src/renderers/list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,KAAK,SAAS,GAAG;IACf,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,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAoB9B,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,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,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAwCtC,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAqD9C,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { type FC } from "react";
|
|
2
2
|
import { type ViewStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type MathInlineProps = {
|
|
4
4
|
content?: string;
|
|
5
5
|
style?: ViewStyle;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
7
|
export declare const MathInline: FC<MathInlineProps>;
|
|
8
|
-
|
|
8
|
+
type MathBlockProps = {
|
|
9
9
|
content?: string;
|
|
10
10
|
style?: ViewStyle;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
12
|
export declare const MathBlock: FC<MathBlockProps>;
|
|
13
13
|
export {};
|
|
14
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;AAC7D,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAoBtB,
|
|
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,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAyDF,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2B1C,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA0BxC,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { type FC, type ReactNode } from "react";
|
|
2
2
|
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
-
|
|
3
|
+
type ParagraphProps = {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
inListItem?: boolean;
|
|
6
6
|
style?: StyleProp<ViewStyle>;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
8
|
export declare const Paragraph: FC<ParagraphProps>;
|
|
9
9
|
export {};
|
|
10
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,
|
|
1
|
+
{"version":3,"file":"paragraph.d.ts","sourceRoot":"","sources":["../../../../src/renderers/paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,EAAE,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,KAAK,cAAc,GAAG;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAkCxC,CAAC"}
|