@prefecthq/graphs 2.4.1 → 3.0.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/graphs.mjs +13933 -16267
- package/dist/graphs.mjs.map +1 -1
- package/dist/graphs.umd.js +126 -126
- package/dist/graphs.umd.js.map +1 -1
- package/dist/types/src/factories/eventData.d.ts +2 -2
- package/dist/types/src/factories/offsets.d.ts +1 -1
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/models/index.d.ts +1 -0
- package/dist/types/src/models/layout.d.ts +2 -0
- package/dist/types/src/models/utilities.d.ts +1 -0
- package/dist/types/src/objects/cache.d.ts +2 -1
- package/dist/types/src/objects/config.d.ts +3 -2
- package/dist/types/src/objects/events.d.ts +0 -2
- package/dist/types/src/objects/index.d.ts +7 -3
- package/dist/types/src/objects/settings.d.ts +1 -16
- package/dist/types/src/utilities/index.d.ts +2 -0
- package/package.json +11 -20
- package/dist/style.css +0 -1
- package/dist/types/demo/App.vue.d.ts +0 -2
- package/dist/types/demo/components/AppComponentNavigationItems.vue.d.ts +0 -7
- package/dist/types/demo/components/AppNavigationBar.vue.d.ts +0 -31
- package/dist/types/demo/main.d.ts +0 -2
- package/dist/types/demo/router/index.d.ts +0 -3
- package/dist/types/demo/router/menu.d.ts +0 -4
- package/dist/types/demo/router/routeRecords.d.ts +0 -5
- package/dist/types/demo/router/routeRecordsFlat.d.ts +0 -4
- package/dist/types/demo/sections/WelcomePage.vue.d.ts +0 -2
- package/dist/types/demo/sections/components/RunGraphDemo.vue.d.ts +0 -2
- package/dist/types/demo/sections/components/index.d.ts +0 -2
- package/dist/types/demo/sections/index.d.ts +0 -2
- package/dist/types/src/components/RunGraph.vue.d.ts +0 -39
- package/dist/types/src/components/RunGraphSettings.vue.d.ts +0 -2
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/objects/scope.d.ts +0 -4
- package/dist/types/src/utilities/effectScopeFactory.d.ts +0 -6
- package/dist/types/src/utilities/keyboard.d.ts +0 -1
- package/dist/types/tailwind.config.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MaybeRefOrGetter } from 'vue';
|
|
2
1
|
import { RunGraphEvent, RunGraphFetchEventsContext } from '../models';
|
|
2
|
+
import { MaybeGetter } from '../models/utilities';
|
|
3
3
|
type EventDataCallback = (data: RunGraphEvent[]) => void;
|
|
4
|
-
export declare function eventDataFactory(context:
|
|
4
|
+
export declare function eventDataFactory(context: MaybeGetter<RunGraphFetchEventsContext>, callback: EventDataCallback): Promise<{
|
|
5
5
|
start: () => Promise<void>;
|
|
6
6
|
stop: () => void;
|
|
7
7
|
}>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MaybeGetter } from '../models/utilities';
|
|
1
2
|
type SetOffsetParameters = {
|
|
2
3
|
axis: number;
|
|
3
4
|
nodeId: string;
|
|
@@ -11,7 +12,6 @@ type RemoveOffsetParameters = {
|
|
|
11
12
|
axis: number;
|
|
12
13
|
nodeId: string;
|
|
13
14
|
};
|
|
14
|
-
type MaybeGetter<T> = T | (() => T);
|
|
15
15
|
export type Offsets = Awaited<ReturnType<typeof offsetsFactory>>;
|
|
16
16
|
export type OffsetParameters = {
|
|
17
17
|
gap?: MaybeGetter<number>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './components';
|
|
2
1
|
export * from './models';
|
|
2
|
+
export * from './consts';
|
|
3
|
+
export { start, stop, centerViewport, updateViewportFromDateRange, setConfig, emitter, selectItem, layout, resetHorizontalScaleMultiplier, setHorizontalScaleMultiplier, setVerticalMode, setHorizontalMode, setDisabledArtifacts, setDisabledEdges, setDisabledEvents } from './objects';
|
|
@@ -4,6 +4,8 @@ export type Pixels = {
|
|
|
4
4
|
};
|
|
5
5
|
export type VerticalMode = 'waterfall' | 'nearest-parent' | 'duration-sorted';
|
|
6
6
|
export type HorizontalMode = 'temporal' | 'dependency' | 'left-aligned';
|
|
7
|
+
export declare function isVerticalMode(value: string): value is VerticalMode;
|
|
8
|
+
export declare function isHorizontalMode(value: string): value is HorizontalMode;
|
|
7
9
|
export type NodeSize = {
|
|
8
10
|
height: number;
|
|
9
11
|
width: number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type MaybeGetter<T> = T | (() => T);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
type Action = (...args: any[]) => any;
|
|
2
2
|
export declare function startCache(): void;
|
|
3
3
|
export declare function stopCache(): void;
|
|
4
4
|
export declare function cache<T extends Action>(action: T, parameters: Parameters<T>): Promise<ReturnType<T>>;
|
|
5
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { RequiredGraphConfig,
|
|
2
|
-
export declare function startConfig(
|
|
1
|
+
import { RequiredGraphConfig, RunGraphConfig } from '../models/RunGraph';
|
|
2
|
+
export declare function startConfig(config: RunGraphConfig): void;
|
|
3
|
+
export declare function setConfig(value: RunGraphConfig): void;
|
|
3
4
|
export declare function stopConfig(): void;
|
|
4
5
|
export declare function waitForConfig(): Promise<RequiredGraphConfig>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Cull } from '@pixi-essentials/cull';
|
|
2
2
|
import { Viewport } from 'pixi-viewport';
|
|
3
3
|
import { Application, Container } from 'pixi.js';
|
|
4
|
-
import { EffectScope } from 'vue';
|
|
5
4
|
import { HorizontalScale } from '../factories/position';
|
|
6
5
|
import { RunGraphEvent } from '../models';
|
|
7
6
|
import { LayoutSettings } from '../models/layout';
|
|
@@ -22,7 +21,6 @@ type Events = {
|
|
|
22
21
|
viewportMoved: null;
|
|
23
22
|
configCreated: RequiredGraphConfig;
|
|
24
23
|
configUpdated: RequiredGraphConfig;
|
|
25
|
-
scopeCreated: EffectScope;
|
|
26
24
|
fontsLoaded: Fonts;
|
|
27
25
|
containerCreated: Container;
|
|
28
26
|
layoutSettingsUpdated: LayoutSettings;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RunGraphConfig } from '../models/RunGraph';
|
|
2
2
|
export * from './application';
|
|
3
3
|
export * from './stage';
|
|
4
4
|
export * from './viewport';
|
|
5
|
+
export * from './config';
|
|
6
|
+
export * from './events';
|
|
7
|
+
export * from './selection';
|
|
8
|
+
export * from './settings';
|
|
5
9
|
type StartParameters = {
|
|
6
10
|
stage: HTMLDivElement;
|
|
7
|
-
|
|
11
|
+
config: RunGraphConfig;
|
|
8
12
|
};
|
|
9
|
-
export declare function start({ stage,
|
|
13
|
+
export declare function start({ stage, config }: StartParameters): void;
|
|
10
14
|
export declare function stop(): void;
|
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
import { HorizontalMode, LayoutSettings, VerticalMode } from '../models/layout';
|
|
2
2
|
export declare function startSettings(): Promise<void>;
|
|
3
3
|
export declare function stopSettings(): void;
|
|
4
|
-
export declare const layout:
|
|
5
|
-
horizontal: HorizontalMode;
|
|
6
|
-
vertical: VerticalMode;
|
|
7
|
-
horizontalScaleMultiplierDefault: number;
|
|
8
|
-
horizontalScaleMultiplier: number;
|
|
9
|
-
disableAnimations: boolean;
|
|
10
|
-
disableGuides: boolean;
|
|
11
|
-
disableEdges: boolean;
|
|
12
|
-
disableArtifacts: boolean;
|
|
13
|
-
disableEvents: boolean;
|
|
14
|
-
isTemporal: () => boolean;
|
|
15
|
-
isDependency: () => boolean;
|
|
16
|
-
isWaterfall: () => boolean;
|
|
17
|
-
isNearestParent: () => boolean;
|
|
18
|
-
isLeftAligned: () => boolean;
|
|
19
|
-
};
|
|
4
|
+
export declare const layout: LayoutSettings;
|
|
20
5
|
export declare function waitForSettings(): Promise<LayoutSettings>;
|
|
21
6
|
export declare function getHorizontalColumnSize(): number;
|
|
22
7
|
export declare function getHorizontalRange(): [number, number];
|
package/package.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prefecthq/graphs",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"description": "Large scale graphs designed for Prefect",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"build": "vue-tsc && tsc-alias && vite build",
|
|
10
|
-
"build:demo": "vite build --mode=demo",
|
|
7
|
+
"dev": "tsc -w & tsc-alias -w & vite build -w",
|
|
8
|
+
"build": "tsc && tsc-alias && vite build",
|
|
11
9
|
"lint": "eslint src",
|
|
12
10
|
"lint:fix": "eslint src --fix",
|
|
13
11
|
"changelog": "auto-changelog --package --commit-limit 0",
|
|
@@ -45,29 +43,22 @@
|
|
|
45
43
|
"@types/lodash.merge": "4.6.9",
|
|
46
44
|
"@types/lodash.throttle": "^4.1.9",
|
|
47
45
|
"@types/node": "^22.0.0",
|
|
48
|
-
"@vitejs/plugin-vue": "5.1
|
|
46
|
+
"@vitejs/plugin-vue": "5.2.1",
|
|
49
47
|
"auto-changelog": "^2.4.0",
|
|
50
48
|
"autoprefixer": "10.4.20",
|
|
51
|
-
"eslint": "8.57.
|
|
52
|
-
"postcss": "8.4.
|
|
53
|
-
"tailwindcss": "3.4.
|
|
49
|
+
"eslint": "8.57.1",
|
|
50
|
+
"postcss": "8.4.49",
|
|
51
|
+
"tailwindcss": "3.4.17",
|
|
54
52
|
"tsc-alias": "1.8.10",
|
|
55
|
-
"typescript": "5.
|
|
56
|
-
"vite": "5.4.
|
|
57
|
-
"vite-svg-loader": "^5.1.0"
|
|
58
|
-
"vue-tsc": "2.1.6"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"@prefecthq/prefect-design": "^2.10.10",
|
|
62
|
-
"@prefecthq/vue-compositions": "^1.6.7",
|
|
63
|
-
"vue": "^3.2.45",
|
|
64
|
-
"vue-router": "^4.0.12"
|
|
53
|
+
"typescript": "5.7.3",
|
|
54
|
+
"vite": "5.4.11",
|
|
55
|
+
"vite-svg-loader": "^5.1.0"
|
|
65
56
|
},
|
|
66
57
|
"dependencies": {
|
|
67
58
|
"@pixi-essentials/cull": "2.0.0",
|
|
68
59
|
"@pixi/ui": "^1.0.1",
|
|
69
60
|
"d3": "7.9.0",
|
|
70
|
-
"date-fns": "
|
|
61
|
+
"date-fns": "4.1.0",
|
|
71
62
|
"fontfaceobserver": "^2.3.0",
|
|
72
63
|
"gsap": "^3.12.2",
|
|
73
64
|
"lodash.isequal": "4.5.0",
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
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}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RouteLocationRaw } from 'vue-router';
|
|
2
|
-
export type ContextAccordionChildItem = {
|
|
3
|
-
to: RouteLocationRaw;
|
|
4
|
-
title?: string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
|
|
7
|
-
export default _default;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
declare function __VLS_template(): {
|
|
2
|
-
slots: {
|
|
3
|
-
prepend?(_: {
|
|
4
|
-
layout: "horizontal" | "vertical";
|
|
5
|
-
}): any;
|
|
6
|
-
};
|
|
7
|
-
refs: {};
|
|
8
|
-
attrs: Partial<{}>;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_TypePropsToOption<{
|
|
12
|
-
layout?: "horizontal" | "vertical";
|
|
13
|
-
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<{
|
|
14
|
-
layout?: "horizontal" | "vertical";
|
|
15
|
-
}>>>, {}, {}>;
|
|
16
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
-
export default _default;
|
|
18
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
19
|
-
type __VLS_TypePropsToOption<T> = {
|
|
20
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
21
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
22
|
-
} : {
|
|
23
|
-
type: import('vue').PropType<T[K]>;
|
|
24
|
-
required: true;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
-
new (): {
|
|
29
|
-
$slots: S;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RouteComponent, RouteRecordRaw } from 'vue-router';
|
|
2
|
-
export type ImportComponent = RouteComponent | (() => Promise<RouteComponent>);
|
|
3
|
-
export type Section = Record<string, ImportComponent>;
|
|
4
|
-
export declare function isSection(value: unknown): value is Section;
|
|
5
|
-
export declare function convertSectionToRouteRecords(section: Section, isRoot?: boolean): RouteRecordRaw[];
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { RouteLocationNormalizedLoaded, RouteLocationRaw } from 'vue-router';
|
|
2
|
-
export type RouteRecordsFlat = Record<string, RouteLocationRaw>;
|
|
3
|
-
export declare const routeRecordsFlat: RouteRecordsFlat;
|
|
4
|
-
export declare function getRouteRecordIndex(route: RouteLocationNormalizedLoaded): number;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { RunGraphProps } from '../models/RunGraph';
|
|
2
|
-
import { GraphItemSelection } from '../models/selection';
|
|
3
|
-
import { ViewportDateRange } from '../models/viewport';
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<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: GraphItemSelection | null) => void;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<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: GraphItemSelection | null) => any) | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
selected: GraphItemSelection | null;
|
|
20
|
-
fullscreen: boolean | null;
|
|
21
|
-
}, {}>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
|
-
type __VLS_TypePropsToOption<T> = {
|
|
30
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
31
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
32
|
-
} : {
|
|
33
|
-
type: import('vue').PropType<T[K]>;
|
|
34
|
-
required: true;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
type __VLS_PrettifyLocal<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
39
|
-
} & {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as RunGraph } from './RunGraph.vue';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function eventTargetIsInput(eventTarget: EventTarget | null): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|