@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.d7cab79 → 6.4.0-pr.revamp.667.e94a2a6

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 (128) hide show
  1. package/README.md +2 -2
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +11 -1
  4. package/dist/3d.js +43 -25
  5. package/dist/CurrentPose/index.cjs +1 -0
  6. package/dist/CurrentPose/index.d.ts +3 -0
  7. package/dist/CurrentPose/index.js +9 -0
  8. package/dist/CurrentPoseBar/index.cjs +1 -1
  9. package/dist/CurrentPoseBar/index.js +1 -1
  10. package/dist/JoggingButtons/index.cjs +1 -1
  11. package/dist/JoggingButtons/index.js +1 -1
  12. package/dist/JoggingGizmo/index.cjs +1 -1
  13. package/dist/JoggingGizmo/index.d.ts +1 -0
  14. package/dist/JoggingGizmo/index.js +2 -2
  15. package/dist/JoggingJointSlider/index.cjs +1 -1
  16. package/dist/JoggingJointSlider/index.js +1 -1
  17. package/dist/RobotControl/index.cjs +1 -0
  18. package/dist/RobotControl/index.d.ts +3 -0
  19. package/dist/RobotControl/index.js +9 -0
  20. package/dist/RobotControlPanel/index.cjs +1 -1
  21. package/dist/RobotControlPanel/index.js +1 -1
  22. package/dist/RobotHeader/index.cjs +1 -1
  23. package/dist/RobotHeader/index.d.ts +4 -0
  24. package/dist/RobotHeader/index.js +8 -3
  25. package/dist/RobotScene/index.cjs +1 -0
  26. package/dist/RobotScene/index.d.ts +5 -0
  27. package/dist/RobotScene/index.js +11 -0
  28. package/dist/RobotView/index.cjs +1 -0
  29. package/dist/RobotView/index.d.ts +4 -0
  30. package/dist/RobotView/index.js +9 -0
  31. package/dist/SafetyBar/index.cjs +1 -1
  32. package/dist/SafetyBar/index.d.ts +1 -0
  33. package/dist/SafetyBar/index.js +4 -3
  34. package/dist/chunks/CurrentPose-B-dYw6Qi.js +52 -0
  35. package/dist/chunks/CurrentPose-d8-aJzMZ.cjs +1 -0
  36. package/dist/chunks/{CurrentPoseBar-DrXTcV-I.cjs → CurrentPoseBar-CgNJwnxA.cjs} +1 -1
  37. package/dist/chunks/{CurrentPoseBar-DENCilvf.js → CurrentPoseBar-DAgEpcgw.js} +2 -2
  38. package/dist/chunks/{JoggingButtons-CXaozFVz.js → JoggingButtons-D4S2oJGt.js} +1 -1
  39. package/dist/chunks/{JoggingButtons-CbL-5LMK.cjs → JoggingButtons-nXLqJLIr.cjs} +1 -1
  40. package/dist/chunks/{JoggingGizmo-SuS9MmL7.js → JoggingGizmo-9wEBSe1P.js} +301 -280
  41. package/dist/chunks/JoggingGizmo-BJ3wDpAJ.cjs +1 -0
  42. package/dist/chunks/{JoggingGizmoOrientation-dzned4f4.cjs → JoggingGizmoOrientation-D9VS6nag.cjs} +1 -1
  43. package/dist/chunks/{JoggingGizmoOrientation-x_crT_64.js → JoggingGizmoOrientation-DYeHwowd.js} +1 -1
  44. package/dist/chunks/{JoggingJointSlider-R3_A9Ppj.cjs → JoggingJointSlider-D7AsxkrT.cjs} +1 -1
  45. package/dist/chunks/{JoggingJointSlider-CZ-k6XCa.js → JoggingJointSlider-DQneQhXH.js} +1 -1
  46. package/dist/chunks/JoggingRefusedError-2q4x_fDF.cjs +1 -0
  47. package/dist/chunks/JoggingRefusedError-M954yLQO.js +23 -0
  48. package/dist/chunks/Pose3-B_fLR-Wv.js +80 -0
  49. package/dist/chunks/Pose3-Ch4xVeXV.cjs +1 -0
  50. package/dist/chunks/PoseTransformer-dP4nzrPG.cjs +1 -0
  51. package/dist/chunks/PoseTransformer-tafab65c.js +454 -0
  52. package/dist/chunks/Robot-DEJXhv-D.cjs +1 -0
  53. package/dist/chunks/Robot-IG0yo_YD.js +428 -0
  54. package/dist/chunks/RobotControl-DyoRsotp.js +282 -0
  55. package/dist/chunks/RobotControl-DyvIWt4S.cjs +1 -0
  56. package/dist/chunks/RobotControlPanel-BsDe4A5F.cjs +1 -0
  57. package/dist/chunks/{RobotControlPanel-E-hUzMIL.js → RobotControlPanel-TZuS0_YA.js} +264 -262
  58. package/dist/chunks/RobotScene-BS77SUtN.js +1230 -0
  59. package/dist/chunks/RobotScene-BjctJ5z1.cjs +1 -0
  60. package/dist/chunks/RobotSessionProvider--AekyPqD.cjs +1 -0
  61. package/dist/chunks/RobotSessionProvider-TVaKGzqa.js +25 -0
  62. package/dist/chunks/RobotView-BlV3MdCy.cjs +1 -0
  63. package/dist/chunks/RobotView-CGvHcO7j.js +158 -0
  64. package/dist/chunks/coordSystemLabel-BThpFG9n.cjs +1 -0
  65. package/dist/chunks/coordSystemLabel-Bfy9MUsV.js +6 -0
  66. package/dist/chunks/externalizeComponent-BW1UV6Gh.cjs +2 -0
  67. package/dist/chunks/{externalizeComponent-_w2d1_pz.js → externalizeComponent-TgclPxwg.js} +34 -10
  68. package/dist/chunks/{loadRobotSession-kKQ96rWu.js → loadRobotSession-CWrjx1wy.js} +1165 -1338
  69. package/dist/chunks/loadRobotSession-DwBed9kJ.cjs +3 -0
  70. package/dist/chunks/robotActivationOf-BCKyEgny.cjs +1 -0
  71. package/dist/chunks/robotActivationOf-DUbbBf7J.js +480 -0
  72. package/dist/chunks/{SafetyBar-eYzCHOFD.js → robotSafetyOf-BGSW_Ql3.js} +44 -34
  73. package/dist/chunks/{SafetyBar-BVk-SH_0.cjs → robotSafetyOf-Y4NuRInk.cjs} +1 -1
  74. package/dist/chunks/{useEveryFrame-CHxg25f4.cjs → useEveryFrame-891OscPu.cjs} +1 -1
  75. package/dist/chunks/{useEveryFrame-B8t_yz-G.js → useEveryFrame-D9oux4jW.js} +3 -3
  76. package/dist/chunks/useWebGLRenderer-BozrbZz-.js +45 -0
  77. package/dist/chunks/useWebGLRenderer-CtddVDDb.cjs +1 -0
  78. package/dist/components/connectionWarning/ConnectionWarning.d.ts +21 -0
  79. package/dist/components/connectionWarning/connectionWarningOf.d.ts +11 -0
  80. package/dist/components/connectionWarning/timeAgo.d.ts +5 -0
  81. package/dist/components/currentPoseBar/CurrentPose.d.ts +23 -0
  82. package/dist/components/currentPoseBar/useCurrentPoseProps.d.ts +16 -0
  83. package/dist/components/jogging/JoggingRefusedError.d.ts +19 -0
  84. package/dist/components/jogging/JoggingStore.d.ts +98 -3
  85. package/dist/components/jogging/coordSystemLabel.d.ts +7 -0
  86. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +8 -1
  87. package/dist/components/robotControl/JogArea.d.ts +5 -2
  88. package/dist/components/robotControl/RobotControl.d.ts +23 -0
  89. package/dist/components/robotControl/useRobotControlProps.d.ts +34 -0
  90. package/dist/components/robotHeader/robotActivationOf.d.ts +8 -0
  91. package/dist/components/robotHeader/robotSafetyOf.d.ts +11 -0
  92. package/dist/components/robotScene/JoggingAxes.d.ts +38 -0
  93. package/dist/components/robotScene/RobotScene.d.ts +28 -0
  94. package/dist/components/robotScene/RobotSceneView.d.ts +53 -0
  95. package/dist/components/robotScene/useRobotSceneProps.d.ts +18 -0
  96. package/dist/components/robotSession/RobotSessionProvider.d.ts +13 -0
  97. package/dist/components/robotView/RobotCanvas.d.ts +42 -0
  98. package/dist/components/robotView/RobotView.d.ts +23 -0
  99. package/dist/components/robotView/WebGLUnavailable.d.ts +5 -0
  100. package/dist/components/robots/DHRobot.d.ts +1 -1
  101. package/dist/components/robots/GenericRobot.d.ts +16 -1
  102. package/dist/components/robots/LinearAxisAnimator.d.ts +1 -1
  103. package/dist/components/robots/SupportedLinearAxis.d.ts +16 -3
  104. package/dist/components/robots/SupportedRobot.d.ts +21 -3
  105. package/dist/components/robots/ghostStyle.d.ts +21 -0
  106. package/dist/components/robots/modelRotation.d.ts +14 -0
  107. package/dist/components/robots/robotModelLogic.d.ts +138 -6
  108. package/dist/components/robots/robotModelSource.d.ts +14 -1
  109. package/dist/components/utils/useWebGLRenderer.d.ts +32 -0
  110. package/dist/components/utils/webglSupport.d.ts +11 -0
  111. package/dist/core.cjs +1 -1
  112. package/dist/core.d.ts +8 -0
  113. package/dist/core.js +68 -56
  114. package/dist/index.cjs +1 -1
  115. package/dist/index.js +118 -88
  116. package/dist/lib/robotSession/RobotActivation.d.ts +13 -2
  117. package/dist/lib/robotSession/RobotSession.d.ts +19 -1
  118. package/package.json +1 -1
  119. package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +0 -1
  120. package/dist/chunks/Pose3-DIyg-aZA.cjs +0 -1
  121. package/dist/chunks/Pose3-pocKPrHN.js +0 -292
  122. package/dist/chunks/RobotControlPanel-DTE8-v2j.cjs +0 -1
  123. package/dist/chunks/RobotHeader-BvIzk8Fw.js +0 -244
  124. package/dist/chunks/RobotHeader-Daft80jq.cjs +0 -1
  125. package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +0 -2
  126. package/dist/chunks/loadRobotSession-DlRzFjYE.cjs +0 -3
  127. package/dist/chunks/robotModelSource-Bv1Z_miZ.cjs +0 -1
  128. package/dist/chunks/robotModelSource-CKuBOeQ-.js +0 -1295
