@wandelbots/wandelbots-js-react-components 2.32.0 → 2.33.0-pr.feature-robot-precondition-list.372.cb78a22

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.
Files changed (45) hide show
  1. package/dist/components/CycleTimer.d.ts.map +1 -1
  2. package/dist/components/DataGrid.d.ts +61 -0
  3. package/dist/components/DataGrid.d.ts.map +1 -0
  4. package/dist/components/LogPanel.d.ts +54 -0
  5. package/dist/components/LogPanel.d.ts.map +1 -0
  6. package/dist/components/LogStore.d.ts +11 -0
  7. package/dist/components/LogStore.d.ts.map +1 -0
  8. package/dist/components/LogViewer.d.ts +26 -0
  9. package/dist/components/LogViewer.d.ts.map +1 -0
  10. package/dist/components/ProgramControl.d.ts +6 -1
  11. package/dist/components/ProgramControl.d.ts.map +1 -1
  12. package/dist/components/ProgramStateIndicator.d.ts +1 -1
  13. package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
  14. package/dist/components/RobotCard.d.ts +84 -0
  15. package/dist/components/RobotCard.d.ts.map +1 -0
  16. package/dist/components/RobotListItem.d.ts +34 -0
  17. package/dist/components/RobotListItem.d.ts.map +1 -0
  18. package/dist/components/RobotSetupReadinessIndicator.d.ts +31 -0
  19. package/dist/components/RobotSetupReadinessIndicator.d.ts.map +1 -0
  20. package/dist/components/RobotSetupReadinessIndicator.test.d.ts +2 -0
  21. package/dist/components/RobotSetupReadinessIndicator.test.d.ts.map +1 -0
  22. package/dist/components/robots/Robot.d.ts +3 -2
  23. package/dist/components/robots/Robot.d.ts.map +1 -1
  24. package/dist/index.cjs +48 -48
  25. package/dist/index.cjs.map +1 -1
  26. package/dist/index.d.ts +7 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +8321 -7160
  29. package/dist/index.js.map +1 -1
  30. package/package.json +2 -1
  31. package/src/components/CycleTimer.tsx +43 -64
  32. package/src/components/DataGrid.tsx +454 -0
  33. package/src/components/LogPanel.tsx +85 -0
  34. package/src/components/LogStore.ts +40 -0
  35. package/src/components/LogViewer.tsx +297 -0
  36. package/src/components/ProgramControl.tsx +20 -10
  37. package/src/components/ProgramStateIndicator.tsx +20 -8
  38. package/src/components/RobotCard.tsx +576 -0
  39. package/src/components/RobotListItem.tsx +152 -0
  40. package/src/components/RobotSetupReadinessIndicator.test.tsx +60 -0
  41. package/src/components/RobotSetupReadinessIndicator.tsx +124 -0
  42. package/src/components/robots/Robot.tsx +5 -2
  43. package/src/i18n/locales/de/translations.json +6 -1
  44. package/src/i18n/locales/en/translations.json +6 -1
  45. package/src/index.ts +7 -0
