@prefecthq/graphs 2.2.17 → 2.3.1

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.
@@ -20,6 +20,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
20
20
  fullscreen: boolean | null;
21
21
  }, {}>;
22
22
  export default _default;
23
+
23
24
  type __VLS_WithDefaults<P, D> = {
24
25
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
25
26
  default: D[K];
@@ -1,5 +1,3 @@
1
- /// <reference types="gsap/types/css-plugin" />
2
- import gsap from 'gsap';
3
1
  export declare function animationFactory(): Promise<{
4
2
  animate: (el: gsap.TweenTarget, vars: gsap.TweenVars, skipAnimation?: boolean) => gsap.core.Tween;
5
3
  }>;
@@ -5,10 +5,12 @@ type ArtifactFactoryOptions = {
5
5
  enableLocalClickHandling?: boolean;
6
6
  };
7
7
  export declare function artifactFactory(artifact: RunGraphArtifact, { cullAtZoomThreshold, enableLocalClickHandling, }?: ArtifactFactoryOptions): Promise<{
8
+ isArtifact: boolean;
8
9
  element: import("pixi.js").Container<import("pixi.js").DisplayObject>;
9
- render: () => Promise<void>;
10
+ render: (artifact: RunGraphArtifact) => Promise<void>;
10
11
  getSelected: () => boolean;
11
12
  getDate: () => Date;
12
13
  getId: () => string;
13
14
  }>;
15
+ export declare function isArtifactFactory(value: Record<string, unknown>): value is ArtifactFactory;
14
16
  export {};
@@ -4,6 +4,7 @@ export type ArtifactClusterFactoryRenderProps = {
4
4
  date: Date;
5
5
  };
6
6
  export declare function artifactClusterFactory(): Promise<{
7
+ isArtifactCluster: boolean;
7
8
  element: import("pixi.js").Container<import("pixi.js").DisplayObject>;
8
9
  render: (props?: ArtifactClusterFactoryRenderProps) => Promise<void>;
9
10
  getSelected: () => boolean;
@@ -11,3 +12,4 @@ export declare function artifactClusterFactory(): Promise<{
11
12
  getIds: () => string[];
12
13
  isCluster: boolean;
13
14
  }>;
15
+ export declare function isArtifactClusterFactory(value: Record<string, unknown>): value is ArtifactClusterFactory;
@@ -1,15 +1,15 @@
1
1
  import { Container } from 'pixi.js';
2
- import { ArtifactType } from '../models';
2
+ import { ArtifactType, RunGraphArtifactTypeAndData } from '../models';
3
3
  type ArtifactNodeFactoryOptions = {
4
4
  cullAtZoomThreshold?: boolean;
5
5
  };
6
6
  type ArtifactNodeFactoryRenderOptions = {
7
7
  selected?: boolean;
8
8
  name?: string;
9
- type?: ArtifactType;
10
- };
9
+ type: ArtifactType;
10
+ } & RunGraphArtifactTypeAndData;
11
11
  export declare function artifactNodeFactory({ cullAtZoomThreshold }: ArtifactNodeFactoryOptions): Promise<{
12
12
  element: Container<import("pixi.js").DisplayObject>;
13
- render: (options?: ArtifactNodeFactoryRenderOptions) => Promise<Container>;
13
+ render: (options: ArtifactNodeFactoryRenderOptions) => Promise<Container>;
14
14
  }>;
15
15
  export {};
@@ -0,0 +1,9 @@
1
+ import { CircularProgressBar, MaskedProgressBarOptions } from '@pixi/ui';
2
+ type CircularProgressBarOptions = {
3
+ cullAtZoomThreshold?: boolean;
4
+ } & Partial<MaskedProgressBarOptions>;
5
+ export declare function circularProgressBarFactory(options?: CircularProgressBarOptions): Promise<{
6
+ element: CircularProgressBar;
7
+ render: (data: Partial<MaskedProgressBarOptions> & Pick<MaskedProgressBarOptions, 'lineWidth' | 'radius' | 'value'>) => CircularProgressBar;
8
+ }>;
9
+ export {};
@@ -1,14 +1,21 @@
1
- export declare const artifactTypes: readonly ["result", "markdown", "table", "unknown"];
1
+ export declare const artifactTypes: readonly ["result", "markdown", "table", "progress", "image", "unknown"];
2
2
  export type ArtifactType = typeof artifactTypes[number];
3
+ export type RunGraphArtifactTypeAndData = {
4
+ type: Exclude<ArtifactType, 'progress'>;
5
+ } | {
6
+ type: 'progress';
7
+ data: number;
8
+ };
3
9
  export type RunGraphArtifact = {
4
10
  id: string;
5
11
  created: Date;
6
12
  key?: string;
7
- type: ArtifactType;
8
- };
13
+ } & RunGraphArtifactTypeAndData;
9
14
  export declare const artifactTypeIconMap: {
10
15
  readonly markdown: "ArtifactMarkdown";
11
16
  readonly table: "ArtifactTable";
12
17
  readonly result: "ArtifactResult";
18
+ readonly image: "ArtifactImage";
19
+ readonly progress: "ArtifactProgress";
13
20
  readonly unknown: "Artifact";
14
21
  };
@@ -2,3 +2,5 @@ export { default as Artifact } from './artifact.svg?url';
2
2
  export { default as ArtifactMarkdown } from './artifact-markdown.svg?url';
3
3
  export { default as ArtifactResult } from './artifact-result.svg?url';
4
4
  export { default as ArtifactTable } from './artifact-table.svg?url';
5
+ export { default as ArtifactImage } from './artifact-image.svg?url';
6
+ export { default as ArtifactProgress } from './artifact-progress.svg?url';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prefecthq/graphs",
3
3
  "private": false,
4
- "version": "2.2.17",
4
+ "version": "2.3.1",
5
5
  "description": "Large scale graphs designed for Prefect",
6
6
  "scripts": {
7
7
  "serve": "vite --host --mode=demo",
@@ -52,10 +52,10 @@
52
52
  "postcss": "8.4.38",
53
53
  "tailwindcss": "3.4.1",
54
54
  "tsc-alias": "1.8.8",
55
- "typescript": "5.3.3",
55
+ "typescript": "5.4.5",
56
56
  "vite": "5.2.6",
57
57
  "vite-svg-loader": "^5.1.0",
58
- "vue-tsc": "2.0.7"
58
+ "vue-tsc": "2.0.19"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@prefecthq/prefect-design": "^2.10.10",
@@ -65,6 +65,7 @@
65
65
  },
66
66
  "dependencies": {
67
67
  "@pixi-essentials/cull": "2.0.0",
68
+ "@pixi/ui": "^1.0.1",
68
69
  "d3": "7.8.5",
69
70
  "date-fns": "3.6.0",
70
71
  "fontfaceobserver": "^2.3.0",