@prefecthq/graphs 3.0.0 → 3.0.2
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/assets/{runGraph.worker-C4c20Jgu.js.map → runGraph.worker-wjnyJFtp.js.map} +1 -1
- package/dist/graphs.mjs +6523 -6985
- 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/models/RunGraph.d.ts +8 -7
- package/dist/types/src/objects/events.d.ts +3 -1
- package/dist/types/src/objects/styles.d.ts +4 -0
- package/dist/types/src/utilities/getInitialHorizontalScaleMultiplier.d.ts +2 -2
- package/package.json +7 -7
|
@@ -11,8 +11,8 @@ export type RunGraphProps = {
|
|
|
11
11
|
};
|
|
12
12
|
export type RunGraphData = {
|
|
13
13
|
root_node_ids: string[];
|
|
14
|
-
start_time:
|
|
15
|
-
end_time:
|
|
14
|
+
start_time: string;
|
|
15
|
+
end_time: string | null;
|
|
16
16
|
nodes: RunGraphNodes;
|
|
17
17
|
artifacts?: RunGraphArtifact[];
|
|
18
18
|
states?: RunGraphStateEvent[];
|
|
@@ -28,8 +28,8 @@ export type RunGraphNode = {
|
|
|
28
28
|
id: string;
|
|
29
29
|
label: string;
|
|
30
30
|
state_type: StateType;
|
|
31
|
-
start_time:
|
|
32
|
-
end_time:
|
|
31
|
+
start_time: string;
|
|
32
|
+
end_time: string | null;
|
|
33
33
|
parents: RunGraphEdge[];
|
|
34
34
|
children: RunGraphEdge[];
|
|
35
35
|
artifacts?: RunGraphArtifact[];
|
|
@@ -54,7 +54,6 @@ export type RunGraphStateStyles = {
|
|
|
54
54
|
background?: ColorSource;
|
|
55
55
|
};
|
|
56
56
|
export type RunGraphStyles = {
|
|
57
|
-
colorMode: 'dark' | 'light';
|
|
58
57
|
rowGap?: number;
|
|
59
58
|
columnGap?: number;
|
|
60
59
|
textDefault?: ColorSource;
|
|
@@ -106,16 +105,18 @@ export type RunGraphStyles = {
|
|
|
106
105
|
node?: (node: RunGraphNode) => RunGraphNodeStyles;
|
|
107
106
|
state?: (state: RunGraphStateEvent) => RunGraphStateStyles;
|
|
108
107
|
};
|
|
108
|
+
export type RunGraphTheme = 'dark' | 'light';
|
|
109
109
|
export type RunGraphConfig = {
|
|
110
110
|
runId: string;
|
|
111
111
|
fetch: RunGraphFetch;
|
|
112
112
|
fetchEvents?: RunGraphFetchEvents;
|
|
113
|
+
theme: RunGraphTheme;
|
|
113
114
|
fetchEventsInterval?: number;
|
|
114
115
|
animationDuration?: number;
|
|
115
|
-
styles?: RunGraphStyles;
|
|
116
|
+
styles?: (theme: RunGraphTheme) => RunGraphStyles;
|
|
116
117
|
disableAnimationsThreshold?: number;
|
|
117
118
|
disableEdgesThreshold?: number;
|
|
118
119
|
};
|
|
119
120
|
export type RequiredGraphConfig = Omit<Required<RunGraphConfig>, 'styles'> & {
|
|
120
|
-
styles:
|
|
121
|
+
styles?: (theme: RunGraphTheme) => RunGraphStyles;
|
|
121
122
|
};
|
|
@@ -4,7 +4,7 @@ import { Application, Container } from 'pixi.js';
|
|
|
4
4
|
import { HorizontalScale } from '../factories/position';
|
|
5
5
|
import { RunGraphEvent } from '../models';
|
|
6
6
|
import { LayoutSettings } from '../models/layout';
|
|
7
|
-
import { RequiredGraphConfig, RunGraphData } from '../models/RunGraph';
|
|
7
|
+
import { RequiredGraphConfig, RunGraphData, RunGraphStyles } from '../models/RunGraph';
|
|
8
8
|
import { GraphItemSelection } from '../models/selection';
|
|
9
9
|
import { ViewportDateRange } from '../models/viewport';
|
|
10
10
|
import { Fonts } from '../objects/fonts';
|
|
@@ -36,6 +36,8 @@ type Events = {
|
|
|
36
36
|
itemSelected: GraphItemSelection | null;
|
|
37
37
|
layoutUpdated: void;
|
|
38
38
|
toggleCullCreated: VisibilityCull;
|
|
39
|
+
stylesCreated: Required<RunGraphStyles>;
|
|
40
|
+
stylesUpdated: Required<RunGraphStyles>;
|
|
39
41
|
};
|
|
40
42
|
export type EventKey = keyof Events;
|
|
41
43
|
export declare const emitter: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function getInitialHorizontalScaleMultiplier({ start_time, end_time, nodes }: RunGraphData,
|
|
1
|
+
import { RunGraphData, RunGraphStyles } from '../models/RunGraph';
|
|
2
|
+
export declare function getInitialHorizontalScaleMultiplier({ start_time, end_time, nodes }: RunGraphData, styles: Required<RunGraphStyles>, aspectRatio: number): number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefecthq/graphs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.2",
|
|
5
5
|
"description": "Large scale graphs designed for Prefect",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "tsc -w & tsc-alias -w & vite build -w",
|
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
"lint": "eslint src",
|
|
10
10
|
"lint:fix": "eslint src --fix",
|
|
11
11
|
"changelog": "auto-changelog --package --commit-limit 0",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"release": "./graphs-release",
|
|
13
|
+
"validate:types": "tsc --noEmit"
|
|
14
14
|
},
|
|
15
15
|
"main": "./dist/graphs.umd.js",
|
|
16
16
|
"module": "./dist/graphs.mjs",
|
|
17
17
|
"exports": {
|
|
18
18
|
".": {
|
|
19
19
|
"import": "./dist/graphs.mjs",
|
|
20
|
-
"require": "./dist/graphs.umd.js"
|
|
20
|
+
"require": "./dist/graphs.umd.js",
|
|
21
|
+
"types": "./dist/types/src/index.d.ts"
|
|
21
22
|
},
|
|
22
23
|
"./dist/style.css": "./dist/style.css"
|
|
23
24
|
},
|
|
@@ -44,10 +45,9 @@
|
|
|
44
45
|
"@types/lodash.throttle": "^4.1.9",
|
|
45
46
|
"@types/node": "^22.0.0",
|
|
46
47
|
"@vitejs/plugin-vue": "5.2.1",
|
|
47
|
-
"auto-changelog": "^2.4.0",
|
|
48
48
|
"autoprefixer": "10.4.20",
|
|
49
49
|
"eslint": "8.57.1",
|
|
50
|
-
"postcss": "8.
|
|
50
|
+
"postcss": "8.5.2",
|
|
51
51
|
"tailwindcss": "3.4.17",
|
|
52
52
|
"tsc-alias": "1.8.10",
|
|
53
53
|
"typescript": "5.7.3",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"vite-svg-loader": "^5.1.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
+
"@fontsource-variable/inter": "^5.1.1",
|
|
58
59
|
"@pixi-essentials/cull": "2.0.0",
|
|
59
60
|
"@pixi/ui": "^1.0.1",
|
|
60
61
|
"d3": "7.9.0",
|
|
@@ -62,7 +63,6 @@
|
|
|
62
63
|
"fontfaceobserver": "^2.3.0",
|
|
63
64
|
"gsap": "^3.12.2",
|
|
64
65
|
"lodash.isequal": "4.5.0",
|
|
65
|
-
"lodash.merge": "4.6.2",
|
|
66
66
|
"lodash.throttle": "^4.1.1",
|
|
67
67
|
"pixi-viewport": "5.0.3",
|
|
68
68
|
"pixi.js": "7.3.2"
|