@@ -1 +1 @@
1
- {"version":3,"file":"CycleTimer.d.ts","sourceRoot":"","sources":["../../src/components/CycleTimer.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,QAAQ,EAAE;QAC1B,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;QACxE,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,QAAQ,EAAE,MAAM,OAAO,CAAA;KACxB,KAAK,IAAI,CAAA;IACV,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,UAAU,8EAShB,eAAe;;CA2YrB,CAAA"}
1
+ {"version":3,"file":"CycleTimer.d.ts","sourceRoot":"","sources":["../../src/components/CycleTimer.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,eAAe,EAAE,CAAC,QAAQ,EAAE;QAC1B,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;QACxE,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,QAAQ,EAAE,MAAM,OAAO,CAAA;KACxB,KAAK,IAAI,CAAA;IACV,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,qFAAqF;IACrF,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,eAAO,MAAM,UAAU,8EAShB,eAAe;;CAsXrB,CAAA"}
@@ -0,0 +1,61 @@
1
+ import { type DataGridProps, type GridColDef, type GridRowParams } from "@mui/x-data-grid";
2
+ export interface WandelbotsDataGridProps<T = Record<string, unknown>> {
3
+ /**
4
+ * Array of data items to display in the grid
5
+ */
6
+ data: T[];
7
+ /**
8
+ * Column definitions for the DataGrid
9
+ */
10
+ columns: GridColDef[];
11
+ /**
12
+ * Function to transform data items into DataGrid rows
13
+ * Should return an object with an 'id' field and other fields matching column definitions
14
+ */
15
+ getRowData: (item: T) => Record<string, unknown> & {
16
+ id: string | number;
17
+ };
18
+ /**
19
+ * Callback when a row is clicked
20
+ */
21
+ onRowClick?: (item: T, params: GridRowParams) => void;
22
+ /**
23
+ * Currently selected item (for highlighting)
24
+ */
25
+ selectedItem?: T | null;
26
+ /**
27
+ * Function to get the ID of an item (used for selection highlighting)
28
+ */
29
+ getItemId?: (item: T) => string | number;
30
+ /**
31
+ * Title displayed in the toolbar
32
+ */
33
+ title?: string;
34
+ /**
35
+ * Show item count in title
36
+ * @default true
37
+ */
38
+ showCount?: boolean;
39
+ /**
40
+ * Placeholder text for the search input
41
+ * @default "Search"
42
+ */
43
+ searchPlaceholder?: string;
44
+ /**
45
+ * Additional DataGrid props to pass through
46
+ */
47
+ dataGridProps?: Partial<DataGridProps>;
48
+ /**
49
+ * Custom toolbar component to replace the default one
50
+ */
51
+ CustomToolbar?: React.ComponentType;
52
+ /**
53
+ * Select the first item by default
54
+ * @default false
55
+ */
56
+ selectFirstByDefault?: boolean;
57
+ }
58
+ export declare const WandelbotsDataGrid: (<T>({ data, columns, getRowData, onRowClick, selectedItem, getItemId, title, showCount, searchPlaceholder, dataGridProps, CustomToolbar, selectFirstByDefault, }: WandelbotsDataGridProps<T>) => import("react/jsx-runtime").JSX.Element) & {
59
+ displayName: string;
60
+ };
61
+ //# sourceMappingURL=DataGrid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataGrid.d.ts","sourceRoot":"","sources":["../../src/components/DataGrid.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,aAAa,EAOnB,MAAM,kBAAkB,CAAA;AAKzB,MAAM,WAAW,uBAAuB,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAClE;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAA;IAET;;OAEG;IACH,OAAO,EAAE,UAAU,EAAE,CAAA;IAErB;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IAE1E;;OAEG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,aAAa,KAAK,IAAI,CAAA;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAA;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,GAAG,MAAM,CAAA;IAExC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IAEnB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAE1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAEtC;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAEnC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED,eAAO,MAAM,kBAAkB,IAE1B,CAAC,gKAaC,uBAAuB,CAAC,CAAC,CAAC;;CA6VhC,CAAA"}
@@ -0,0 +1,54 @@
1
+ import type { SxProps } from "@mui/material";
2
+ import { LogStore } from "./LogStore";
3
+ export type LogPanelProps = {
4
+ /** Log store instance to use, or create one automatically if not provided */
5
+ store?: LogStore;
6
+ /** Height of the component */
7
+ height?: string | number;
8
+ /** Additional styles */
9
+ sx?: SxProps;
10
+ /** Ref to the log store for external access */
11
+ onStoreReady?: (store: LogStore) => void;
12
+ };
13
+ /**
14
+ * A complete log panel component with built-in state management.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * // Simple usage with automatic state management
19
+ * function MyComponent() {
20
+ * const [logStore, setLogStore] = useState<LogStore>()
21
+ *
22
+ * return (
23
+ * <LogPanel
24
+ * height={400}
25
+ * onStoreReady={setLogStore}
26
+ * />
27
+ * )
28
+ * }
29
+ *
30
+ * // Then use the store to add messages
31
+ * logStore?.addInfo("Operation completed successfully")
32
+ * logStore?.addError("Something went wrong")
33
+ * logStore?.addWarning("Warning message")
34
+ * ```
35
+ *
36
+ * @example
37
+ * ```tsx
38
+ * // Usage with external store for shared state
39
+ * function MyApp() {
40
+ * const logStore = useMemo(() => new LogStore(), [])
41
+ *
42
+ * return (
43
+ * <div>
44
+ * <LogPanel store={logStore} height={300} />
45
+ * <SomeOtherComponent onError={(msg) => logStore.addError(msg)} />
46
+ * </div>
47
+ * )
48
+ * }
49
+ * ```
50
+ */
51
+ export declare const LogPanel: ((props: LogPanelProps) => import("react/jsx-runtime").JSX.Element) & {
52
+ displayName: string;
53
+ };
54
+ //# sourceMappingURL=LogPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogPanel.d.ts","sourceRoot":"","sources":["../../src/components/LogPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAGrC,MAAM,MAAM,aAAa,GAAG;IAC1B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,+CAA+C;IAC/C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAA;CACzC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,QAAQ,WACF,aAAa;;CA2B/B,CAAA"}
@@ -0,0 +1,11 @@
1
+ import type { LogLevel, LogMessage } from "./LogViewer";
2
+ export declare class LogStore {
3
+ messages: LogMessage[];
4
+ constructor();
5
+ addMessage: (message: string, level?: LogLevel) => void;
6
+ clearMessages: () => void;
7
+ addInfo: (message: string) => void;
8
+ addWarning: (message: string) => void;
9
+ addError: (message: string) => void;
10
+ }
11
+ //# sourceMappingURL=LogStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogStore.d.ts","sourceRoot":"","sources":["../../src/components/LogStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAEvD,qBAAa,QAAQ;IACnB,QAAQ,EAAE,UAAU,EAAE,CAAK;;IAU3B,UAAU,GAAI,SAAS,MAAM,EAAE,QAAO,QAAiB,UAQtD;IAED,aAAa,aAEZ;IAED,OAAO,GAAI,SAAS,MAAM,UAEzB;IAED,UAAU,GAAI,SAAS,MAAM,UAE5B;IAED,QAAQ,GAAI,SAAS,MAAM,UAE1B;CACF"}
@@ -0,0 +1,26 @@
1
+ import type { SxProps } from "@mui/material";
2
+ export type LogLevel = "info" | "error" | "warning";
3
+ export type LogMessage = {
4
+ id: string;
5
+ timestamp: Date;
6
+ message: string;
7
+ level: LogLevel;
8
+ };
9
+ export type LogViewerProps = {
10
+ /** Log messages to display */
11
+ messages: LogMessage[];
12
+ /** Callback when clear button is clicked */
13
+ onClear?: () => void;
14
+ /** Height of the component */
15
+ height?: string | number;
16
+ /** Additional styles */
17
+ sx?: SxProps;
18
+ };
19
+ /**
20
+ * A log viewer component that displays timestamped log messages with different levels.
21
+ * Features a header with document icon and clear button, and scrollable message area.
22
+ */
23
+ export declare const LogViewer: ((props: LogViewerProps) => import("react/jsx-runtime").JSX.Element) & {
24
+ displayName: string;
25
+ };
26
+ //# sourceMappingURL=LogViewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LogViewer.d.ts","sourceRoot":"","sources":["../../src/components/LogViewer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,UAAU,EAAE,CAAA;IACtB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,8BAA8B;IAC9B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,wBAAwB;IACxB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,WACH,cAAc;;CAmQhC,CAAA"}
@@ -1,4 +1,9 @@
1
- export type ProgramState = "idle" | "running" | "paused" | "stopping";
1
+ export declare enum ProgramState {
2
+ IDLE = "idle",
3
+ RUNNING = "running",
4
+ PAUSED = "paused",
5
+ STOPPING = "stopping"
6
+ }
2
7
  export interface ProgramControlProps {
3
8
  /** The current state of the program control */
4
9
  state: ProgramState;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgramControl.d.ts","sourceRoot":"","sources":["../../src/components/ProgramControl.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;AAErE,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,KAAK,EAAE,YAAY,CAAA;IACnB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,qDAAqD;IACrD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAA;IACxC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AASD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,0FAWpB,mBAAmB;;CAuJzB,CAAA"}
1
+ {"version":3,"file":"ProgramControl.d.ts","sourceRoot":"","sources":["../../src/components/ProgramControl.tsx"],"names":[],"mappings":"AAMA,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAED,MAAM,WAAW,mBAAmB;IAClC,+CAA+C;IAC/C,KAAK,EAAE,YAAY,CAAA;IACnB,2DAA2D;IAC3D,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,+FAA+F;IAC/F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,qDAAqD;IACrD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,OAAO,CAAC,EAAE,YAAY,GAAG,eAAe,CAAA;IACxC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AASD;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,0FAWpB,mBAAmB;;CA4JzB,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import type { RobotControllerStateOperationModeEnum, RobotControllerStateSafetyStateEnum } from "@wandelbots/nova-js/v1";
2
- import type { ProgramState } from "./ProgramControl";
2
+ import { ProgramState } from "./ProgramControl";
3
3
  export interface ProgramStateIndicatorProps {
4
4
  /** The current state of the program */
5
5
  programState: ProgramState;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgramStateIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ProgramStateIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAI/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAEpD,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,YAAY,EAAE,YAAY,CAAA;IAC1B,uDAAuD;IACvD,WAAW,EAAE,mCAAmC,CAAA;IAChD,yDAAyD;IACzD,aAAa,EAAE,qCAAqC,CAAA;IACpD,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAO3B,0BAA0B;;CA6GhC,CAAA"}
1
+ {"version":3,"file":"ProgramStateIndicator.d.ts","sourceRoot":"","sources":["../../src/components/ProgramStateIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAI/B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,WAAW,0BAA0B;IACzC,uCAAuC;IACvC,YAAY,EAAE,YAAY,CAAA;IAC1B,uDAAuD;IACvD,WAAW,EAAE,mCAAmC,CAAA;IAChD,yDAAyD;IACzD,aAAa,EAAE,qCAAqC,CAAA;IACpD,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,8DAO3B,0BAA0B;;CAyHhC,CAAA"}
@@ -0,0 +1,84 @@
1
+ import type { ConnectedMotionGroup, RobotControllerStateOperationModeEnum, RobotControllerStateSafetyStateEnum } from "@wandelbots/nova-js/v1";
2
+ import type { Group } from "three";
3
+ import type { ProgramState } from "./ProgramControl";
4
+ export interface RobotCardProps {
5
+ /** Name of the robot displayed at the top */
6
+ robotName: string;
7
+ /** Current program state */
8
+ programState: ProgramState;
9
+ /** Current safety state of the robot controller */
10
+ safetyState: RobotControllerStateSafetyStateEnum;
11
+ /** Current operation mode of the robot controller */
12
+ operationMode: RobotControllerStateOperationModeEnum;
13
+ /** Whether the "Drive to Home" button should be enabled */
14
+ driveToHomeEnabled?: boolean;
15
+ /** Callback fired when "Drive to Home" button is pressed */
16
+ onDriveToHomePress?: () => void;
17
+ /** Callback fired when "Drive to Home" button is released */
18
+ onDriveToHomeRelease?: () => void;
19
+ /** Connected motion group for the robot */
20
+ connectedMotionGroup: ConnectedMotionGroup;
21
+ /** Custom robot component to render (optional, defaults to Robot) */
22
+ robotComponent?: React.ComponentType<{
23
+ connectedMotionGroup: ConnectedMotionGroup;
24
+ flangeRef?: React.Ref<Group>;
25
+ postModelRender?: () => void;
26
+ transparentColor?: string;
27
+ getModel?: (modelFromController: string) => string;
28
+ }>;
29
+ /** Custom cycle timer component (optional, defaults to CycleTimer) */
30
+ cycleTimerComponent?: React.ComponentType<{
31
+ variant?: "default" | "small";
32
+ compact?: boolean;
33
+ onCycleComplete: (controls: {
34
+ startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void;
35
+ pause: () => void;
36
+ resume: () => void;
37
+ isPaused: () => boolean;
38
+ }) => void;
39
+ onCycleEnd?: () => void;
40
+ autoStart?: boolean;
41
+ className?: string;
42
+ }>;
43
+ /** Callback to receive cycle timer controls for external timer management */
44
+ onCycleTimerReady?: (controls: {
45
+ startNewCycle: (maxTimeSeconds: number, elapsedSeconds?: number) => void;
46
+ pause: () => void;
47
+ resume: () => void;
48
+ isPaused: () => boolean;
49
+ }) => void;
50
+ /** Callback fired when a cycle completes (reaches zero) */
51
+ onCycleEnd?: () => void;
52
+ /** Whether the cycle timer should auto-start when a new cycle is set */
53
+ cycleTimerAutoStart?: boolean;
54
+ /** Additional CSS class name */
55
+ className?: string;
56
+ }
57
+ /**
58
+ * A responsive card component that displays a 3D robot with states and controls.
59
+ * The card automatically adapts to its container's size and aspect ratio.
60
+ *
61
+ * Features:
62
+ * - Fully responsive Material-UI Card that adapts to container dimensions
63
+ * - Automatic layout switching based on aspect ratio:
64
+ * - Portrait mode: Vertical layout with robot in center
65
+ * - Landscape mode: Horizontal layout with robot on left, content on right (left-aligned)
66
+ * - Responsive 3D robot rendering:
67
+ * - Scales dynamically with container size
68
+ * - Hides at very small sizes to preserve usability
69
+ * - Adaptive margin based on available space
70
+ * - Smart spacing and padding that reduces at smaller sizes
71
+ * - Minimum size constraints for usability while maximizing content density
72
+ * - Robot name displayed in Typography h6 at top-left
73
+ * - Program state indicator below the name
74
+ * - Auto-fitting 3D robot model that scales with container size
75
+ * - Compact cycle time component with small variant
76
+ * - Transparent gray divider line
77
+ * - "Drive to Home" button with press-and-hold functionality
78
+ * - Localization support via react-i18next
79
+ * - Material-UI theming integration
80
+ */
81
+ export declare const RobotCard: (({ robotName, programState, safetyState, operationMode, driveToHomeEnabled, onDriveToHomePress, onDriveToHomeRelease, connectedMotionGroup, robotComponent: RobotComponent, cycleTimerComponent: CycleTimerComponent, onCycleTimerReady, onCycleEnd, cycleTimerAutoStart, className, }: RobotCardProps) => import("react/jsx-runtime").JSX.Element) & {
82
+ displayName: string;
83
+ };
84
+ //# sourceMappingURL=RobotCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RobotCard.d.ts","sourceRoot":"","sources":["../../src/components/RobotCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,qCAAqC,EACrC,mCAAmC,EACpC,MAAM,wBAAwB,CAAA;AAI/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAuBpD,MAAM,WAAW,cAAc;IAC7B,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAA;IACjB,4BAA4B;IAC5B,YAAY,EAAE,YAAY,CAAA;IAC1B,mDAAmD;IACnD,WAAW,EAAE,mCAAmC,CAAA;IAChD,qDAAqD;IACrD,aAAa,EAAE,qCAAqC,CAAA;IACpD,2DAA2D;IAC3D,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC/B,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAA;IACjC,2CAA2C;IAC3C,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,qEAAqE;IACrE,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACnC,oBAAoB,EAAE,oBAAoB,CAAA;QAC1C,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QAC5B,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;QAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;QACzB,QAAQ,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAA;KACnD,CAAC,CAAA;IACF,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACxC,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;QAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;QACjB,eAAe,EAAE,CAAC,QAAQ,EAAE;YAC1B,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;YACxE,KAAK,EAAE,MAAM,IAAI,CAAA;YACjB,MAAM,EAAE,MAAM,IAAI,CAAA;YAClB,QAAQ,EAAE,MAAM,OAAO,CAAA;SACxB,KAAK,IAAI,CAAA;QACV,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;QACvB,SAAS,CAAC,EAAE,OAAO,CAAA;QACnB,SAAS,CAAC,EAAE,MAAM,CAAA;KACnB,CAAC,CAAA;IACF,6EAA6E;IAC7E,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE;QAC7B,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;QACxE,KAAK,EAAE,MAAM,IAAI,CAAA;QACjB,MAAM,EAAE,MAAM,IAAI,CAAA;QAClB,QAAQ,EAAE,MAAM,OAAO,CAAA;KACxB,KAAK,IAAI,CAAA;IACV,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,wEAAwE;IACxE,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,SAAS,2RAiBf,cAAc;;CA0bpB,CAAA"}
@@ -0,0 +1,34 @@
1
+ import type { ComponentType } from "react";
2
+ import { RobotSetupReadinessState } from "./RobotSetupReadinessIndicator";
3
+ export interface RobotListItemProps {
4
+ /** The name of the robot */
5
+ robotName: string;
6
+ /** The type/model of the robot (will try to derive from nova if not provided) */
7
+ robotType?: string;
8
+ /** The current setup readiness state of the robot */
9
+ setupState: RobotSetupReadinessState;
10
+ /**
11
+ * Component to render for the precondition indicator.
12
+ * Defaults to RobotSetupReadinessIndicator.
13
+ * Pass null or undefined to hide the indicator.
14
+ */
15
+ PreconditionComponent?: ComponentType<{
16
+ setupState: RobotSetupReadinessState;
17
+ }> | null;
18
+ /** Additional CSS class name */
19
+ className?: string;
20
+ }
21
+ /**
22
+ * A list item component that displays robot information and setup readiness state.
23
+ *
24
+ * Features:
25
+ * - Shows robot name, type, and customizable precondition component
26
+ * - Color-coded icon based on readiness state (robot icon for ready, warning for issues)
27
+ * - Styled with consistent border, background, and spacing
28
+ * - Responsive layout with proper spacing and alignment
29
+ * - Flexible precondition component that can be customized or hidden
30
+ */
31
+ export declare const RobotListItem: (({ robotName, robotType, setupState, PreconditionComponent, className, }: RobotListItemProps) => import("react/jsx-runtime").JSX.Element) & {
32
+ displayName: string;
33
+ };
34
+ //# sourceMappingURL=RobotListItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RobotListItem.d.ts","sourceRoot":"","sources":["../../src/components/RobotListItem.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAG1C,OAAO,EAEL,wBAAwB,EACzB,MAAM,gCAAgC,CAAA;AAEvC,MAAM,WAAW,kBAAkB;IACjC,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAA;IACjB,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,qDAAqD;IACrD,UAAU,EAAE,wBAAwB,CAAA;IACpC;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,aAAa,CAAC;QACpC,UAAU,EAAE,wBAAwB,CAAA;KACrC,CAAC,GAAG,IAAI,CAAA;IACT,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa,6EAQnB,kBAAkB;;CAuGxB,CAAA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Enum representing the robot setup readiness state
3
+ */
4
+ export declare enum RobotSetupReadinessState {
5
+ /** Preconditions are not fulfilled for robot operation */
6
+ PRECONDITION_NOT_FULFILLED = "PRECONDITION_NOT_FULFILLED",
7
+ /** Robot is disconnected from the system */
8
+ ROBOT_DISCONNECTED = "ROBOT_DISCONNECTED",
9
+ /** Robot is ready for operation */
10
+ READY = "READY"
11
+ }
12
+ export interface RobotSetupReadinessIndicatorProps {
13
+ /** The current setup readiness state of the robot */
14
+ setupState: RobotSetupReadinessState;
15
+ /** Additional CSS class name */
16
+ className?: string;
17
+ }
18
+ /**
19
+ * A state indicator component that displays the current robot setup readiness state.
20
+ *
21
+ * Features:
22
+ * - Shows three states: Precondition not fulfilled, Robot disconnected, Ready
23
+ * - Color-coded based on state (ready: tertiary/main, others: error/main)
24
+ * - Rendered as Material-UI filled chip with paper-elevation-11 background
25
+ * - Includes colored circle indicator (8px width)
26
+ * - Localization support via react-i18next
27
+ */
28
+ export declare const RobotSetupReadinessIndicator: (({ setupState, className }: RobotSetupReadinessIndicatorProps) => import("react/jsx-runtime").JSX.Element) & {
29
+ displayName: string;
30
+ };
31
+ //# sourceMappingURL=RobotSetupReadinessIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RobotSetupReadinessIndicator.d.ts","sourceRoot":"","sources":["../../src/components/RobotSetupReadinessIndicator.tsx"],"names":[],"mappings":"AAKA;;GAEG;AACH,oBAAY,wBAAwB;IAClC,0DAA0D;IAC1D,0BAA0B,+BAA+B;IACzD,4CAA4C;IAC5C,kBAAkB,uBAAuB;IACzC,mCAAmC;IACnC,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,iCAAiC;IAChD,qDAAqD;IACrD,UAAU,EAAE,wBAAwB,CAAA;IACpC,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B,+BACF,iCAAiC;;CAwFvE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RobotSetupReadinessIndicator.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RobotSetupReadinessIndicator.test.d.ts","sourceRoot":"","sources":["../../src/components/RobotSetupReadinessIndicator.test.tsx"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { type ThreeElements } from "@react-three/fiber";
1
+ import type { ThreeElements } from "@react-three/fiber";
2
2
  import type { ConnectedMotionGroup } from "@wandelbots/nova-js/v1";
3
3
  import type { Group } from "three";
4
4
  export type RobotProps = {
@@ -6,6 +6,7 @@ export type RobotProps = {
6
6
  getModel?: (modelFromController: string) => string;
7
7
  flangeRef?: React.Ref<Group>;
8
8
  transparentColor?: string;
9
+ postModelRender?: () => void;
9
10
  } & ThreeElements["group"];
10
11
  /**
11
12
  * The Robot component is a wrapper around the SupportedRobot component
@@ -18,5 +19,5 @@ export type RobotProps = {
18
19
  *
19
20
  * @returns {JSX.Element} The rendered SupportedRobot component.
20
21
  */
21
- export declare function Robot({ connectedMotionGroup, getModel, flangeRef, transparentColor, ...props }: RobotProps): import("react/jsx-runtime").JSX.Element | null;
22
+ export declare function Robot({ connectedMotionGroup, getModel, flangeRef, transparentColor, postModelRender, ...props }: RobotProps): import("react/jsx-runtime").JSX.Element | null;
22
23
  //# sourceMappingURL=Robot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Robot.d.ts","sourceRoot":"","sources":["../../../src/components/robots/Robot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,MAAM,MAAM,UAAU,GAAG;IACvB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,QAAQ,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAA;IAClD,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;AAE1B;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,EACpB,oBAAoB,EACpB,QAA0B,EAC1B,SAAS,EACT,gBAAgB,EAChB,GAAG,KAAK,EACT,EAAE,UAAU,kDAkBZ"}
1
+ {"version":3,"file":"Robot.d.ts","sourceRoot":"","sources":["../../../src/components/robots/Robot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAIlC,MAAM,MAAM,UAAU,GAAG;IACvB,oBAAoB,EAAE,oBAAoB,CAAA;IAC1C,QAAQ,CAAC,EAAE,CAAC,mBAAmB,EAAE,MAAM,KAAK,MAAM,CAAA;IAClD,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,IAAI,CAAA;CAC7B,GAAG,aAAa,CAAC,OAAO,CAAC,CAAA;AAE1B;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,EACpB,oBAAoB,EACpB,QAA0B,EAC1B,SAAS,EACT,gBAAgB,EAChB,eAAe,EACf,GAAG,KAAK,EACT,EAAE,UAAU,kDAmBZ"}