@surrealdb/ui 1.0.77 → 1.0.78
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/.cursor/plans/mdx_support_research_f85826b1.plan.md +260 -0
- package/dist/ui.css +1 -1
- package/dist/ui.d.ts +147 -318
- package/dist/ui.js +11090 -8033
- package/dist/ui.js.map +1 -1
- package/package.json +2 -1
package/dist/ui.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ declare type AnyFn = (...rest: any[]) => any;
|
|
|
68
68
|
|
|
69
69
|
declare type AnyLanguage = Language | (string & {});
|
|
70
70
|
|
|
71
|
-
export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNode | TableRowNode | TableCellNode
|
|
71
|
+
export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNode | TableRowNode | TableCellNode;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* Apply automatic folding to objects/arrays at the specified depth level
|
|
@@ -77,6 +77,8 @@ export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNod
|
|
|
77
77
|
*/
|
|
78
78
|
export declare function applyAutoFolding(view: EditorView, autoCollapseDepth: number): void;
|
|
79
79
|
|
|
80
|
+
export declare type AttributeValue = string | JsxExpression | true;
|
|
81
|
+
|
|
80
82
|
export declare const BlockEditor: FC<BlockEditorProps>;
|
|
81
83
|
|
|
82
84
|
export declare interface BlockEditorProps {
|
|
@@ -89,7 +91,7 @@ export declare interface BlockEditorProps {
|
|
|
89
91
|
children?: ReactNode;
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
export declare type BlockNode = HeadingNode | ParagraphNode | CodeNode | BlockquoteNode | ListNode | TableNode | ThematicBreakNode | DivNode | DetailsNode | ImageNode |
|
|
94
|
+
export declare type BlockNode = HeadingNode | ParagraphNode | CodeNode | BlockquoteNode | ListNode | TableNode | ThematicBreakNode | DivNode | DetailsNode | ImageNode | JsxComponentNode;
|
|
93
95
|
|
|
94
96
|
export declare type BlockOptionsComponent = FC<{
|
|
95
97
|
blockId: string;
|
|
@@ -108,12 +110,9 @@ declare type BlockquoteElementMap = {
|
|
|
108
110
|
blockquote: BlockquoteElement;
|
|
109
111
|
};
|
|
110
112
|
|
|
111
|
-
export declare interface BlockquoteNode {
|
|
113
|
+
export declare interface BlockquoteNode extends CommonAttrs {
|
|
112
114
|
type: "blockquote";
|
|
113
115
|
children: BlockNode[];
|
|
114
|
-
className?: string;
|
|
115
|
-
id?: string;
|
|
116
|
-
style?: string;
|
|
117
116
|
noteKind?: NoteKind;
|
|
118
117
|
noteTitle?: string;
|
|
119
118
|
}
|
|
@@ -324,23 +323,12 @@ export declare const brandYouTube: string;
|
|
|
324
323
|
|
|
325
324
|
export declare const BreadcrumbButton: FC<ButtonProps & ElementProps<"button">>;
|
|
326
325
|
|
|
327
|
-
export declare interface BreakNode {
|
|
326
|
+
export declare interface BreakNode extends CommonAttrs {
|
|
328
327
|
type: "break";
|
|
329
|
-
className?: string;
|
|
330
|
-
id?: string;
|
|
331
|
-
style?: string;
|
|
332
328
|
}
|
|
333
329
|
|
|
334
330
|
export declare function Check({ children, ...props }: CheckProps): ReactNode;
|
|
335
331
|
|
|
336
|
-
export declare interface CheckNode {
|
|
337
|
-
type: "check";
|
|
338
|
-
children: InlineNode[];
|
|
339
|
-
className?: string;
|
|
340
|
-
id?: string;
|
|
341
|
-
style?: string;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
332
|
export declare interface CheckProps extends GroupProps {
|
|
345
333
|
children?: ReactNode;
|
|
346
334
|
}
|
|
@@ -377,15 +365,12 @@ export declare interface CodeEditorProps extends BoxProps {
|
|
|
377
365
|
ref?: RefObject<EditorView>;
|
|
378
366
|
}
|
|
379
367
|
|
|
380
|
-
export declare interface CodeNode {
|
|
368
|
+
export declare interface CodeNode extends CommonAttrs {
|
|
381
369
|
type: "code";
|
|
382
370
|
value: string;
|
|
383
371
|
lang?: string;
|
|
384
372
|
title?: string;
|
|
385
373
|
runnable?: string;
|
|
386
|
-
className?: string;
|
|
387
|
-
id?: string;
|
|
388
|
-
style?: string;
|
|
389
374
|
}
|
|
390
375
|
|
|
391
376
|
export declare const COLOR_OPTIONS: OptionItem[];
|
|
@@ -399,24 +384,17 @@ declare interface CommentNode {
|
|
|
399
384
|
text: string;
|
|
400
385
|
}
|
|
401
386
|
|
|
387
|
+
export declare interface CommonAttrs {
|
|
388
|
+
className?: AttributeValue;
|
|
389
|
+
id?: AttributeValue;
|
|
390
|
+
style?: AttributeValue;
|
|
391
|
+
}
|
|
392
|
+
|
|
402
393
|
/**
|
|
403
394
|
* Common extensions applied to all CodeMirror editors
|
|
404
395
|
*/
|
|
405
396
|
export declare const commonExtensions: () => Extension;
|
|
406
397
|
|
|
407
|
-
declare type ComponentFunction<T extends AnyNode["type"]> = NodeOfType<T> extends {
|
|
408
|
-
children: unknown[];
|
|
409
|
-
} ? (props: {
|
|
410
|
-
node: NodeOfType<T>;
|
|
411
|
-
children: ReactNode;
|
|
412
|
-
}) => ReactNode : (props: {
|
|
413
|
-
node: NodeOfType<T>;
|
|
414
|
-
}) => ReactNode;
|
|
415
|
-
|
|
416
|
-
declare type ComponentMap = {
|
|
417
|
-
[T in AnyNode["type"]]: ComponentFunction<T>;
|
|
418
|
-
};
|
|
419
|
-
|
|
420
398
|
/**
|
|
421
399
|
* Create a style highlighter for the given color scheme and syntax theme
|
|
422
400
|
*/
|
|
@@ -473,12 +451,9 @@ export declare const Details: FC<DetailsProps> & {
|
|
|
473
451
|
Summary: FC<SummaryProps>;
|
|
474
452
|
};
|
|
475
453
|
|
|
476
|
-
export declare interface DetailsNode {
|
|
454
|
+
export declare interface DetailsNode extends CommonAttrs {
|
|
477
455
|
type: "details";
|
|
478
456
|
children: Array<SummaryNode | BlockNode>;
|
|
479
|
-
className?: string;
|
|
480
|
-
id?: string;
|
|
481
|
-
style?: string;
|
|
482
457
|
}
|
|
483
458
|
|
|
484
459
|
export declare interface DetailsProps extends Omit<BoxProps, "component" | "children"> {
|
|
@@ -491,12 +466,9 @@ export declare interface DiagramNode {
|
|
|
491
466
|
children: RailroadNode[];
|
|
492
467
|
}
|
|
493
468
|
|
|
494
|
-
export declare interface DivNode {
|
|
469
|
+
export declare interface DivNode extends CommonAttrs {
|
|
495
470
|
type: "div";
|
|
496
471
|
children: BlockNode[];
|
|
497
|
-
className?: string;
|
|
498
|
-
id?: string;
|
|
499
|
-
style?: string;
|
|
500
472
|
}
|
|
501
473
|
|
|
502
474
|
export declare interface EditorController {
|
|
@@ -533,24 +505,11 @@ export declare type EditorStateSnapshot = Record<string, unknown>;
|
|
|
533
505
|
*/
|
|
534
506
|
export declare function editorTheme(theme: ThemeConfig_2, colorScheme: MantineColorScheme): Extension;
|
|
535
507
|
|
|
536
|
-
export declare interface EmphasisNode {
|
|
508
|
+
export declare interface EmphasisNode extends CommonAttrs {
|
|
537
509
|
type: "emphasis";
|
|
538
510
|
children: InlineNode[];
|
|
539
|
-
className?: string;
|
|
540
|
-
id?: string;
|
|
541
|
-
style?: string;
|
|
542
511
|
}
|
|
543
512
|
|
|
544
|
-
/**
|
|
545
|
-
* Enter a node (push to stack and set container)
|
|
546
|
-
*/
|
|
547
|
-
export declare function enterNode(state: ParserState, nodeType: string, node: BlockNode | SummaryNode): void;
|
|
548
|
-
|
|
549
|
-
/**
|
|
550
|
-
* Exit a node (pop from stack and validate)
|
|
551
|
-
*/
|
|
552
|
-
export declare function exitNode(state: ParserState, expectedType: string): void;
|
|
553
|
-
|
|
554
513
|
export declare interface ExtractedCode {
|
|
555
514
|
test?: string;
|
|
556
515
|
code: string;
|
|
@@ -577,13 +536,10 @@ export declare function getBrandsafeImageURL(imageId: string | undefined, width?
|
|
|
577
536
|
|
|
578
537
|
export declare function getBrandsafeVideoURL(videoId: string | undefined, format?: "mp4" | "webm" | "mov", controls?: boolean): string | undefined;
|
|
579
538
|
|
|
580
|
-
export declare interface HeadingNode {
|
|
539
|
+
export declare interface HeadingNode extends CommonAttrs {
|
|
581
540
|
type: "heading";
|
|
582
541
|
depth: 1 | 2 | 3 | 4 | 5 | 6;
|
|
583
542
|
children: InlineNode[];
|
|
584
|
-
className?: string;
|
|
585
|
-
id?: string;
|
|
586
|
-
style?: string;
|
|
587
543
|
}
|
|
588
544
|
|
|
589
545
|
export declare const Highlighting: FC<HighlightingProps>;
|
|
@@ -860,7 +816,7 @@ export declare interface IconProps extends BoxProps, Omit<HTMLAttributes<SVGElem
|
|
|
860
816
|
color?: MantineColor;
|
|
861
817
|
spin?: boolean;
|
|
862
818
|
path: string;
|
|
863
|
-
flip?: "horizontal" | "vertical";
|
|
819
|
+
flip?: "horizontal" | "vertical" | "both";
|
|
864
820
|
}
|
|
865
821
|
|
|
866
822
|
export declare const iconQuery: string;
|
|
@@ -945,83 +901,78 @@ export declare const iconWrench: string;
|
|
|
945
901
|
|
|
946
902
|
export declare const iconXml: string;
|
|
947
903
|
|
|
948
|
-
export declare interface ImageNode {
|
|
904
|
+
export declare interface ImageNode extends CommonAttrs {
|
|
949
905
|
type: "image";
|
|
950
906
|
src: string;
|
|
951
907
|
darkSrc?: string;
|
|
952
908
|
alt: string;
|
|
953
909
|
title?: string;
|
|
954
|
-
className?: string;
|
|
955
|
-
id?: string;
|
|
956
|
-
style?: string;
|
|
957
910
|
}
|
|
958
911
|
|
|
959
|
-
export declare interface InlineCodeNode {
|
|
912
|
+
export declare interface InlineCodeNode extends CommonAttrs {
|
|
960
913
|
type: "inlineCode";
|
|
961
914
|
value: string;
|
|
962
|
-
className?: string;
|
|
963
|
-
id?: string;
|
|
964
|
-
style?: string;
|
|
965
915
|
}
|
|
966
916
|
|
|
967
|
-
export declare type InlineNode = TextNode | LinkNode | InlineCodeNode | StrongNode | EmphasisNode | BreakNode | SpanNode | ImageNode;
|
|
917
|
+
export declare type InlineNode = TextNode | LinkNode | InlineCodeNode | StrongNode | EmphasisNode | BreakNode | SpanNode | ImageNode | JsxExpressionNode;
|
|
968
918
|
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
919
|
+
export declare interface JsxComponentNode extends CommonAttrs {
|
|
920
|
+
type: "jsxComponent";
|
|
921
|
+
name: string;
|
|
922
|
+
attributes: Record<string, AttributeValue>;
|
|
923
|
+
children: AnyNode[];
|
|
924
|
+
position?: NodePosition;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
export declare interface JsxExpression {
|
|
928
|
+
type: "expression";
|
|
929
|
+
value: string;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
export declare interface JsxExpressionNode extends CommonAttrs {
|
|
933
|
+
type: "jsxExpression";
|
|
934
|
+
value: string;
|
|
935
|
+
position?: NodePosition;
|
|
936
|
+
}
|
|
974
937
|
|
|
975
938
|
/**
|
|
976
|
-
*
|
|
939
|
+
* Controls how `<Component />` tags and `{expression}` values in markdown are handled.
|
|
940
|
+
*
|
|
941
|
+
* - `"render"` — Evaluate and render JSX normally (default).
|
|
942
|
+
* - `"throw"` — Throw an error when a JSX node is encountered.
|
|
943
|
+
* - `"graceful"` — Render an inline error box instead of the JSX node.
|
|
944
|
+
* - `"omit"` — Silently skip JSX nodes (render nothing).
|
|
977
945
|
*/
|
|
978
|
-
export declare
|
|
946
|
+
export declare type JsxMode = "render" | "throw" | "graceful" | "omit";
|
|
979
947
|
|
|
980
948
|
export declare function Label({ label, ...props }: LabelProps): ReactNode;
|
|
981
949
|
|
|
982
|
-
export declare interface LabelNode {
|
|
983
|
-
type: "label";
|
|
984
|
-
label: string;
|
|
985
|
-
className?: string;
|
|
986
|
-
id?: string;
|
|
987
|
-
style?: string;
|
|
988
|
-
}
|
|
989
|
-
|
|
990
950
|
export declare interface LabelProps extends Omit<BadgeProps, "children"> {
|
|
991
951
|
label: string;
|
|
992
952
|
}
|
|
993
953
|
|
|
994
954
|
declare type Language = "csharp" | "rust" | "javascript" | "typescript" | "surrealql" | "json" | "yaml" | "java" | "go" | "python" | "html" | "cli" | "php" | "syntax";
|
|
995
955
|
|
|
996
|
-
export declare interface LinkNode {
|
|
956
|
+
export declare interface LinkNode extends CommonAttrs {
|
|
997
957
|
type: "link";
|
|
998
958
|
url: string;
|
|
999
959
|
title?: string;
|
|
1000
960
|
children: InlineNode[];
|
|
1001
|
-
className?: string;
|
|
1002
|
-
id?: string;
|
|
1003
|
-
style?: string;
|
|
1004
961
|
}
|
|
1005
962
|
|
|
1006
|
-
export declare interface ListItemNode {
|
|
963
|
+
export declare interface ListItemNode extends CommonAttrs {
|
|
1007
964
|
type: "listItem";
|
|
1008
965
|
checked?: boolean;
|
|
1009
966
|
spread?: boolean;
|
|
1010
967
|
children: AnyNode[];
|
|
1011
|
-
className?: string;
|
|
1012
|
-
id?: string;
|
|
1013
|
-
style?: string;
|
|
1014
968
|
}
|
|
1015
969
|
|
|
1016
|
-
export declare interface ListNode {
|
|
970
|
+
export declare interface ListNode extends CommonAttrs {
|
|
1017
971
|
type: "list";
|
|
1018
972
|
variant?: "ordered" | "unordered" | "checklist";
|
|
1019
973
|
start?: number;
|
|
1020
974
|
spread?: boolean;
|
|
1021
975
|
children: ListItemNode[];
|
|
1022
|
-
className?: string;
|
|
1023
|
-
id?: string;
|
|
1024
|
-
style?: string;
|
|
1025
976
|
}
|
|
1026
977
|
|
|
1027
978
|
/**
|
|
@@ -1077,11 +1028,9 @@ export declare interface MantineTableProps {
|
|
|
1077
1028
|
* Main Markdown component that parses markdown and renders it
|
|
1078
1029
|
* Applies stylesheet and spacing
|
|
1079
1030
|
*/
|
|
1080
|
-
export declare function Markdown({ content, components,
|
|
1031
|
+
export declare function Markdown({ content, renderers, rendererProps, components, scope, }: MarkdownProps): React_2.ReactElement;
|
|
1081
1032
|
|
|
1082
|
-
declare
|
|
1083
|
-
code?: Partial<CodeBlockProps>;
|
|
1084
|
-
}
|
|
1033
|
+
declare type MarkdownComponents = Record<string, React.ComponentType<any>>;
|
|
1085
1034
|
|
|
1086
1035
|
export declare interface MarkdownProps {
|
|
1087
1036
|
/**
|
|
@@ -1089,10 +1038,50 @@ export declare interface MarkdownProps {
|
|
|
1089
1038
|
*/
|
|
1090
1039
|
content: string;
|
|
1091
1040
|
/**
|
|
1092
|
-
*
|
|
1041
|
+
* Override how built-in markdown elements are rendered.
|
|
1042
|
+
* Keys are AST node types (`"heading"`, `"code"`, `"table"`, etc.).
|
|
1043
|
+
*/
|
|
1044
|
+
renderers?: MarkdownRenderers;
|
|
1045
|
+
/**
|
|
1046
|
+
* Extra props forwarded to specific built-in renderers (e.g. code block options).
|
|
1047
|
+
*/
|
|
1048
|
+
rendererProps?: MarkdownRendererProps;
|
|
1049
|
+
/**
|
|
1050
|
+
* React components available for use as `<Component />` tags in the markdown content.
|
|
1051
|
+
* Keys should match PascalCase tag names (e.g. `{ StatusCard, Alert }`).
|
|
1052
|
+
*/
|
|
1053
|
+
components?: MarkdownComponents;
|
|
1054
|
+
/**
|
|
1055
|
+
* Variable context for evaluating `{expression}` values in JSX attributes
|
|
1056
|
+
* and inline expressions (e.g. `{ userName: "Alice", count: 42 }`).
|
|
1057
|
+
*/
|
|
1058
|
+
scope?: Record<string, unknown>;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Extra props forwarded to specific built-in renderers (e.g. code block options).
|
|
1063
|
+
*/
|
|
1064
|
+
export declare interface MarkdownRendererProps {
|
|
1065
|
+
code?: Partial<CodeBlockProps>;
|
|
1066
|
+
/**
|
|
1067
|
+
* How `<Component />` tags and `{expression}` values are handled.
|
|
1068
|
+
*
|
|
1069
|
+
* @default "render"
|
|
1093
1070
|
*/
|
|
1094
|
-
|
|
1095
|
-
|
|
1071
|
+
jsx?: JsxMode;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
declare type MarkdownRenderers = Partial<RendererMap>;
|
|
1075
|
+
|
|
1076
|
+
export declare interface MDXProvidedComponents {
|
|
1077
|
+
Check: typeof Check;
|
|
1078
|
+
Label: typeof Label;
|
|
1079
|
+
RailroadDiagram: typeof RailroadDiagram;
|
|
1080
|
+
Since: typeof Since;
|
|
1081
|
+
SurrealistMini: typeof SurrealistMini;
|
|
1082
|
+
TabItem: typeof TabItem_2;
|
|
1083
|
+
Tabs: typeof Tabs_2;
|
|
1084
|
+
Version: typeof Version;
|
|
1096
1085
|
}
|
|
1097
1086
|
|
|
1098
1087
|
export declare interface MiniConfig {
|
|
@@ -1148,6 +1137,11 @@ declare type NodeOfType<T extends AnyNode["type"]> = Extract<AnyNode, {
|
|
|
1148
1137
|
type: T;
|
|
1149
1138
|
}>;
|
|
1150
1139
|
|
|
1140
|
+
export declare interface NodePosition {
|
|
1141
|
+
start: number;
|
|
1142
|
+
end: number;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1151
1145
|
export declare const NON_TEXT_BLOCKS: Set<string>;
|
|
1152
1146
|
|
|
1153
1147
|
declare interface NonTerminalNode {
|
|
@@ -1187,84 +1181,16 @@ declare type OptionItem = {
|
|
|
1187
1181
|
value: string;
|
|
1188
1182
|
};
|
|
1189
1183
|
|
|
1190
|
-
export declare interface ParagraphNode {
|
|
1184
|
+
export declare interface ParagraphNode extends CommonAttrs {
|
|
1191
1185
|
type: "paragraph";
|
|
1192
1186
|
children: InlineNode[];
|
|
1193
|
-
className?: string;
|
|
1194
|
-
id?: string;
|
|
1195
|
-
style?: string;
|
|
1196
1187
|
}
|
|
1197
1188
|
|
|
1198
|
-
/**
|
|
1199
|
-
* Parse HTML-style attributes from a string
|
|
1200
|
-
* Handles: name="value", name='value', name=value
|
|
1201
|
-
* Properly handles escaped quotes: name="value with \"escaped\" quotes"
|
|
1202
|
-
*/
|
|
1203
|
-
export declare function parseAttributes(attrString: string): Record<string, string>;
|
|
1204
|
-
|
|
1205
|
-
export declare function parseBlockquote(state: ParserState): void;
|
|
1206
|
-
|
|
1207
|
-
export declare function parseCheckTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1208
|
-
|
|
1209
|
-
export declare function parseCodeBlock(state: ParserState): void;
|
|
1210
|
-
|
|
1211
|
-
export declare function parseDetailsTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1212
|
-
|
|
1213
|
-
export declare function parseDivTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1214
|
-
|
|
1215
|
-
export declare function parseEmphasis(text: string, startIndex: number): {
|
|
1216
|
-
node: EmphasisNode;
|
|
1217
|
-
endIndex: number;
|
|
1218
|
-
} | null;
|
|
1219
|
-
|
|
1220
|
-
export declare function parseHeading(state: ParserState): void;
|
|
1221
|
-
|
|
1222
|
-
/**
|
|
1223
|
-
* Parse an HTML `<table>` element into the same TableNode AST
|
|
1224
|
-
* that the markdown `| ... |` table parser produces.
|
|
1225
|
-
*
|
|
1226
|
-
* Handles `<thead>`, `<tbody>`, `<tr>`, `<th>`, `<td>`, and common
|
|
1227
|
-
* inline HTML elements inside cells (`<strong>`, `<em>`, `<mark>`,
|
|
1228
|
-
* `<code>`, `<a>`).
|
|
1229
|
-
*/
|
|
1230
|
-
export declare function parseHtmlTable(state: ParserState, attrs: Record<string, string>): void;
|
|
1231
|
-
|
|
1232
|
-
export declare function parseHtmlTag(state: ParserState): void;
|
|
1233
|
-
|
|
1234
|
-
export declare function parseHtmlTagInline(text: string, startIndex: number): {
|
|
1235
|
-
node: BreakNode | SpanNode;
|
|
1236
|
-
endIndex: number;
|
|
1237
|
-
} | null;
|
|
1238
|
-
|
|
1239
|
-
export declare function parseImage(text: string, startIndex: number): {
|
|
1240
|
-
node: ImageNode;
|
|
1241
|
-
endIndex: number;
|
|
1242
|
-
} | null;
|
|
1243
|
-
|
|
1244
|
-
export declare function parseInlineCode(text: string, startIndex: number): {
|
|
1245
|
-
node: InlineCodeNode;
|
|
1246
|
-
endIndex: number;
|
|
1247
|
-
} | null;
|
|
1248
|
-
|
|
1249
|
-
/**
|
|
1250
|
-
* Parse inline markdown content
|
|
1251
|
-
*/
|
|
1252
|
-
export declare function parseInlines(text: string): InlineNode[];
|
|
1253
|
-
|
|
1254
|
-
export declare function parseLink(text: string, startIndex: number): {
|
|
1255
|
-
node: LinkNode;
|
|
1256
|
-
endIndex: number;
|
|
1257
|
-
} | null;
|
|
1258
|
-
|
|
1259
|
-
export declare function parseList(state: ParserState): void;
|
|
1260
|
-
|
|
1261
1189
|
/**
|
|
1262
1190
|
* Parse markdown string to AST
|
|
1263
1191
|
*/
|
|
1264
1192
|
export declare function parseMarkdown(markdown: string): Root;
|
|
1265
1193
|
|
|
1266
|
-
export declare function parseParagraph(state: ParserState): void;
|
|
1267
|
-
|
|
1268
1194
|
export declare interface ParserState {
|
|
1269
1195
|
lines: string[];
|
|
1270
1196
|
currentIndex: number;
|
|
@@ -1273,35 +1199,6 @@ export declare interface ParserState {
|
|
|
1273
1199
|
currentContainer: BlockNode[];
|
|
1274
1200
|
}
|
|
1275
1201
|
|
|
1276
|
-
export declare function parseStrong(text: string, startIndex: number): {
|
|
1277
|
-
node: StrongNode;
|
|
1278
|
-
endIndex: number;
|
|
1279
|
-
} | null;
|
|
1280
|
-
|
|
1281
|
-
export declare function parseSummaryTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1282
|
-
|
|
1283
|
-
export declare function parseTable(state: ParserState): void;
|
|
1284
|
-
|
|
1285
|
-
export declare function parseTableAlignment(line: string): Array<"left" | "right" | "center" | null>;
|
|
1286
|
-
|
|
1287
|
-
/**
|
|
1288
|
-
* Parse a table row into cells
|
|
1289
|
-
* Note: Escaped pipes (\|) are not currently supported - they will be treated as cell separators
|
|
1290
|
-
* @param line - The table row line
|
|
1291
|
-
* @param isHeader - Whether this is a header row
|
|
1292
|
-
* @returns Array of table cell nodes
|
|
1293
|
-
*/
|
|
1294
|
-
export declare function parseTableRow(line: string, isHeader?: boolean): TableCellNode[];
|
|
1295
|
-
|
|
1296
|
-
export declare function parseTabsTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1297
|
-
|
|
1298
|
-
export declare function parseText(text: string, startIndex: number): {
|
|
1299
|
-
node: TextNode;
|
|
1300
|
-
endIndex: number;
|
|
1301
|
-
};
|
|
1302
|
-
|
|
1303
|
-
export declare function parseThematicBreak(state: ParserState): void;
|
|
1304
|
-
|
|
1305
1202
|
export declare const picto2106: string;
|
|
1306
1203
|
|
|
1307
1204
|
export declare const picto360DegreeView: string;
|
|
@@ -1758,60 +1655,37 @@ export declare function processHighlightRegions(code: string): {
|
|
|
1758
1655
|
processedCode: string;
|
|
1759
1656
|
};
|
|
1760
1657
|
|
|
1761
|
-
/**
|
|
1762
|
-
* Validate and process code attributes
|
|
1763
|
-
*/
|
|
1764
|
-
export declare function pushCode(attrs: Record<string, string>, value: string, lang?: string): CodeNode;
|
|
1765
|
-
|
|
1766
|
-
/**
|
|
1767
|
-
* Validate and process details attributes
|
|
1768
|
-
*/
|
|
1769
|
-
export declare function pushDetails(attrs: Record<string, string>): DetailsNode;
|
|
1770
|
-
|
|
1771
|
-
export declare function pushDiv(attrs: Record<string, string>): DivNode;
|
|
1772
|
-
|
|
1773
|
-
/**
|
|
1774
|
-
* Validate and process image attributes
|
|
1775
|
-
*/
|
|
1776
|
-
export declare function pushImage(attrs: Record<string, string>): ImageNode;
|
|
1777
|
-
|
|
1778
|
-
/**
|
|
1779
|
-
* Validate and process summary attributes
|
|
1780
|
-
*/
|
|
1781
|
-
export declare function pushSummary(attrs: Record<string, string>): SummaryNode;
|
|
1782
|
-
|
|
1783
1658
|
export declare function RailroadDiagram({ ast, ...props }: RailroadDiagramProps): ReactNode;
|
|
1784
1659
|
|
|
1785
|
-
export declare interface RailroadDiagramNode {
|
|
1786
|
-
type: "railroadDiagram";
|
|
1787
|
-
ast?: DiagramNode;
|
|
1788
|
-
className?: string;
|
|
1789
|
-
id?: string;
|
|
1790
|
-
style?: string;
|
|
1791
|
-
}
|
|
1792
|
-
|
|
1793
1660
|
export declare interface RailroadDiagramProps extends BoxProps {
|
|
1794
1661
|
ast?: DiagramNode;
|
|
1795
1662
|
}
|
|
1796
1663
|
|
|
1797
1664
|
export declare type RailroadNode = DiagramNode | SequenceNode | TerminalNode | NonTerminalNode | OptionalNode | ChoiceNode | OneOrMoreNode | ZeroOrMoreNode | CommentNode;
|
|
1798
1665
|
|
|
1666
|
+
export declare function registerBlockOptions(blockType: string, component: BlockOptionsComponent): void;
|
|
1667
|
+
|
|
1668
|
+
export declare type RendererFunction<T extends AnyNode["type"]> = NodeOfType<T> extends {
|
|
1669
|
+
children: unknown[];
|
|
1670
|
+
} ? (props: {
|
|
1671
|
+
node: NodeOfType<T>;
|
|
1672
|
+
children: ReactNode;
|
|
1673
|
+
}) => ReactNode : (props: {
|
|
1674
|
+
node: NodeOfType<T>;
|
|
1675
|
+
}) => ReactNode;
|
|
1676
|
+
|
|
1799
1677
|
/**
|
|
1800
|
-
*
|
|
1801
|
-
* Returns tag name and end index
|
|
1678
|
+
* Maps each AST node type to its renderer function.
|
|
1802
1679
|
*/
|
|
1803
|
-
export declare
|
|
1804
|
-
|
|
1805
|
-
endIndex: number;
|
|
1680
|
+
export declare type RendererMap = {
|
|
1681
|
+
[T in AnyNode["type"]]: RendererFunction<T>;
|
|
1806
1682
|
};
|
|
1807
1683
|
|
|
1808
|
-
export declare function registerBlockOptions(blockType: string, component: BlockOptionsComponent): void;
|
|
1809
|
-
|
|
1810
1684
|
/**
|
|
1811
1685
|
* Render parsed markdown AST to React elements
|
|
1812
1686
|
* Direct AST-to-React conversion with component mapping
|
|
1813
1687
|
*/
|
|
1814
|
-
export declare function RenderMarkdown({ ast, components,
|
|
1688
|
+
export declare function RenderMarkdown({ ast, renderers, rendererProps, components, scope, ...props }: RenderMarkdownProps): React_2.ReactElement | null;
|
|
1815
1689
|
|
|
1816
1690
|
export declare interface RenderMarkdownProps extends StackProps {
|
|
1817
1691
|
/**
|
|
@@ -1819,10 +1693,25 @@ export declare interface RenderMarkdownProps extends StackProps {
|
|
|
1819
1693
|
*/
|
|
1820
1694
|
ast: Root;
|
|
1821
1695
|
/**
|
|
1822
|
-
*
|
|
1696
|
+
* Override how built-in markdown elements are rendered.
|
|
1697
|
+
* Keys are AST node types (`"heading"`, `"code"`, `"table"`, etc.).
|
|
1698
|
+
* Each renderer receives the typed AST node and its children.
|
|
1823
1699
|
*/
|
|
1824
|
-
|
|
1825
|
-
|
|
1700
|
+
renderers?: MarkdownRenderers;
|
|
1701
|
+
/**
|
|
1702
|
+
* Extra props forwarded to specific built-in renderers (e.g. code block options).
|
|
1703
|
+
*/
|
|
1704
|
+
rendererProps?: MarkdownRendererProps;
|
|
1705
|
+
/**
|
|
1706
|
+
* React components available for use as `<Component />` tags in the markdown content.
|
|
1707
|
+
* Keys should match PascalCase tag names (e.g. `{ StatusCard, Alert }`).
|
|
1708
|
+
*/
|
|
1709
|
+
components?: MarkdownComponents;
|
|
1710
|
+
/**
|
|
1711
|
+
* Variable context for evaluating `{expression}` values in JSX attributes
|
|
1712
|
+
* and inline expressions (e.g. `{ userName: "Alice", count: 42 }`).
|
|
1713
|
+
*/
|
|
1714
|
+
scope?: Record<string, unknown>;
|
|
1826
1715
|
}
|
|
1827
1716
|
|
|
1828
1717
|
export declare interface ResponsiveTabItem {
|
|
@@ -1867,15 +1756,6 @@ export declare function setEditorText(editor: EditorView, text: string): void;
|
|
|
1867
1756
|
|
|
1868
1757
|
export declare function Since({ v, prefix, ...props }: SinceProps): ReactNode;
|
|
1869
1758
|
|
|
1870
|
-
export declare interface SinceNode {
|
|
1871
|
-
type: "since";
|
|
1872
|
-
v: string;
|
|
1873
|
-
prefix?: string;
|
|
1874
|
-
className?: string;
|
|
1875
|
-
id?: string;
|
|
1876
|
-
style?: string;
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
1759
|
export declare interface SinceProps extends Omit<BadgeProps, "children"> {
|
|
1880
1760
|
v: string;
|
|
1881
1761
|
prefix?: string;
|
|
@@ -1898,24 +1778,18 @@ export declare interface SortOptions<T = DefaultSort> {
|
|
|
1898
1778
|
|
|
1899
1779
|
export declare const Spacer: FC<BoxProps>;
|
|
1900
1780
|
|
|
1901
|
-
export declare interface SpanNode {
|
|
1781
|
+
export declare interface SpanNode extends CommonAttrs {
|
|
1902
1782
|
type: "span";
|
|
1903
1783
|
children: InlineNode[];
|
|
1904
|
-
className?: string;
|
|
1905
|
-
id?: string;
|
|
1906
|
-
style?: string;
|
|
1907
1784
|
}
|
|
1908
1785
|
|
|
1909
1786
|
export declare type StateFields = {
|
|
1910
1787
|
[prop: string]: StateField<any>;
|
|
1911
1788
|
};
|
|
1912
1789
|
|
|
1913
|
-
export declare interface StrongNode {
|
|
1790
|
+
export declare interface StrongNode extends CommonAttrs {
|
|
1914
1791
|
type: "strong";
|
|
1915
1792
|
children: InlineNode[];
|
|
1916
|
-
className?: string;
|
|
1917
|
-
id?: string;
|
|
1918
|
-
style?: string;
|
|
1919
1793
|
}
|
|
1920
1794
|
|
|
1921
1795
|
/**
|
|
@@ -1923,12 +1797,9 @@ export declare interface StrongNode {
|
|
|
1923
1797
|
*/
|
|
1924
1798
|
export declare const suggestCompletions: Command;
|
|
1925
1799
|
|
|
1926
|
-
export declare interface SummaryNode {
|
|
1800
|
+
export declare interface SummaryNode extends CommonAttrs {
|
|
1927
1801
|
type: "summary";
|
|
1928
1802
|
children: InlineNode[];
|
|
1929
|
-
className?: string;
|
|
1930
|
-
id?: string;
|
|
1931
|
-
style?: string;
|
|
1932
1803
|
}
|
|
1933
1804
|
|
|
1934
1805
|
export declare interface SummaryProps extends Omit<BoxProps, "component" | "children"> {
|
|
@@ -1953,23 +1824,6 @@ export declare interface SurrealCodeBlockProps {
|
|
|
1953
1824
|
|
|
1954
1825
|
export declare function SurrealistMini({ config, frameRef, ...props }: SurrealistMiniProps): ReactNode;
|
|
1955
1826
|
|
|
1956
|
-
export declare interface SurrealistMiniNode {
|
|
1957
|
-
type: "surrealistMini";
|
|
1958
|
-
url?: string;
|
|
1959
|
-
dataset?: string;
|
|
1960
|
-
setup?: string;
|
|
1961
|
-
query?: string;
|
|
1962
|
-
variables?: string;
|
|
1963
|
-
theme?: string;
|
|
1964
|
-
orientation?: string;
|
|
1965
|
-
appearance?: string;
|
|
1966
|
-
transparent?: string;
|
|
1967
|
-
autorun?: string;
|
|
1968
|
-
className?: string;
|
|
1969
|
-
id?: string;
|
|
1970
|
-
style?: string;
|
|
1971
|
-
}
|
|
1972
|
-
|
|
1973
1827
|
export declare interface SurrealistMiniProps extends BoxProps {
|
|
1974
1828
|
config?: MiniConfig;
|
|
1975
1829
|
frameRef?: RefObject<HTMLIFrameElement | null>;
|
|
@@ -1999,51 +1853,40 @@ export declare interface TabItem {
|
|
|
1999
1853
|
content: ReactNode;
|
|
2000
1854
|
}
|
|
2001
1855
|
|
|
2002
|
-
|
|
1856
|
+
declare function TabItem_2({ children, className, id, style }: Record<string, unknown>): ReactNode;
|
|
1857
|
+
|
|
1858
|
+
export declare interface TabItemNode extends CommonAttrs {
|
|
2003
1859
|
type: "tabItem";
|
|
2004
1860
|
label: string;
|
|
2005
1861
|
icon?: string;
|
|
2006
1862
|
children: BlockNode[];
|
|
2007
|
-
className?: string;
|
|
2008
|
-
id?: string;
|
|
2009
|
-
style?: string;
|
|
2010
1863
|
}
|
|
2011
1864
|
|
|
2012
|
-
export declare interface TableCellNode {
|
|
1865
|
+
export declare interface TableCellNode extends CommonAttrs {
|
|
2013
1866
|
type: "tableCell";
|
|
2014
1867
|
children: AnyNode[];
|
|
2015
|
-
className?: string;
|
|
2016
|
-
id?: string;
|
|
2017
|
-
style?: string;
|
|
2018
1868
|
isHeader: boolean;
|
|
2019
1869
|
}
|
|
2020
1870
|
|
|
2021
|
-
export declare interface TableNode {
|
|
1871
|
+
export declare interface TableNode extends CommonAttrs {
|
|
2022
1872
|
type: "table";
|
|
2023
1873
|
align?: Array<"left" | "right" | "center" | null>;
|
|
2024
1874
|
children: TableRowNode[];
|
|
2025
|
-
className?: string;
|
|
2026
|
-
id?: string;
|
|
2027
|
-
style?: string;
|
|
2028
1875
|
}
|
|
2029
1876
|
|
|
2030
|
-
export declare interface TableRowNode {
|
|
1877
|
+
export declare interface TableRowNode extends CommonAttrs {
|
|
2031
1878
|
type: "tableRow";
|
|
2032
1879
|
children: TableCellNode[];
|
|
2033
|
-
className?: string;
|
|
2034
|
-
id?: string;
|
|
2035
|
-
style?: string;
|
|
2036
1880
|
}
|
|
2037
1881
|
|
|
2038
1882
|
export declare function Tabs({ items, syncKey, ...props }: TabsProps): ReactNode;
|
|
2039
1883
|
|
|
2040
|
-
|
|
1884
|
+
declare function Tabs_2({ syncKey, children, className, id, style, }: Record<string, unknown>): ReactNode;
|
|
1885
|
+
|
|
1886
|
+
export declare interface TabsNode extends CommonAttrs {
|
|
2041
1887
|
type: "tabs";
|
|
2042
1888
|
syncKey?: string;
|
|
2043
1889
|
children: TabItemNode[];
|
|
2044
|
-
className?: string;
|
|
2045
|
-
id?: string;
|
|
2046
|
-
style?: string;
|
|
2047
1890
|
}
|
|
2048
1891
|
|
|
2049
1892
|
export declare interface TabsProps extends Omit<TabsProps_2, "children" | "value" | "onChange"> {
|
|
@@ -2056,19 +1899,13 @@ declare interface TerminalNode {
|
|
|
2056
1899
|
text: string;
|
|
2057
1900
|
}
|
|
2058
1901
|
|
|
2059
|
-
export declare interface TextNode {
|
|
1902
|
+
export declare interface TextNode extends CommonAttrs {
|
|
2060
1903
|
type: "text";
|
|
2061
1904
|
value: string;
|
|
2062
|
-
className?: string;
|
|
2063
|
-
id?: string;
|
|
2064
|
-
style?: string;
|
|
2065
1905
|
}
|
|
2066
1906
|
|
|
2067
|
-
export declare interface ThematicBreakNode {
|
|
1907
|
+
export declare interface ThematicBreakNode extends CommonAttrs {
|
|
2068
1908
|
type: "thematicBreak";
|
|
2069
|
-
className?: string;
|
|
2070
|
-
id?: string;
|
|
2071
|
-
style?: string;
|
|
2072
1909
|
}
|
|
2073
1910
|
|
|
2074
1911
|
export declare type ThemeConfig = {
|
|
@@ -2143,14 +1980,6 @@ export declare const VARIANT_OPTIONS: OptionItem[];
|
|
|
2143
1980
|
|
|
2144
1981
|
export declare function Version({ version, ...props }: VersionProps): ReactNode;
|
|
2145
1982
|
|
|
2146
|
-
export declare interface VersionNode {
|
|
2147
|
-
type: "version";
|
|
2148
|
-
version?: string;
|
|
2149
|
-
className?: string;
|
|
2150
|
-
id?: string;
|
|
2151
|
-
style?: string;
|
|
2152
|
-
}
|
|
2153
|
-
|
|
2154
1983
|
export declare interface VersionProps extends CodeProps {
|
|
2155
1984
|
version: string;
|
|
2156
1985
|
}
|