@prefecthq/graphs 2.0.5 → 2.1.0
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-57858a3b.js.map +1 -0
- package/dist/graphs.mjs +31635 -5
- package/dist/graphs.mjs.map +1 -1
- package/dist/graphs.umd.js +693 -1093
- package/dist/graphs.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/demo/{sections/components/FlowRunTimelineDemo.vue.d.ts → components/AppComponentNavigationItems.vue.d.ts} +5 -0
- package/dist/types/demo/components/{HashLink.vue.d.ts → AppNavigationBar.vue.d.ts} +5 -3
- package/dist/types/demo/main.d.ts +1 -1
- package/dist/types/src/components/RunGraph.vue.d.ts +39 -0
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/consts.d.ts +16 -0
- package/dist/types/src/factories/animation.d.ts +4 -0
- package/dist/types/src/factories/arrow.d.ts +15 -0
- package/dist/types/src/factories/bar.d.ts +13 -0
- package/dist/types/src/factories/border.d.ts +12 -0
- package/dist/types/src/factories/cap.d.ts +12 -0
- package/dist/types/src/factories/data.d.ts +7 -0
- package/dist/types/src/factories/edge.d.ts +8 -0
- package/dist/types/src/factories/events.d.ts +13 -0
- package/dist/types/src/factories/guide.d.ts +7 -0
- package/dist/types/src/factories/guides.d.ts +5 -0
- package/dist/types/src/factories/label.d.ts +6 -0
- package/dist/types/src/factories/node.d.ts +10 -0
- package/dist/types/src/factories/nodeArrowButton.d.ts +11 -0
- package/dist/types/src/factories/nodeBar.d.ts +6 -0
- package/dist/types/src/factories/nodeFlowRun.d.ts +9 -0
- package/dist/types/src/factories/nodeTaskRun.d.ts +9 -0
- package/dist/types/src/factories/nodes.d.ts +11 -0
- package/dist/types/src/factories/offsets.d.ts +24 -0
- package/dist/types/src/factories/position.d.ts +12 -0
- package/dist/types/src/factories/rectangle.d.ts +2 -0
- package/dist/types/src/factories/settings.d.ts +3 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/models/RunGraph.d.ts +70 -0
- package/dist/types/src/models/boundsContainer.d.ts +15 -0
- package/dist/types/src/models/guides.d.ts +6 -0
- package/dist/types/src/models/index.d.ts +3 -1
- package/dist/types/src/models/layout.d.ts +35 -0
- package/dist/types/src/models/nonTemporalLayoutError.d.ts +3 -0
- package/dist/types/src/models/selection.d.ts +5 -0
- package/dist/types/src/models/states.d.ts +2 -0
- package/dist/types/src/models/viewport.d.ts +1 -0
- package/dist/types/src/objects/application.d.ts +5 -0
- package/dist/types/src/objects/config.d.ts +4 -0
- package/dist/types/src/objects/culling.d.ts +6 -0
- package/dist/types/src/objects/edgeCulling.d.ts +4 -0
- package/dist/types/src/objects/events.d.ts +48 -0
- package/dist/types/src/objects/fonts.d.ts +9 -0
- package/dist/types/src/objects/guides.d.ts +2 -0
- package/dist/types/src/objects/index.d.ts +10 -0
- package/dist/types/src/objects/labelCulling.d.ts +4 -0
- package/dist/types/src/objects/nodes.d.ts +4 -0
- package/dist/types/src/objects/scale.d.ts +4 -0
- package/dist/types/src/objects/scope.d.ts +4 -0
- package/dist/types/src/objects/selection.d.ts +5 -0
- package/dist/types/src/objects/settings.d.ts +26 -0
- package/dist/types/src/objects/stage.d.ts +4 -0
- package/dist/types/src/objects/viewport.d.ts +17 -0
- package/dist/types/src/services/visibilityCull.d.ts +12 -0
- package/dist/types/src/textures/cap.d.ts +6 -0
- package/dist/types/src/textures/corner.d.ts +7 -0
- package/dist/types/src/textures/pixel.d.ts +2 -0
- package/dist/types/src/utilities/columns.d.ts +14 -0
- package/dist/types/src/utilities/effectScopeFactory.d.ts +6 -0
- package/dist/types/src/utilities/exhaustive.d.ts +1 -0
- package/dist/types/src/utilities/getEdgesCount.d.ts +2 -0
- package/dist/types/src/utilities/getInitialHorizontalScaleMultiplier.d.ts +2 -0
- package/dist/types/src/utilities/keyboard.d.ts +1 -0
- package/dist/types/src/utilities/repeat.d.ts +1 -0
- package/dist/types/src/utilities/timeIncrements.d.ts +21 -0
- package/dist/types/src/workers/layouts/horizontal.d.ts +6 -0
- package/dist/types/src/workers/layouts/nearestParentVertical.d.ts +4 -0
- package/dist/types/src/workers/layouts/vertical.d.ts +4 -0
- package/dist/types/src/workers/runGraph.d.ts +21 -0
- package/dist/types/vite.config.d.ts +1 -1
- package/package.json +23 -19
- package/dist/assets/nodeLayout.worker-ba54e168.js.map +0 -1
- package/dist/index-cd319f80.mjs +0 -19948
- package/dist/index-cd319f80.mjs.map +0 -1
- package/dist/types/demo/components/ComponentPage.vue.d.ts +0 -30
- package/dist/types/demo/components/ResizableSection.vue.d.ts +0 -9
- package/dist/types/demo/components/contextAccordionChildItem.d.ts +0 -5
- package/dist/types/demo/components/router.d.ts +0 -3
- package/dist/types/demo/sections/components/TimescaleTable.vue.d.ts +0 -30
- package/dist/types/demo/utilities/randomColor.d.ts +0 -5
- package/dist/types/demo/utilities/randomDate.d.ts +0 -7
- package/dist/types/demo/utilities/randomStarName.d.ts +0 -4
- package/dist/types/demo/utilities/starnames/index.d.ts +0 -3
- package/dist/types/demo/utilities/starnames/names.d.ts +0 -2
- package/dist/types/demo/utilities/starnames/prefixes.d.ts +0 -2
- package/dist/types/demo/utilities/starnames/suffixes.d.ts +0 -2
- package/dist/types/demo/utilities/timescaleData.d.ts +0 -14
- package/dist/types/src/FlowRunTimeline.vue.d.ts +0 -52
- package/dist/types/src/containers/guide.d.ts +0 -29
- package/dist/types/src/containers/guides.d.ts +0 -26
- package/dist/types/src/models/FlowRunTimeline.d.ts +0 -191
- package/dist/types/src/pixiFunctions/bitmapFonts.d.ts +0 -4
- package/dist/types/src/pixiFunctions/deselectLayer.d.ts +0 -12
- package/dist/types/src/pixiFunctions/index.d.ts +0 -13
- package/dist/types/src/pixiFunctions/initPixiApp.d.ts +0 -2
- package/dist/types/src/pixiFunctions/initViewport.d.ts +0 -3
- package/dist/types/src/pixiFunctions/loadingIndicator.d.ts +0 -19
- package/dist/types/src/pixiFunctions/nodeSprites.d.ts +0 -34
- package/dist/types/src/pixiFunctions/roundedBorderRect.d.ts +0 -39
- package/dist/types/src/pixiFunctions/subNodesToggle.d.ts +0 -41
- package/dist/types/src/pixiFunctions/timeScale.d.ts +0 -2
- package/dist/types/src/pixiFunctions/timelineEdge.d.ts +0 -49
- package/dist/types/src/pixiFunctions/timelineNode.d.ts +0 -112
- package/dist/types/src/pixiFunctions/timelineNodes.d.ts +0 -54
- package/dist/types/src/pixiFunctions/timelinePlayhead.d.ts +0 -14
- package/dist/types/src/pixiFunctions/viewport.d.ts +0 -1
- package/dist/types/src/types/index.d.ts +0 -1
- package/dist/types/src/types/timeline.d.ts +0 -11
- package/dist/types/src/utilities/index.d.ts +0 -5
- package/dist/types/src/utilities/map.d.ts +0 -1
- package/dist/types/src/utilities/math.d.ts +0 -13
- package/dist/types/src/utilities/style.d.ts +0 -4
- package/dist/types/src/utilities/time.d.ts +0 -42
- package/dist/types/src/utilities/viewport.d.ts +0 -3
- package/dist/types/src/utilities/zIndex.d.ts +0 -5
- package/dist/types/src/workers/layouts/nearestNeighbor.d.ts +0 -10
- package/dist/types/src/workers/layouts/waterfall.d.ts +0 -3
- package/dist/viewport.es-3ce16114.mjs +0 -2237
- package/dist/viewport.es-3ce16114.mjs.map +0 -1
- /package/dist/types/demo/{components/ContextSidebar.vue.d.ts → sections/WelcomePage.vue.d.ts} +0 -0
- /package/dist/types/demo/sections/{Data.vue.d.ts → components/RunGraphDemo.vue.d.ts} +0 -0
- /package/dist/types/{demo/sections/Home.vue.d.ts → src/components/RunGraphSettings.vue.d.ts} +0 -0
- /package/dist/types/src/workers/{nodeLayout.worker.d.ts → runGraph.worker.d.ts} +0 -0
package/dist/style.css
CHANGED
|
@@ -1 +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,2 +1,7 @@
|
|
|
1
|
+
import { RouteLocationRaw } from 'vue-router';
|
|
2
|
+
export type ContextAccordionChildItem = {
|
|
3
|
+
to: RouteLocationRaw;
|
|
4
|
+
title?: string;
|
|
5
|
+
};
|
|
1
6
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
2
7
|
export default _default;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
|
|
2
|
+
layout?: "horizontal" | "vertical" | undefined;
|
|
3
3
|
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
-
|
|
4
|
+
layout?: "horizontal" | "vertical" | undefined;
|
|
5
5
|
}>>>, {}, {}>, {
|
|
6
|
-
|
|
6
|
+
prepend?(_: {
|
|
7
|
+
layout: "horizontal" | "vertical";
|
|
8
|
+
}): any;
|
|
7
9
|
}>;
|
|
8
10
|
export default _default;
|
|
9
11
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import '@prefecthq/prefect-design/dist/style.css';
|
|
2
|
-
import '
|
|
2
|
+
import '@/styles/style.css';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { RunGraphProps } from '../models/RunGraph';
|
|
2
|
+
import { NodeSelection } from '../models/selection';
|
|
3
|
+
import { ViewportDateRange } from '../models/viewport';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RunGraphProps>, {
|
|
5
|
+
fullscreen: null;
|
|
6
|
+
selected: null;
|
|
7
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:viewport": (value: ViewportDateRange) => void;
|
|
9
|
+
"update:fullscreen": (value: boolean) => void;
|
|
10
|
+
"update:selected": (value: NodeSelection | null) => void;
|
|
11
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<RunGraphProps>, {
|
|
12
|
+
fullscreen: null;
|
|
13
|
+
selected: null;
|
|
14
|
+
}>>> & {
|
|
15
|
+
"onUpdate:viewport"?: ((value: ViewportDateRange) => any) | undefined;
|
|
16
|
+
"onUpdate:fullscreen"?: ((value: boolean) => any) | undefined;
|
|
17
|
+
"onUpdate:selected"?: ((value: NodeSelection | null) => any) | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
selected: NodeSelection | null;
|
|
20
|
+
fullscreen: boolean | null;
|
|
21
|
+
}, {}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
+
} : {
|
|
28
|
+
type: import('vue').PropType<T[K]>;
|
|
29
|
+
required: true;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type __VLS_WithDefaults<P, D> = {
|
|
33
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
|
+
default: D[K];
|
|
35
|
+
}> : P[K];
|
|
36
|
+
};
|
|
37
|
+
type __VLS_Prettify<T> = {
|
|
38
|
+
[K in keyof T]: T[K];
|
|
39
|
+
} & {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as RunGraph } from './RunGraph.vue';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const DEFAULT_POLL_INTERVAL = 1000;
|
|
2
|
+
export declare const DEFAULT_NODES_CONTAINER_NAME = "nodes-container";
|
|
3
|
+
export declare const DEFAULT_NODE_CONTAINER_NAME = "node-container";
|
|
4
|
+
export declare const DEFAULT_EDGE_CONTAINER_NAME = "edge-container";
|
|
5
|
+
export declare const DEFAULT_TIME_COLUMN_SPAN_SECONDS = 1;
|
|
6
|
+
export declare const DEFAULT_TIME_COLUMN_SIZE_PIXELS = 20;
|
|
7
|
+
export declare const DEFAULT_LINEAR_COLUMN_SIZE_PIXELS = 200;
|
|
8
|
+
export declare const DEFAULT_LABEL_CULLING_THRESHOLD = 0.2;
|
|
9
|
+
export declare const DEFAULT_EDGE_CULLING_THRESHOLD = 0.1;
|
|
10
|
+
export declare const DEFAULT_TEXTURE_RESOLUTION = 10;
|
|
11
|
+
export declare const DEFAULT_EDGE_POINTS = 20;
|
|
12
|
+
export declare const DEFAULT_EDGE_MINIMUM_BEZIER = 64;
|
|
13
|
+
export declare const DEFAULT_HORIZONTAL_SCALE_MULTIPLIER = 0.25;
|
|
14
|
+
export declare const DEFAULT_HORIZONTAL_SCALE = 1;
|
|
15
|
+
export declare const DEFAULT_GUIDES_COUNT = 30;
|
|
16
|
+
export declare const DEFAULT_GUIDES_MIN_GAP = 260;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Sprite } from 'pixi.js';
|
|
2
|
+
import { CornerStyle } from '../textures/corner';
|
|
3
|
+
export declare enum ArrowDirection {
|
|
4
|
+
Up = 0,
|
|
5
|
+
Down = 180,
|
|
6
|
+
Left = 270,
|
|
7
|
+
Right = 90
|
|
8
|
+
}
|
|
9
|
+
export type ArrowStyle = CornerStyle & {
|
|
10
|
+
rotate?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare function arrowFactory(): {
|
|
13
|
+
element: Sprite;
|
|
14
|
+
render: (style: ArrowStyle) => Promise<Sprite>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ColorSource, Container } from 'pixi.js';
|
|
2
|
+
export type BarStyle = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
background: ColorSource;
|
|
6
|
+
radius: number;
|
|
7
|
+
capLeft?: boolean;
|
|
8
|
+
capRight?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare function barFactory(): Promise<{
|
|
11
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
12
|
+
render: (style: BarStyle) => Promise<Container>;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ColorSource, Container } from 'pixi.js';
|
|
2
|
+
export type BorderStyle = {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
stroke: number;
|
|
6
|
+
radius?: number;
|
|
7
|
+
color?: ColorSource;
|
|
8
|
+
};
|
|
9
|
+
export declare function borderFactory(): {
|
|
10
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
11
|
+
render: (style: BorderStyle) => Promise<Container>;
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Sprite } from 'pixi.js';
|
|
2
|
+
import { CapStyle } from '../textures/cap';
|
|
3
|
+
type CapSprites = {
|
|
4
|
+
left: Sprite;
|
|
5
|
+
right: Sprite;
|
|
6
|
+
};
|
|
7
|
+
export declare function capFactory(): {
|
|
8
|
+
left: Sprite;
|
|
9
|
+
right: Sprite;
|
|
10
|
+
render: (style: CapStyle) => Promise<CapSprites>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { Pixels } from '../models/layout';
|
|
3
|
+
export type EdgeFactory = Awaited<ReturnType<typeof edgeFactory>>;
|
|
4
|
+
export declare function edgeFactory(): Promise<{
|
|
5
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
6
|
+
render: () => Promise<Container>;
|
|
7
|
+
setPosition: (source: Pixels, target: Pixels) => Promise<void>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type Handler<T = any> = (...payload: T[]) => void;
|
|
2
|
+
type Events = Record<string, unknown>;
|
|
3
|
+
export declare function eventsFactory<T extends Events>(): {
|
|
4
|
+
on: <E extends keyof T>(event: E, handler: Handler<T[E]>) => () => void;
|
|
5
|
+
off: <E_1 extends keyof T>(event: E_1, handler: Handler<T[E_1]>) => void;
|
|
6
|
+
once: <E_2 extends keyof T>(event: E_2, handler: Handler<T[E_2]>) => void;
|
|
7
|
+
emit: {
|
|
8
|
+
<E_3 extends keyof T>(event: undefined extends T[E_3] ? E_3 : never): void;
|
|
9
|
+
<E_4 extends keyof T>(event: E_4, payload: T[E_4]): void;
|
|
10
|
+
};
|
|
11
|
+
clear: () => void;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { FormatDate } from '../models/guides';
|
|
3
|
+
export type GuideFactory = Awaited<ReturnType<typeof guideFactory>>;
|
|
4
|
+
export declare function guideFactory(): Promise<{
|
|
5
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
6
|
+
render: (date: Date, labelFormatter: FormatDate) => void;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoundsContainer } from '../models/boundsContainer';
|
|
2
|
+
import { Pixels } from '../models/layout';
|
|
3
|
+
import { RunGraphNode } from '../models/RunGraph';
|
|
4
|
+
export type NodeContainerFactory = Awaited<ReturnType<typeof nodeContainerFactory>>;
|
|
5
|
+
export declare function nodeContainerFactory(node: RunGraphNode): Promise<{
|
|
6
|
+
element: BoundsContainer;
|
|
7
|
+
render: (node: RunGraphNode) => Promise<BoundsContainer>;
|
|
8
|
+
bar: import("pixi.js").Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
setPosition: ({ x, y }: Pixels) => void;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container, ColorSource } from 'pixi.js';
|
|
2
|
+
type NodeArrowBarStyles = {
|
|
3
|
+
inside: boolean;
|
|
4
|
+
background: ColorSource;
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function nodeArrowButtonFactory(): Promise<{
|
|
8
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
render: ({ inside, isOpen, background }: NodeArrowBarStyles) => Promise<Container>;
|
|
10
|
+
}>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BoundsContainer } from '../models/boundsContainer';
|
|
2
|
+
import { RunGraphNode } from '../models/RunGraph';
|
|
3
|
+
export type FlowRunContainer = Awaited<ReturnType<typeof flowRunContainerFactory>>;
|
|
4
|
+
export declare function flowRunContainerFactory(node: RunGraphNode): Promise<{
|
|
5
|
+
kind: "flow-run";
|
|
6
|
+
element: BoundsContainer;
|
|
7
|
+
bar: import("pixi.js").Container<import("pixi.js").DisplayObject>;
|
|
8
|
+
render: (node: RunGraphNode) => Promise<BoundsContainer>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BoundsContainer } from '../models/boundsContainer';
|
|
2
|
+
import { RunGraphNode } from '../models/RunGraph';
|
|
3
|
+
export type TaskRunContainer = Awaited<ReturnType<typeof taskRunContainerFactory>>;
|
|
4
|
+
export declare function taskRunContainerFactory(): Promise<{
|
|
5
|
+
kind: "task-run";
|
|
6
|
+
element: BoundsContainer;
|
|
7
|
+
render: (node: RunGraphNode) => Promise<BoundsContainer>;
|
|
8
|
+
bar: import("pixi.js").Container<import("pixi.js").DisplayObject>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
import { RunGraphData } from '../models/RunGraph';
|
|
3
|
+
export type NodesContainer = Awaited<ReturnType<typeof nodesContainerFactory>>;
|
|
4
|
+
export declare function nodesContainerFactory(): Promise<{
|
|
5
|
+
element: Container<import("pixi.js").DisplayObject>;
|
|
6
|
+
getSize: () => {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
render: (data: RunGraphData) => Promise<void>;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type SetOffsetParameters = {
|
|
2
|
+
axis: number;
|
|
3
|
+
nodeId: string;
|
|
4
|
+
offset: number;
|
|
5
|
+
};
|
|
6
|
+
type RemoveOffsetParameters = {
|
|
7
|
+
axis: number;
|
|
8
|
+
nodeId: string;
|
|
9
|
+
};
|
|
10
|
+
type MaybeGetter<T> = T | (() => T);
|
|
11
|
+
export type Offsets = Awaited<ReturnType<typeof offsetsFactory>>;
|
|
12
|
+
export type OffsetParameters = {
|
|
13
|
+
gap?: MaybeGetter<number>;
|
|
14
|
+
minimum?: MaybeGetter<number>;
|
|
15
|
+
};
|
|
16
|
+
export declare function offsetsFactory({ gap, minimum }?: OffsetParameters): {
|
|
17
|
+
getOffset: (axis: number) => number;
|
|
18
|
+
getTotalOffset: (axis: number) => number;
|
|
19
|
+
getTotalValue: (axis: number) => number;
|
|
20
|
+
setOffset: ({ axis, nodeId, offset }: SetOffsetParameters) => void;
|
|
21
|
+
removeOffset: ({ axis, nodeId }: RemoveOffsetParameters) => void;
|
|
22
|
+
clear: () => void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScaleLinear, ScaleTime } from 'd3';
|
|
2
|
+
import { HorizontalMode, VerticalMode } from '../models/layout';
|
|
3
|
+
export type VerticalPositionSettings = {
|
|
4
|
+
mode: VerticalMode;
|
|
5
|
+
};
|
|
6
|
+
export type HorizontalPositionSettings = {
|
|
7
|
+
mode: HorizontalMode;
|
|
8
|
+
range: [number, number];
|
|
9
|
+
domain: [Date, Date] | [number, number];
|
|
10
|
+
};
|
|
11
|
+
export type HorizontalScale = ReturnType<typeof horizontalScaleFactory>;
|
|
12
|
+
export declare function horizontalScaleFactory(settings: HorizontalPositionSettings): ScaleTime<number, number> | ScaleLinear<number, number>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ColorSource } from 'pixi.js';
|
|
2
|
+
import { NodeSelection } from '../models/selection';
|
|
3
|
+
import { StateType } from '../models/states';
|
|
4
|
+
import { ViewportDateRange } from '../models/viewport';
|
|
5
|
+
export type RunGraphProps = {
|
|
6
|
+
config: RunGraphConfig;
|
|
7
|
+
viewport?: ViewportDateRange;
|
|
8
|
+
fullscreen?: boolean | null;
|
|
9
|
+
selected?: NodeSelection | null;
|
|
10
|
+
};
|
|
11
|
+
export type RunGraphData = {
|
|
12
|
+
root_node_ids: string[];
|
|
13
|
+
start_time: Date;
|
|
14
|
+
end_time: Date | null;
|
|
15
|
+
nodes: RunGraphNodes;
|
|
16
|
+
};
|
|
17
|
+
export type RunGraphNodes = Map<string, RunGraphNode>;
|
|
18
|
+
export type RunGraphNode = {
|
|
19
|
+
kind: RunGraphNodeKind;
|
|
20
|
+
id: string;
|
|
21
|
+
label: string;
|
|
22
|
+
state_name: string;
|
|
23
|
+
state_type: StateType;
|
|
24
|
+
start_time: Date;
|
|
25
|
+
end_time: Date | null;
|
|
26
|
+
parents: RunGraphEdge[];
|
|
27
|
+
children: RunGraphEdge[];
|
|
28
|
+
};
|
|
29
|
+
export type RunGraphEdge = {
|
|
30
|
+
id: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const runGraphNodeKinds: readonly ["flow-run", "task-run"];
|
|
33
|
+
export type RunGraphNodeKind = typeof runGraphNodeKinds[number];
|
|
34
|
+
export declare function isRunGraphNodeType(value: unknown): value is RunGraphNodeKind;
|
|
35
|
+
export type RunGraphFetch = (runId: string) => RunGraphData | Promise<RunGraphData>;
|
|
36
|
+
export type RunGraphNodeStyles = {
|
|
37
|
+
background?: ColorSource;
|
|
38
|
+
};
|
|
39
|
+
export type RunGraphStyles = {
|
|
40
|
+
rowGap?: number;
|
|
41
|
+
columnGap?: number;
|
|
42
|
+
nodesPadding?: number;
|
|
43
|
+
nodeHeight?: number;
|
|
44
|
+
nodePadding?: number;
|
|
45
|
+
nodeRadius?: number;
|
|
46
|
+
nodeBorderRadius?: number;
|
|
47
|
+
nodeToggleSize?: number;
|
|
48
|
+
nodeToggleBorderRadius?: number;
|
|
49
|
+
nodeToggleBorderColor?: ColorSource;
|
|
50
|
+
nodeSelectedBorderColor?: ColorSource;
|
|
51
|
+
edgeColor?: string;
|
|
52
|
+
guideLineWidth?: number;
|
|
53
|
+
guideLineColor?: string;
|
|
54
|
+
guideTextTopPadding?: number;
|
|
55
|
+
guideTextLeftPadding?: number;
|
|
56
|
+
guideTextSize?: number;
|
|
57
|
+
guideTextColor?: string;
|
|
58
|
+
node?: (node: RunGraphNode) => RunGraphNodeStyles;
|
|
59
|
+
};
|
|
60
|
+
export type RunGraphConfig = {
|
|
61
|
+
runId: string;
|
|
62
|
+
fetch: RunGraphFetch;
|
|
63
|
+
animationDuration?: number;
|
|
64
|
+
styles?: RunGraphStyles;
|
|
65
|
+
disableAnimationsThreshold?: number;
|
|
66
|
+
disableEdgesThreshold?: number;
|
|
67
|
+
};
|
|
68
|
+
export type RequiredGraphConfig = Omit<Required<RunGraphConfig>, 'styles'> & {
|
|
69
|
+
styles: Required<RunGraphStyles>;
|
|
70
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Container } from 'pixi.js';
|
|
2
|
+
/**
|
|
3
|
+
* This container extends the container from pixi but overrides
|
|
4
|
+
* the updateTransform and calculateBounds methods.
|
|
5
|
+
* The versions of these methods here are functional copies
|
|
6
|
+
* except these version also check children whose renderable
|
|
7
|
+
* or visible property is set to false. This means a BoundsContainer
|
|
8
|
+
* will have the same bounds even if some or all of its children are not
|
|
9
|
+
* rendered. This is important for any container where we need to know the actual
|
|
10
|
+
* size of the container even if its children have been culled.
|
|
11
|
+
*/
|
|
12
|
+
export declare class BoundsContainer extends Container {
|
|
13
|
+
updateTransform(): void;
|
|
14
|
+
calculateBounds(): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export type Pixels = {
|
|
2
|
+
x: number;
|
|
3
|
+
y: number;
|
|
4
|
+
};
|
|
5
|
+
export type VerticalMode = 'waterfall' | 'nearest-parent';
|
|
6
|
+
export type HorizontalMode = 'temporal' | 'dependency';
|
|
7
|
+
export type NodeSize = {
|
|
8
|
+
height: number;
|
|
9
|
+
width: number;
|
|
10
|
+
};
|
|
11
|
+
export type LayoutSettings = {
|
|
12
|
+
horizontal: HorizontalMode;
|
|
13
|
+
vertical: VerticalMode;
|
|
14
|
+
horizontalScaleMultiplierDefault: number;
|
|
15
|
+
horizontalScaleMultiplier: number;
|
|
16
|
+
disableEdges: boolean;
|
|
17
|
+
disableAnimations: boolean;
|
|
18
|
+
disableGuides: boolean;
|
|
19
|
+
isTemporal: () => boolean;
|
|
20
|
+
isDependency: () => boolean;
|
|
21
|
+
isWaterfall: () => boolean;
|
|
22
|
+
isNearestParent: () => boolean;
|
|
23
|
+
};
|
|
24
|
+
export type NodeWidths = Map<string, number>;
|
|
25
|
+
export type NodeLayoutResponse = {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
column: number;
|
|
29
|
+
row: number;
|
|
30
|
+
};
|
|
31
|
+
export type NodesLayoutResponse = {
|
|
32
|
+
maxRow: number;
|
|
33
|
+
maxColumn: number;
|
|
34
|
+
positions: Map<string, NodeLayoutResponse>;
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ViewportDateRange = [start: Date, end: Date];
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Application } from 'pixi.js';
|
|
2
|
+
export declare let application: Application | null;
|
|
3
|
+
export declare function startApplication(): Promise<void>;
|
|
4
|
+
export declare function stopApplication(): void;
|
|
5
|
+
export declare function waitForApplication(): Promise<Application>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Cull } from '@pixi-essentials/cull';
|
|
2
|
+
export declare function startCulling(): Promise<void>;
|
|
3
|
+
export declare function stopCulling(): void;
|
|
4
|
+
export declare function cull(): Promise<void>;
|
|
5
|
+
export declare function uncull(): void;
|
|
6
|
+
export declare function waitForCull(): Promise<Cull>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Cull } from '@pixi-essentials/cull';
|
|
2
|
+
import { Viewport } from 'pixi-viewport';
|
|
3
|
+
import { Application, Container } from 'pixi.js';
|
|
4
|
+
import { EffectScope } from 'vue';
|
|
5
|
+
import { HorizontalScale } from '../factories/position';
|
|
6
|
+
import { LayoutSettings } from '../models/layout';
|
|
7
|
+
import { RequiredGraphConfig, RunGraphData } from '../models/RunGraph';
|
|
8
|
+
import { NodeSelection } from '../models/selection';
|
|
9
|
+
import { ViewportDateRange } from '../models/viewport';
|
|
10
|
+
import { Fonts } from '../objects/fonts';
|
|
11
|
+
import { VisibilityCull } from '../services/visibilityCull';
|
|
12
|
+
type Events = {
|
|
13
|
+
scaleCreated: HorizontalScale;
|
|
14
|
+
scaleUpdated: HorizontalScale;
|
|
15
|
+
applicationCreated: Application;
|
|
16
|
+
applicationResized: Application;
|
|
17
|
+
stageCreated: HTMLDivElement;
|
|
18
|
+
stageUpdated: HTMLDivElement;
|
|
19
|
+
viewportCreated: Viewport;
|
|
20
|
+
viewportDateRangeUpdated: ViewportDateRange;
|
|
21
|
+
configCreated: RequiredGraphConfig;
|
|
22
|
+
configUpdated: RequiredGraphConfig;
|
|
23
|
+
scopeCreated: EffectScope;
|
|
24
|
+
fontsLoaded: Fonts;
|
|
25
|
+
containerCreated: Container;
|
|
26
|
+
layoutSettingsUpdated: LayoutSettings;
|
|
27
|
+
layoutSettingsCreated: LayoutSettings;
|
|
28
|
+
cullCreated: Cull;
|
|
29
|
+
labelCullCreated: VisibilityCull;
|
|
30
|
+
edgeCullCreated: VisibilityCull;
|
|
31
|
+
runDataCreated: RunGraphData;
|
|
32
|
+
runDataUpdated: RunGraphData;
|
|
33
|
+
nodeSelected: NodeSelection | null;
|
|
34
|
+
layoutUpdated: void;
|
|
35
|
+
};
|
|
36
|
+
export type EventKey = keyof Events;
|
|
37
|
+
export declare const emitter: {
|
|
38
|
+
on: <E extends keyof Events>(event: E, handler: (...payload: Events[E][]) => void) => () => void;
|
|
39
|
+
off: <E_1 extends keyof Events>(event: E_1, handler: (...payload: Events[E_1][]) => void) => void;
|
|
40
|
+
once: <E_2 extends keyof Events>(event: E_2, handler: (...payload: Events[E_2][]) => void) => void;
|
|
41
|
+
emit: {
|
|
42
|
+
<E_3 extends keyof Events>(event: undefined extends Events[E_3] ? E_3 : never): void;
|
|
43
|
+
<E_4 extends keyof Events>(event: E_4, payload: Events[E_4]): void;
|
|
44
|
+
};
|
|
45
|
+
clear: () => void;
|
|
46
|
+
};
|
|
47
|
+
export declare function waitForEvent<T extends EventKey>(event: T): Promise<Events[T]>;
|
|
48
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BitmapText } from 'pixi.js';
|
|
2
|
+
declare const fonts: {
|
|
3
|
+
readonly inter: (text: string) => BitmapText;
|
|
4
|
+
};
|
|
5
|
+
export type Fonts = typeof fonts;
|
|
6
|
+
export declare function startFonts(): Promise<void>;
|
|
7
|
+
export declare function stopFonts(): void;
|
|
8
|
+
export declare function waitForFonts(): Promise<Fonts>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RunGraphProps } from '../models/RunGraph';
|
|
2
|
+
export * from './application';
|
|
3
|
+
export * from './stage';
|
|
4
|
+
export * from './viewport';
|
|
5
|
+
type StartParameters = {
|
|
6
|
+
stage: HTMLDivElement;
|
|
7
|
+
props: RunGraphProps;
|
|
8
|
+
};
|
|
9
|
+
export declare function start({ stage, props }: StartParameters): void;
|
|
10
|
+
export declare function stop(): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { NodeSelection } from '../models/selection';
|
|
2
|
+
export declare function startSelection(): Promise<void>;
|
|
3
|
+
export declare function stopSelection(): void;
|
|
4
|
+
export declare function selectNode(node: NodeSelection | null): void;
|
|
5
|
+
export declare function isSelected(selection: NodeSelection | null): boolean;
|