finish initial migration (runs in runes mode)
This commit is contained in:
@@ -6,9 +6,9 @@ const config = {
|
|||||||
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
// Consult https://kit.svelte.dev/docs/integrations#preprocessors
|
||||||
// for more information about preprocessors
|
// for more information about preprocessors
|
||||||
preprocess: vitePreprocess(),
|
preprocess: vitePreprocess(),
|
||||||
// compilerOptions: {
|
compilerOptions: {
|
||||||
// runes: true
|
runes: true
|
||||||
// },
|
},
|
||||||
kit: {
|
kit: {
|
||||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||||
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
import { createStore, key } from '$lib/store';
|
import { createStore, key } from '$lib/store';
|
||||||
import type { SvelteFlowProviderProps } from './types';
|
import type { SvelteFlowProviderProps } from './types';
|
||||||
|
|
||||||
type $$Props = SvelteFlowProviderProps;
|
let {
|
||||||
|
initialNodes,
|
||||||
export let initialNodes: $$Props['initialNodes'] = undefined;
|
initialEdges,
|
||||||
export let initialEdges: $$Props['initialEdges'] = undefined;
|
initialWidth,
|
||||||
export let initialWidth: $$Props['initialWidth'] = undefined;
|
initialHeight,
|
||||||
export let initialHeight: $$Props['initialHeight'] = undefined;
|
nodeOrigin,
|
||||||
export let fitView: $$Props['fitView'] = undefined;
|
fitView
|
||||||
export let nodeOrigin: $$Props['nodeOrigin'] = undefined;
|
}: SvelteFlowProviderProps = $props();
|
||||||
|
|
||||||
const store = createStore({
|
const store = createStore({
|
||||||
nodes: initialNodes,
|
nodes: initialNodes,
|
||||||
|
|||||||
@@ -4,9 +4,15 @@
|
|||||||
import { CallOnMount } from '$lib/components/CallOnMount';
|
import { CallOnMount } from '$lib/components/CallOnMount';
|
||||||
import { MarkerDefinition } from '$lib/container/EdgeRenderer/MarkerDefinition';
|
import { MarkerDefinition } from '$lib/container/EdgeRenderer/MarkerDefinition';
|
||||||
import { useStore } from '$lib/store';
|
import { useStore } from '$lib/store';
|
||||||
import type { DefaultEdgeOptions } from '$lib/types';
|
import type { DefaultEdgeOptions, EdgeEvents } from '$lib/types';
|
||||||
|
|
||||||
export let defaultEdgeOptions: DefaultEdgeOptions | undefined;
|
let {
|
||||||
|
defaultEdgeOptions,
|
||||||
|
onedgeclick,
|
||||||
|
onedgecontextmenu,
|
||||||
|
onedgemouseenter,
|
||||||
|
onedgemouseleave
|
||||||
|
}: { defaultEdgeOptions?: DefaultEdgeOptions } & EdgeEvents = $props();
|
||||||
|
|
||||||
const {
|
const {
|
||||||
visibleEdges,
|
visibleEdges,
|
||||||
@@ -16,6 +22,7 @@
|
|||||||
} = useStore();
|
} = useStore();
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
|
// TODO: Remove this when we have a better way to set default options
|
||||||
if (defaultEdgeOptions) setDefaultOptions(defaultEdgeOptions);
|
if (defaultEdgeOptions) setDefaultOptions(defaultEdgeOptions);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -54,10 +61,10 @@
|
|||||||
class={edge.class}
|
class={edge.class}
|
||||||
type={edge.type || 'default'}
|
type={edge.type || 'default'}
|
||||||
zIndex={edge.zIndex}
|
zIndex={edge.zIndex}
|
||||||
on:edgeclick
|
{onedgeclick}
|
||||||
on:edgecontextmenu
|
{onedgecontextmenu}
|
||||||
on:edgemouseenter
|
{onedgemouseenter}
|
||||||
on:edgemouseleave
|
{onedgemouseleave}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { type MarkerProps, MarkerType } from '@xyflow/system';
|
import { type MarkerProps, MarkerType } from '@xyflow/system';
|
||||||
|
|
||||||
type $$Props = MarkerProps;
|
let {
|
||||||
|
id,
|
||||||
export let id: $$Props['id'];
|
type,
|
||||||
export let type: $$Props['type'];
|
width = 12.5,
|
||||||
export let width: $$Props['width'] = 12.5;
|
height = 12.5,
|
||||||
export let height: $$Props['height'] = 12.5;
|
markerUnits = 'strokeWidth',
|
||||||
export let markerUnits: $$Props['markerUnits'] = 'strokeWidth';
|
orient = 'auto-start-reverse',
|
||||||
export let orient: $$Props['orient'] = 'auto-start-reverse';
|
color,
|
||||||
export let color: $$Props['color'] = undefined;
|
strokeWidth
|
||||||
export let strokeWidth: $$Props['strokeWidth'] = undefined;
|
}: MarkerProps = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<marker
|
<marker
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { onDestroy } from 'svelte';
|
import { onDestroy } from 'svelte';
|
||||||
import { nodeHasDimensions } from '@xyflow/system';
|
import { nodeHasDimensions } from '@xyflow/system';
|
||||||
|
|
||||||
import type { NodeEvents } from '$lib/types/events';
|
import type { NodeEvents } from '$lib/types';
|
||||||
import { NodeWrapper } from '$lib/components/NodeWrapper';
|
import { NodeWrapper } from '$lib/components/NodeWrapper';
|
||||||
import { useStore } from '$lib/store';
|
import { useStore } from '$lib/store';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user