@simon_he/vue-tui 0.0.7 → 0.0.8

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.
@@ -0,0 +1,112 @@
1
+ import { Style } from "./types-ClIV2h1o.js";
2
+ import { TuiMarkdownTheme, TuiMarkdownThemeOverrides } from "./theme-Bsm65g8k.js";
3
+ import { ParsedNode } from "stream-markdown-parser";
4
+
5
+ //#region src/vue/components/TMarkdownText.d.ts
6
+ declare const TMarkdownText: any;
7
+
8
+ //#endregion
9
+ //#region src/vue/components/TVirtualMarkdown.d.ts
10
+ declare const TVirtualMarkdown: any;
11
+
12
+ //#endregion
13
+ //#region src/vue/markdown/parser.d.ts
14
+ interface TuiMarkdownParseConfig {
15
+ streaming?: boolean;
16
+ customHtmlTags?: readonly string[];
17
+ }
18
+ interface TuiMarkdownParser {
19
+ parse: (content: string, final: boolean) => ParsedNode[];
20
+ }
21
+ declare function isSafeMarkdownLink(url: string): boolean;
22
+ declare function createTuiMarkdownParser(config?: TuiMarkdownParseConfig): TuiMarkdownParser;
23
+
24
+ //#endregion
25
+ //#region src/vue/markdown/types.d.ts
26
+ type TuiMarkdownInlineSegment = Readonly<{
27
+ text: string;
28
+ style?: Style;
29
+ hardBreak?: boolean;
30
+ }>;
31
+ type TuiMarkdownBlock = Readonly<{
32
+ type: "inline";
33
+ key: string;
34
+ segments: readonly TuiMarkdownInlineSegment[];
35
+ prefixSegments?: readonly TuiMarkdownInlineSegment[];
36
+ continuationPrefixSegments?: readonly TuiMarkdownInlineSegment[];
37
+ }> | Readonly<{
38
+ type: "code_block";
39
+ key: string;
40
+ lines: readonly string[];
41
+ style?: Style;
42
+ prefixSegments?: readonly TuiMarkdownInlineSegment[];
43
+ continuationPrefixSegments?: readonly TuiMarkdownInlineSegment[];
44
+ }> | Readonly<{
45
+ type: "thematic_break";
46
+ key: string;
47
+ char?: string;
48
+ style?: Style;
49
+ prefixSegments?: readonly TuiMarkdownInlineSegment[];
50
+ }> | Readonly<{
51
+ type: "blank";
52
+ key: string;
53
+ }>;
54
+ type TuiMarkdownVisualSegment = Readonly<{
55
+ text: string;
56
+ style?: Style;
57
+ cells: number;
58
+ }>;
59
+ type TuiMarkdownVisualRow = Readonly<{
60
+ key: string;
61
+ blockKey: string;
62
+ rowInBlock: number;
63
+ plainText: string;
64
+ segments: readonly TuiMarkdownVisualSegment[];
65
+ }>;
66
+
67
+ //#endregion
68
+ //#region src/vue/markdown/block-source.d.ts
69
+ type TuiMarkdownBlockSourceSnapshot = Readonly<{
70
+ version: number;
71
+ blocks: readonly TuiMarkdownBlock[];
72
+ }>;
73
+ type TuiMarkdownBlockSource = Readonly<{
74
+ version: number;
75
+ blocks: readonly TuiMarkdownBlock[];
76
+ appendDelta: (text: string) => void;
77
+ replaceTailBlock: (text: string) => void;
78
+ finalizeBlock: () => void;
79
+ clear: () => void;
80
+ snapshot: () => TuiMarkdownBlockSourceSnapshot;
81
+ }>;
82
+ type TuiMarkdownBlockSourceOptions = Readonly<{
83
+ parser?: TuiMarkdownParser;
84
+ customHtmlTags?: readonly string[];
85
+ theme?: TuiMarkdownThemeOverrides;
86
+ }>;
87
+ declare function createMarkdownBlockSource(options?: TuiMarkdownBlockSourceOptions): TuiMarkdownBlockSource;
88
+
89
+ //#endregion
90
+ //#region src/vue/markdown/document.d.ts
91
+ /**
92
+ * This helper always builds visual rows from the full source string. Components
93
+ * that need streaming reuse can call buildMarkdownBlocks and cache block layout.
94
+ */
95
+ declare function buildMarkdownBlocks(content: string, parser: TuiMarkdownParser, options?: Readonly<{
96
+ final?: boolean;
97
+ theme?: TuiMarkdownThemeOverrides;
98
+ }>): Readonly<{
99
+ nodes: readonly ParsedNode[];
100
+ blocks: readonly TuiMarkdownBlock[];
101
+ }>;
102
+ declare function buildMarkdownVisualRows(content: string, width: number, parser: TuiMarkdownParser, options?: Readonly<{
103
+ final?: boolean;
104
+ theme?: TuiMarkdownThemeOverrides;
105
+ }>): readonly TuiMarkdownVisualRow[];
106
+
107
+ //#endregion
108
+ //#region src/vue/markdown/layout.d.ts
109
+ declare function layoutMarkdownBlocks(blocks: readonly TuiMarkdownBlock[], width: number): readonly TuiMarkdownVisualRow[];
110
+
111
+ //#endregion
112
+ export { TMarkdownText, TVirtualMarkdown, TuiMarkdownBlock, TuiMarkdownBlockSource, TuiMarkdownBlockSourceOptions, TuiMarkdownBlockSourceSnapshot, TuiMarkdownInlineSegment, TuiMarkdownParseConfig, TuiMarkdownParser, TuiMarkdownTheme, TuiMarkdownThemeOverrides, TuiMarkdownVisualRow, TuiMarkdownVisualSegment, buildMarkdownBlocks, buildMarkdownVisualRows, createMarkdownBlockSource, createTuiMarkdownParser, isSafeMarkdownLink, layoutMarkdownBlocks };