@wandelbots/wandelbots-js-react-components 2.32.0-pr.feature-robot-precondition-list.372.8ed54a6 → 2.32.0-pr.feature-robot-precondition-list.372.5bce944
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/components/ProgramControl.d.ts +6 -1
- package/dist/components/ProgramControl.d.ts.map +1 -1
- package/dist/components/ProgramStateIndicator.d.ts +1 -1
- package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
- package/dist/components/RobotCard.d.ts +20 -7
- package/dist/components/RobotCard.d.ts.map +1 -1
- package/dist/components/robots/Robot.d.ts +3 -2
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/index.cjs +43 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3745 -3719
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ProgramControl.tsx +20 -10
- package/src/components/ProgramStateIndicator.tsx +5 -5
- package/src/components/RobotCard.tsx +252 -183
- package/src/components/robots/Robot.tsx +5 -2
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
export
|
|
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,
|
|
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
|
|
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,
|
|
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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { DHParameter } from "@wandelbots/nova-api/v1";
|
|
2
1
|
import type { ConnectedMotionGroup, RobotControllerStateOperationModeEnum, RobotControllerStateSafetyStateEnum } from "@wandelbots/nova-js/v1";
|
|
3
2
|
import type { Group } from "three";
|
|
4
3
|
import type { ProgramState } from "./ProgramControl";
|
|
@@ -19,11 +18,9 @@ export interface RobotCardProps {
|
|
|
19
18
|
onDriveToHomeRelease?: () => void;
|
|
20
19
|
/** Connected motion group for the robot */
|
|
21
20
|
connectedMotionGroup: ConnectedMotionGroup;
|
|
22
|
-
/** Custom robot component to render (optional, defaults to
|
|
21
|
+
/** Custom robot component to render (optional, defaults to Robot) */
|
|
23
22
|
robotComponent?: React.ComponentType<{
|
|
24
|
-
|
|
25
|
-
modelFromController: string;
|
|
26
|
-
dhParameters: DHParameter[];
|
|
23
|
+
connectedMotionGroup: ConnectedMotionGroup;
|
|
27
24
|
flangeRef?: React.Ref<Group>;
|
|
28
25
|
postModelRender?: () => void;
|
|
29
26
|
transparentColor?: string;
|
|
@@ -43,6 +40,17 @@ export interface RobotCardProps {
|
|
|
43
40
|
autoStart?: boolean;
|
|
44
41
|
className?: string;
|
|
45
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;
|
|
46
54
|
/** Additional CSS class name */
|
|
47
55
|
className?: string;
|
|
48
56
|
}
|
|
@@ -55,7 +63,12 @@ export interface RobotCardProps {
|
|
|
55
63
|
* - Automatic layout switching based on aspect ratio:
|
|
56
64
|
* - Portrait mode: Vertical layout with robot in center
|
|
57
65
|
* - Landscape mode: Horizontal layout with robot on left, content on right (left-aligned)
|
|
58
|
-
* -
|
|
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
|
|
59
72
|
* - Robot name displayed in Typography h6 at top-left
|
|
60
73
|
* - Program state indicator below the name
|
|
61
74
|
* - Auto-fitting 3D robot model that scales with container size
|
|
@@ -65,7 +78,7 @@ export interface RobotCardProps {
|
|
|
65
78
|
* - Localization support via react-i18next
|
|
66
79
|
* - Material-UI theming integration
|
|
67
80
|
*/
|
|
68
|
-
export declare const RobotCard: (({ robotName, programState, safetyState, operationMode, driveToHomeEnabled, onDriveToHomePress, onDriveToHomeRelease, connectedMotionGroup, robotComponent: RobotComponent, cycleTimerComponent: CycleTimerComponent, className, }: RobotCardProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
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) & {
|
|
69
82
|
displayName: string;
|
|
70
83
|
};
|
|
71
84
|
//# sourceMappingURL=RobotCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RobotCard.d.ts","sourceRoot":"","sources":["../../src/components/RobotCard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,
|
|
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;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
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,
|
|
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"}
|