@valbuild/core 0.57.0 → 0.58.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.
@@ -33,7 +33,6 @@ export type ParagraphNode<O extends RichTextOptions> = {
|
|
33
33
|
};
|
34
34
|
export type BrNode = {
|
35
35
|
tag: "br";
|
36
|
-
children: [];
|
37
36
|
};
|
38
37
|
export type SpanNode<O extends RichTextOptions> = {
|
39
38
|
tag: "span";
|
@@ -43,10 +42,10 @@ export type SpanNode<O extends RichTextOptions> = {
|
|
43
42
|
type ImageTagNode = {
|
44
43
|
tag: "img";
|
45
44
|
src: string;
|
45
|
+
alt?: string;
|
46
46
|
height?: number;
|
47
47
|
width?: number;
|
48
48
|
mimeType?: string;
|
49
|
-
children: [];
|
50
49
|
};
|
51
50
|
export type ImageNode<O extends RichTextOptions> = O["img"] extends true ? ImageTagNode : never;
|
52
51
|
type LinkTagNode<O extends RichTextOptions> = {
|
@@ -55,10 +54,10 @@ type LinkTagNode<O extends RichTextOptions> = {
|
|
55
54
|
children: (string | SpanNode<O>)[];
|
56
55
|
};
|
57
56
|
export type LinkNode<O extends RichTextOptions> = O["a"] extends true ? LinkTagNode<O> : never;
|
58
|
-
export type ListItemNode<O extends RichTextOptions> = {
|
57
|
+
export type ListItemNode<O extends RichTextOptions> = O["ul"] | O["ol"] extends true ? {
|
59
58
|
tag: "li";
|
60
59
|
children: (string | SpanNode<O> | LinkNode<O> | BrNode | UnorderedListNode<O> | OrderedListNode<O>)[];
|
61
|
-
};
|
60
|
+
} : never;
|
62
61
|
export type UnorderedListNode<O extends RichTextOptions> = O["ul"] extends true ? {
|
63
62
|
tag: "ul";
|
64
63
|
dir?: "ltr" | "rtl";
|