@vention/machine-apps-components 1.10.1 → 1.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vention/machine-apps-components",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/VentionCo/machine-cloud.git"
@@ -15,7 +15,8 @@
15
15
  "i18next": "^23.0.0",
16
16
  "i18next-browser-languagedetector": "^8.0.0",
17
17
  "react-i18next": "^15.0.1",
18
- "tss-react": "^4.9.20"
18
+ "tss-react": "^4.9.20",
19
+ "@vention/machine-logic-ui-sdk": "0.37.0"
19
20
  },
20
21
  "peerDependencies": {
21
22
  "react": "17.0.2",
@@ -137,5 +137,41 @@ declare const _default: {
137
137
  deleteConfirmation: string;
138
138
  emptyState: string;
139
139
  };
140
+ calibration: {
141
+ footer: {
142
+ loading: string;
143
+ cancel: string;
144
+ neverCompleted: string;
145
+ lastCompleted: string;
146
+ };
147
+ handEye: {
148
+ calibrate: {
149
+ calibrate: string;
150
+ update: string;
151
+ cancel: string;
152
+ cancelling: string;
153
+ running: string;
154
+ lastCalibratedOn: string;
155
+ never: string;
156
+ };
157
+ verify: {
158
+ action: string;
159
+ loading: string;
160
+ };
161
+ };
162
+ environment: {
163
+ topAlert: string;
164
+ helper: string;
165
+ startSession: string;
166
+ starting: string;
167
+ takePhoto: string;
168
+ endSession: string;
169
+ sessionLabel: string;
170
+ photoCount: string;
171
+ noPhotos: string;
172
+ lastPhotoAt: string;
173
+ error: string;
174
+ };
175
+ };
140
176
  };
141
177
  export default _default;
@@ -137,5 +137,41 @@ declare const _default: {
137
137
  deleteConfirmation: string;
138
138
  emptyState: string;
139
139
  };
140
+ calibration: {
141
+ footer: {
142
+ loading: string;
143
+ cancel: string;
144
+ neverCompleted: string;
145
+ lastCompleted: string;
146
+ };
147
+ handEye: {
148
+ calibrate: {
149
+ calibrate: string;
150
+ update: string;
151
+ cancel: string;
152
+ cancelling: string;
153
+ running: string;
154
+ lastCalibratedOn: string;
155
+ never: string;
156
+ };
157
+ verify: {
158
+ action: string;
159
+ loading: string;
160
+ };
161
+ };
162
+ environment: {
163
+ topAlert: string;
164
+ helper: string;
165
+ startSession: string;
166
+ starting: string;
167
+ takePhoto: string;
168
+ endSession: string;
169
+ sessionLabel: string;
170
+ photoCount: string;
171
+ noPhotos: string;
172
+ lastPhotoAt: string;
173
+ error: string;
174
+ };
175
+ };
140
176
  };
141
177
  export default _default;
@@ -137,5 +137,41 @@ declare const _default: {
137
137
  deleteConfirmation: string;
138
138
  emptyState: string;
139
139
  };
140
+ calibration: {
141
+ footer: {
142
+ loading: string;
143
+ cancel: string;
144
+ neverCompleted: string;
145
+ lastCompleted: string;
146
+ };
147
+ handEye: {
148
+ calibrate: {
149
+ calibrate: string;
150
+ update: string;
151
+ cancel: string;
152
+ cancelling: string;
153
+ running: string;
154
+ lastCalibratedOn: string;
155
+ never: string;
156
+ };
157
+ verify: {
158
+ action: string;
159
+ loading: string;
160
+ };
161
+ };
162
+ environment: {
163
+ topAlert: string;
164
+ helper: string;
165
+ startSession: string;
166
+ starting: string;
167
+ takePhoto: string;
168
+ endSession: string;
169
+ sessionLabel: string;
170
+ photoCount: string;
171
+ noPhotos: string;
172
+ lastPhotoAt: string;
173
+ error: string;
174
+ };
175
+ };
140
176
  };
