prevent passing of props to the div element as attributes

This commit is contained in:
peterkogo
2025-01-29 16:01:31 +01:00
parent 25db8d4e66
commit f481ee3953
5 changed files with 179 additions and 46 deletions
-2
View File
@@ -21,8 +21,6 @@ import {
import type { EdgeTypes, NodeTypes, Node, Edge, FitViewOptions } from '$lib/types';
import { initialEdgeTypes, initialNodeTypes, getInitialStore } from './initial-store.svelte';
import { type StoreSignals, type SvelteFlowStore, type SvelteFlowStoreActions } from './types';
// import { getVisibleEdges } from './visible-edges';
// import { getVisibleNodes } from './visible-nodes';
export const key = Symbol();
+52 -1
View File
@@ -37,8 +37,59 @@ export type SvelteFlowStoreActions = {
reset(): void;
};
export type SvelteFlowRestProps = Omit<
SvelteFlowProps,
| 'width'
| 'height'
| 'class'
| 'proOptions'
| 'selectionKey'
| 'deleteKey'
| 'panActivationKey'
| 'multiSelectionKey'
| 'zoomActivationKey'
| 'paneClickDistance'
| 'nodeClickDistance'
| 'onMoveStart'
| 'onMoveEnd'
| 'onMove'
| 'onnodeclick'
| 'onnodecontextmenu'
| 'onnodedrag'
| 'onnodedragstart'
| 'onnodedragstop'
| 'onnodepointerenter'
| 'onnodepointermove'
| 'onnodepointerleave'
| 'onselectionclick'
| 'onselectioncontextmenu'
| 'onedgeclick'
| 'onedgecontextmenu'
| 'onedgepointerenter'
| 'onedgepointerleave'
| 'onpaneclick'
| 'onpanecontextmenu'
| 'panOnScrollMode'
| 'preventScrolling'
| 'zoomOnScroll'
| 'zoomOnDoubleClick'
| 'zoomOnPinch'
| 'panOnScroll'
| 'panOnDrag'
| 'selectionOnDrag'
| 'connectionLineComponent'
| 'connectionLineStyle'
| 'connectionLineContainerStyle'
| 'connectionLineType'
| 'attributionPosition'
| 'children'
| 'nodes'
| 'edges'
| 'viewport'
>;
export type StoreSignals = {
props: Partial<SvelteFlowProps>;
props: SvelteFlowRestProps;
width?: number;
height?: number;
nodes: Node[];