@yamcs/opi 1.2.24 → 1.3.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/opi.js +10 -10
- package/dist/opi.js.map +4 -4
- package/dist/types/Color.d.ts +1 -0
- package/dist/types/Display.d.ts +13 -0
- package/dist/types/Graphics.d.ts +2 -5
- package/dist/types/Widget.d.ts +2 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/positioning.d.ts +8 -0
- package/dist/types/pv/LocalPV.d.ts +2 -2
- package/dist/types/pv/PVEngine.d.ts +1 -1
- package/dist/types/scripting/PVUtil.d.ts +1 -1
- package/dist/types/widgets/graphics/Label.d.ts +2 -0
- package/package.json +3 -3
package/dist/types/Color.d.ts
CHANGED
package/dist/types/Display.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Color } from "./Color";
|
|
1
2
|
import { ConsoleHandler } from "./ConsoleHandler";
|
|
2
3
|
import { DialogHandler } from "./DialogHandler";
|
|
3
4
|
import { FontResolver } from "./FontResolver";
|
|
@@ -65,6 +66,10 @@ export declare class Display {
|
|
|
65
66
|
private _selection;
|
|
66
67
|
private _scale;
|
|
67
68
|
private _transparent;
|
|
69
|
+
private _disconnectedColor;
|
|
70
|
+
private _invalidColor;
|
|
71
|
+
private _majorColor;
|
|
72
|
+
private _minorColor;
|
|
68
73
|
private refreshCycle;
|
|
69
74
|
/**
|
|
70
75
|
* Prefix for images sourced during draw.
|
|
@@ -132,6 +137,14 @@ export declare class Display {
|
|
|
132
137
|
set transparent(transparent: boolean);
|
|
133
138
|
get utc(): boolean;
|
|
134
139
|
set utc(utc: boolean);
|
|
140
|
+
get disconnectedColor(): Color;
|
|
141
|
+
set disconnectedColor(disconnectedColor: Color);
|
|
142
|
+
get invalidColor(): Color;
|
|
143
|
+
set invalidColor(invalidColor: Color);
|
|
144
|
+
get majorColor(): Color;
|
|
145
|
+
set majorColor(majorColor: Color);
|
|
146
|
+
get minorColor(): Color;
|
|
147
|
+
set minorColor(minorColor: Color);
|
|
135
148
|
get widgets(): Widget[];
|
|
136
149
|
clearSelection(): void;
|
|
137
150
|
findWidget(wuid: string): Widget | undefined;
|
package/dist/types/Graphics.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Color } from "./Color";
|
|
|
2
2
|
import { Font } from "./Font";
|
|
3
3
|
import { HitCanvas } from "./HitCanvas";
|
|
4
4
|
import { HitRegionSpecification } from "./HitRegionSpecification";
|
|
5
|
-
import { Bounds, NullablePoint } from "./positioning";
|
|
5
|
+
import { Bounds, Dimension, NullablePoint } from "./positioning";
|
|
6
6
|
interface RectColorFill {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
@@ -137,10 +137,7 @@ export declare class Graphics {
|
|
|
137
137
|
fillText(fill: TextFill): void;
|
|
138
138
|
fillEllipse(fill: EllipseFill): void;
|
|
139
139
|
strokeEllipse(stroke: EllipseStroke): void;
|
|
140
|
-
measureText(text: string, font: Font):
|
|
141
|
-
width: number;
|
|
142
|
-
height: number;
|
|
143
|
-
};
|
|
140
|
+
measureText(text: string, font: Font, ceil?: boolean): Dimension;
|
|
144
141
|
createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
|
|
145
142
|
strokeRect(stroke: RectStroke): void;
|
|
146
143
|
strokePath(stroke: PathStroke): void;
|
package/dist/types/Widget.d.ts
CHANGED
|
@@ -30,7 +30,8 @@ export declare abstract class Widget {
|
|
|
30
30
|
drawHolder(g: Graphics): void;
|
|
31
31
|
beforeDrawBorder(g: Graphics): void;
|
|
32
32
|
private drawBorderStyle;
|
|
33
|
-
private
|
|
33
|
+
private isAnyPvDisconnected;
|
|
34
|
+
private isAnyPvInvalid;
|
|
34
35
|
drawDecoration(g: Graphics): void;
|
|
35
36
|
drawOverlay(g: Graphics): void;
|
|
36
37
|
drawSelection(ctx: CanvasRenderingContext2D): void;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
export { Color, colorFromCssColor } from "./Color";
|
|
1
2
|
export { ConsoleHandler, DefaultConsoleHandler } from "./ConsoleHandler";
|
|
2
3
|
export { DefaultDialogHandler, DialogHandler } from "./DialogHandler";
|
|
3
4
|
export { Display } from "./Display";
|
|
4
5
|
export { Font } from "./Font";
|
|
5
6
|
export { FontResolver } from "./FontResolver";
|
|
6
7
|
export { DefaultPathResolver, PathResolver } from "./PathResolver";
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
8
|
+
export { Dimension, NullablePoint, Point } from "./positioning";
|
|
9
|
+
export { CompiledFormula, DataSourceStatus } from "./pv/formulas/CompiledFormula";
|
|
10
|
+
export { FormulaCompiler } from "./pv/formulas/FormulaCompiler";
|
|
9
11
|
export { HistoricalDataProvider } from "./pv/HistoricalDataProvider";
|
|
10
12
|
export { AlarmSeverity, PV } from "./pv/PV";
|
|
11
13
|
export { PVProvider } from "./pv/PVProvider";
|
|
12
14
|
export { Sample } from "./pv/Sample";
|
|
13
|
-
export {
|
|
14
|
-
export { FormulaCompiler } from "./pv/formulas/FormulaCompiler";
|
|
15
|
+
export { Widget } from "./Widget";
|
|
@@ -8,6 +8,13 @@ export interface Point {
|
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* A 2D dimension (width and height).
|
|
13
|
+
*/
|
|
14
|
+
export interface Dimension {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
}
|
|
11
18
|
export interface NullablePoint {
|
|
12
19
|
x: number;
|
|
13
20
|
y: number | null;
|
|
@@ -59,3 +66,4 @@ export declare class PolarPoint {
|
|
|
59
66
|
toPoint(): Point;
|
|
60
67
|
}
|
|
61
68
|
export declare function scalePoints(points: Point[], scale: number): Point[];
|
|
69
|
+
export declare function halfPixelPoints(points: Point[]): Point[];
|
|
@@ -4,7 +4,7 @@ import { Sample } from "./Sample";
|
|
|
4
4
|
export type LocalPVType = "VDouble" | "VDoubleArray" | "VString" | "VStringArray";
|
|
5
5
|
export declare class LocalPV extends PV {
|
|
6
6
|
type?: LocalPVType | undefined;
|
|
7
|
-
readonly initializer?: any;
|
|
8
|
-
constructor(name: string, pvEngine: PVEngine, type?: LocalPVType | undefined, initializer?: any);
|
|
7
|
+
readonly initializer?: any | undefined;
|
|
8
|
+
constructor(name: string, pvEngine: PVEngine, type?: LocalPVType | undefined, initializer?: any | undefined);
|
|
9
9
|
setSample(sample: Sample): void;
|
|
10
10
|
}
|
|
@@ -41,7 +41,7 @@ export declare class PVEngine {
|
|
|
41
41
|
getValue(pvName: string): any;
|
|
42
42
|
setValue(time: Date, pvName: string, value: any, severity?: AlarmSeverity): void;
|
|
43
43
|
setExternalValues(samples: Map<string, Sample>): void;
|
|
44
|
-
createScript(widget: Widget, model: Script, scriptText: string): ScriptInstance;
|
|
44
|
+
createScript(widget: Widget, model: Script, scriptText: string, pvs: PV[]): ScriptInstance;
|
|
45
45
|
createRule(widget: Widget, model: Rule): void;
|
|
46
46
|
addProvider(provider: PVProvider): void;
|
|
47
47
|
addScriptLibrary(name: string, library: any): void;
|
|
@@ -14,7 +14,7 @@ export declare class PVUtil {
|
|
|
14
14
|
getStringArray(pv: PVWrapper): string[];
|
|
15
15
|
getTimeInMilliseconds(pv: PVWrapper): number;
|
|
16
16
|
getTimeString(pv: PVWrapper, format?: string): string | null;
|
|
17
|
-
getSeverity(pv: PVWrapper):
|
|
17
|
+
getSeverity(pv: PVWrapper): 1 | 2 | 0 | -1;
|
|
18
18
|
getSeverityString(pv: PVWrapper): string;
|
|
19
19
|
getStatus(pv: PVWrapper): string;
|
|
20
20
|
getUnits(pv: PVWrapper): string | null;
|
|
@@ -6,6 +6,8 @@ import { AbstractContainerWidget } from "../others/AbstractContainerWidget";
|
|
|
6
6
|
export declare class Label extends Widget {
|
|
7
7
|
constructor(display: Display, parent: AbstractContainerWidget);
|
|
8
8
|
draw(g: Graphics): void;
|
|
9
|
+
private drawText;
|
|
10
|
+
private drawWrapped;
|
|
9
11
|
private wrapText;
|
|
10
12
|
private wrapLine;
|
|
11
13
|
get font(): Font;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamcs/opi",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "OPI Display Renderer",
|
|
5
5
|
"author": "Yamcs Team <yamcs@spaceapplications.com>",
|
|
6
6
|
"repository": {
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
],
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^20.11.15",
|
|
28
|
-
"esbuild": "^0.
|
|
28
|
+
"esbuild": "^0.25.0",
|
|
29
29
|
"esbuild-plugin-copy": "^2.1.1",
|
|
30
30
|
"express": "^4.18.1",
|
|
31
31
|
"morgan": "^1.10.0",
|
|
32
32
|
"nunjucks": "^3.2.2",
|
|
33
|
-
"peggy": "4.
|
|
33
|
+
"peggy": "4.2.0",
|
|
34
34
|
"tslib": "^2.6.3",
|
|
35
35
|
"typescript": "^5.4.5"
|
|
36
36
|
}
|