@prefecthq/graphs 2.2.2 → 2.2.4

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/style.css CHANGED
@@ -1 +1 @@
1
- .run-graph-settings{display:inline-block}.run-graph-settings__menu{padding:.5rem}.run-graph{position:relative}.run-graph--fullscreen{position:fixed;height:100vh!important;width:100vw!important;left:0;top:0}.run-graph__stage,.run-graph__stage>canvas{width:100%;height:100%}.run-graph__actions{position:absolute;bottom:0;right:0;padding:.5rem}
1
+ .run-graph-settings{display:inline-block}.run-graph-settings__menu{padding:.5rem}.run-graph{position:relative}.run-graph--fullscreen{position:fixed;height:100vh!important;width:100vw!important;left:0;top:0}.run-graph__stage,.run-graph__stage>canvas{width:100%;height:100%}.run-graph__actions{position:absolute;bottom:.5rem;right:.5rem}
@@ -15,7 +15,7 @@ export type RunGraphData = {
15
15
  end_time: Date | null;
16
16
  nodes: RunGraphNodes;
17
17
  artifacts?: RunGraphArtifact[];
18
- state_events?: RunGraphStateEvent[];
18
+ states?: RunGraphStateEvent[];
19
19
  };
20
20
  export type RunGraphNodes = Map<string, RunGraphNode>;
21
21
  export type RunGraphNode = {
@@ -75,6 +75,7 @@ export type RunGraphStyles = {
75
75
  artifactIconSize?: number;
76
76
  artifactIconColor?: ColorSource;
77
77
  flowStateBarHeight?: number;
78
+ flowStateSelectedBarHeight?: number;
78
79
  flowStateAreaAlpha?: number;
79
80
  guideLineWidth?: number;
80
81
  guideLineColor?: ColorSource;
@@ -2,3 +2,4 @@ export * from './artifact';
2
2
  export * from './RunGraph';
3
3
  export * from './viewport';
4
4
  export * from './selection';
5
+ export * from './states';
@@ -1,4 +1,10 @@
1
- import { RunGraphNode } from '../models';
1
+ import { RunGraphNode, RunGraphStateEvent } from '../models';
2
+ export type GraphSelectionPosition = {
3
+ x: number;
4
+ y: number;
5
+ width: number;
6
+ height: number;
7
+ };
2
8
  export type NodeSelection = {
3
9
  kind: RunGraphNode['kind'];
4
10
  id: string;
@@ -12,10 +18,12 @@ export declare function isArtifactSelection(selection: GraphItemSelection): sele
12
18
  export type ArtifactsSelection = {
13
19
  kind: 'artifacts';
14
20
  ids: string[];
15
- position?: {
16
- x: number;
17
- y: number;
18
- };
21
+ position?: GraphSelectionPosition;
19
22
  };
20
23
  export declare function isArtifactsSelection(selection: GraphItemSelection): selection is ArtifactsSelection;
21
- export type GraphItemSelection = NodeSelection | ArtifactSelection | ArtifactsSelection;
24
+ export interface StateSelection extends RunGraphStateEvent {
25
+ kind: 'state';
26
+ position?: GraphSelectionPosition;
27
+ }
28
+ export declare function isStateSelection(selection: GraphItemSelection): selection is StateSelection;
29
+ export type GraphItemSelection = NodeSelection | ArtifactSelection | ArtifactsSelection | StateSelection;
@@ -2,6 +2,7 @@ export declare const stateType: readonly ["COMPLETED", "RUNNING", "SCHEDULED", "
2
2
  export type StateType = typeof stateType[number];
3
3
  export type RunGraphStateEvent = {
4
4
  id: string;
5
- occurred: Date;
5
+ timestamp: Date;
6
6
  type: StateType;
7
+ name: string;
7
8
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prefecthq/graphs",
3
3
  "private": false,
4
- "version": "2.2.2",
4
+ "version": "2.2.4",
5
5
  "description": "Large scale graphs designed for Prefect",
6
6
  "scripts": {
7
7
  "serve": "vite --host --mode=demo",