141
177
  export default _default;
@@ -137,5 +137,41 @@ declare const _default: {
137
137
  deleteConfirmation: string;
138
138
  emptyState: string;
139
139
  };
140
+ calibration: {
141
+ footer: {
142
+ loading: string;
143
+ cancel: string;
144
+ neverCompleted: string;
145
+ lastCompleted: string;
146
+ };
147
+ handEye: {
148
+ calibrate: {
149
+ calibrate: string;
150
+ update: string;
151
+ cancel: string;
152
+ cancelling: string;
153
+ running: string;
154
+ lastCalibratedOn: string;
155
+ never: string;
156
+ };
157
+ verify: {
158
+ action: string;
159
+ loading: string;
160
+ };
161
+ };
162
+ environment: {
163
+ topAlert: string;
164
+ helper: string;
165
+ startSession: string;
166
+ starting: string;
167
+ takePhoto: string;
168
+ endSession: string;
169
+ sessionLabel: string;
170
+ photoCount: string;
171
+ noPhotos: string;
172
+ lastPhotoAt: string;
173
+ error: string;
174
+ };
175
+ };
140
176
  };
141
177
  export default _default;
package/src/index.d.ts CHANGED
@@ -21,6 +21,13 @@ export * from "./lib/step-progress-circle/step-progress-circle";
21
21
  export * from "./lib/action-button/action-button";
22
22
  export * from "./lib/press-button/press-button";
23
23
  export * from "./lib/product-form-list/product-form-list";
24
+ export * from "./lib/calibration-footer/calibration-footer";
25
+ export type { CalibrationFooterProps } from "./lib/calibration-footer/calibration-footer";
26
+ export * from "./lib/calibration-mqtt/topics";
27
+ export * from "./lib/calibration-hand-eye-page/calibration-hand-eye-page";
28
+ export type { CalibrationHandEyePageProps, CalibrationProgress, CalibrationProgressStatus, HandEyeVerifyResult, } from "./lib/calibration-hand-eye-page/calibration-hand-eye-page";
29
+ export * from "./lib/calibration-environment-page/calibration-environment-page";
30
+ export type { CalibrationEnvironmentPageProps } from "./lib/calibration-environment-page/calibration-environment-page";
24
31
  export * from "./hooks/use-auto-scroll-input";
25
32
  export * from "./types/user-level";