package/README.md CHANGED
@@ -152,7 +152,7 @@ load.dispose()
152
152
  What changes besides the names:
153
153
 
154
154
  - **Loading:** `loadRobotSession` returns at once. `load.state` ("loading", "ready", "failed") and `load.progress` tell how far it is, `load.retry()` loads again after a failure, `await load.ready` gives the session. A failed step is retried on its own, after 1 and 2 seconds unless `retryDelaysMs` says otherwise.
155
- - **Jogging comes with it:** `session.jogging` is the robot's `JoggingStore`. An app no longer opens it with `JoggerConnection.open` and `JoggingStore.loadFor`.
155
+ - **Jogging comes with it:** `session.jogging` is the robot's `JoggingStore`. An app no longer opens it with `JoggerConnection.open` and `JoggingStore.loadFor`. It starts no jog while the robot may not move (`safety.canBeMoved` is false, so also while the robot is activating): the start rejects with a `JoggingRefusedError`.
156
156
  - **Nothing happens unasked:** without `storage` the jogging settings are not kept (pass `localStorage` to keep them), and a virtual robot is activated only with `autoActivateVirtual: true`.
157
157
  - **Errors:** what the app calls rejects (`session.activation.activate()` with a `RobotModeChangeError`); what fails in the background (a jog, a message of the live state) goes to `onError`.
158
158
  - **Several robots:** load one session per robot instead of `ConnectedMotionGroup.connectMultiple`.
@@ -222,7 +222,7 @@ Manual robot control interfaces.
222
222
  - **JoggingCartesianAxisControl** - Single-axis cartesian movement
223
223
  - **JoggingJointValueControl** - Individual joint controls
224
224
  - **VelocitySlider** (and **VelocitySliderLabel**) - Speed adjustment interface
225
- - **JoggingStore** - The state of the jogging (velocity, coordinate system, the jogging connection). `JoggingPanel` gives it to `onSetup`, and `JoggingStore.loadFor` creates one for your own controls.
225
+ - **JoggingStore** - The state of the jogging (velocity, coordinate system, the jogging connection). `JoggingPanel` gives it to `onSetup`, and `JoggingStore.loadFor` creates one for your own controls. It also jogs for them: `startCartesianJogging(motion, axis, direction)` or `startJointJogging(joint, direction)` when a control is pressed and `stopJogging()` when it is let go, and `runIncrementalCartesianJog(motion, axis, direction, increment)` for one step. The store keeps the order that hold-to-jog needs: a press that ends before the jogging connection is ready moves nothing, and one step runs at a time. While the store is locked, or its owner says that the robot may not move (the option `notMoveableReason`, which a `RobotSession` gives its store), it starts no jog: the start rejects with a `JoggingRefusedError`, whose `reason.code` says why.
226
226
 
227
227
  **JoggingGizmo** and **JoggingGizmoOrientation** (from `/3d` or `/JoggingGizmo`) - Jogging by the axes of the jog frame as the camera of the 3D view sees them: orbit the view and the gizmo turns with it, so the arrow pointing right on screen moves the robot right on screen. Hold a handle to jog.
228
228
 
package/dist/3d.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/robotModelSource-Bv1Z_miZ.cjs"),t=require("./chunks/JoggingGizmo-DGbFLWgT.cjs"),r=require("./chunks/JoggingGizmoOrientation-dzned4f4.cjs"),i=require("./chunks/RobotControlPanel-DTE8-v2j.cjs"),e=require("./chunks/Pose3-DIyg-aZA.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedLinearAxis=o.SupportedLinearAxis;exports.SupportedLinearAxisExact=o.SupportedLinearAxisExact;exports.SupportedRobot=o.SupportedRobot;exports.SupportedRobotExact=o.SupportedRobotExact;exports.TrajectoryRenderer=o.TrajectoryRenderer;exports.defaultGetModel=o.defaultGetModel;exports.robotModelOf=o.robotModelOf;exports.JoggingGizmo=t.JoggingGizmo;exports.JoggingGizmoOrientation=r.JoggingGizmoOrientation;exports.RobotControlPanel=i.RobotControlPanel;exports.Pose3=e.Pose3;exports.ValueInterpolator=e.ValueInterpolator;exports.parseRotationToQuaternion=e.parseRotationToQuaternion;exports.quaternionToRotationVector=e.quaternionToRotationVector;exports.useSmoothedMotionState=e.useSmoothedMotionState;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/Robot-DEJXhv-D.cjs"),o=require("./chunks/RobotScene-BjctJ5z1.cjs"),a=require("./chunks/JoggingGizmo-BJ3wDpAJ.cjs"),s=require("./chunks/JoggingGizmoOrientation-D9VS6nag.cjs"),u=require("./chunks/RobotControlPanel-BsDe4A5F.cjs"),r=require("./chunks/RobotControl-DyvIWt4S.cjs"),n=require("./chunks/RobotView-BlV3MdCy.cjs"),i=require("./chunks/PoseTransformer-dP4nzrPG.cjs"),t=require("./chunks/Pose3-Ch4xVeXV.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.JointLimitGizmo=e.JointLimitGizmo;exports.LinearAxis=e.LinearAxis;exports.Robot=e.Robot;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.FLANGE_NODE_SUFFIX=o.FLANGE_NODE_SUFFIX;exports.JOINT_NODE_NAME=o.JOINT_NODE_NAME;exports.JOINT_REST_SUFFIX=o.JOINT_REST_SUFFIX;exports.JoggingAxes=o.JoggingAxes;exports.MODEL_ROTATION=o.MODEL_ROTATION;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.RobotScene=o.RobotScene;exports.RobotSceneView=o.RobotSceneView;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedLinearAxis=o.SupportedLinearAxis;exports.SupportedLinearAxisExact=o.SupportedLinearAxisExact;exports.SupportedRobot=o.SupportedRobot;exports.SupportedRobotExact=o.SupportedRobotExact;exports.defaultGetModel=o.defaultGetModel;exports.jointIndexOf=o.jointIndexOf;exports.revokeAllModelUrls=o.revokeAllModelUrls;exports.robotModelOf=o.robotModelOf;exports.useRobotSceneProps=o.useRobotSceneProps;exports.JoggingGizmo=a.JoggingGizmo;exports.JoggingGizmoOrientation=s.JoggingGizmoOrientation;exports.RobotControlPanel=u.RobotControlPanel;exports.RobotControl=r.RobotControl;exports.useRobotControlProps=r.useRobotControlProps;exports.RobotCanvas=n.RobotCanvas;exports.RobotView=n.RobotView;exports.ValueInterpolator=i.ValueInterpolator;exports.useSmoothedMotionState=i.useSmoothedMotionState;exports.Pose3=t.Pose3;exports.parseRotationToQuaternion=t.parseRotationToQuaternion;exports.quaternionToRotationVector=t.quaternionToRotationVector;
package/dist/3d.d.ts CHANGED
@@ -8,10 +8,20 @@ export { JoggingGizmoOrientation, type JoggingGizmoOrientationProps, } from "./c
8
8
  export type { JogAxis, JogDirection, JogHandle, } from "./components/jogging/jogHandle";
9
9
  export type { JogControlsProps } from "./components/jogging/useJogControls";
