@prefecthq/graphs 2.2.7 → 2.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphs.mjs +6639 -6432
- package/dist/graphs.mjs.map +1 -1
- package/dist/graphs.umd.js +65 -65
- package/dist/graphs.umd.js.map +1 -1
- package/dist/types/src/factories/artifact.d.ts +2 -1
- package/dist/types/src/factories/border.d.ts +1 -1
- package/dist/types/src/factories/eventData.d.ts +3 -2
- package/dist/types/src/factories/flowRunState.d.ts +3 -3
- package/dist/types/src/factories/nodeFlowRunArtifact.d.ts +20 -0
- package/dist/types/src/factories/nodeFlowRunEvent.d.ts +20 -0
- package/dist/types/src/factories/nodeFlowRunState.d.ts +16 -0
- package/dist/types/src/factories/runArtifacts.d.ts +12 -0
- package/dist/types/src/factories/runEvents.d.ts +12 -0
- package/dist/types/src/factories/runStates.d.ts +11 -0
- package/dist/types/src/models/RunGraph.d.ts +5 -1
- package/dist/types/src/objects/flowRunEvents.d.ts +2 -0
- package/dist/types/src/utilities/detectHorizontalCollisions.d.ts +1 -0
- package/package.json +1 -1
- package/dist/types/src/factories/flowRunArtifacts.d.ts +0 -4
- package/dist/types/src/factories/flowRunEvents.d.ts +0 -4
- package/dist/types/src/factories/flowRunStates.d.ts +0 -6
|
@@ -2,8 +2,9 @@ import { RunGraphArtifact } from '../models/artifact';
|
|
|
2
2
|
export type ArtifactFactory = Awaited<ReturnType<typeof artifactFactory>>;
|
|
3
3
|
type ArtifactFactoryOptions = {
|
|
4
4
|
cullAtZoomThreshold?: boolean;
|
|
5
|
+
enableLocalClickHandling?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare function artifactFactory(artifact: RunGraphArtifact, { cullAtZoomThreshold }?: ArtifactFactoryOptions): Promise<{
|
|
7
|
+
export declare function artifactFactory(artifact: RunGraphArtifact, { cullAtZoomThreshold, enableLocalClickHandling, }?: ArtifactFactoryOptions): Promise<{
|
|
7
8
|
element: import("pixi.js").Container<import("pixi.js").DisplayObject>;
|
|
8
9
|
render: () => Promise<void>;
|
|
9
10
|
getSelected: () => boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { RunGraphEvent, RunGraphFetchEventsOptions } from '../models';
|
|
2
3
|
type EventDataCallback = (data: RunGraphEvent[]) => void;
|
|
3
|
-
export declare function eventDataFactory(runId: string, callback: EventDataCallback): Promise<{
|
|
4
|
+
export declare function eventDataFactory(runId: string, callback: EventDataCallback, options?: MaybeRefOrGetter<RunGraphFetchEventsOptions>): Promise<{
|
|
4
5
|
start: () => Promise<void>;
|
|
5
6
|
stop: () => void;
|
|
6
7
|
}>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
2
|
import { RunGraphStateEvent } from '../models/states';
|
|
3
3
|
export type FlowRunStateFactory = Awaited<ReturnType<typeof flowRunStateFactory>>;
|
|
4
|
-
type
|
|
4
|
+
type FlowRunStateFactoryRenderProps = {
|
|
5
5
|
end: Date;
|
|
6
6
|
};
|
|
7
|
-
export declare function flowRunStateFactory(state: RunGraphStateEvent
|
|
7
|
+
export declare function flowRunStateFactory(state: RunGraphStateEvent): Promise<{
|
|
8
8
|
element: Container<import("pixi.js").DisplayObject>;
|
|
9
|
-
render: (newOptions?:
|
|
9
|
+
render: (newOptions?: FlowRunStateFactoryRenderProps) => void;
|
|
10
10
|
}>;
|
|
11
11
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ArtifactFactory } from '../factories/artifact';
|
|
2
|
+
import { ArtifactClusterFactory } from '../factories/artifactCluster';
|
|
3
|
+
import { RunGraphArtifact } from '../models';
|
|
4
|
+
export type NodeFlowRunArtifactFactory = Awaited<ReturnType<typeof nodeFlowRunArtifactFactory>>;
|
|
5
|
+
type NodeFlowRunArtifactFactorySharedOptions = {
|
|
6
|
+
parentStartDate?: Date;
|
|
7
|
+
};
|
|
8
|
+
type NodeFlowRunArtifactFactoryOptions = NodeFlowRunArtifactFactorySharedOptions & ({
|
|
9
|
+
type: 'artifact';
|
|
10
|
+
artifact: RunGraphArtifact;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'cluster';
|
|
13
|
+
});
|
|
14
|
+
type FactoryType<T> = T extends {
|
|
15
|
+
type: 'artifact';
|
|
16
|
+
} ? ArtifactFactory : T extends {
|
|
17
|
+
type: 'cluster';
|
|
18
|
+
} ? ArtifactClusterFactory : never;
|
|
19
|
+
export declare function nodeFlowRunArtifactFactory<T extends NodeFlowRunArtifactFactoryOptions>(options: T): Promise<FactoryType<T>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EventFactory } from '../factories/event';
|
|
2
|
+
import { EventClusterFactory } from '../factories/eventCluster';
|
|
3
|
+
import { RunGraphEvent } from '../models';
|
|
4
|
+
export type NodeFlowRunEventFactory = Awaited<ReturnType<typeof nodeFlowRunEventFactory>>;
|
|
5
|
+
type NodeEventFactorySharedOptions = {
|
|
6
|
+
parentStartDate?: Date;
|
|
7
|
+
};
|
|
8
|
+
type NodeEventFactoryOptions = NodeEventFactorySharedOptions & ({
|
|
9
|
+
type: 'event';
|
|
10
|
+
event: RunGraphEvent;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'cluster';
|
|
13
|
+
});
|
|
14
|
+
type EventFactoryType<T> = T extends {
|
|
15
|
+
type: 'event';
|
|
16
|
+
} ? EventFactory : T extends {
|
|
17
|
+
type: 'cluster';
|
|
18
|
+
} ? EventClusterFactory : never;
|
|
19
|
+
export declare function nodeFlowRunEventFactory<T extends NodeEventFactoryOptions>(options: T): Promise<EventFactoryType<T>>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { FlowRunStateFactory } from '../factories/flowRunState';
|
|
3
|
+
import { RunGraphStateEvent } from '../models/states';
|
|
4
|
+
export type NodeFlowRunStateFactory = Awaited<ReturnType<typeof nodeFlowRunStateFactory>>;
|
|
5
|
+
export declare function isNodeFlowRunStateFactory(factory: NodeFlowRunStateFactory | FlowRunStateFactory): factory is NodeFlowRunStateFactory;
|
|
6
|
+
export type NodeFlowRunStateFactoryRenderProps = {
|
|
7
|
+
end?: Date;
|
|
8
|
+
parentStartDate?: Date;
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function nodeFlowRunStateFactory(state: RunGraphStateEvent): Promise<{
|
|
13
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
14
|
+
render: (props?: NodeFlowRunStateFactoryRenderProps) => void;
|
|
15
|
+
isNodesFlowRunStateFactory: boolean;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { RunGraphArtifact } from '../models';
|
|
3
|
+
type RunEventsFactoryProps = {
|
|
4
|
+
isRoot?: boolean;
|
|
5
|
+
parentStartDate?: Date;
|
|
6
|
+
};
|
|
7
|
+
export declare function runArtifactsFactory({ isRoot, parentStartDate }?: RunEventsFactoryProps): Promise<{
|
|
8
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
render: (newData?: RunGraphArtifact[]) => Promise<void>;
|
|
10
|
+
update: () => void;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { RunGraphEvent } from '../models';
|
|
3
|
+
type RunEventsFactoryProps = {
|
|
4
|
+
isRoot?: boolean;
|
|
5
|
+
parentStartDate?: Date;
|
|
6
|
+
};
|
|
7
|
+
export declare function runEventsFactory({ isRoot, parentStartDate }?: RunEventsFactoryProps): Promise<{
|
|
8
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
render: (newData?: RunGraphEvent[]) => Promise<void>;
|
|
10
|
+
update: () => void;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { NodeFlowRunStateFactoryRenderProps } from '../factories/nodeFlowRunState';
|
|
3
|
+
import { RunGraphStateEvent } from '../models/states';
|
|
4
|
+
type FlowRunStatesFactoryProps = {
|
|
5
|
+
isRoot?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function runStatesFactory({ isRoot }?: FlowRunStatesFactoryProps): {
|
|
8
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
render: (newStateData?: RunGraphStateEvent[], nodesStateOptions?: NodeFlowRunStateFactoryRenderProps) => Promise<void>;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -37,7 +37,11 @@ export declare const runGraphNodeKinds: readonly ["flow-run", "task-run"];
|
|
|
37
37
|
export type RunGraphNodeKind = typeof runGraphNodeKinds[number];
|
|
38
38
|
export declare function isRunGraphNodeType(value: unknown): value is RunGraphNodeKind;
|
|
39
39
|
export type RunGraphFetch = (runId: string) => RunGraphData | Promise<RunGraphData>;
|
|
40
|
-
export type
|
|
40
|
+
export type RunGraphFetchEventsOptions = {
|
|
41
|
+
since?: Date;
|
|
42
|
+
until?: Date;
|
|
43
|
+
};
|
|
44
|
+
export type RunGraphFetchEvents = (runId: string, options?: RunGraphFetchEventsOptions) => RunGraphEvent[] | Promise<RunGraphEvent[]>;
|
|
41
45
|
export type RunGraphNodeStyles = {
|
|
42
46
|
background?: ColorSource;
|
|
43
47
|
};
|
|
@@ -13,6 +13,7 @@ type ClusterFactory = {
|
|
|
13
13
|
date: Date;
|
|
14
14
|
}) => void;
|
|
15
15
|
} & Record<string, unknown>;
|
|
16
|
+
export declare function itemIsClusterFactory(item: ItemFactory | ClusterFactory): item is ClusterFactory;
|
|
16
17
|
type ClusterHorizontalCollisionsProps = {
|
|
17
18
|
items: Map<string, ItemFactory | ClusterFactory>;
|
|
18
19
|
createCluster: () => Promise<ClusterFactory>;
|
package/package.json
CHANGED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Container } from 'pixi.js';
|
|
2
|
-
import { RunGraphStateEvent } from '../models/states';
|
|
3
|
-
export declare function flowRunStatesFactory(): {
|
|
4
|
-
element: Container<import("pixi.js").DisplayObject>;
|
|
5
|
-
render: (newStateData?: RunGraphStateEvent[]) => Promise<void>;
|
|
6
|
-
};
|