26
33
  export * from "./lib/utils/api-config-utils";
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from "react";
2
+ import { SxProps, Theme } from "@mui/material";
3
+ export interface CalibrationEnvironmentPageProps {
4
+ onStartSession: () => Promise<void>;
5
+ onTakePhoto: () => Promise<void>;
6
+ onEndSession: () => Promise<void>;
7
+ sessionName?: string | null;
8
+ photoCount: number;
9
+ lastPhotoAt?: Date | null;
10
+ isError?: boolean;
11
+ errorMessage?: string;
12
+ isBusy?: boolean;
13
+ illustration?: ReactNode;
14
+ helperText?: string;
15
+ topAlertTitle?: string;
16
+ className?: string;
17
+ sx?: SxProps<Theme>;
18
+ }
19
+ export declare const CalibrationEnvironmentPage: {
20
+ ({ onStartSession, onTakePhoto, onEndSession, sessionName, photoCount, lastPhotoAt, isError, errorMessage, isBusy, illustration, helperText, topAlertTitle, className, sx, }: CalibrationEnvironmentPageProps): import("react/jsx-runtime").JSX.Element;
21
+ displayName: string;
22
+ };
@@ -0,0 +1,20 @@
1
+ import { SxProps, Theme } from "@mui/material";
2
+ export interface CalibrationFooterProps {
3
+ primaryLabel: string;
4
+ onPrimaryAction: () => void;
5
+ isLoading?: boolean;
6
+ loadingLabel?: string;
7
+ disabled?: boolean;
8
+ onCancel?: () => void;
9
+ cancelLabel?: string;
10
+ lastCompletedAt?: Date | null;
11
+ completedLabelPrefix?: string;
12
+ neverCompletedLabel?: string;
13
+ className?: string;
14
+ sx?: SxProps<Theme>;
15
+ "data-testid"?: string;
16
+ }
17
+ export declare const CalibrationFooter: {
18
+ ({ primaryLabel, onPrimaryAction, isLoading, loadingLabel, disabled, onCancel, cancelLabel, lastCompletedAt, completedLabelPrefix, neverCompletedLabel, className, sx, "data-testid": dataTestId, }: CalibrationFooterProps): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
@@ -0,0 +1,45 @@
1
+ import { SxProps, Theme } from "@mui/material";
2
+ export type CalibrationProgressStatus = "idle" | "running" | "success" | "error" | "cancelled";
3
+ export interface CalibrationProgress {
4
+ percent: number;
5
+ status: CalibrationProgressStatus;
6
+ message?: string;
7
+ }
8
+ export interface HandEyeVerifyResult {
9
+ isValid: boolean;
10
+ message: string;
11
+ posErrorMm?: number;
12
+ rotErrorDeg?: number;
13
+ }
14
+ export interface CalibrationHandEyePageProps {
15
+ /** Fire-and-forget start. Throws are caught and surfaced via `onError`. */
16
+ onCalibrate: () => Promise<void>;
17
+ /** Fire-and-forget cancel. While the cancel call is in flight the UI shows a "Cancelling..." state. */
18
+ onCancel: () => Promise<void> | void;
19
+ /**
20
+ * Live progress. If passed, wins over MQTT — useful in stories and tests.
21
+ * Outside those contexts, leave undefined and rely on the MQTT subscription
22
+ * to `griip/calibration/hand_eye/progress`.
23
+ */
24
+ progress?: CalibrationProgress;
25
+ /** Last successful hand-eye calibration. Renders "Calibrated on …" below the primary button. */
26
+ lastCalibrationAt?: Date | null;
27
+ /** Force Start to render even when a (possibly stale) "running" message says otherwise. */
28
+ forceShowStart?: boolean;
29
+ /** Disable the primary button (consumer-driven, e.g. while another flow holds the hardware). */
30
+ disabled?: boolean;
31
+ /**
32
+ * Inline error message rendered above the primary button. Use this for backend errors
33
+ * the consumer wants to surface (e.g. "calibration_joints not set in cell yaml").
34
+ */
35
+ error?: string | null;
36
+ /** Invoked when `onCalibrate` or `onCancel` rejects. The component shows the rejection's `message` until cleared. */
37
+ onError?: (error: Error) => void;
38
+ onVerify?: () => Promise<HandEyeVerifyResult>;
39
+ className?: string;
40
+ sx?: SxProps<Theme>;
41
+ }
42
+ export declare const CalibrationHandEyePage: {
43
+ ({ onCalibrate, onCancel, progress, lastCalibrationAt, forceShowStart, disabled, error, onError, onVerify, className, sx, }: CalibrationHandEyePageProps): import("react/jsx-runtime").JSX.Element;
44
+ displayName: string;
45
+ };
@@ -0,0 +1,13 @@
1
+ export declare const HAND_EYE_PROGRESS_TOPIC = "griip/calibration/hand_eye/progress";
2
+ export declare const ENVIRONMENT_PROGRESS_TOPIC = "griip/calibration/environment/progress";
3
+ export interface HandEyeProgressMessage {
4
+ percentage: number;
5
+ status: "in_progress" | "success" | "error" | "cancelled";
6
+ message: string;
7
+ }
8
+ export interface EnvironmentProgressMessage {
9
+ status: "in_progress" | "success" | "error";
10
+ message: string;
11
+ sessionName?: string | null;
12
+ photoCount?: number;
13
+ }