10
10
  export { type JogMotion, RobotControlPanel, type RobotControlIncrements, type RobotControlJogMode, type RobotControlJoint, type RobotControlJoints, type RobotControlMoveState, type RobotControlMoveTo, type RobotControlOption, type RobotControlPanelProps, type RobotControlPose, type RobotControlSelect, type RobotControlTab, type RobotControlVelocity, } from "./components/robotControl/RobotControlPanel";
11
+ export { RobotControl, type RobotControlProps, } from "./components/robotControl/RobotControl";
12
+ export { type RobotControlOptions, useRobotControlProps, } from "./components/robotControl/useRobotControlProps";
13
+ export { JoggingAxes, type JoggingAxesProps, } from "./components/robotScene/JoggingAxes";
14
+ export { RobotScene, type RobotSceneProps, } from "./components/robotScene/RobotScene";
15
+ export { RobotSceneView, type RobotSceneViewProps, } from "./components/robotScene/RobotSceneView";
16
+ export { useRobotSceneProps } from "./components/robotScene/useRobotSceneProps";
17
+ export { RobotCanvas, type RobotCanvasProps, } from "./components/robotView/RobotCanvas";
18
+ export { RobotView, type RobotViewProps, } from "./components/robotView/RobotView";
19
+ export type { WebGLUnavailableContext } from "./components/utils/useWebGLRenderer";
11
20
  export * from "./components/robots/LinearAxis";
12
21
  export * from "./components/robots/MotionGroupVisualizer";
13
22
  export * from "./components/robots/Robot";
14
- export { defaultGetModel } from "./components/robots/robotModelLogic";
23
+ export { MODEL_ROTATION } from "./components/robots/modelRotation";
24
+ export { defaultGetModel, FLANGE_NODE_SUFFIX, JOINT_NODE_NAME, JOINT_REST_SUFFIX, jointIndexOf, revokeAllModelUrls, } from "./components/robots/robotModelLogic";
15
25
  export { type RobotModelSource, robotModelOf, } from "./components/robots/robotModelSource";
16
26
  export * from "./components/robots/SupportedLinearAxis";
17
27
  export * from "./components/robots/SupportedRobot";
