@surrealdb/ui 1.0.76 → 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 +184 -321
- package/dist/ui.js +11170 -8044
- package/dist/ui.js.map +1 -1
- package/dist/yoopta.css +1 -4
- package/package.json +5 -4
package/dist/ui.d.ts
CHANGED
|
@@ -30,10 +30,13 @@ import { PaperProps } from '@mantine/core';
|
|
|
30
30
|
import type * as React_2 from 'react';
|
|
31
31
|
import { ReactNode } from 'react';
|
|
32
32
|
import { RefObject } from 'react';
|
|
33
|
+
import { SelectProps } from '@mantine/core';
|
|
33
34
|
import { SlateElement } from '@yoopta/editor';
|
|
34
35
|
import { StackProps } from '@mantine/core';
|
|
35
36
|
import { StateField } from '@codemirror/state';
|
|
37
|
+
import { TabsListProps } from '@mantine/core';
|
|
36
38
|
import { TabsProps as TabsProps_2 } from '@mantine/core';
|
|
39
|
+
import { TabsTabProps } from '@mantine/core';
|
|
37
40
|
import { VideoHTMLAttributes } from 'react';
|
|
38
41
|
import { YooEditor } from '@yoopta/editor';
|
|
39
42
|
import { YooptaContentValue } from '@yoopta/editor';
|
|
@@ -65,7 +68,7 @@ declare type AnyFn = (...rest: any[]) => any;
|
|
|
65
68
|
|
|
66
69
|
declare type AnyLanguage = Language | (string & {});
|
|
67
70
|
|
|
68
|
-
export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNode | TableRowNode | TableCellNode
|
|
71
|
+
export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNode | TableRowNode | TableCellNode;
|
|
69
72
|
|
|
70
73
|
/**
|
|
71
74
|
* Apply automatic folding to objects/arrays at the specified depth level
|
|
@@ -74,6 +77,8 @@ export declare type AnyNode = BlockNode | InlineNode | SummaryNode | ListItemNod
|
|
|
74
77
|
*/
|
|
75
78
|
export declare function applyAutoFolding(view: EditorView, autoCollapseDepth: number): void;
|
|
76
79
|
|
|
80
|
+
export declare type AttributeValue = string | JsxExpression | true;
|
|
81
|
+
|
|
77
82
|
export declare const BlockEditor: FC<BlockEditorProps>;
|
|
78
83
|
|
|
79
84
|
export declare interface BlockEditorProps {
|
|
@@ -86,22 +91,28 @@ export declare interface BlockEditorProps {
|
|
|
86
91
|
children?: ReactNode;
|
|
87
92
|
}
|
|
88
93
|
|
|
89
|
-
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;
|
|
90
95
|
|
|
91
96
|
export declare type BlockOptionsComponent = FC<{
|
|
92
97
|
blockId: string;
|
|
93
98
|
}>;
|
|
94
99
|
|
|
100
|
+
export declare const BlockOptionsContext: React.Context<BlockOptionsContextValue>;
|
|
101
|
+
|
|
102
|
+
export declare interface BlockOptionsContextValue {
|
|
103
|
+
headingLinks?: boolean;
|
|
104
|
+
checkable?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export declare const BlockOptionsProvider: React.Provider<BlockOptionsContextValue>;
|
|
108
|
+
|
|
95
109
|
declare type BlockquoteElementMap = {
|
|
96
110
|
blockquote: BlockquoteElement;
|
|
97
111
|
};
|
|
98
112
|
|
|
99
|
-
export declare interface BlockquoteNode {
|
|
113
|
+
export declare interface BlockquoteNode extends CommonAttrs {
|
|
100
114
|
type: "blockquote";
|
|
101
115
|
children: BlockNode[];
|
|
102
|
-
className?: string;
|
|
103
|
-
id?: string;
|
|
104
|
-
style?: string;
|
|
105
116
|
noteKind?: NoteKind;
|
|
106
117
|
noteTitle?: string;
|
|
107
118
|
}
|
|
@@ -112,7 +123,7 @@ export declare interface BlockRendererProps {
|
|
|
112
123
|
value: YooptaContentValue;
|
|
113
124
|
marks?: YooptaMark<any>[];
|
|
114
125
|
plugins?: YooptaPlugin<Record<string, SlateElement>, Record<string, unknown>>[];
|
|
115
|
-
|
|
126
|
+
blockOptions?: BlockOptionsContextValue;
|
|
116
127
|
className?: string;
|
|
117
128
|
}
|
|
118
129
|
|
|
@@ -312,23 +323,12 @@ export declare const brandYouTube: string;
|
|
|
312
323
|
|
|
313
324
|
export declare const BreadcrumbButton: FC<ButtonProps & ElementProps<"button">>;
|
|
314
325
|
|
|
315
|
-
export declare interface BreakNode {
|
|
326
|
+
export declare interface BreakNode extends CommonAttrs {
|
|
316
327
|
type: "break";
|
|
317
|
-
className?: string;
|
|
318
|
-
id?: string;
|
|
319
|
-
style?: string;
|
|
320
328
|
}
|
|
321
329
|
|
|
322
330
|
export declare function Check({ children, ...props }: CheckProps): ReactNode;
|
|
323
331
|
|
|
324
|
-
export declare interface CheckNode {
|
|
325
|
-
type: "check";
|
|
326
|
-
children: InlineNode[];
|
|
327
|
-
className?: string;
|
|
328
|
-
id?: string;
|
|
329
|
-
style?: string;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
332
|
export declare interface CheckProps extends GroupProps {
|
|
333
333
|
children?: ReactNode;
|
|
334
334
|
}
|
|
@@ -365,15 +365,12 @@ export declare interface CodeEditorProps extends BoxProps {
|
|
|
365
365
|
ref?: RefObject<EditorView>;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
export declare interface CodeNode {
|
|
368
|
+
export declare interface CodeNode extends CommonAttrs {
|
|
369
369
|
type: "code";
|
|
370
370
|
value: string;
|
|
371
371
|
lang?: string;
|
|
372
372
|
title?: string;
|
|
373
373
|
runnable?: string;
|
|
374
|
-
className?: string;
|
|
375
|
-
id?: string;
|
|
376
|
-
style?: string;
|
|
377
374
|
}
|
|
378
375
|
|
|
379
376
|
export declare const COLOR_OPTIONS: OptionItem[];
|
|
@@ -387,24 +384,17 @@ declare interface CommentNode {
|
|
|
387
384
|
text: string;
|
|
388
385
|
}
|
|
389
386
|
|
|
387
|
+
export declare interface CommonAttrs {
|
|
388
|
+
className?: AttributeValue;
|
|
389
|
+
id?: AttributeValue;
|
|
390
|
+
style?: AttributeValue;
|
|
391
|
+
}
|
|
392
|
+
|
|
390
393
|
/**
|
|
391
394
|
* Common extensions applied to all CodeMirror editors
|
|
392
395
|
*/
|
|
393
396
|
export declare const commonExtensions: () => Extension;
|
|
394
397
|
|
|
395
|
-
declare type ComponentFunction<T extends AnyNode["type"]> = NodeOfType<T> extends {
|
|
396
|
-
children: unknown[];
|
|
397
|
-
} ? (props: {
|
|
398
|
-
node: NodeOfType<T>;
|
|
399
|
-
children: ReactNode;
|
|
400
|
-
}) => ReactNode : (props: {
|
|
401
|
-
node: NodeOfType<T>;
|
|
402
|
-
}) => ReactNode;
|
|
403
|
-
|
|
404
|
-
declare type ComponentMap = {
|
|
405
|
-
[T in AnyNode["type"]]: ComponentFunction<T>;
|
|
406
|
-
};
|
|
407
|
-
|
|
408
398
|
/**
|
|
409
399
|
* Create a style highlighter for the given color scheme and syntax theme
|
|
410
400
|
*/
|
|
@@ -461,12 +451,9 @@ export declare const Details: FC<DetailsProps> & {
|
|
|
461
451
|
Summary: FC<SummaryProps>;
|
|
462
452
|
};
|
|
463
453
|
|
|
464
|
-
export declare interface DetailsNode {
|
|
454
|
+
export declare interface DetailsNode extends CommonAttrs {
|
|
465
455
|
type: "details";
|
|
466
456
|
children: Array<SummaryNode | BlockNode>;
|
|
467
|
-
className?: string;
|
|
468
|
-
id?: string;
|
|
469
|
-
style?: string;
|
|
470
457
|
}
|
|
471
458
|
|
|
472
459
|
export declare interface DetailsProps extends Omit<BoxProps, "component" | "children"> {
|
|
@@ -479,12 +466,9 @@ export declare interface DiagramNode {
|
|
|
479
466
|
children: RailroadNode[];
|
|
480
467
|
}
|
|
481
468
|
|
|
482
|
-
export declare interface DivNode {
|
|
469
|
+
export declare interface DivNode extends CommonAttrs {
|
|
483
470
|
type: "div";
|
|
484
471
|
children: BlockNode[];
|
|
485
|
-
className?: string;
|
|
486
|
-
id?: string;
|
|
487
|
-
style?: string;
|
|
488
472
|
}
|
|
489
473
|
|
|
490
474
|
export declare interface EditorController {
|
|
@@ -521,24 +505,11 @@ export declare type EditorStateSnapshot = Record<string, unknown>;
|
|
|
521
505
|
*/
|
|
522
506
|
export declare function editorTheme(theme: ThemeConfig_2, colorScheme: MantineColorScheme): Extension;
|
|
523
507
|
|
|
524
|
-
export declare interface EmphasisNode {
|
|
508
|
+
export declare interface EmphasisNode extends CommonAttrs {
|
|
525
509
|
type: "emphasis";
|
|
526
510
|
children: InlineNode[];
|
|
527
|
-
className?: string;
|
|
528
|
-
id?: string;
|
|
529
|
-
style?: string;
|
|
530
511
|
}
|
|
531
512
|
|
|
532
|
-
/**
|
|
533
|
-
* Enter a node (push to stack and set container)
|
|
534
|
-
*/
|
|
535
|
-
export declare function enterNode(state: ParserState, nodeType: string, node: BlockNode | SummaryNode): void;
|
|
536
|
-
|
|
537
|
-
/**
|
|
538
|
-
* Exit a node (pop from stack and validate)
|
|
539
|
-
*/
|
|
540
|
-
export declare function exitNode(state: ParserState, expectedType: string): void;
|
|
541
|
-
|
|
542
513
|
export declare interface ExtractedCode {
|
|
543
514
|
test?: string;
|
|
544
515
|
code: string;
|
|
@@ -565,15 +536,10 @@ export declare function getBrandsafeImageURL(imageId: string | undefined, width?
|
|
|
565
536
|
|
|
566
537
|
export declare function getBrandsafeVideoURL(videoId: string | undefined, format?: "mp4" | "webm" | "mov", controls?: boolean): string | undefined;
|
|
567
538
|
|
|
568
|
-
export declare
|
|
569
|
-
|
|
570
|
-
export declare interface HeadingNode {
|
|
539
|
+
export declare interface HeadingNode extends CommonAttrs {
|
|
571
540
|
type: "heading";
|
|
572
541
|
depth: 1 | 2 | 3 | 4 | 5 | 6;
|
|
573
542
|
children: InlineNode[];
|
|
574
|
-
className?: string;
|
|
575
|
-
id?: string;
|
|
576
|
-
style?: string;
|
|
577
543
|
}
|
|
578
544
|
|
|
579
545
|
export declare const Highlighting: FC<HighlightingProps>;
|
|
@@ -850,7 +816,7 @@ export declare interface IconProps extends BoxProps, Omit<HTMLAttributes<SVGElem
|
|
|
850
816
|
color?: MantineColor;
|
|
851
817
|
spin?: boolean;
|
|
852
818
|
path: string;
|
|
853
|
-
flip?: "horizontal" | "vertical";
|
|
819
|
+
flip?: "horizontal" | "vertical" | "both";
|
|
854
820
|
}
|
|
855
821
|
|
|
856
822
|
export declare const iconQuery: string;
|
|
@@ -935,83 +901,78 @@ export declare const iconWrench: string;
|
|
|
935
901
|
|
|
936
902
|
export declare const iconXml: string;
|
|
937
903
|
|
|
938
|
-
export declare interface ImageNode {
|
|
904
|
+
export declare interface ImageNode extends CommonAttrs {
|
|
939
905
|
type: "image";
|
|
940
906
|
src: string;
|
|
941
907
|
darkSrc?: string;
|
|
942
908
|
alt: string;
|
|
943
909
|
title?: string;
|
|
944
|
-
className?: string;
|
|
945
|
-
id?: string;
|
|
946
|
-
style?: string;
|
|
947
910
|
}
|
|
948
911
|
|
|
949
|
-
export declare interface InlineCodeNode {
|
|
912
|
+
export declare interface InlineCodeNode extends CommonAttrs {
|
|
950
913
|
type: "inlineCode";
|
|
951
914
|
value: string;
|
|
952
|
-
className?: string;
|
|
953
|
-
id?: string;
|
|
954
|
-
style?: string;
|
|
955
915
|
}
|
|
956
916
|
|
|
957
|
-
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;
|
|
958
918
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
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
|
+
}
|
|
964
937
|
|
|
965
938
|
/**
|
|
966
|
-
*
|
|
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).
|
|
967
945
|
*/
|
|
968
|
-
export declare
|
|
946
|
+
export declare type JsxMode = "render" | "throw" | "graceful" | "omit";
|
|
969
947
|
|
|
970
948
|
export declare function Label({ label, ...props }: LabelProps): ReactNode;
|
|
971
949
|
|
|
972
|
-
export declare interface LabelNode {
|
|
973
|
-
type: "label";
|
|
974
|
-
label: string;
|
|
975
|
-
className?: string;
|
|
976
|
-
id?: string;
|
|
977
|
-
style?: string;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
950
|
export declare interface LabelProps extends Omit<BadgeProps, "children"> {
|
|
981
951
|
label: string;
|
|
982
952
|
}
|
|
983
953
|
|
|
984
954
|
declare type Language = "csharp" | "rust" | "javascript" | "typescript" | "surrealql" | "json" | "yaml" | "java" | "go" | "python" | "html" | "cli" | "php" | "syntax";
|
|
985
955
|
|
|
986
|
-
export declare interface LinkNode {
|
|
956
|
+
export declare interface LinkNode extends CommonAttrs {
|
|
987
957
|
type: "link";
|
|
988
958
|
url: string;
|
|
989
959
|
title?: string;
|
|
990
960
|
children: InlineNode[];
|
|
991
|
-
className?: string;
|
|
992
|
-
id?: string;
|
|
993
|
-
style?: string;
|
|
994
961
|
}
|
|
995
962
|
|
|
996
|
-
export declare interface ListItemNode {
|
|
963
|
+
export declare interface ListItemNode extends CommonAttrs {
|
|
997
964
|
type: "listItem";
|
|
998
965
|
checked?: boolean;
|
|
999
966
|
spread?: boolean;
|
|
1000
967
|
children: AnyNode[];
|
|
1001
|
-
className?: string;
|
|
1002
|
-
id?: string;
|
|
1003
|
-
style?: string;
|
|
1004
968
|
}
|
|
1005
969
|
|
|
1006
|
-
export declare interface ListNode {
|
|
970
|
+
export declare interface ListNode extends CommonAttrs {
|
|
1007
971
|
type: "list";
|
|
1008
972
|
variant?: "ordered" | "unordered" | "checklist";
|
|
1009
973
|
start?: number;
|
|
1010
974
|
spread?: boolean;
|
|
1011
975
|
children: ListItemNode[];
|
|
1012
|
-
className?: string;
|
|
1013
|
-
id?: string;
|
|
1014
|
-
style?: string;
|
|
1015
976
|
}
|
|
1016
977
|
|
|
1017
978
|
/**
|
|
@@ -1067,11 +1028,9 @@ export declare interface MantineTableProps {
|
|
|
1067
1028
|
* Main Markdown component that parses markdown and renders it
|
|
1068
1029
|
* Applies stylesheet and spacing
|
|
1069
1030
|
*/
|
|
1070
|
-
export declare function Markdown({ content, components,
|
|
1031
|
+
export declare function Markdown({ content, renderers, rendererProps, components, scope, }: MarkdownProps): React_2.ReactElement;
|
|
1071
1032
|
|
|
1072
|
-
declare
|
|
1073
|
-
code?: Partial<CodeBlockProps>;
|
|
1074
|
-
}
|
|
1033
|
+
declare type MarkdownComponents = Record<string, React.ComponentType<any>>;
|
|
1075
1034
|
|
|
1076
1035
|
export declare interface MarkdownProps {
|
|
1077
1036
|
/**
|
|
@@ -1079,10 +1038,50 @@ export declare interface MarkdownProps {
|
|
|
1079
1038
|
*/
|
|
1080
1039
|
content: string;
|
|
1081
1040
|
/**
|
|
1082
|
-
*
|
|
1041
|
+
* Override how built-in markdown elements are rendered.
|
|
1042
|
+
* Keys are AST node types (`"heading"`, `"code"`, `"table"`, etc.).
|
|
1083
1043
|
*/
|
|
1084
|
-
|
|
1085
|
-
|
|
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"
|
|
1070
|
+
*/
|
|
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;
|
|
1086
1085
|
}
|
|
1087
1086
|
|
|
1088
1087
|
export declare interface MiniConfig {
|
|
@@ -1138,6 +1137,11 @@ declare type NodeOfType<T extends AnyNode["type"]> = Extract<AnyNode, {
|
|
|
1138
1137
|
type: T;
|
|
1139
1138
|
}>;
|
|
1140
1139
|
|
|
1140
|
+
export declare interface NodePosition {
|
|
1141
|
+
start: number;
|
|
1142
|
+
end: number;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1141
1145
|
export declare const NON_TEXT_BLOCKS: Set<string>;
|
|
1142
1146
|
|
|
1143
1147
|
declare interface NonTerminalNode {
|
|
@@ -1177,84 +1181,16 @@ declare type OptionItem = {
|
|
|
1177
1181
|
value: string;
|
|
1178
1182
|
};
|
|
1179
1183
|
|
|
1180
|
-
export declare interface ParagraphNode {
|
|
1184
|
+
export declare interface ParagraphNode extends CommonAttrs {
|
|
1181
1185
|
type: "paragraph";
|
|
1182
1186
|
children: InlineNode[];
|
|
1183
|
-
className?: string;
|
|
1184
|
-
id?: string;
|
|
1185
|
-
style?: string;
|
|
1186
1187
|
}
|
|
1187
1188
|
|
|
1188
|
-
/**
|
|
1189
|
-
* Parse HTML-style attributes from a string
|
|
1190
|
-
* Handles: name="value", name='value', name=value
|
|
1191
|
-
* Properly handles escaped quotes: name="value with \"escaped\" quotes"
|
|
1192
|
-
*/
|
|
1193
|
-
export declare function parseAttributes(attrString: string): Record<string, string>;
|
|
1194
|
-
|
|
1195
|
-
export declare function parseBlockquote(state: ParserState): void;
|
|
1196
|
-
|
|
1197
|
-
export declare function parseCheckTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1198
|
-
|
|
1199
|
-
export declare function parseCodeBlock(state: ParserState): void;
|
|
1200
|
-
|
|
1201
|
-
export declare function parseDetailsTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1202
|
-
|
|
1203
|
-
export declare function parseDivTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1204
|
-
|
|
1205
|
-
export declare function parseEmphasis(text: string, startIndex: number): {
|
|
1206
|
-
node: EmphasisNode;
|
|
1207
|
-
endIndex: number;
|
|
1208
|
-
} | null;
|
|
1209
|
-
|
|
1210
|
-
export declare function parseHeading(state: ParserState): void;
|
|
1211
|
-
|
|
1212
|
-
/**
|
|
1213
|
-
* Parse an HTML `<table>` element into the same TableNode AST
|
|
1214
|
-
* that the markdown `| ... |` table parser produces.
|
|
1215
|
-
*
|
|
1216
|
-
* Handles `<thead>`, `<tbody>`, `<tr>`, `<th>`, `<td>`, and common
|
|
1217
|
-
* inline HTML elements inside cells (`<strong>`, `<em>`, `<mark>`,
|
|
1218
|
-
* `<code>`, `<a>`).
|
|
1219
|
-
*/
|
|
1220
|
-
export declare function parseHtmlTable(state: ParserState, attrs: Record<string, string>): void;
|
|
1221
|
-
|
|
1222
|
-
export declare function parseHtmlTag(state: ParserState): void;
|
|
1223
|
-
|
|
1224
|
-
export declare function parseHtmlTagInline(text: string, startIndex: number): {
|
|
1225
|
-
node: BreakNode | SpanNode;
|
|
1226
|
-
endIndex: number;
|
|
1227
|
-
} | null;
|
|
1228
|
-
|
|
1229
|
-
export declare function parseImage(text: string, startIndex: number): {
|
|
1230
|
-
node: ImageNode;
|
|
1231
|
-
endIndex: number;
|
|
1232
|
-
} | null;
|
|
1233
|
-
|
|
1234
|
-
export declare function parseInlineCode(text: string, startIndex: number): {
|
|
1235
|
-
node: InlineCodeNode;
|
|
1236
|
-
endIndex: number;
|
|
1237
|
-
} | null;
|
|
1238
|
-
|
|
1239
|
-
/**
|
|
1240
|
-
* Parse inline markdown content
|
|
1241
|
-
*/
|
|
1242
|
-
export declare function parseInlines(text: string): InlineNode[];
|
|
1243
|
-
|
|
1244
|
-
export declare function parseLink(text: string, startIndex: number): {
|
|
1245
|
-
node: LinkNode;
|
|
1246
|
-
endIndex: number;
|
|
1247
|
-
} | null;
|
|
1248
|
-
|
|
1249
|
-
export declare function parseList(state: ParserState): void;
|
|
1250
|
-
|
|
1251
1189
|
/**
|
|
1252
1190
|
* Parse markdown string to AST
|
|
1253
1191
|
*/
|
|
1254
1192
|
export declare function parseMarkdown(markdown: string): Root;
|
|
1255
1193
|
|
|
1256
|
-
export declare function parseParagraph(state: ParserState): void;
|
|
1257
|
-
|
|
1258
1194
|
export declare interface ParserState {
|
|
1259
1195
|
lines: string[];
|
|
1260
1196
|
currentIndex: number;
|
|
@@ -1263,35 +1199,6 @@ export declare interface ParserState {
|
|
|
1263
1199
|
currentContainer: BlockNode[];
|
|
1264
1200
|
}
|
|
1265
1201
|
|
|
1266
|
-
export declare function parseStrong(text: string, startIndex: number): {
|
|
1267
|
-
node: StrongNode;
|
|
1268
|
-
endIndex: number;
|
|
1269
|
-
} | null;
|
|
1270
|
-
|
|
1271
|
-
export declare function parseSummaryTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1272
|
-
|
|
1273
|
-
export declare function parseTable(state: ParserState): void;
|
|
1274
|
-
|
|
1275
|
-
export declare function parseTableAlignment(line: string): Array<"left" | "right" | "center" | null>;
|
|
1276
|
-
|
|
1277
|
-
/**
|
|
1278
|
-
* Parse a table row into cells
|
|
1279
|
-
* Note: Escaped pipes (\|) are not currently supported - they will be treated as cell separators
|
|
1280
|
-
* @param line - The table row line
|
|
1281
|
-
* @param isHeader - Whether this is a header row
|
|
1282
|
-
* @returns Array of table cell nodes
|
|
1283
|
-
*/
|
|
1284
|
-
export declare function parseTableRow(line: string, isHeader?: boolean): TableCellNode[];
|
|
1285
|
-
|
|
1286
|
-
export declare function parseTabsTag(state: ParserState, attrs: Record<string, string>): void;
|
|
1287
|
-
|
|
1288
|
-
export declare function parseText(text: string, startIndex: number): {
|
|
1289
|
-
node: TextNode;
|
|
1290
|
-
endIndex: number;
|
|
1291
|
-
};
|
|
1292
|
-
|
|
1293
|
-
export declare function parseThematicBreak(state: ParserState): void;
|
|
1294
|
-
|
|
1295
1202
|
export declare const picto2106: string;
|
|
1296
1203
|
|
|
1297
1204
|
export declare const picto360DegreeView: string;
|
|
@@ -1748,60 +1655,37 @@ export declare function processHighlightRegions(code: string): {
|
|
|
1748
1655
|
processedCode: string;
|
|
1749
1656
|
};
|
|
1750
1657
|
|
|
1751
|
-
/**
|
|
1752
|
-
* Validate and process code attributes
|
|
1753
|
-
*/
|
|
1754
|
-
export declare function pushCode(attrs: Record<string, string>, value: string, lang?: string): CodeNode;
|
|
1755
|
-
|
|
1756
|
-
/**
|
|
1757
|
-
* Validate and process details attributes
|
|
1758
|
-
*/
|
|
1759
|
-
export declare function pushDetails(attrs: Record<string, string>): DetailsNode;
|
|
1760
|
-
|
|
1761
|
-
export declare function pushDiv(attrs: Record<string, string>): DivNode;
|
|
1762
|
-
|
|
1763
|
-
/**
|
|
1764
|
-
* Validate and process image attributes
|
|
1765
|
-
*/
|
|
1766
|
-
export declare function pushImage(attrs: Record<string, string>): ImageNode;
|
|
1767
|
-
|
|
1768
|
-
/**
|
|
1769
|
-
* Validate and process summary attributes
|
|
1770
|
-
*/
|
|
1771
|
-
export declare function pushSummary(attrs: Record<string, string>): SummaryNode;
|
|
1772
|
-
|
|
1773
1658
|
export declare function RailroadDiagram({ ast, ...props }: RailroadDiagramProps): ReactNode;
|
|
1774
1659
|
|
|
1775
|
-
export declare interface RailroadDiagramNode {
|
|
1776
|
-
type: "railroadDiagram";
|
|
1777
|
-
ast?: DiagramNode;
|
|
1778
|
-
className?: string;
|
|
1779
|
-
id?: string;
|
|
1780
|
-
style?: string;
|
|
1781
|
-
}
|
|
1782
|
-
|
|
1783
1660
|
export declare interface RailroadDiagramProps extends BoxProps {
|
|
1784
1661
|
ast?: DiagramNode;
|
|
1785
1662
|
}
|
|
1786
1663
|
|
|
1787
1664
|
export declare type RailroadNode = DiagramNode | SequenceNode | TerminalNode | NonTerminalNode | OptionalNode | ChoiceNode | OneOrMoreNode | ZeroOrMoreNode | CommentNode;
|
|
1788
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
|
+
|
|
1789
1677
|
/**
|
|
1790
|
-
*
|
|
1791
|
-
* Returns tag name and end index
|
|
1678
|
+
* Maps each AST node type to its renderer function.
|
|
1792
1679
|
*/
|
|
1793
|
-
export declare
|
|
1794
|
-
|
|
1795
|
-
endIndex: number;
|
|
1680
|
+
export declare type RendererMap = {
|
|
1681
|
+
[T in AnyNode["type"]]: RendererFunction<T>;
|
|
1796
1682
|
};
|
|
1797
1683
|
|
|
1798
|
-
export declare function registerBlockOptions(blockType: string, component: BlockOptionsComponent): void;
|
|
1799
|
-
|
|
1800
1684
|
/**
|
|
1801
1685
|
* Render parsed markdown AST to React elements
|
|
1802
1686
|
* Direct AST-to-React conversion with component mapping
|
|
1803
1687
|
*/
|
|
1804
|
-
export declare function RenderMarkdown({ ast, components,
|
|
1688
|
+
export declare function RenderMarkdown({ ast, renderers, rendererProps, components, scope, ...props }: RenderMarkdownProps): React_2.ReactElement | null;
|
|
1805
1689
|
|
|
1806
1690
|
export declare interface RenderMarkdownProps extends StackProps {
|
|
1807
1691
|
/**
|
|
@@ -1809,10 +1693,47 @@ export declare interface RenderMarkdownProps extends StackProps {
|
|
|
1809
1693
|
*/
|
|
1810
1694
|
ast: Root;
|
|
1811
1695
|
/**
|
|
1812
|
-
*
|
|
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.
|
|
1699
|
+
*/
|
|
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 }`).
|
|
1813
1713
|
*/
|
|
1814
|
-
|
|
1815
|
-
|
|
1714
|
+
scope?: Record<string, unknown>;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
export declare interface ResponsiveTabItem {
|
|
1718
|
+
value: string;
|
|
1719
|
+
label: ReactNode;
|
|
1720
|
+
selectLabel?: string;
|
|
1721
|
+
tabProps?: Omit<TabsTabProps, "value" | "children">;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
export declare function ResponsiveTabs({ tabs, value, defaultValue, onChange, breakpoint, showSelectWhen, mediaQuery, tabsListProps, tabProps, selectProps, ...tabsProps }: ResponsiveTabsProps): ReactNode;
|
|
1725
|
+
|
|
1726
|
+
export declare interface ResponsiveTabsProps extends Omit<TabsProps_2, "children" | "value" | "defaultValue" | "onChange"> {
|
|
1727
|
+
tabs: ResponsiveTabItem[];
|
|
1728
|
+
value?: string;
|
|
1729
|
+
defaultValue?: string;
|
|
1730
|
+
onChange?: (value: string | null) => void;
|
|
1731
|
+
breakpoint?: number | string;
|
|
1732
|
+
showSelectWhen?: "above" | "below";
|
|
1733
|
+
mediaQuery?: string;
|
|
1734
|
+
tabsListProps?: TabsListProps;
|
|
1735
|
+
tabProps?: Omit<TabsTabProps, "value" | "children">;
|
|
1736
|
+
selectProps?: Omit<SelectProps, "data" | "value" | "defaultValue" | "onChange">;
|
|
1816
1737
|
}
|
|
1817
1738
|
|
|
1818
1739
|
export declare interface Root {
|
|
@@ -1835,15 +1756,6 @@ export declare function setEditorText(editor: EditorView, text: string): void;
|
|
|
1835
1756
|
|
|
1836
1757
|
export declare function Since({ v, prefix, ...props }: SinceProps): ReactNode;
|
|
1837
1758
|
|
|
1838
|
-
export declare interface SinceNode {
|
|
1839
|
-
type: "since";
|
|
1840
|
-
v: string;
|
|
1841
|
-
prefix?: string;
|
|
1842
|
-
className?: string;
|
|
1843
|
-
id?: string;
|
|
1844
|
-
style?: string;
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
1759
|
export declare interface SinceProps extends Omit<BadgeProps, "children"> {
|
|
1848
1760
|
v: string;
|
|
1849
1761
|
prefix?: string;
|
|
@@ -1866,24 +1778,18 @@ export declare interface SortOptions<T = DefaultSort> {
|
|
|
1866
1778
|
|
|
1867
1779
|
export declare const Spacer: FC<BoxProps>;
|
|
1868
1780
|
|
|
1869
|
-
export declare interface SpanNode {
|
|
1781
|
+
export declare interface SpanNode extends CommonAttrs {
|
|
1870
1782
|
type: "span";
|
|
1871
1783
|
children: InlineNode[];
|
|
1872
|
-
className?: string;
|
|
1873
|
-
id?: string;
|
|
1874
|
-
style?: string;
|
|
1875
1784
|
}
|
|
1876
1785
|
|
|
1877
1786
|
export declare type StateFields = {
|
|
1878
1787
|
[prop: string]: StateField<any>;
|
|
1879
1788
|
};
|
|
1880
1789
|
|
|
1881
|
-
export declare interface StrongNode {
|
|
1790
|
+
export declare interface StrongNode extends CommonAttrs {
|
|
1882
1791
|
type: "strong";
|
|
1883
1792
|
children: InlineNode[];
|
|
1884
|
-
className?: string;
|
|
1885
|
-
id?: string;
|
|
1886
|
-
style?: string;
|
|
1887
1793
|
}
|
|
1888
1794
|
|
|
1889
1795
|
/**
|
|
@@ -1891,12 +1797,9 @@ export declare interface StrongNode {
|
|
|
1891
1797
|
*/
|
|
1892
1798
|
export declare const suggestCompletions: Command;
|
|
1893
1799
|
|
|
1894
|
-
export declare interface SummaryNode {
|
|
1800
|
+
export declare interface SummaryNode extends CommonAttrs {
|
|
1895
1801
|
type: "summary";
|
|
1896
1802
|
children: InlineNode[];
|
|
1897
|
-
className?: string;
|
|
1898
|
-
id?: string;
|
|
1899
|
-
style?: string;
|
|
1900
1803
|
}
|
|
1901
1804
|
|
|
1902
1805
|
export declare interface SummaryProps extends Omit<BoxProps, "component" | "children"> {
|
|
@@ -1921,23 +1824,6 @@ export declare interface SurrealCodeBlockProps {
|
|
|
1921
1824
|
|
|
1922
1825
|
export declare function SurrealistMini({ config, frameRef, ...props }: SurrealistMiniProps): ReactNode;
|
|
1923
1826
|
|
|
1924
|
-
export declare interface SurrealistMiniNode {
|
|
1925
|
-
type: "surrealistMini";
|
|
1926
|
-
url?: string;
|
|
1927
|
-
dataset?: string;
|
|
1928
|
-
setup?: string;
|
|
1929
|
-
query?: string;
|
|
1930
|
-
variables?: string;
|
|
1931
|
-
theme?: string;
|
|
1932
|
-
orientation?: string;
|
|
1933
|
-
appearance?: string;
|
|
1934
|
-
transparent?: string;
|
|
1935
|
-
autorun?: string;
|
|
1936
|
-
className?: string;
|
|
1937
|
-
id?: string;
|
|
1938
|
-
style?: string;
|
|
1939
|
-
}
|
|
1940
|
-
|
|
1941
1827
|
export declare interface SurrealistMiniProps extends BoxProps {
|
|
1942
1828
|
config?: MiniConfig;
|
|
1943
1829
|
frameRef?: RefObject<HTMLIFrameElement | null>;
|
|
@@ -1967,51 +1853,40 @@ export declare interface TabItem {
|
|
|
1967
1853
|
content: ReactNode;
|
|
1968
1854
|
}
|
|
1969
1855
|
|
|
1970
|
-
|
|
1856
|
+
declare function TabItem_2({ children, className, id, style }: Record<string, unknown>): ReactNode;
|
|
1857
|
+
|
|
1858
|
+
export declare interface TabItemNode extends CommonAttrs {
|
|
1971
1859
|
type: "tabItem";
|
|
1972
1860
|
label: string;
|
|
1973
1861
|
icon?: string;
|
|
1974
1862
|
children: BlockNode[];
|
|
1975
|
-
className?: string;
|
|
1976
|
-
id?: string;
|
|
1977
|
-
style?: string;
|
|
1978
1863
|
}
|
|
1979
1864
|
|
|
1980
|
-
export declare interface TableCellNode {
|
|
1865
|
+
export declare interface TableCellNode extends CommonAttrs {
|
|
1981
1866
|
type: "tableCell";
|
|
1982
1867
|
children: AnyNode[];
|
|
1983
|
-
className?: string;
|
|
1984
|
-
id?: string;
|
|
1985
|
-
style?: string;
|
|
1986
1868
|
isHeader: boolean;
|
|
1987
1869
|
}
|
|
1988
1870
|
|
|
1989
|
-
export declare interface TableNode {
|
|
1871
|
+
export declare interface TableNode extends CommonAttrs {
|
|
1990
1872
|
type: "table";
|
|
1991
1873
|
align?: Array<"left" | "right" | "center" | null>;
|
|
1992
1874
|
children: TableRowNode[];
|
|
1993
|
-
className?: string;
|
|
1994
|
-
id?: string;
|
|
1995
|
-
style?: string;
|
|
1996
1875
|
}
|
|
1997
1876
|
|
|
1998
|
-
export declare interface TableRowNode {
|
|
1877
|
+
export declare interface TableRowNode extends CommonAttrs {
|
|
1999
1878
|
type: "tableRow";
|
|
2000
1879
|
children: TableCellNode[];
|
|
2001
|
-
className?: string;
|
|
2002
|
-
id?: string;
|
|
2003
|
-
style?: string;
|
|
2004
1880
|
}
|
|
2005
1881
|
|
|
2006
1882
|
export declare function Tabs({ items, syncKey, ...props }: TabsProps): ReactNode;
|
|
2007
1883
|
|
|
2008
|
-
|
|
1884
|
+
declare function Tabs_2({ syncKey, children, className, id, style, }: Record<string, unknown>): ReactNode;
|
|
1885
|
+
|
|
1886
|
+
export declare interface TabsNode extends CommonAttrs {
|
|
2009
1887
|
type: "tabs";
|
|
2010
1888
|
syncKey?: string;
|
|
2011
1889
|
children: TabItemNode[];
|
|
2012
|
-
className?: string;
|
|
2013
|
-
id?: string;
|
|
2014
|
-
style?: string;
|
|
2015
1890
|
}
|
|
2016
1891
|
|
|
2017
1892
|
export declare interface TabsProps extends Omit<TabsProps_2, "children" | "value" | "onChange"> {
|
|
@@ -2024,19 +1899,13 @@ declare interface TerminalNode {
|
|
|
2024
1899
|
text: string;
|
|
2025
1900
|
}
|
|
2026
1901
|
|
|
2027
|
-
export declare interface TextNode {
|
|
1902
|
+
export declare interface TextNode extends CommonAttrs {
|
|
2028
1903
|
type: "text";
|
|
2029
1904
|
value: string;
|
|
2030
|
-
className?: string;
|
|
2031
|
-
id?: string;
|
|
2032
|
-
style?: string;
|
|
2033
1905
|
}
|
|
2034
1906
|
|
|
2035
|
-
export declare interface ThematicBreakNode {
|
|
1907
|
+
export declare interface ThematicBreakNode extends CommonAttrs {
|
|
2036
1908
|
type: "thematicBreak";
|
|
2037
|
-
className?: string;
|
|
2038
|
-
id?: string;
|
|
2039
|
-
style?: string;
|
|
2040
1909
|
}
|
|
2041
1910
|
|
|
2042
1911
|
export declare type ThemeConfig = {
|
|
@@ -2069,6 +1938,8 @@ export declare interface ThemedImageProps extends ImageProps {
|
|
|
2069
1938
|
*/
|
|
2070
1939
|
export declare type TypeVisitor<T extends AnyNode> = (node: T, index: number | undefined, parent: AnyNode | Root | null) => undefined | boolean | void;
|
|
2071
1940
|
|
|
1941
|
+
export declare function useBlockOptions(): BlockOptionsContextValue;
|
|
1942
|
+
|
|
2072
1943
|
export declare function useEditor(options?: EditorOptions): EditorController;
|
|
2073
1944
|
|
|
2074
1945
|
/**
|
|
@@ -2109,14 +1980,6 @@ export declare const VARIANT_OPTIONS: OptionItem[];
|
|
|
2109
1980
|
|
|
2110
1981
|
export declare function Version({ version, ...props }: VersionProps): ReactNode;
|
|
2111
1982
|
|
|
2112
|
-
export declare interface VersionNode {
|
|
2113
|
-
type: "version";
|
|
2114
|
-
version?: string;
|
|
2115
|
-
className?: string;
|
|
2116
|
-
id?: string;
|
|
2117
|
-
style?: string;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
1983
|
export declare interface VersionProps extends CodeProps {
|
|
2121
1984
|
version: string;
|
|
2122
1985
|
}
|