@surrealdb/ui 1.0.26 → 1.0.27
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/dist/ui.d.ts +5 -1
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/ui.d.ts
CHANGED
|
@@ -821,6 +821,10 @@ export declare interface MarkdownProps {
|
|
|
821
821
|
components?: Partial<Record<string, React_2.ComponentType<unknown>>>;
|
|
822
822
|
}
|
|
823
823
|
|
|
824
|
+
declare type NodeOfType<T extends AnyNode["type"]> = Extract<AnyNode, {
|
|
825
|
+
type: T;
|
|
826
|
+
}>;
|
|
827
|
+
|
|
824
828
|
/**
|
|
825
829
|
* Note/Callout component with variants: note, important, warning, caution
|
|
826
830
|
*/
|
|
@@ -1606,7 +1610,7 @@ export declare function useSwitch(initialState?: boolean, callbacks?: {
|
|
|
1606
1610
|
*/
|
|
1607
1611
|
export declare function visit(tree: Root | AnyNode, visitor: Visitor): void;
|
|
1608
1612
|
|
|
1609
|
-
export declare function visit<T extends AnyNode>(tree: Root | AnyNode, nodeType: T
|
|
1613
|
+
export declare function visit<T extends AnyNode["type"]>(tree: Root | AnyNode, nodeType: T, visitor: TypeVisitor<NodeOfType<T>>): void;
|
|
1610
1614
|
|
|
1611
1615
|
/**
|
|
1612
1616
|
* Generic visitor function
|