package/dist/3d.js CHANGED
@@ -1,30 +1,48 @@
1
- import { C as a, J as t, L as r, M as s, a as i, P as n, R as p, S as u, b as d, c as l, d as m, e as x, T as R, f, r as S } from "./chunks/robotModelSource-CKuBOeQ-.js";
2
- import { J as b } from "./chunks/JoggingGizmo-SuS9MmL7.js";
3
- import { J as G } from "./chunks/JoggingGizmoOrientation-x_crT_64.js";
4
- import { R as M } from "./chunks/RobotControlPanel-E-hUzMIL.js";
5
- import { P as L, V as P, p as V, q as E, a as T } from "./chunks/Pose3-pocKPrHN.js";
1
+ import { C as a, J as t, L as r, R as s, T as n } from "./chunks/Robot-IG0yo_YD.js";
2
+ import { F as p, J as R, a as l, b as u, M as x, c as m, d as S, P as d, R as f, e as b, S as c, f as g, g as E, h as J, i as O, j as M, k as T, r as A, l as G, u as I } from "./chunks/RobotScene-BS77SUtN.js";
3
+ import { J as N } from "./chunks/JoggingGizmo-9wEBSe1P.js";
4
+ import { J as V } from "./chunks/JoggingGizmoOrientation-DYeHwowd.js";
5
+ import { R as C } from "./chunks/RobotControlPanel-TZuS0_YA.js";
6
+ import { R as z, u as j } from "./chunks/RobotControl-DyoRsotp.js";
7
+ import { R as D, a as U } from "./chunks/RobotView-CGvHcO7j.js";
8
+ import { V as k, a as q } from "./chunks/PoseTransformer-tafab65c.js";
9
+ import { P as y, p as X, q as Q } from "./chunks/Pose3-B_fLR-Wv.js";
6
10
  export {
7
11
  a as CollisionSceneRenderer,
8
- b as JoggingGizmo,
9
- G as JoggingGizmoOrientation,
12
+ p as FLANGE_NODE_SUFFIX,
13
+ R as JOINT_NODE_NAME,
14
+ l as JOINT_REST_SUFFIX,
15
+ u as JoggingAxes,
16
+ N as JoggingGizmo,
17
+ V as JoggingGizmoOrientation,
10
18
  t as JointLimitGizmo,
11
19
  r as LinearAxis,
12
- s as MotionGroupVisualizer,
13
- i as MotionGroupVisualizerExact,
14
- L as Pose3,
15
- n as PresetEnvironment,
16
- p as Robot,
17
- M as RobotControlPanel,
18
- u as SafetyZonesRenderer,
19
- d as SupportedLinearAxis,
20
- l as SupportedLinearAxisExact,
21
- m as SupportedRobot,
22
- x as SupportedRobotExact,
23
- R as TrajectoryRenderer,
24
- P as ValueInterpolator,
25
- f as defaultGetModel,
26
- V as parseRotationToQuaternion,
27
- E as quaternionToRotationVector,
28
- S as robotModelOf,
29
- T as useSmoothedMotionState
20
+ x as MODEL_ROTATION,
21
+ m as MotionGroupVisualizer,
22
+ S as MotionGroupVisualizerExact,
23
+ y as Pose3,
24
+ d as PresetEnvironment,
25
+ s as Robot,
26
+ D as RobotCanvas,
27
+ z as RobotControl,
28
+ C as RobotControlPanel,
29
+ f as RobotScene,
30
+ b as RobotSceneView,
31
+ U as RobotView,
32
+ c as SafetyZonesRenderer,
33
+ g as SupportedLinearAxis,
34
+ E as SupportedLinearAxisExact,
35
+ J as SupportedRobot,
36
+ O as SupportedRobotExact,
37
+ n as TrajectoryRenderer,
38
+ k as ValueInterpolator,
39
+ M as defaultGetModel,
40
+ T as jointIndexOf,
41
+ X as parseRotationToQuaternion,
42
+ Q as quaternionToRotationVector,
43
+ A as revokeAllModelUrls,
44
+ G as robotModelOf,
45
+ j as useRobotControlProps,
46
+ I as useRobotSceneProps,
47
+ q as useSmoothedMotionState
30
48
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/CurrentPose-d8-aJzMZ.cjs"),o=require("../chunks/RobotSessionProvider--AekyPqD.cjs");exports.CurrentPose=e.CurrentPose;exports.default=e.CurrentPose;exports.useCurrentPoseProps=e.useCurrentPoseProps;exports.RobotSessionProvider=o.RobotSessionProvider;exports.useRobotSession=o.useRobotSession;
@@ -0,0 +1,3 @@
1
+ export { CurrentPose, CurrentPose as default, type CurrentPoseProps, } from "../components/currentPoseBar/CurrentPose";
2
+ export { useCurrentPoseProps } from "../components/currentPoseBar/useCurrentPoseProps";
3
+ export { RobotSessionProvider, useRobotSession, } from "../components/robotSession/RobotSessionProvider";
@@ -0,0 +1,9 @@
1
+ import { C as e, C as r, u as t } from "../chunks/CurrentPose-B-dYw6Qi.js";
2
+ import { R as a, u as n } from "../chunks/RobotSessionProvider-TVaKGzqa.js";
3
+ export {
4
+ e as CurrentPose,
5
+ a as RobotSessionProvider,
6
+ r as default,
7
+ t as useCurrentPoseProps,
8
+ n as useRobotSession
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/CurrentPoseBar-DrXTcV-I.cjs");exports.CurrentPoseBar=e.CurrentPoseBar;exports.default=e.CurrentPoseBar;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/CurrentPoseBar-CgNJwnxA.cjs");exports.CurrentPoseBar=e.CurrentPoseBar;exports.default=e.CurrentPoseBar;
@@ -1,4 +1,4 @@
1
- import { C as e, C as o } from "../chunks/CurrentPoseBar-DENCilvf.js";
1
+ import { C as e, C as o } from "../chunks/CurrentPoseBar-DAgEpcgw.js";
2
2
  export {
3
3
  e as CurrentPoseBar,
4
4
  o as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../chunks/JoggingButtons-CbL-5LMK.cjs");exports.JoggingButtons=t.JoggingButtons;exports.default=t.JoggingButtons;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../chunks/JoggingButtons-nXLqJLIr.cjs");exports.JoggingButtons=t.JoggingButtons;exports.default=t.JoggingButtons;
@@ -1,4 +1,4 @@
1
- import { J as a, J as g } from "../chunks/JoggingButtons-CXaozFVz.js";
1
+ import { J as a, J as g } from "../chunks/JoggingButtons-D4S2oJGt.js";
2
2
  export {
3
3
  a as JoggingButtons,
4
4
  g as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../chunks/JoggingGizmo-DGbFLWgT.cjs"),o=require("../chunks/JoggingGizmoOrientation-dzned4f4.cjs");exports.JoggingGizmo=i.JoggingGizmo;exports.default=i.JoggingGizmo;exports.JoggingGizmoOrientation=o.JoggingGizmoOrientation;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../chunks/JoggingGizmo-BJ3wDpAJ.cjs"),o=require("../chunks/JoggingGizmoOrientation-D9VS6nag.cjs");exports.JoggingGizmo=i.JoggingGizmo;exports.default=i.JoggingGizmo;exports.JoggingGizmoOrientation=o.JoggingGizmoOrientation;
@@ -2,3 +2,4 @@ export { JoggingGizmo, JoggingGizmo as default, type JoggingGizmoProps, } from "
2
2
  export { JoggingGizmoOrientation, type JoggingGizmoOrientationProps, } from "../components/jogging/gizmo/JoggingGizmoOrientation";
3
3
  export type { JogAxis, JogDirection, JogHandle, } from "../components/jogging/jogHandle";
4
4
  export type { JogControlsProps } from "../components/jogging/useJogControls";
5
+ export type { WebGLUnavailableContext } from "../components/utils/useWebGLRenderer";
@@ -1,5 +1,5 @@
1
- import { J as i, J as a } from "../chunks/JoggingGizmo-SuS9MmL7.js";
2
- import { J as t } from "../chunks/JoggingGizmoOrientation-x_crT_64.js";
1
+ import { J as i, J as a } from "../chunks/JoggingGizmo-9wEBSe1P.js";
2
+ import { J as t } from "../chunks/JoggingGizmoOrientation-DYeHwowd.js";
3
3
  export {
4
4
  i as JoggingGizmo,
5
5
  t as JoggingGizmoOrientation,
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/JoggingJointSlider-R3_A9Ppj.cjs");exports.JoggingJointSlider=e.JoggingJointSlider;exports.default=e.JoggingJointSlider;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/JoggingJointSlider-D7AsxkrT.cjs");exports.JoggingJointSlider=e.JoggingJointSlider;exports.default=e.JoggingJointSlider;
@@ -1,4 +1,4 @@
1
- import { J as a, J as e } from "../chunks/JoggingJointSlider-CZ-k6XCa.js";
1
+ import { J as a, J as e } from "../chunks/JoggingJointSlider-DQneQhXH.js";
2
2
  export {
3
3
  a as JoggingJointSlider,
4
4
  e as default
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/RobotControl-DyvIWt4S.cjs"),e=require("../chunks/RobotSessionProvider--AekyPqD.cjs");exports.RobotControl=o.RobotControl;exports.default=o.RobotControl;exports.useRobotControlProps=o.useRobotControlProps;exports.RobotSessionProvider=e.RobotSessionProvider;exports.useRobotSession=e.useRobotSession;
@@ -0,0 +1,3 @@
1
+ export { RobotControl, RobotControl as default, type RobotControlProps, } from "../components/robotControl/RobotControl";
2
+ export { type RobotControlOptions, useRobotControlProps, } from "../components/robotControl/useRobotControlProps";
3
+ export { RobotSessionProvider, useRobotSession, } from "../components/robotSession/RobotSessionProvider";
@@ -0,0 +1,9 @@
1
+ import { R as r, R as t, u as e } from "../chunks/RobotControl-DyoRsotp.js";
2
+ import { R as a, u } from "../chunks/RobotSessionProvider-TVaKGzqa.js";
3
+ export {
4
+ r as RobotControl,
5
+ a as RobotSessionProvider,
6
+ t as default,
7
+ e as useRobotControlProps,
8
+ u as useRobotSession
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/RobotControlPanel-DTE8-v2j.cjs");exports.RobotControlPanel=o.RobotControlPanel;exports.default=o.RobotControlPanel;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/RobotControlPanel-BsDe4A5F.cjs");exports.RobotControlPanel=o.RobotControlPanel;exports.default=o.RobotControlPanel;
@@ -1,4 +1,4 @@
1
- import { R as t, R as e } from "../chunks/RobotControlPanel-E-hUzMIL.js";
1
+ import { R as t, R as e } from "../chunks/RobotControlPanel-TZuS0_YA.js";
2
2
  export {
3
3
  t as RobotControlPanel,
4
4
  e as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RobotHeader-Daft80jq.cjs");exports.RobotHeader=e.RobotHeader;exports.default=e.RobotHeader;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/robotActivationOf-BCKyEgny.cjs"),t=require("../chunks/robotSafetyOf-Y4NuRInk.cjs");exports.ConnectionWarning=o.ConnectionWarning;exports.RobotHeader=o.RobotHeader;exports.connectionWarningOf=o.connectionWarningOf;exports.default=o.RobotHeader;exports.robotActivationOf=o.robotActivationOf;exports.robotSafetyOf=t.robotSafetyOf;
@@ -1,4 +1,8 @@
1
1
  export type { AppItem } from "../components/AppHeader";
2
2
  export type { RobotControlOption, RobotControlSelect, } from "../components/robotControl/RobotControlPanel";
3
3
  export { RobotHeader, RobotHeader as default, type RobotHeaderActivation, type RobotHeaderActivationState, type RobotHeaderProps, } from "../components/robotHeader/RobotHeader";
4
+ export { robotActivationOf } from "../components/robotHeader/robotActivationOf";
5
+ export { robotSafetyOf } from "../components/robotHeader/robotSafetyOf";
4
6
  export type { SafetyBarProps } from "../SafetyBar/SafetyBar";
7
+ export { type ConnectionQuality, ConnectionWarning, type ConnectionWarningProps, } from "../components/connectionWarning/ConnectionWarning";
8
+ export { connectionWarningOf } from "../components/connectionWarning/connectionWarningOf";
@@ -1,5 +1,10 @@
1
- import { R as o, R as r } from "../chunks/RobotHeader-BvIzk8Fw.js";
1
+ import { C as n, a as r, c as t, a as e, r as f } from "../chunks/robotActivationOf-DUbbBf7J.js";
2
+ import { r as s } from "../chunks/robotSafetyOf-BGSW_Ql3.js";
2
3
  export {
3
- o as RobotHeader,
4
- r as default
4
+ n as ConnectionWarning,
5
+ r as RobotHeader,
6
+ t as connectionWarningOf,
7
+ e as default,
8
+ f as robotActivationOf,
9
+ s as robotSafetyOf
5
10
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RobotScene-BjctJ5z1.cjs"),o=require("../chunks/RobotSessionProvider--AekyPqD.cjs");exports.JoggingAxes=e.JoggingAxes;exports.RobotScene=e.RobotScene;exports.RobotSceneView=e.RobotSceneView;exports.default=e.RobotScene;exports.useRobotSceneProps=e.useRobotSceneProps;exports.RobotSessionProvider=o.RobotSessionProvider;exports.useRobotSession=o.useRobotSession;
@@ -0,0 +1,5 @@
1
+ export { JoggingAxes, type JoggingAxesProps, } from "../components/robotScene/JoggingAxes";
2
+ export { RobotScene, RobotScene as default, type RobotSceneProps, } from "../components/robotScene/RobotScene";
3
+ export { RobotSceneView, type RobotSceneViewProps, } from "../components/robotScene/RobotSceneView";
4
+ export { useRobotSceneProps } from "../components/robotScene/useRobotSceneProps";
5
+ export { RobotSessionProvider, useRobotSession, } from "../components/robotSession/RobotSessionProvider";
@@ -0,0 +1,11 @@
1
+ import { b as s, R as a, e as t, R, u as r } from "../chunks/RobotScene-BS77SUtN.js";
2
+ import { R as n, u as i } from "../chunks/RobotSessionProvider-TVaKGzqa.js";
3
+ export {
4
+ s as JoggingAxes,
5
+ a as RobotScene,
6
+ t as RobotSceneView,
7
+ n as RobotSessionProvider,
8
+ R as default,
9
+ r as useRobotSceneProps,
10
+ i as useRobotSession
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/RobotView-BlV3MdCy.cjs"),e=require("../chunks/RobotSessionProvider--AekyPqD.cjs");exports.RobotCanvas=o.RobotCanvas;exports.RobotView=o.RobotView;exports.default=o.RobotView;exports.RobotSessionProvider=e.RobotSessionProvider;exports.useRobotSession=e.useRobotSession;
@@ -0,0 +1,4 @@
1
+ export { RobotCanvas, type RobotCanvasProps, } from "../components/robotView/RobotCanvas";
2
+ export { RobotView, RobotView as default, type RobotViewProps, } from "../components/robotView/RobotView";
3
+ export type { WebGLUnavailableContext } from "../components/utils/useWebGLRenderer";
4
+ export { RobotSessionProvider, useRobotSession, } from "../components/robotSession/RobotSessionProvider";
@@ -0,0 +1,9 @@
1
+ import { R as a, a as e, a as t } from "../chunks/RobotView-CGvHcO7j.js";
2
+ import { R, u as b } from "../chunks/RobotSessionProvider-TVaKGzqa.js";
3
+ export {
4
+ a as RobotCanvas,
5
+ R as RobotSessionProvider,
6
+ e as RobotView,
7
+ t as default,
8
+ b as useRobotSession
9
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-BVk-SH_0.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/robotSafetyOf-Y4NuRInk.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;exports.robotSafetyOf=e.robotSafetyOf;
@@ -1,2 +1,3 @@
1
1
  export * from "./SafetyBar";
2
2
  export { SafetyBar as default } from "./SafetyBar";
3
+ export { robotSafetyOf } from "../components/robotHeader/robotSafetyOf";
@@ -1,5 +1,6 @@
1
- import { S as f, S as r } from "../chunks/SafetyBar-eYzCHOFD.js";
1
+ import { S as r, S as t, r as e } from "../chunks/robotSafetyOf-BGSW_Ql3.js";
2
2
  export {
3
- f as SafetyBar,
4
- r as default
3
+ r as SafetyBar,
4
+ t as default,
5
+ e as robotSafetyOf
5
6
  };
@@ -0,0 +1,52 @@
1
+ import { jsx as y } from "react/jsx-runtime";
2
+ import { observer as I } from "mobx-react-lite";
3
+ import { a as S } from "./RobotSessionProvider-TVaKGzqa.js";
4
+ import { C as P } from "./CurrentPoseBar-DAgEpcgw.js";
5
+ import { useState as l } from "react";
6
+ import { useTranslation as b } from "react-i18next";
7
+ import { i as T } from "./externalizeComponent-TgclPxwg.js";
8
+ import { c as v } from "./coordSystemLabel-Bfy9MUsV.js";
9
+ function h(n) {
10
+ var d, m, p;
11
+ const o = n.jogging, { t: e } = b(void 0, { i18n: T }), [r, s] = l(o.selectedTcpId), [i, u] = l(o.selectedCoordSystemId), a = o.tcpsById[r] ? r : o.selectedTcpId, c = o.coordSystemsById[i] ? i : o.selectedCoordSystemId, f = (p = (m = (d = o.jogger.motionStream.rapidlyChangingMotionState.execute) == null ? void 0 : d.details) == null ? void 0 : m.state) == null ? void 0 : p.kind, g = o.lastJogErrorTranslationKey ? e(o.lastJogErrorTranslationKey) : o.lastJogError;
12
+ function C() {
13
+ const t = o.tcpPoseIn(a, c);
14
+ return !(t != null && t.position) || !t.orientation ? null : {
15
+ position: t.position,
16
+ orientation: t.orientation
17
+ };
18
+ }
19
+ return {
20
+ getCurrentPose: C,
21
+ tcp: o.tcps.length > 0 ? {
22
+ // As the Robot control panel names them
23
+ options: o.tcps.map((t) => ({
24
+ id: t.id,
25
+ label: t.id
26
+ })),
27
+ value: a,
28
+ onChange: s
29
+ } : void 0,
30
+ frame: {
31
+ options: o.coordSystems.map((t) => ({
32
+ id: t.coordinate_system,
33
+ label: v(o, t)
34
+ })),
35
+ value: c,
36
+ onChange: u
37
+ },
38
+ state: f,
39
+ error: g
40
+ };
41
+ }
42
+ const L = I(function({
43
+ session: o,
44
+ ...e
45
+ }) {
46
+ const r = S(o), s = h(r);
47
+ return /* @__PURE__ */ y(P, { ...s, ...e });
48
+ });
49
+ export {
50
+ L as C,
51
+ h as u
52
+ };
@@ -0,0 +1 @@
1
+ "use strict";const P=require("react/jsx-runtime"),S=require("mobx-react-lite"),b=require("./RobotSessionProvider--AekyPqD.cjs"),f=require("./CurrentPoseBar-CgNJwnxA.cjs"),p=require("react"),q=require("react-i18next"),v=require("./externalizeComponent-BW1UV6Gh.cjs"),x=require("./coordSystemLabel-BThpFG9n.cjs");function m(n){var u,d,l;const e=n.jogging,{t:r}=q.useTranslation(void 0,{i18n:v.i18n}),[o,s]=p.useState(e.selectedTcpId),[i,g]=p.useState(e.selectedCoordSystemId),c=e.tcpsById[o]?o:e.selectedTcpId,a=e.coordSystemsById[i]?i:e.selectedCoordSystemId,C=(l=(d=(u=e.jogger.motionStream.rapidlyChangingMotionState.execute)==null?void 0:u.details)==null?void 0:d.state)==null?void 0:l.kind,y=e.lastJogErrorTranslationKey?r(e.lastJogErrorTranslationKey):e.lastJogError;function I(){const t=e.tcpPoseIn(c,a);return!(t!=null&&t.position)||!t.orientation?null:{position:t.position,orientation:t.orientation}}return{getCurrentPose:I,tcp:e.tcps.length>0?{options:e.tcps.map(t=>({id:t.id,label:t.id})),value:c,onChange:s}:void 0,frame:{options:e.coordSystems.map(t=>({id:t.coordinate_system,label:x.coordSystemLabel(e,t)})),value:a,onChange:g},state:C,error:y}}const T=S.observer(function({session:e,...r}){const o=b.useRobotSessionOf(e),s=m(o);return P.jsx(f.CurrentPoseBar,{...s,...r})});exports.CurrentPose=T;exports.useCurrentPoseProps=m;
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),$=require("@mui/material/Divider"),Z=require("@mui/material/IconButton"),b=require("@mui/material/Stack"),G=require("@mui/material/Tooltip"),R=require("@mui/material/Typography"),J=require("@wandelbots/icons/ContentCopyFilled"),H=require("@wandelbots/icons/Settings"),d=require("react"),F=require("react-i18next"),K=require("./externalizeComponent-BdxGBLIv.cjs"),y=require("./useEveryFrame-CHxg25f4.cjs"),ee=require("./SmallSelect-Dcsd7_6_.cjs"),ne=require("@mui/material/ListSubheader"),te=require("@mui/material/MenuItem"),re=require("@mui/material/Popover"),oe=require("@wandelbots/mui"),ie=require("@mui/material/Box"),D=["XYZ","XZY","YXZ","YZX","ZXY","ZYX","XYX","XZX","YXY","YZY","ZXZ","ZYZ"],ae=[...D.map(e=>`EULER_ANGLES_INTRINSIC_${e}`),...D.map(e=>`EULER_ANGLES_EXTRINSIC_${e}`)];function N(e){const n=e.slice(e.lastIndexOf("_")+1);return{intrinsic:e.includes("_INTRINSIC_"),axes:[...n]}}function z([e,n,r]){const o=Math.hypot(e,n,r);if(o<1e-12)return[0,0,0,1];const c=Math.sin(o/2)/o;return[e*c,n*c,r*c,Math.cos(o/2)]}const U={X:0,Y:1,Z:2};function se(e){return e>Math.PI?e-2*Math.PI:e<-Math.PI?e+2*Math.PI:e}function le(e,n){const{intrinsic:r,axes:o}=N(n),c=r?[...o].reverse():o,i=U[c[0]],s=U[c[1]],p=c[0]===c[2],a=p?3-i-s:U[c[2]],x=(i-s)*(s-a)*(a-i)/2,q=Math.hypot(...e)||1,[L,A,I,m]=e.map(V=>V/q),S=[L,A,I],j=S[i]??0,f=S[s]??0,v=(S[a]??0)*x,[T,g,O,_]=p?[m,j,f,v]:[m-f,j+v,f+m,v-j];let C=2*Math.atan2(Math.hypot(O,_),Math.hypot(T,g));const E=Math.atan2(g,T),P=Math.atan2(_,O);let l,u;const h=1e-7;return Math.abs(C)<=h?(l=2*E,u=0):Math.abs(C-Math.PI)<=h?(l=-2*P,u=0):(l=E-P,u=E+P),p||(u*=x,C-=Math.PI/2),(r?[u,C,l]:[l,C,u]).map(se)}function X({children:e}){return t.jsx(ne,{children:e})}X.muiSkipListHighlight=!0;function ce({value:e,onChange:n}){const{t:r}=F.useTranslation(),o=d.useId(),c=s=>{const{intrinsic:p,axes:a}=N(s);return r(p?"CurrentPose.EulerConvention.Intrinsic.lb":"CurrentPose.EulerConvention.Extrinsic.lb",{axes:a.join("")})},i=s=>ae.filter(p=>N(p).intrinsic===s).map(p=>t.jsx(te,{value:p,children:N(p).axes.join("")},p));return t.jsxs(oe.AdornedSelect,{label:r("CurrentPose.EulerConvention.lb"),labelId:o,value:e,renderValue:s=>c(s),onChange:s=>n(s.target.value),children:[t.jsx(X,{children:r("CurrentPose.EulerConvention.Intrinsic.hlb")}),i(!0),t.jsx(X,{children:r("CurrentPose.EulerConvention.Extrinsic.hlb")}),i(!1)]})}const ue=d.memo(pe,(e,n)=>e.anchor===n.anchor&&e.open===n.open&&e.onClose===n.onClose&&e.onChange===n.onChange&&e.format.type===n.format.type&&e.format.angleUnit===n.format.angleUnit&&e.format.eulerConvention===n.format.eulerConvention);function pe({anchor:e,open:n,onClose:r,format:o,onChange:c}){const{t:i}=F.useTranslation(),s=i("CurrentPose.OrientationFormat.ti"),p=a=>c({...o,...a});return t.jsxs(re,{open:n,anchorEl:e,onClose:r,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{role:"dialog","aria-label":s,sx:a=>{var x;return{width:"264px",padding:"16px",display:"flex",flexDirection:"column",gap:"16px",borderRadius:"10px",border:`1px solid ${a.palette.divider}`,background:(x=a.palette.backgroundPaperElevation)==null?void 0:x[2],backgroundImage:"none",boxShadow:a.shadows[16]}}}},children:[t.jsx(R,{variant:"subtitle2",color:"text.primary",children:s}),t.jsx($,{}),t.jsxs(b,{sx:{gap:"8px"},children:[t.jsx(y.PanelSelect,{label:i("CurrentPose.Format.lb"),options:[{id:"rotationVector",label:i("CurrentPose.Format.RotationVector.lb")},{id:"eulerAngles",label:i("CurrentPose.Format.EulerAngles.lb")},{id:"quaternion",label:i("CurrentPose.Format.Quaternion.lb")}],value:o.type,onChange:a=>p({type:a}),disabled:!1}),o.type!=="quaternion"&&t.jsx(y.PanelSelect,{label:i("CurrentPose.AngleUnit.lb"),options:[{id:"rad",label:i("CurrentPose.AngleUnit.Radians.lb")},{id:"deg",label:i("CurrentPose.AngleUnit.Degrees.lb")}],value:o.angleUnit,onChange:a=>p({angleUnit:a}),disabled:!1}),o.type==="eulerAngles"&&t.jsx(ce,{value:o.eulerConvention,onChange:a=>p({eulerConvention:a})})]})]})}const de={type:"rotationVector",angleUnit:"rad",eulerConvention:"EULER_ANGLES_EXTRINSIC_XYZ"};function w(e,n){const r=e.toFixed(n);return Number(r)===0?0 .toFixed(n):r}function B(e,n){return n==="deg"?`${w(e*180/Math.PI,1)}°`:`${w(e,3)} rad`}function xe(e){switch(e.type){case"quaternion":return["Qx","Qy","Qz","Qw"];case"eulerAngles":return N(e.eulerConvention).axes.map(n=>`R${n.toLowerCase()}`);default:return["Rx","Ry","Rz"]}}function he(e,n){switch(n.type){case"quaternion":return z(e).map(r=>w(r,3));case"eulerAngles":return le(z(e),n.eulerConvention).map(r=>B(r,n.angleUnit));default:return e.map(r=>B(r,n.angleUnit))}}function ge(e,n){const r=["x","y","z"].map((i,s)=>({label:i.toUpperCase(),value:e?w(e.position[s]??0,1):"–",kind:i})),o=e?he(e.orientation,n):null,c=xe(n).map((i,s)=>({label:i,value:(o==null?void 0:o[s])??"–",kind:"orientation"}));return[...r,...c]}const Ce={KIND_UNKNOWN:"success.main",RUNNING:"info.main",PAUSED_NEAR_COLLISION:"warning.main",PAUSED_NEAR_JOINT_LIMIT:"warning.main",PAUSED_NEAR_SINGULARITY:"warning.main"};function be({state:e,error:n}){const{t:r}=F.useTranslation(),o=e??"KIND_UNKNOWN",c=n||r(`Jogging.StreamStateSection.${o}.lb`),i=n?"error.main":Ce[o]??"text.secondary";return t.jsx(G,{title:n?c:"",placement:"top-end",children:t.jsxs(b,{direction:"row","data-testid":n?"JOG_ERROR":o,sx:{gap:"5px",alignItems:"center",minWidth:0},children:[t.jsx(ie,{sx:{width:"6px",height:"6px",borderRadius:"50%",flexShrink:0,bgcolor:i}}),t.jsx(R,{variant:"caption",noWrap:!0,sx:{color:i,letterSpacing:"0.17px"},children:c})]})})}const k={letterSpacing:"0.17px"},me={x:"error.main",y:"success.main",z:"info.main",orientation:"grey.600"};function Q({children:e,id:n}){return t.jsx(R,{id:n,variant:"caption",color:"text.secondary",noWrap:!0,sx:k,children:e})}function W({label:e,...n}){const r=d.useId();return t.jsxs(b,{direction:"row",sx:{gap:"8px",alignItems:"center"},children:[t.jsx(Q,{id:r,children:e}),t.jsx(ee.SmallSelect,{labelId:r,width:"172px",...n})]})}const M=()=>t.jsx($,{orientation:"vertical",flexItem:!1,sx:{height:"16px"}}),ve=K.externalizeComponent(({getCurrentPose:e,tcp:n,frame:r,state:o,error:c,orientationFormat:i,onOrientationFormatChange:s,sx:p})=>{const{t:a}=F.useTranslation(),x=d.useRef(null),[q,L]=d.useState(de),A=i??q,[I,m]=d.useState(null),{copied:S,copy:j}=y.useCopyText(),f=y.useEveryFrame(()=>JSON.stringify(e()),!0),v=JSON.parse(f),T=ge(v,A),g=d.useRef({tcp:n,frame:r,onOrientationFormatChange:s});g.current={tcp:n,frame:r,onOrientationFormatChange:s};const O=d.useCallback(l=>{var u;return(u=g.current.tcp)==null?void 0:u.onChange(l)},[]),_=d.useCallback(l=>{var u;return(u=g.current.frame)==null?void 0:u.onChange(l)},[]),C=d.useCallback(l=>{var u,h;L(l),(h=(u=g.current).onOrientationFormatChange)==null||h.call(u,l)},[]),E=d.useCallback(()=>m(null),[]);function P(){const l=e();l&&j(y.poseToText(l))}return t.jsxs(b,{ref:x,direction:"row","data-testid":"current-pose-bar",sx:[l=>{var u;return{alignItems:"center",justifyContent:"space-between",gap:"12px",padding:"8px 16px",minHeight:"54px",boxSizing:"border-box",borderRadius:"10px",border:`1px solid ${l.palette.divider}`,background:(u=l.palette.backgroundPaperElevation)==null?void 0:u[2],boxShadow:l.shadows[16]}},...Array.isArray(p)?p:[p]],children:[t.jsxs(b,{direction:"row",sx:{gap:"12px",alignItems:"center",minWidth:0},children:[t.jsx(Q,{children:a("CurrentPose.Title.lb")}),t.jsx(Z,{"aria-label":a("CurrentPose.OrientationFormat.ti"),"aria-haspopup":"dialog","aria-expanded":I!==null,onClick:()=>m(x.current),sx:{padding:"3px",margin:"-3px",color:"text.secondary"},children:t.jsx(H.Settings,{})}),n&&t.jsxs(t.Fragment,{children:[t.jsx(M,{}),t.jsx(W,{label:a("RobotControl.Tcp.lb"),options:n.options,value:n.value,onChange:O})]}),r&&t.jsxs(t.Fragment,{children:[t.jsx(M,{}),t.jsx(W,{label:a("CurrentPose.RelativeTo.lb"),options:r.options,value:r.value,onChange:_})]}),t.jsx(M,{}),t.jsx(b,{direction:"row","data-testid":"current-pose-values",sx:{gap:"12px",alignItems:"center",minWidth:0,overflow:"hidden"},children:T.map(({label:l,value:u,kind:h},Y)=>t.jsxs(b,{direction:"row",sx:{gap:h==="orientation"?"1px":"2px"},children:[t.jsx(R,{variant:"caption",sx:{...k,color:me[h]},children:l}),t.jsx(R,{variant:"caption",noWrap:!0,sx:{...k,color:"text.secondary",fontVariantNumeric:"tabular-nums"},children:u})]},Y))}),t.jsx(G,{title:a("CurrentPose.Copied.lb"),open:S,disableHoverListener:!0,placement:"top",children:t.jsx("span",{children:t.jsx(Z,{"aria-label":a("CurrentPose.Copy.bt"),onClick:P,disabled:!v,sx:{width:"30px",height:"30px",padding:"5px",borderRadius:"10px",color:"text.secondary","& svg":{width:"20px",height:"20px"}},children:t.jsx(J.ContentCopyFilled,{})})})})]}),t.jsx(be,{state:o,error:c}),t.jsx(ue,{anchor:I,open:I!==null,onClose:E,format:A,onChange:C})]})});exports.CurrentPoseBar=ve;
1
+ "use strict";const t=require("react/jsx-runtime"),$=require("@mui/material/Divider"),Z=require("@mui/material/IconButton"),b=require("@mui/material/Stack"),G=require("@mui/material/Tooltip"),R=require("@mui/material/Typography"),J=require("@wandelbots/icons/ContentCopyFilled"),H=require("@wandelbots/icons/Settings"),d=require("react"),F=require("react-i18next"),K=require("./externalizeComponent-BW1UV6Gh.cjs"),y=require("./useEveryFrame-891OscPu.cjs"),ee=require("./SmallSelect-Dcsd7_6_.cjs"),ne=require("@mui/material/ListSubheader"),te=require("@mui/material/MenuItem"),re=require("@mui/material/Popover"),oe=require("@wandelbots/mui"),ie=require("@mui/material/Box"),D=["XYZ","XZY","YXZ","YZX","ZXY","ZYX","XYX","XZX","YXY","YZY","ZXZ","ZYZ"],ae=[...D.map(e=>`EULER_ANGLES_INTRINSIC_${e}`),...D.map(e=>`EULER_ANGLES_EXTRINSIC_${e}`)];function N(e){const n=e.slice(e.lastIndexOf("_")+1);return{intrinsic:e.includes("_INTRINSIC_"),axes:[...n]}}function z([e,n,r]){const o=Math.hypot(e,n,r);if(o<1e-12)return[0,0,0,1];const c=Math.sin(o/2)/o;return[e*c,n*c,r*c,Math.cos(o/2)]}const U={X:0,Y:1,Z:2};function se(e){return e>Math.PI?e-2*Math.PI:e<-Math.PI?e+2*Math.PI:e}function le(e,n){const{intrinsic:r,axes:o}=N(n),c=r?[...o].reverse():o,i=U[c[0]],s=U[c[1]],p=c[0]===c[2],a=p?3-i-s:U[c[2]],x=(i-s)*(s-a)*(a-i)/2,q=Math.hypot(...e)||1,[L,A,I,m]=e.map(V=>V/q),S=[L,A,I],j=S[i]??0,f=S[s]??0,v=(S[a]??0)*x,[T,g,O,_]=p?[m,j,f,v]:[m-f,j+v,f+m,v-j];let C=2*Math.atan2(Math.hypot(O,_),Math.hypot(T,g));const E=Math.atan2(g,T),P=Math.atan2(_,O);let l,u;const h=1e-7;return Math.abs(C)<=h?(l=2*E,u=0):Math.abs(C-Math.PI)<=h?(l=-2*P,u=0):(l=E-P,u=E+P),p||(u*=x,C-=Math.PI/2),(r?[u,C,l]:[l,C,u]).map(se)}function X({children:e}){return t.jsx(ne,{children:e})}X.muiSkipListHighlight=!0;function ce({value:e,onChange:n}){const{t:r}=F.useTranslation(),o=d.useId(),c=s=>{const{intrinsic:p,axes:a}=N(s);return r(p?"CurrentPose.EulerConvention.Intrinsic.lb":"CurrentPose.EulerConvention.Extrinsic.lb",{axes:a.join("")})},i=s=>ae.filter(p=>N(p).intrinsic===s).map(p=>t.jsx(te,{value:p,children:N(p).axes.join("")},p));return t.jsxs(oe.AdornedSelect,{label:r("CurrentPose.EulerConvention.lb"),labelId:o,value:e,renderValue:s=>c(s),onChange:s=>n(s.target.value),children:[t.jsx(X,{children:r("CurrentPose.EulerConvention.Intrinsic.hlb")}),i(!0),t.jsx(X,{children:r("CurrentPose.EulerConvention.Extrinsic.hlb")}),i(!1)]})}const ue=d.memo(pe,(e,n)=>e.anchor===n.anchor&&e.open===n.open&&e.onClose===n.onClose&&e.onChange===n.onChange&&e.format.type===n.format.type&&e.format.angleUnit===n.format.angleUnit&&e.format.eulerConvention===n.format.eulerConvention);function pe({anchor:e,open:n,onClose:r,format:o,onChange:c}){const{t:i}=F.useTranslation(),s=i("CurrentPose.OrientationFormat.ti"),p=a=>c({...o,...a});return t.jsxs(re,{open:n,anchorEl:e,onClose:r,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"left"},slotProps:{paper:{role:"dialog","aria-label":s,sx:a=>{var x;return{width:"264px",padding:"16px",display:"flex",flexDirection:"column",gap:"16px",borderRadius:"10px",border:`1px solid ${a.palette.divider}`,background:(x=a.palette.backgroundPaperElevation)==null?void 0:x[2],backgroundImage:"none",boxShadow:a.shadows[16]}}}},children:[t.jsx(R,{variant:"subtitle2",color:"text.primary",children:s}),t.jsx($,{}),t.jsxs(b,{sx:{gap:"8px"},children:[t.jsx(y.PanelSelect,{label:i("CurrentPose.Format.lb"),options:[{id:"rotationVector",label:i("CurrentPose.Format.RotationVector.lb")},{id:"eulerAngles",label:i("CurrentPose.Format.EulerAngles.lb")},{id:"quaternion",label:i("CurrentPose.Format.Quaternion.lb")}],value:o.type,onChange:a=>p({type:a}),disabled:!1}),o.type!=="quaternion"&&t.jsx(y.PanelSelect,{label:i("CurrentPose.AngleUnit.lb"),options:[{id:"rad",label:i("CurrentPose.AngleUnit.Radians.lb")},{id:"deg",label:i("CurrentPose.AngleUnit.Degrees.lb")}],value:o.angleUnit,onChange:a=>p({angleUnit:a}),disabled:!1}),o.type==="eulerAngles"&&t.jsx(ce,{value:o.eulerConvention,onChange:a=>p({eulerConvention:a})})]})]})}const de={type:"rotationVector",angleUnit:"rad",eulerConvention:"EULER_ANGLES_EXTRINSIC_XYZ"};function w(e,n){const r=e.toFixed(n);return Number(r)===0?0 .toFixed(n):r}function B(e,n){return n==="deg"?`${w(e*180/Math.PI,1)}°`:`${w(e,3)} rad`}function xe(e){switch(e.type){case"quaternion":return["Qx","Qy","Qz","Qw"];case"eulerAngles":return N(e.eulerConvention).axes.map(n=>`R${n.toLowerCase()}`);default:return["Rx","Ry","Rz"]}}function he(e,n){switch(n.type){case"quaternion":return z(e).map(r=>w(r,3));case"eulerAngles":return le(z(e),n.eulerConvention).map(r=>B(r,n.angleUnit));default:return e.map(r=>B(r,n.angleUnit))}}function ge(e,n){const r=["x","y","z"].map((i,s)=>({label:i.toUpperCase(),value:e?w(e.position[s]??0,1):"–",kind:i})),o=e?he(e.orientation,n):null,c=xe(n).map((i,s)=>({label:i,value:(o==null?void 0:o[s])??"–",kind:"orientation"}));return[...r,...c]}const Ce={KIND_UNKNOWN:"success.main",RUNNING:"info.main",PAUSED_NEAR_COLLISION:"warning.main",PAUSED_NEAR_JOINT_LIMIT:"warning.main",PAUSED_NEAR_SINGULARITY:"warning.main"};function be({state:e,error:n}){const{t:r}=F.useTranslation(),o=e??"KIND_UNKNOWN",c=n||r(`Jogging.StreamStateSection.${o}.lb`),i=n?"error.main":Ce[o]??"text.secondary";return t.jsx(G,{title:n?c:"",placement:"top-end",children:t.jsxs(b,{direction:"row","data-testid":n?"JOG_ERROR":o,sx:{gap:"5px",alignItems:"center",minWidth:0},children:[t.jsx(ie,{sx:{width:"6px",height:"6px",borderRadius:"50%",flexShrink:0,bgcolor:i}}),t.jsx(R,{variant:"caption",noWrap:!0,sx:{color:i,letterSpacing:"0.17px"},children:c})]})})}const k={letterSpacing:"0.17px"},me={x:"error.main",y:"success.main",z:"info.main",orientation:"grey.600"};function Q({children:e,id:n}){return t.jsx(R,{id:n,variant:"caption",color:"text.secondary",noWrap:!0,sx:k,children:e})}function W({label:e,...n}){const r=d.useId();return t.jsxs(b,{direction:"row",sx:{gap:"8px",alignItems:"center"},children:[t.jsx(Q,{id:r,children:e}),t.jsx(ee.SmallSelect,{labelId:r,width:"172px",...n})]})}const M=()=>t.jsx($,{orientation:"vertical",flexItem:!1,sx:{height:"16px"}}),ve=K.externalizeComponent(({getCurrentPose:e,tcp:n,frame:r,state:o,error:c,orientationFormat:i,onOrientationFormatChange:s,sx:p})=>{const{t:a}=F.useTranslation(),x=d.useRef(null),[q,L]=d.useState(de),A=i??q,[I,m]=d.useState(null),{copied:S,copy:j}=y.useCopyText(),f=y.useEveryFrame(()=>JSON.stringify(e()),!0),v=JSON.parse(f),T=ge(v,A),g=d.useRef({tcp:n,frame:r,onOrientationFormatChange:s});g.current={tcp:n,frame:r,onOrientationFormatChange:s};const O=d.useCallback(l=>{var u;return(u=g.current.tcp)==null?void 0:u.onChange(l)},[]),_=d.useCallback(l=>{var u;return(u=g.current.frame)==null?void 0:u.onChange(l)},[]),C=d.useCallback(l=>{var u,h;L(l),(h=(u=g.current).onOrientationFormatChange)==null||h.call(u,l)},[]),E=d.useCallback(()=>m(null),[]);function P(){const l=e();l&&j(y.poseToText(l))}return t.jsxs(b,{ref:x,direction:"row","data-testid":"current-pose-bar",sx:[l=>{var u;return{alignItems:"center",justifyContent:"space-between",gap:"12px",padding:"8px 16px",minHeight:"54px",boxSizing:"border-box",borderRadius:"10px",border:`1px solid ${l.palette.divider}`,background:(u=l.palette.backgroundPaperElevation)==null?void 0:u[2],boxShadow:l.shadows[16]}},...Array.isArray(p)?p:[p]],children:[t.jsxs(b,{direction:"row",sx:{gap:"12px",alignItems:"center",minWidth:0},children:[t.jsx(Q,{children:a("CurrentPose.Title.lb")}),t.jsx(Z,{"aria-label":a("CurrentPose.OrientationFormat.ti"),"aria-haspopup":"dialog","aria-expanded":I!==null,onClick:()=>m(x.current),sx:{padding:"3px",margin:"-3px",color:"text.secondary"},children:t.jsx(H.Settings,{})}),n&&t.jsxs(t.Fragment,{children:[t.jsx(M,{}),t.jsx(W,{label:a("RobotControl.Tcp.lb"),options:n.options,value:n.value,onChange:O})]}),r&&t.jsxs(t.Fragment,{children:[t.jsx(M,{}),t.jsx(W,{label:a("CurrentPose.RelativeTo.lb"),options:r.options,value:r.value,onChange:_})]}),t.jsx(M,{}),t.jsx(b,{direction:"row","data-testid":"current-pose-values",sx:{gap:"12px",alignItems:"center",minWidth:0,overflow:"hidden"},children:T.map(({label:l,value:u,kind:h},Y)=>t.jsxs(b,{direction:"row",sx:{gap:h==="orientation"?"1px":"2px"},children:[t.jsx(R,{variant:"caption",sx:{...k,color:me[h]},children:l}),t.jsx(R,{variant:"caption",noWrap:!0,sx:{...k,color:"text.secondary",fontVariantNumeric:"tabular-nums"},children:u})]},Y))}),t.jsx(G,{title:a("CurrentPose.Copied.lb"),open:S,disableHoverListener:!0,placement:"top",children:t.jsx("span",{children:t.jsx(Z,{"aria-label":a("CurrentPose.Copy.bt"),onClick:P,disabled:!v,sx:{width:"30px",height:"30px",padding:"5px",borderRadius:"10px",color:"text.secondary","& svg":{width:"20px",height:"20px"}},children:t.jsx(J.ContentCopyFilled,{})})})})]}),t.jsx(be,{state:o,error:c}),t.jsx(ue,{anchor:I,open:I!==null,onClose:E,format:A,onChange:C})]})});exports.CurrentPoseBar=ve;
@@ -8,8 +8,8 @@ import { ContentCopyFilled as tn } from "@wandelbots/icons/ContentCopyFilled";
8
8
  import { Settings as on } from "@wandelbots/icons/Settings";
9
9
  import { memo as rn, useId as K, useRef as $, useState as j, useCallback as T } from "react";
10
10
  import { useTranslation as U } from "react-i18next";
11
- import { e as an } from "./externalizeComponent-_w2d1_pz.js";
12
- import { P as B, u as sn, c as ln, b as cn } from "./useEveryFrame-B8t_yz-G.js";
11
+ import { e as an } from "./externalizeComponent-TgclPxwg.js";
12
+ import { P as B, c as sn, u as ln, b as cn } from "./useEveryFrame-D9oux4jW.js";
13
13
  import { S as un } from "./SmallSelect-BdD9uLKK.js";
14
14
  import pn from "@mui/material/ListSubheader";
15
15
  import dn from "@mui/material/MenuItem";
@@ -6,7 +6,7 @@ import { alpha as d } from "@mui/material/styles";
6
6
  import I from "@mui/material/Typography";
7
7
  import { Rotation as j } from "@wandelbots/icons/Rotation";
8
8
  import { SecondaryButton as y } from "@wandelbots/mui";
9
- import { e as v } from "./externalizeComponent-_w2d1_pz.js";
9
+ import { e as v } from "./externalizeComponent-TgclPxwg.js";
10
10
  import { u as J, J as S, a as k, j as u, b as R } from "./joggingColors-CuT5u0H8.js";
11
11
  function $({
12
12
  axis: o,
@@ -1 +1 @@
1
- "use strict";const o=require("react/jsx-runtime"),j=require("@mui/material/Box"),d=require("@mui/material/Button"),x=require("@mui/material/Stack"),l=require("@mui/material/styles"),m=require("@mui/material/Typography"),q=require("@wandelbots/icons/Rotation"),f=require("@wandelbots/mui"),I=require("./externalizeComponent-BdxGBLIv.cjs"),t=require("./joggingColors-ZDc_2UCp.cjs");function y({axis:e,motion:n,disabled:i}){const r=t.jogAxisColors[e];return o.jsx(j,{"aria-hidden":!0,sx:{opacity:i?.4:1,width:30,height:30,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,backgroundColor:l.alpha(r,.15),border:`1px solid ${l.alpha(r,.4)}`},children:o.jsx(m,{variant:"caption",sx:{color:r},children:n==="rotate"?`R${e}`:e.toUpperCase()})})}function R(e){return o.jsx(q.Rotation,{style:e.direction==="-"?{transform:"scaleX(-1)"}:void 0})}const v=I.externalizeComponent(e=>{const{motion:n="translate",disabled:i=!1}=e,{handlersFor:r,label:C,isPressed:b}=t.useJogControls(e);return o.jsx(x,{"data-testid":"jogging-buttons",sx:{gap:"16px",width:280,maxWidth:"100%"},children:t.JOG_AXES.map(a=>o.jsxs(x,{direction:"row",sx:{alignItems:"center",gap:"16px"},children:[o.jsx(y,{axis:a,motion:n,disabled:i}),t.JOG_DIRECTIONS.map(c=>{const s={axis:a,direction:c},u=b(s),g=n==="rotate"?R(s):void 0,h=t.jogAxisColors[a],p={backgroundColor:l.alpha(h,.25),borderColor:l.alpha(h,.4)};return o.jsx(f.SecondaryButton,{size:"large",disabled:i,"aria-label":C(s),"aria-pressed":u,startIcon:c==="-"?g:void 0,endIcon:c==="+"?g:void 0,...r(s),sx:{flex:1,touchAction:"none",userSelect:"none","& svg":{width:24,height:24},[`& .${d.buttonClasses.startIcon}`]:{marginLeft:"-6px"},[`& .${d.buttonClasses.endIcon}`]:{marginRight:"-6px"},...u&&{...p,[`&.${d.buttonClasses.disabled}`]:p}},children:t.jogHandleName(s,n)},c)})]},a))})});exports.JoggingButtons=v;
1
+ "use strict";const o=require("react/jsx-runtime"),j=require("@mui/material/Box"),d=require("@mui/material/Button"),x=require("@mui/material/Stack"),l=require("@mui/material/styles"),m=require("@mui/material/Typography"),q=require("@wandelbots/icons/Rotation"),f=require("@wandelbots/mui"),I=require("./externalizeComponent-BW1UV6Gh.cjs"),t=require("./joggingColors-ZDc_2UCp.cjs");function y({axis:e,motion:n,disabled:i}){const r=t.jogAxisColors[e];return o.jsx(j,{"aria-hidden":!0,sx:{opacity:i?.4:1,width:30,height:30,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderRadius:1,backgroundColor:l.alpha(r,.15),border:`1px solid ${l.alpha(r,.4)}`},children:o.jsx(m,{variant:"caption",sx:{color:r},children:n==="rotate"?`R${e}`:e.toUpperCase()})})}function R(e){return o.jsx(q.Rotation,{style:e.direction==="-"?{transform:"scaleX(-1)"}:void 0})}const v=I.externalizeComponent(e=>{const{motion:n="translate",disabled:i=!1}=e,{handlersFor:r,label:C,isPressed:b}=t.useJogControls(e);return o.jsx(x,{"data-testid":"jogging-buttons",sx:{gap:"16px",width:280,maxWidth:"100%"},children:t.JOG_AXES.map(a=>o.jsxs(x,{direction:"row",sx:{alignItems:"center",gap:"16px"},children:[o.jsx(y,{axis:a,motion:n,disabled:i}),t.JOG_DIRECTIONS.map(c=>{const s={axis:a,direction:c},u=b(s),g=n==="rotate"?R(s):void 0,h=t.jogAxisColors[a],p={backgroundColor:l.alpha(h,.25),borderColor:l.alpha(h,.4)};return o.jsx(f.SecondaryButton,{size:"large",disabled:i,"aria-label":C(s),"aria-pressed":u,startIcon:c==="-"?g:void 0,endIcon:c==="+"?g:void 0,...r(s),sx:{flex:1,touchAction:"none",userSelect:"none","& svg":{width:24,height:24},[`& .${d.buttonClasses.startIcon}`]:{marginLeft:"-6px"},[`& .${d.buttonClasses.endIcon}`]:{marginRight:"-6px"},...u&&{...p,[`&.${d.buttonClasses.disabled}`]:p}},children:t.jogHandleName(s,n)},c)})]},a))})});exports.JoggingButtons=v;