@prefecthq/graphs 0.1.3 → 0.1.5

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,4 @@
1
- import { IBitmapTextStyle } from 'pixi.js';
1
+ import { IBitmapTextStyle, TextStyle } 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,5 +11,6 @@ export type TimelineNodeData = {
11
11
  export type TextStyles = {
12
12
  nodeTextDefault: Partial<IBitmapTextStyle>;
13
13
  nodeTextInverse: Partial<IBitmapTextStyle>;
14
+ nodeTextMetrics: TextStyle;
14
15
  timeMarkerLabel: Partial<IBitmapTextStyle>;
15
16
  };
@@ -0,0 +1,2 @@
1
+ import { TextStyles } from '../models';
2
+ export declare const getBitmapFonts: () => Promise<TextStyles>;
@@ -1,4 +1,5 @@
1
- export * from './initBitmapFonts';
1
+ export * from './bitmapFonts';
2
2
  export * from './initPixiApp';
3
3
  export * from './initViewport';
4
4
  export * from './timelineGuides';
5
+ export * from './timelineNode';
@@ -0,0 +1,22 @@
1
+ import { Container } from 'pixi.js';
2
+ import { TimelineNodeData } from '../models';
3
+ export type TimelineNodeProps = {
4
+ nodeData: TimelineNodeData;
5
+ };
6
+ export declare class TimelineNode extends Container {
7
+ nodeData: TimelineNodeData;
8
+ private readonly xScale;
9
+ private label;
10
+ private readonly box;
11
+ private apxLabelWidth;
12
+ private nodeWidth;
13
+ private readonly yPositionIndex;
14
+ private isLabelInBox;
15
+ constructor(nodeData: TimelineNodeData, xScale: (date: Date) => number, yPositionIndex: number);
16
+ private getNodeWidth;
17
+ private drawLabel;
18
+ private get boxColor();
19
+ private drawBox;
20
+ private updatePosition;
21
+ update(): void;
22
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@prefecthq/graphs",
3
3
  "private": false,
4
- "version": "0.1.3",
4
+ "version": "0.1.5",
5
5
  "description": "Large scale graphs designed for Prefect",
6
6
  "scripts": {
7
7
  "serve": "vite --host --mode=demo",
@@ -55,7 +55,7 @@
55
55
  "vue-tsc": "1.0.9"
56
56
  },
57
57
  "peerDependencies": {
58
- "@prefecthq/prefect-design": "^1.1.35",
58
+ "@prefecthq/prefect-design": "^1.1.39",
59
59
  "vue": "^3.2.45",
60
60
  "vue-router": "^4.0.12"
61
61
  },
@@ -1,2 +0,0 @@
1
- import { TextStyles } from '../models';
2
- export declare function initBitmapFonts(devicePixelRatio: number): Promise<TextStyles>;