@prefecthq/graphs 2.1.5 → 2.1.7

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.
@@ -1,4 +1,3 @@
1
- export declare const DEFAULT_POLL_INTERVAL = 1000;
2
1
  export declare const DEFAULT_NODES_CONTAINER_NAME = "nodes-container";
3
2
  export declare const DEFAULT_NODE_CONTAINER_NAME = "node-container";
4
3
  export declare const DEFAULT_EDGE_CONTAINER_NAME = "edge-container";
@@ -6,6 +5,7 @@ export declare const DEFAULT_TIME_COLUMN_SPAN_SECONDS = 1;
6
5
  export declare const DEFAULT_TIME_COLUMN_SIZE_PIXELS = 20;
7
6
  export declare const DEFAULT_LINEAR_COLUMN_SIZE_PIXELS = 200;
8
7
  export declare const DEFAULT_LABEL_CULLING_THRESHOLD = 0.2;
8
+ export declare const DEFAULT_TOGGLE_CULLING_THRESHOLD = 0.2;
9
9
  export declare const DEFAULT_EDGE_CULLING_THRESHOLD = 0.1;
10
10
  export declare const DEFAULT_TEXTURE_RESOLUTION = 10;
11
11
  export declare const DEFAULT_EDGE_POINTS = 20;
@@ -1,11 +1,10 @@
1
- import { Container, ColorSource } from 'pixi.js';
1
+ import { Container } from 'pixi.js';
2
2
  type NodeArrowBarStyles = {
3
3
  inside: boolean;
4
- background: ColorSource;
5
4
  isOpen: boolean;
6
5
  };
7
6
  export declare function nodeArrowButtonFactory(): Promise<{
8
7
  element: Container<import("pixi.js").DisplayObject>;
9
- render: ({ inside, isOpen, background }: NodeArrowBarStyles) => Promise<Container>;
8
+ render: ({ inside, isOpen }: NodeArrowBarStyles) => Promise<Container>;
10
9
  }>;
11
10
  export {};
@@ -3,6 +3,7 @@ import { RunGraphData } from '../models/RunGraph';
3
3
  export type NodesContainer = Awaited<ReturnType<typeof nodesContainerFactory>>;
4
4
  export declare function nodesContainerFactory(): Promise<{
5
5
  element: Container<import("pixi.js").DisplayObject>;
6
+ stopWorker: () => void;
6
7
  getSize: () => {
7
8
  width: number;
8
9
  height: number;
@@ -19,7 +19,6 @@ export type RunGraphNode = {
19
19
  kind: RunGraphNodeKind;
20
20
  id: string;
21
21
  label: string;
22
- state_name: string;
23
22
  state_type: StateType;
24
23
  start_time: Date;
25
24
  end_time: Date | null;
@@ -47,6 +46,7 @@ export type RunGraphStyles = {
47
46
  nodePadding?: number;
48
47
  nodeRadius?: number;
49
48
  nodeBorderRadius?: number;
49
+ nodeToggleBgColor?: ColorSource;
50
50
  nodeToggleSize?: number;
51
51
  nodeToggleBorderRadius?: number;
52
52
  nodeToggleBorderColor?: ColorSource;
@@ -7,3 +7,4 @@ export declare function uncull(): void;
7
7
  export declare function waitForCull(): Promise<Cull>;
8
8
  export declare function waitForEdgeCull(): Promise<VisibilityCull>;
9
9
  export declare function waitForLabelCull(): Promise<VisibilityCull>;
10
+ export declare function waitForToggleCull(): Promise<VisibilityCull>;
@@ -32,6 +32,7 @@ type Events = {
32
32
  runDataUpdated: RunGraphData;
33
33
  nodeSelected: NodeSelection | null;
34
34
  layoutUpdated: void;
35
+ toggleCullCreated: VisibilityCull;
35
36
  };
36
37
  export type EventKey = keyof Events;
37
38
  export declare const emitter: {
@@ -1,2 +1,2 @@
1
- import { RunGraphData } from '../models/RunGraph';
2
- export declare function getInitialHorizontalScaleMultiplier({ start_time, end_time }: RunGraphData): number;
1
+ import { RequiredGraphConfig, RunGraphData } from '../models/RunGraph';
2
+ export declare function getInitialHorizontalScaleMultiplier({ start_time, end_time, nodes }: RunGraphData, config: RequiredGraphConfig, aspectRatio: number): number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prefecthq/graphs",
3
3
  "private": false,
4
- "version": "2.1.5",
4
+ "version": "2.1.7",
5
5
  "description": "Large scale graphs designed for Prefect",
6
6
  "scripts": {
7
7
  "serve": "vite --host --mode=demo",
@@ -38,12 +38,12 @@
38
38
  "homepage": "https://github.com/PrefectHQ/graphs#readme",
39
39
  "devDependencies": {
40
40
  "@prefecthq/eslint-config": "1.0.31",
41
- "@types/d3": "7.4.2",
41
+ "@types/d3": "7.4.3",
42
42
  "@types/fontfaceobserver": "^2.1.2",
43
- "@types/lodash.isequal": "4.5.7",
44
- "@types/lodash.merge": "4.6.8",
43
+ "@types/lodash.isequal": "4.5.8",
44
+ "@types/lodash.merge": "4.6.9",
45
45
  "@types/node": "^20.1.7",
46
- "@vitejs/plugin-vue": "4.4.0",
46
+ "@vitejs/plugin-vue": "4.4.1",
47
47
  "auto-changelog": "^2.4.0",
48
48
  "autoprefixer": "10.4.16",
49
49
  "eslint": "8.53.0",