chore(types): cleanup #5420

This commit is contained in:
moklick
2025-08-07 07:32:22 +02:00
parent 552ff4da4e
commit 195b4b4f76
4 changed files with 3 additions and 8 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
--- ---
'@xyflow/react': patch '@xyflow/react': patch
'@xyflow/svelte': patch
--- ---
Omit `defaultValue` from `Node`'s and `Edge`'s `domAttributes` to fix type incompatibility when using `WritableDraft` Omit `defaultValue` from `Node`'s `domAttributes` to fix type incompatibility when using `WritableDraft`
+1 -4
View File
@@ -72,10 +72,7 @@ export type Edge<
/** /**
* General escape hatch for adding custom attributes to the edge's DOM element. * General escape hatch for adding custom attributes to the edge's DOM element.
*/ */
domAttributes?: Omit< domAttributes?: Omit<SVGAttributes<SVGGElement>, 'id' | 'style' | 'className' | 'role' | 'aria-label'>;
SVGAttributes<SVGGElement>,
'id' | 'style' | 'className' | 'role' | 'aria-label' | 'defaultValue'
>;
}; };
type SmoothStepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge< type SmoothStepEdge<EdgeData extends Record<string, unknown> = Record<string, unknown>> = Edge<
+1 -1
View File
@@ -35,7 +35,7 @@ export type Edge<
*/ */
domAttributes?: Omit< domAttributes?: Omit<
SVGAttributes<SVGGElement>, SVGAttributes<SVGGElement>,
'id' | 'style' | 'class' | 'role' | 'aria-label' | 'defaultValue' 'id' | 'style' | 'class' | 'role' | 'aria-label'
>; >;
}; };
-1
View File
@@ -38,7 +38,6 @@ export type Node<
| 'draggable' | 'draggable'
| 'role' | 'role'
| 'aria-label' | 'aria-label'
| 'defaultValue'
| keyof DOMAttributes<HTMLDivElement> | keyof DOMAttributes<HTMLDivElement>
>; >;
}; };