@xyflow/svelte
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -26,5 +26,2 @@ import { get } from 'svelte/store'; | ||
}; | ||
}, | ||
onNodeClick: () => { | ||
console.log('node click'); | ||
} | ||
@@ -31,0 +28,0 @@ }); |
@@ -13,3 +13,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type AttributionProps = typeof __propDef.props; | ||
type AttributionProps_ = typeof __propDef.props; | ||
export { AttributionProps_ as AttributionProps }; | ||
export type AttributionEvents = typeof __propDef.events; | ||
@@ -19,2 +20,1 @@ export type AttributionSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -21,3 +21,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type BaseEdgeProps = typeof __propDef.props; | ||
type BaseEdgeProps_ = typeof __propDef.props; | ||
export { BaseEdgeProps_ as BaseEdgeProps }; | ||
export type BaseEdgeEvents = typeof __propDef.events; | ||
@@ -27,2 +28,1 @@ export type BaseEdgeSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -9,2 +9,3 @@ import { SvelteComponentTyped } from "svelte"; | ||
selectable?: boolean | undefined; | ||
ariaLabel?: string | undefined; | ||
style?: string | undefined; | ||
@@ -11,0 +12,0 @@ sourceHandle?: string | null | undefined; |
@@ -8,2 +8,3 @@ import { SvelteComponentTyped } from "svelte"; | ||
deleteKey?: KeyDefinition | undefined; | ||
panActivationKey?: KeyDefinition | undefined; | ||
}; | ||
@@ -15,3 +16,4 @@ events: { | ||
}; | ||
export type KeyHandlerProps = typeof __propDef.props; | ||
type KeyHandlerProps_ = typeof __propDef.props; | ||
export { KeyHandlerProps_ as KeyHandlerProps }; | ||
export type KeyHandlerEvents = typeof __propDef.events; | ||
@@ -21,2 +23,1 @@ export type KeyHandlerSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -5,2 +5,3 @@ import type { KeyDefinition } from '../../types'; | ||
deleteKey?: KeyDefinition; | ||
panActivationKey?: KeyDefinition; | ||
}; |
@@ -36,3 +36,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type NodeWrapperProps = typeof __propDef.props; | ||
type NodeWrapperProps_ = typeof __propDef.props; | ||
export { NodeWrapperProps_ as NodeWrapperProps }; | ||
export type NodeWrapperEvents = typeof __propDef.events; | ||
@@ -42,2 +43,1 @@ export type NodeWrapperSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -19,3 +19,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type MarkerProps = typeof __propDef.props; | ||
type MarkerProps_ = typeof __propDef.props; | ||
export { MarkerProps_ as MarkerProps }; | ||
export type MarkerEvents = typeof __propDef.events; | ||
@@ -25,2 +26,1 @@ export type MarkerSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -20,3 +20,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type PaneProps = typeof __propDef.props; | ||
type PaneProps_ = typeof __propDef.props; | ||
export { PaneProps_ as PaneProps }; | ||
export type PaneEvents = typeof __propDef.events; | ||
@@ -26,2 +27,1 @@ export type PaneSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -224,3 +224,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type PanelProps = typeof __propDef.props; | ||
type PanelProps_ = typeof __propDef.props; | ||
export { PanelProps_ as PanelProps }; | ||
export type PanelEvents = typeof __propDef.events; | ||
@@ -230,2 +231,1 @@ export type PanelSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -115,2 +115,3 @@ import { SvelteComponentTyped } from "svelte"; | ||
selectionKey?: import("../../types").KeyDefinition | undefined; | ||
panActivationKey?: import("../../types").KeyDefinition | undefined; | ||
deleteKey?: import("../../types").KeyDefinition | undefined; | ||
@@ -175,3 +176,4 @@ fitView?: boolean | undefined; | ||
}; | ||
export type SvelteFlowProps = typeof __propDef.props; | ||
type SvelteFlowProps_ = typeof __propDef.props; | ||
export { SvelteFlowProps_ as SvelteFlowProps }; | ||
export type SvelteFlowEvents = typeof __propDef.events; | ||
@@ -181,2 +183,1 @@ export type SvelteFlowSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -12,2 +12,3 @@ import type { DOMAttributes } from 'svelte/elements'; | ||
selectionKey?: KeyDefinition; | ||
panActivationKey?: KeyDefinition; | ||
deleteKey?: KeyDefinition; | ||
@@ -14,0 +15,0 @@ fitView?: boolean; |
@@ -25,3 +25,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type ZoomProps = typeof __propDef.props; | ||
type ZoomProps_ = typeof __propDef.props; | ||
export { ZoomProps_ as ZoomProps }; | ||
export type ZoomEvents = typeof __propDef.events; | ||
@@ -31,2 +32,1 @@ export type ZoomSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -18,3 +18,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type BackgroundProps = typeof __propDef.props; | ||
type BackgroundProps_ = typeof __propDef.props; | ||
export { BackgroundProps_ as BackgroundProps }; | ||
export type BackgroundEvents = typeof __propDef.events; | ||
@@ -24,2 +25,1 @@ export type BackgroundSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -19,3 +19,4 @@ import { SvelteComponentTyped } from "svelte"; | ||
}; | ||
export type ControlsProps = typeof __propDef.props; | ||
type ControlsProps_ = typeof __propDef.props; | ||
export { ControlsProps_ as ControlsProps }; | ||
export type ControlsEvents = typeof __propDef.events; | ||
@@ -25,2 +26,1 @@ export type ControlsSlots = typeof __propDef.slots; | ||
} | ||
export {}; |
@@ -114,4 +114,8 @@ import { getContext, setContext } from 'svelte'; | ||
function unselectNodesAndEdges() { | ||
store.nodes.update((ns) => ns.map(resetSelectedItem)); | ||
store.edges.update((es) => es.map(resetSelectedItem)); | ||
if (get(store.nodes).some((node) => node.selected)) { | ||
store.nodes.update((ns) => ns.map(resetSelectedItem)); | ||
} | ||
if (get(store.edges).some((edge) => edge.selected)) { | ||
store.edges.update((es) => es.map(resetSelectedItem)); | ||
} | ||
} | ||
@@ -118,0 +122,0 @@ store.deleteKeyPressed.subscribe((deleteKeyPressed) => { |
@@ -59,2 +59,3 @@ /// <reference types="svelte" /> | ||
deleteKeyPressed: import("svelte/store").Writable<boolean>; | ||
panActivationKeyPressed: import("svelte/store").Writable<boolean>; | ||
selectionRectMode: import("svelte/store").Writable<string | null>; | ||
@@ -61,0 +62,0 @@ selectionMode: import("svelte/store").Writable<SelectionMode>; |
@@ -51,2 +51,3 @@ import { readable, writable } from 'svelte/store'; | ||
deleteKeyPressed: writable(false), | ||
panActivationKeyPressed: writable(false), | ||
selectionRectMode: writable(null), | ||
@@ -53,0 +54,0 @@ selectionMode: writable(SelectionMode.Partial), |
@@ -39,3 +39,3 @@ import { writable, get } from 'svelte/store'; | ||
let defaults = {}; | ||
let elevateNodesOnSelect = false; | ||
let elevateNodesOnSelect = true; | ||
const _set = (nds) => { | ||
@@ -42,0 +42,0 @@ const nextNodes = updateNodes(nds, value, { |
@@ -1,2 +0,2 @@ | ||
import type { SvelteComponentTyped } from 'svelte'; | ||
import type { SvelteComponent, ComponentType } from 'svelte'; | ||
import type { EdgeBase, BezierPathOptions, DefaultEdgeOptionsBase, EdgePosition, SmoothStepPathOptions } from '@xyflow/system'; | ||
@@ -28,5 +28,5 @@ import type { Node } from './'; | ||
}; | ||
export type EdgeTypes = Record<string, typeof SvelteComponentTyped<EdgeProps>>; | ||
export type EdgeTypes = Record<string, ComponentType<SvelteComponent<EdgeProps>>>; | ||
export type DefaultEdgeOptions = DefaultEdgeOptionsBase<Edge>; | ||
export type EdgeLayouted = Pick<Edge, 'type' | 'id' | 'data' | 'style' | 'source' | 'target' | 'animated' | 'selected' | 'selectable' | 'label' | 'labelStyle' | 'interactionWidth' | 'markerStart' | 'markerEnd' | 'sourceHandle' | 'targetHandle'> & EdgePosition & { | ||
export type EdgeLayouted = Pick<Edge, 'type' | 'id' | 'data' | 'style' | 'source' | 'target' | 'animated' | 'selected' | 'selectable' | 'label' | 'labelStyle' | 'interactionWidth' | 'markerStart' | 'markerEnd' | 'sourceHandle' | 'targetHandle' | 'ariaLabel'> & EdgePosition & { | ||
sourceHandleId?: string | null; | ||
@@ -33,0 +33,0 @@ targetHandleId?: string | null; |
@@ -1,2 +0,2 @@ | ||
import type { SvelteComponentTyped } from 'svelte'; | ||
import type { ComponentType, SvelteComponent } from 'svelte'; | ||
import type { NodeBase, NodeProps } from '@xyflow/system'; | ||
@@ -7,3 +7,3 @@ export type Node<NodeData = any, NodeType extends string | undefined = string | undefined> = NodeBase<NodeData, NodeType> & { | ||
}; | ||
export type NodeTypes = Record<string, typeof SvelteComponentTyped<NodeProps>>; | ||
export type NodeTypes = Record<string, ComponentType<SvelteComponent<NodeProps>>>; | ||
export type DefaultNodeOptions = Partial<Omit<Node, 'id'>>; |
{ | ||
"name": "@xyflow/svelte", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "Svelte Flow - A highly customizable Svelte library for building node-based editors, workflow systems, diagrams and more.", | ||
@@ -27,10 +27,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@svelte-put/shortcut": "^2.0.0", | ||
"@xyflow/system": "0.0.1", | ||
"classcat": "^5.0.4" | ||
"@svelte-put/shortcut": "^3.0.0", | ||
"classcat": "^5.0.4", | ||
"@xyflow/system": "0.0.2" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/adapter-auto": "^2.1.0", | ||
"@sveltejs/kit": "^1.20.5", | ||
"@sveltejs/package": "^2.1.0", | ||
"@sveltejs/kit": "^1.22.6", | ||
"@sveltejs/package": "^2.2.1", | ||
"@typescript-eslint/eslint-plugin": "^5.60.0", | ||
@@ -43,5 +43,5 @@ "@typescript-eslint/parser": "^5.60.0", | ||
"prettier-plugin-svelte": "^2.10.1", | ||
"svelte": "^4.0.0", | ||
"svelte-check": "^3.4.4", | ||
"svelte-eslint-parser": "^0.31.0", | ||
"svelte": "^4.2.0", | ||
"svelte-check": "^3.5.0", | ||
"svelte-eslint-parser": "^0.32.2", | ||
"tslib": "^2.5.3", | ||
@@ -48,0 +48,0 @@ "typescript": "5.1.3", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180385
2730
+ Added@svelte-put/shortcut@3.1.2(transitive)
+ Added@xyflow/system@0.0.2(transitive)
- Removed@svelte-put/shortcut@2.0.0(transitive)
- Removed@xyflow/system@0.0.1(transitive)
Updated@svelte-put/shortcut@^3.0.0
Updated@xyflow/system@0.0.2