@prefecthq/graphs 0.1.8 → 0.1.10
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 +1 -1
- package/dist/graphs.umd.js +57 -56
- package/dist/graphs.umd.js.map +1 -1
- package/dist/{index-97384817.mjs → index-6ad35b53.mjs} +2141 -2082
- package/dist/{index-97384817.mjs.map → index-6ad35b53.mjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/src/FlowRunTimeline.vue.d.ts +12 -0
- package/dist/types/src/models/FlowRunTimeline.d.ts +1 -2
- package/dist/types/src/pixiFunctions/bitmapFonts.d.ts +3 -0
- package/dist/types/src/pixiFunctions/initViewport.d.ts +2 -2
- package/dist/types/src/pixiFunctions/timelineGuide.d.ts +3 -2
- package/dist/types/src/pixiFunctions/timelineGuides.d.ts +20 -8
- package/dist/types/src/pixiFunctions/timelineNode.d.ts +2 -2
- package/dist/types/src/pixiFunctions/timelinePlayhead.d.ts +4 -3
- package/dist/types/src/utilities/time.d.ts +21 -1
- package/dist/{viewport.es-65da1190.mjs → viewport.es-975b1df9.mjs} +2 -2
- package/dist/{viewport.es-65da1190.mjs.map → viewport.es-975b1df9.mjs.map} +1 -1
- package/package.json +2 -2
- package/dist/types/demo/sections/components/HelloWorld.vue.d.ts +0 -44
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.flow-run-timeline{position:relative;height:100%;width:100
|
|
1
|
+
.flow-run-timeline{position:relative;height:100%;width:100%;overflow:hidden;border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.flow-run-timeline canvas{position:absolute;top:0px;left:0px;height:100%;width:100%}
|
|
@@ -6,6 +6,9 @@ declare const _default: {
|
|
|
6
6
|
$props: Partial<{}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
7
7
|
graphData: TimelineNodeData[];
|
|
8
8
|
isRunning?: boolean | undefined;
|
|
9
|
+
formatTimeBySeconds: (date: Date) => string;
|
|
10
|
+
formatTimeByMinutes: (date: Date) => string;
|
|
11
|
+
formatDate: (date: Date) => string;
|
|
9
12
|
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>;
|
|
10
13
|
$attrs: {
|
|
11
14
|
[x: string]: unknown;
|
|
@@ -23,6 +26,9 @@ declare const _default: {
|
|
|
23
26
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
24
27
|
graphData: TimelineNodeData[];
|
|
25
28
|
isRunning?: boolean | undefined;
|
|
29
|
+
formatTimeBySeconds: (date: Date) => string;
|
|
30
|
+
formatTimeByMinutes: (date: Date) => string;
|
|
31
|
+
formatDate: (date: Date) => string;
|
|
26
32
|
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & {
|
|
27
33
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
28
34
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -46,6 +52,9 @@ declare const _default: {
|
|
|
46
52
|
} & Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
47
53
|
graphData: TimelineNodeData[];
|
|
48
54
|
isRunning?: boolean | undefined;
|
|
55
|
+
formatTimeBySeconds: (date: Date) => string;
|
|
56
|
+
formatTimeByMinutes: (date: Date) => string;
|
|
57
|
+
formatDate: (date: Date) => string;
|
|
49
58
|
}>>> & import("vue").ShallowUnwrapRef<{}> & {} & import("vue").ComponentCustomProperties & {};
|
|
50
59
|
__isFragment?: undefined;
|
|
51
60
|
__isTeleport?: undefined;
|
|
@@ -53,6 +62,9 @@ declare const _default: {
|
|
|
53
62
|
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
54
63
|
graphData: TimelineNodeData[];
|
|
55
64
|
isRunning?: boolean | undefined;
|
|
65
|
+
formatTimeBySeconds: (date: Date) => string;
|
|
66
|
+
formatTimeByMinutes: (date: Date) => string;
|
|
67
|
+
formatDate: (date: Date) => string;
|
|
56
68
|
}>>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
|
57
69
|
export default _default;
|
|
58
70
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBitmapTextStyle
|
|
1
|
+
import { IBitmapTextStyle } from 'pixi.js';
|
|
2
2
|
export type TimelineNodeState = 'completed' | 'running' | 'scheduled' | 'pending' | 'failed' | 'cancelled' | 'crashed' | 'paused';
|
|
3
3
|
export type TimelineNodeData = {
|
|
4
4
|
id: string;
|
|
@@ -11,6 +11,5 @@ export type TimelineNodeData = {
|
|
|
11
11
|
export type TextStyles = {
|
|
12
12
|
nodeTextDefault: Partial<IBitmapTextStyle>;
|
|
13
13
|
nodeTextInverse: Partial<IBitmapTextStyle>;
|
|
14
|
-
nodeTextMetrics: TextStyle;
|
|
15
14
|
timeMarkerLabel: Partial<IBitmapTextStyle>;
|
|
16
15
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { Viewport as ViewportType } from 'pixi-viewport';
|
|
2
|
-
import { Application } from 'pixi.js';
|
|
3
|
-
export declare function initViewport(stage: HTMLElement,
|
|
2
|
+
import type { Application } from 'pixi.js';
|
|
3
|
+
export declare function initViewport(stage: HTMLElement, appRef: Application): Promise<ViewportType>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Container } from 'pixi.js';
|
|
2
2
|
export declare class TimelineGuide extends Container {
|
|
3
3
|
private readonly labelText;
|
|
4
|
-
private
|
|
4
|
+
private guideHeight;
|
|
5
5
|
private readonly guideLine;
|
|
6
6
|
private label;
|
|
7
|
-
constructor(labelText: string, guideHeight: number);
|
|
7
|
+
constructor(labelText: string | null, guideHeight: number);
|
|
8
8
|
private drawGuideLine;
|
|
9
9
|
private drawLabel;
|
|
10
|
+
updateHeight(guideHeight: number): void;
|
|
10
11
|
}
|
|
@@ -1,34 +1,46 @@
|
|
|
1
1
|
import type { Viewport } from 'pixi-viewport';
|
|
2
2
|
import { Container } from 'pixi.js';
|
|
3
|
+
import type { Application } from 'pixi.js';
|
|
4
|
+
import type { Ref } from 'vue';
|
|
3
5
|
type TimelineGuidesProps = {
|
|
4
6
|
viewportRef: Viewport;
|
|
5
|
-
|
|
6
|
-
guideHeight: number;
|
|
7
|
-
overallGraphWidth: number;
|
|
7
|
+
appRef: Application;
|
|
8
8
|
xScale: (x: Date) => number;
|
|
9
9
|
dateScale: (x: number) => number;
|
|
10
10
|
minimumStartDate: Date;
|
|
11
|
-
maximumEndDate: Date
|
|
11
|
+
maximumEndDate: Ref<Date | undefined>;
|
|
12
|
+
isRunning: boolean;
|
|
13
|
+
formatTimeBySeconds: (date: Date) => string;
|
|
14
|
+
formatTimeByMinutes: (date: Date) => string;
|
|
15
|
+
formatDate: (date: Date) => string;
|
|
12
16
|
};
|
|
13
17
|
export declare class TimelineGuides extends Container {
|
|
14
18
|
private readonly viewportRef;
|
|
15
|
-
private readonly
|
|
16
|
-
private readonly guideHeight;
|
|
17
|
-
private readonly overallGraphWidth;
|
|
19
|
+
private readonly appRef;
|
|
18
20
|
private readonly xScale;
|
|
19
21
|
private readonly dateScale;
|
|
20
22
|
private readonly minimumStartDate;
|
|
21
23
|
private readonly maximumEndDate;
|
|
24
|
+
private readonly isRunning;
|
|
25
|
+
private readonly formatTimeBySeconds;
|
|
26
|
+
private readonly formatTimeByMinutes;
|
|
27
|
+
private readonly formatDate;
|
|
22
28
|
private idealGuideCount;
|
|
23
29
|
private currentTimeGap;
|
|
30
|
+
private labelFormatter;
|
|
24
31
|
private readonly guides;
|
|
25
|
-
constructor({ viewportRef,
|
|
32
|
+
constructor({ viewportRef, appRef, xScale, dateScale, minimumStartDate, maximumEndDate, isRunning, formatTimeBySeconds, formatTimeByMinutes, formatDate, }: TimelineGuidesProps);
|
|
26
33
|
updateGuides(): void;
|
|
27
34
|
private updateIdealGuideCount;
|
|
28
35
|
private updateCurrentTimeGap;
|
|
29
36
|
private createGuides;
|
|
30
37
|
private getGuidePosition;
|
|
31
38
|
private updateGuidePositions;
|
|
39
|
+
private setLabelFormatter;
|
|
40
|
+
private formatByMinutesWithDates;
|
|
41
|
+
private isRedrawRequired;
|
|
42
|
+
private noGuidesExist;
|
|
43
|
+
private isGuideLengthOutdated;
|
|
32
44
|
destroy(): void;
|
|
33
45
|
}
|
|
34
46
|
export {};
|
|
@@ -11,10 +11,10 @@ export declare class TimelineNode extends Container {
|
|
|
11
11
|
private isLabelInBox;
|
|
12
12
|
constructor(nodeData: TimelineNodeData, xScale: (date: Date) => number, yPositionIndex: number);
|
|
13
13
|
private getNodeWidth;
|
|
14
|
-
private drawLabel;
|
|
15
14
|
private get boxColor();
|
|
16
15
|
private drawBox;
|
|
16
|
+
private drawLabel;
|
|
17
17
|
private updatePosition;
|
|
18
18
|
private updateLabelPosition;
|
|
19
|
-
update(): void;
|
|
19
|
+
update(newNodeData?: TimelineNodeData): void;
|
|
20
20
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import type { Viewport } from 'pixi-viewport';
|
|
2
2
|
import { Container } from 'pixi.js';
|
|
3
|
+
import type { Application } from 'pixi.js';
|
|
3
4
|
type TimelinePlayheadProps = {
|
|
4
|
-
playheadHeight: number;
|
|
5
5
|
viewportRef: Viewport;
|
|
6
|
+
appRef: Application;
|
|
6
7
|
xScale: (date: Date) => number;
|
|
7
8
|
};
|
|
8
9
|
export declare class TimelinePlayhead extends Container {
|
|
9
|
-
private readonly playheadHeight;
|
|
10
10
|
private readonly viewportRef;
|
|
11
|
+
private readonly appRef;
|
|
11
12
|
private readonly xScale;
|
|
12
13
|
private readonly playhead;
|
|
13
|
-
constructor({
|
|
14
|
+
constructor({ viewportRef, appRef, xScale, }: TimelinePlayheadProps);
|
|
14
15
|
private drawPlayhead;
|
|
15
16
|
updatePosition(): void;
|
|
16
17
|
}
|
|
@@ -10,7 +10,27 @@ export declare function secondsToApproximateString(input: number, showOnes?: boo
|
|
|
10
10
|
export declare function getDateBounds(datesArray: {
|
|
11
11
|
start: Date;
|
|
12
12
|
end: Date | null;
|
|
13
|
-
}[]): {
|
|
13
|
+
}[], minimumTimeSpan?: number): {
|
|
14
14
|
min: Date;
|
|
15
15
|
max: Date;
|
|
16
|
+
span: number;
|
|
16
17
|
};
|
|
18
|
+
export declare function roundDownToNearestDay(date: Date): Date;
|
|
19
|
+
export declare function roundDownToNearestEvenNumberedHour(date: Date): Date;
|
|
20
|
+
export declare const timeLengths: {
|
|
21
|
+
second: number;
|
|
22
|
+
minute: number;
|
|
23
|
+
hour: number;
|
|
24
|
+
day: number;
|
|
25
|
+
week: number;
|
|
26
|
+
};
|
|
27
|
+
export declare const labelFormats: {
|
|
28
|
+
seconds: string;
|
|
29
|
+
minutes: string;
|
|
30
|
+
date: string;
|
|
31
|
+
};
|
|
32
|
+
export declare const timeSpanSlots: {
|
|
33
|
+
ceiling: number;
|
|
34
|
+
span: number;
|
|
35
|
+
labelFormat: string;
|
|
36
|
+
}[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as c, R as b, T as C, C as P } from "./index-
|
|
1
|
+
import { P as c, R as b, T as C, C as P } from "./index-6ad35b53.mjs";
|
|
2
2
|
import "vue";
|
|
3
3
|
class u {
|
|
4
4
|
constructor(t) {
|
|
@@ -1530,4 +1530,4 @@ export {
|
|
|
1530
1530
|
O as Viewport,
|
|
1531
1531
|
$ as Wheel
|
|
1532
1532
|
};
|
|
1533
|
-
//# sourceMappingURL=viewport.es-
|
|
1533
|
+
//# sourceMappingURL=viewport.es-975b1df9.mjs.map
|