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
|
||||
// for more information about preprocessors
|
||||
preprocess: vitePreprocess(),
|
||||
// compilerOptions: {
|
||||
// runes: true
|
||||
// },
|
||||
compilerOptions: {
|
||||
runes: true
|
||||
},
|
||||
kit: {
|
||||
// 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.
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
import { createStore, key } from '$lib/store';
|
||||
import type { SvelteFlowProviderProps } from './types';
|
||||
|
||||
type $$Props = SvelteFlowProviderProps;
|
||||
|
||||
export let initialNodes: $$Props['initialNodes'] = undefined;
|
||||
export let initialEdges: $$Props['initialEdges'] = undefined;
|
||||
export let initialWidth: $$Props['initialWidth'] = undefined;
|
||||
export let initialHeight: $$Props['initialHeight'] = undefined;
|
||||
export let fitView: $$Props['fitView'] = undefined;
|
||||
export let nodeOrigin: $$Props['nodeOrigin'] = undefined;
|
||||
let {
|
||||
initialNodes,
|
||||
initialEdges,
|
||||
initialWidth,
|
||||
initialHeight,
|
||||
nodeOrigin,
|
||||
fitView
|
||||
}: SvelteFlowProviderProps = $props();
|
||||
|
||||
const store = createStore({
|
||||
nodes: initialNodes,
|
||||
|
||||
@@ -4,9 +4,15 @@
|
||||
import { CallOnMount } from '$lib/components/CallOnMount';
|
||||
import { MarkerDefinition } from '$lib/container/EdgeRenderer/MarkerDefinition';
|
||||
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 {
|
||||
visibleEdges,
|
||||
@@ -16,6 +22,7 @@
|
||||
} = useStore();
|
||||
|
||||
onMount(() => {
|
||||
// TODO: Remove this when we have a better way to set default options
|
||||
if (defaultEdgeOptions) setDefaultOptions(defaultEdgeOptions);
|
||||
});
|
||||
</script>
|
||||
@@ -54,10 +61,10 @@
|
||||
class={edge.class}
|
||||
type={edge.type || 'default'}
|
||||
zIndex={edge.zIndex}
|
||||
on:edgeclick
|
||||
on:edgecontextmenu
|
||||
on:edgemouseenter
|
||||
on:edgemouseleave
|
||||
{onedgeclick}
|
||||
{onedgecontextmenu}
|
||||
{onedgemouseenter}
|
||||
{onedgemouseleave}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { type MarkerProps, MarkerType } from '@xyflow/system';
|
||||
|
||||
type $$Props = MarkerProps;
|
||||
|
||||
export let id: $$Props['id'];
|
||||
export let type: $$Props['type'];
|
||||
export let width: $$Props['width'] = 12.5;
|
||||
export let height: $$Props['height'] = 12.5;
|
||||
export let markerUnits: $$Props['markerUnits'] = 'strokeWidth';
|
||||
export let orient: $$Props['orient'] = 'auto-start-reverse';
|
||||
export let color: $$Props['color'] = undefined;
|
||||
export let strokeWidth: $$Props['strokeWidth'] = undefined;
|
||||
let {
|
||||
id,
|
||||
type,
|
||||
width = 12.5,
|
||||
height = 12.5,
|
||||
markerUnits = 'strokeWidth',
|
||||
orient = 'auto-start-reverse',
|
||||
color,
|
||||
strokeWidth
|
||||
}: MarkerProps = $props();
|
||||
</script>
|
||||
|
||||
<marker
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import { onDestroy } from 'svelte';
|
||||
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 { useStore } from '$lib/store';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user