From 08ce321d4c31737df05060a63de4967afc957194 Mon Sep 17 00:00:00 2001 From: peterkogo Date: Mon, 12 May 2025 17:49:59 +0200 Subject: [PATCH] improved some tsdocs for SvelteFlowProps --- .../src/lib/container/SvelteFlow/types.ts | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/svelte/src/lib/container/SvelteFlow/types.ts b/packages/svelte/src/lib/container/SvelteFlow/types.ts index 9d4513aa..52ab4caa 100644 --- a/packages/svelte/src/lib/container/SvelteFlow/types.ts +++ b/packages/svelte/src/lib/container/SvelteFlow/types.ts @@ -53,6 +53,10 @@ export type SvelteFlowProps< * The id of the flow. This is necessary if you want to render multiple flows. */ id?: string; + /** Sets a fixed width for the flow */ + width?: number; + /** Sets a fixed height for the flow */ + height?: number; /** * An array of nodes to render in a flow. * @example @@ -318,19 +322,6 @@ export type SvelteFlowProps< * @default true */ autoPanOnNodeDrag?: boolean; - /** - * Set position of the attribution - * @default 'bottom-right' - * @example 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' - */ - attributionPosition?: PanelPosition; - /** - * By default, we render a small attribution in the corner of your flows that links back to the project. - * Anyone is free to remove this attribution whether they're a Pro subscriber or not - * but we ask that you take a quick look at our {@link https://reactflow.dev/learn/troubleshooting/remove-attribution | removing attribution guide} - * before doing so. - */ - proOptions?: ProOptions; /** * Defaults to be applied to all new edges that are added to the flow. * Properties on a new edge will override these defaults if they exist. @@ -341,10 +332,6 @@ export type SvelteFlowProps< * } */ defaultEdgeOptions?: DefaultEdgeOptions; - /** Sets a fixed width for the flow */ - width?: number; - /** Sets a fixed height for the flow */ - height?: number; /** * Controls color scheme used for styling the flow * @default 'system' @@ -408,6 +395,19 @@ export type SvelteFlowProps< * If you have custom connection logic its preferred to use this callback over the * `isValidConnection` prop on the handle component for performance reasons. */ + /** + * Set position of the attribution + * @default 'bottom-right' + * @example 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' + */ + attributionPosition?: PanelPosition; + /** + * By default, we render a small attribution in the corner of your flows that links back to the project. + * You are free to remove this attribution but we ask that you take a quick look at our + * {@link https://svelteflow.dev/learn/troubleshooting/remove-attribution | removing attribution guide} + * before doing so. + */ + proOptions?: ProOptions; isValidConnection?: IsValidConnection; /** This event handler is called when the user begins to pan or zoom the viewport */ onmovestart?: OnMoveStart;