@wandelbots/wandelbots-js-react-components 6.4.0-pr.revamp.667.e1da7d4 → 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 (153) hide show
  1. package/README.md +57 -6
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +12 -1
  4. package/dist/3d.js +43 -24
  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-CyHUWmjM.cjs → CurrentPoseBar-CgNJwnxA.cjs} +1 -1
  37. package/dist/chunks/{CurrentPoseBar-zTZi68tY.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-BiLexAWI.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/converters-BsXgcxCW.cjs +1 -0
  65. package/dist/chunks/{converters-DpNB_WNQ.js → converters-D9KpJ2HD.js} +16 -8
  66. package/dist/chunks/coordSystemLabel-BThpFG9n.cjs +1 -0
  67. package/dist/chunks/coordSystemLabel-Bfy9MUsV.js +6 -0
  68. package/dist/chunks/externalizeComponent-BW1UV6Gh.cjs +2 -0
  69. package/dist/chunks/{externalizeComponent-_w2d1_pz.js → externalizeComponent-TgclPxwg.js} +34 -10
  70. package/dist/chunks/loadRobotSession-CWrjx1wy.js +4548 -0
  71. package/dist/chunks/loadRobotSession-DwBed9kJ.cjs +3 -0
  72. package/dist/chunks/robotActivationOf-BCKyEgny.cjs +1 -0
  73. package/dist/chunks/robotActivationOf-DUbbBf7J.js +480 -0
  74. package/dist/chunks/{SafetyBar-Cuak4ffd.js → robotSafetyOf-BGSW_Ql3.js} +45 -35
  75. package/dist/chunks/{SafetyBar-Bbg-o8h9.cjs → robotSafetyOf-Y4NuRInk.cjs} +1 -1
  76. package/dist/chunks/useEveryFrame-891OscPu.cjs +1 -0
  77. package/dist/chunks/useEveryFrame-D9oux4jW.js +155 -0
  78. package/dist/chunks/useWebGLRenderer-BozrbZz-.js +45 -0
  79. package/dist/chunks/useWebGLRenderer-CtddVDDb.cjs +1 -0
  80. package/dist/components/connectionWarning/ConnectionWarning.d.ts +21 -0
  81. package/dist/components/connectionWarning/connectionWarningOf.d.ts +11 -0
  82. package/dist/components/connectionWarning/timeAgo.d.ts +5 -0
  83. package/dist/components/currentPoseBar/CurrentPose.d.ts +23 -0
  84. package/dist/components/currentPoseBar/useCurrentPoseProps.d.ts +16 -0
  85. package/dist/components/jogging/JoggingRefusedError.d.ts +19 -0
  86. package/dist/components/jogging/JoggingStore.d.ts +98 -3
  87. package/dist/components/jogging/coordSystemLabel.d.ts +7 -0
  88. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +8 -1
  89. package/dist/components/robotControl/JogArea.d.ts +5 -2
  90. package/dist/components/robotControl/RobotControl.d.ts +23 -0
  91. package/dist/components/robotControl/poseText.d.ts +21 -5
  92. package/dist/components/robotControl/useRobotControlProps.d.ts +34 -0
  93. package/dist/components/robotHeader/robotActivationOf.d.ts +8 -0
  94. package/dist/components/robotHeader/robotSafetyOf.d.ts +11 -0
  95. package/dist/components/robotScene/JoggingAxes.d.ts +38 -0
  96. package/dist/components/robotScene/RobotScene.d.ts +28 -0
  97. package/dist/components/robotScene/RobotSceneView.d.ts +53 -0
  98. package/dist/components/robotScene/useRobotSceneProps.d.ts +18 -0
  99. package/dist/components/robotSession/RobotSessionProvider.d.ts +13 -0
  100. package/dist/components/robotView/RobotCanvas.d.ts +42 -0
  101. package/dist/components/robotView/RobotView.d.ts +23 -0
  102. package/dist/components/robotView/WebGLUnavailable.d.ts +5 -0
  103. package/dist/components/robots/DHRobot.d.ts +1 -1
  104. package/dist/components/robots/GenericRobot.d.ts +16 -1
  105. package/dist/components/robots/LinearAxis.d.ts +12 -11
  106. package/dist/components/robots/LinearAxisAnimator.d.ts +1 -1
  107. package/dist/components/robots/Robot.d.ts +26 -9
  108. package/dist/components/robots/SupportedLinearAxis.d.ts +16 -3
  109. package/dist/components/robots/SupportedRobot.d.ts +21 -3
  110. package/dist/components/robots/ghostStyle.d.ts +21 -0
  111. package/dist/components/robots/modelRotation.d.ts +14 -0
  112. package/dist/components/robots/robotModelLogic.d.ts +138 -6
  113. package/dist/components/robots/robotModelSource.d.ts +51 -0
  114. package/dist/components/utils/useWebGLRenderer.d.ts +32 -0
  115. package/dist/components/utils/webglSupport.d.ts +11 -0
  116. package/dist/core.cjs +1 -1
  117. package/dist/core.d.ts +20 -0
  118. package/dist/core.js +75 -41
  119. package/dist/index.cjs +1 -1
  120. package/dist/index.js +118 -65
  121. package/dist/lib/ConnectedMotionGroup.d.ts +5 -1
  122. package/dist/lib/ControllerStateStream.d.ts +125 -0
  123. package/dist/lib/controllerStateSource.d.ts +37 -0
  124. package/dist/lib/motionGroupModelResources.d.ts +1 -0
  125. package/dist/lib/nats/natsControllerStateSource.d.ts +27 -0
  126. package/dist/lib/robotSession/RobotActivation.d.ts +59 -0
  127. package/dist/lib/robotSession/RobotDescription.d.ts +84 -0
  128. package/dist/lib/robotSession/RobotLiveState.d.ts +56 -0
  129. package/dist/lib/robotSession/RobotLoadProgress.d.ts +72 -0
  130. package/dist/lib/robotSession/RobotSafety.d.ts +59 -0
  131. package/dist/lib/robotSession/RobotSession.d.ts +96 -0
  132. package/dist/lib/robotSession/RobotTargetPose.d.ts +78 -0
  133. package/dist/lib/robotSession/loadRobotResources.d.ts +46 -0
  134. package/dist/lib/robotSession/loadRobotSession.d.ts +81 -0
  135. package/dist/lib/robotSession/robotPose.d.ts +28 -0
  136. package/dist/nats.cjs +1 -0
  137. package/dist/nats.d.ts +4 -0
  138. package/dist/nats.js +131 -0
  139. package/package.json +11 -1
  140. package/dist/chunks/JoggingGizmo-DGbFLWgT.cjs +0 -1
  141. package/dist/chunks/Pose3-DIyg-aZA.cjs +0 -1
  142. package/dist/chunks/Pose3-pocKPrHN.js +0 -292
  143. package/dist/chunks/Robot-BeTWgowU.cjs +0 -1
  144. package/dist/chunks/Robot-D4XbngYI.js +0 -1272
  145. package/dist/chunks/RobotControlPanel-BXtBHEe9.cjs +0 -1
  146. package/dist/chunks/RobotHeader-BZci9ahT.js +0 -244
  147. package/dist/chunks/RobotHeader-CqK0700U.cjs +0 -1
  148. package/dist/chunks/TrajectoryExecutionStore-BNZzZ1Gx.js +0 -3387
  149. package/dist/chunks/TrajectoryExecutionStore-CYrVePlx.cjs +0 -3
  150. package/dist/chunks/converters-C8I_A_tA.cjs +0 -1
  151. package/dist/chunks/externalizeComponent-BdxGBLIv.cjs +0 -2
  152. package/dist/chunks/useEveryFrame-G_-ma1nC.js +0 -142
  153. package/dist/chunks/useEveryFrame-dmPPTKtT.cjs +0 -1
package/README.md CHANGED
@@ -68,6 +68,7 @@ Browse the full icon set at https://wandelbotsgmbh.github.io/nova-design-system/
68
68
  - **`.`** (Main) — All components. Requires the peer dependencies of `/core` and `/3d`.
69
69
  - **`/core`** — The parts without 3D (jogging, `SafetyBar`, `AppHeader`, `LoadingCover`, `NoMotionGroupModal`), the NOVA connections and `JoggingStore`, the motion state helpers and `i18n`.
70
70
  - **`/3d`** — The 3D parts (`Robot`, `MotionGroupVisualizer`, `SafetyZonesRenderer`, …). Requires in addition three, three-stdlib, @react-three/fiber and @react-three/drei.
71
+ - **`/nats`** — A robot's live controller state over NOVA's NATS server (`natsControllerStateSource`, `natsUrlOf`), a source for `ControllerStateStream` of `/core` instead of its websocket (`controllerStateWebsocket`). Requires in addition nats.ws; no other entry point loads it.
71
72
  - **`/SafetyBar`** — Only `SafetyBar` (also as the default export).
72
73
  - **`/JoggingGizmo`** — Only `JoggingGizmo` (also as the default export) and `JoggingGizmoOrientation`. Requires in addition three and @react-three/fiber.
73
74
  - **`/JoggingButtons`** — Only `JoggingButtons` (also as the default export). No 3D packages needed.
@@ -94,6 +95,7 @@ import JoggingJointSlider from "@wandelbots/wandelbots-js-react-components/Joggi
94
95
  | `three-stdlib` (only `/3d`) | >=2 |
95
96
  | `@react-three/fiber` (only `/3d`, `/JoggingGizmo`, `/RobotControlPanel`) | ^9 |
96
97
  | `@react-three/drei` (only `/3d`) | ^10 |
98
+ | `nats.ws` (only `/nats`) | ^1.30.3 |
97
99
 
98
100
  These packages are peer dependencies because the app and the library must use the same copy: React, the MUI theme of the app, the MobX stores that the app reads with its own `observer`, and the `<Canvas>` of React Three Fiber.
99
101
 
@@ -130,6 +132,53 @@ These packages are peer dependencies because the app and the library must use th
130
132
  - **Look:** `AppHeader` and `LoadingCover` use the styles of the design system, so they look a little different.
131
133
  - **Release asset:** `no-draco-models.zip` is gone. The models come from the NOVA API (since 4.0.0).
132
134
 
135
+ ### From ConnectedMotionGroup to RobotSession
136
+
137
+ `ConnectedMotionGroup` is deprecated. `RobotSession` replaces it: one robot of a cell, loaded and connected, with its description, live state, safety, activation, jogging and Move to. `ConnectedMotionGroup` keeps working until a later major version removes it, and `Robot` and `LinearAxis` still take it.
138
+
139
+ ```tsx
140
+ // Before
141
+ const motionGroup = await ConnectedMotionGroup.connect(nova, "0@ur5e", { cellId })
142
+ <Robot connectedMotionGroup={motionGroup} />
143
+ motionGroup.dispose()
144
+
145
+ // After
146
+ const load = loadRobotSession(nova, "0@ur5e", { cellId })
147
+ const session = await load.ready
148
+ <Robot motionGroup={robotModelOf(session)} />
149
+ load.dispose()
150
+ ```
151
+
152
+ What changes besides the names:
153
+
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`. 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
+ - **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
+ - **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
+ - **Several robots:** load one session per robot instead of `ConnectedMotionGroup.connectMultiple`.
159
+
160
+ | `ConnectedMotionGroup` | `RobotSession` |
161
+ | --- | --- |
162
+ | `motionGroupId`, `controllerId` | `motionGroupId`, `controllerId` (and `cellId`) |
163
+ | `modelFromController` | `description.motionGroupModel` |
164
+ | `dhParameters` | `description.dhParameters` |
165
+ | `safetyZones` | `description.safetyZones` |
166
+ | `description` | `description.motionGroupDescription` |
167
+ | `isVirtual` | `description.isVirtual` |
168
+ | `tcps` | `description.tcps` (id and name), `description.tcpOffsetsById` (position and orientation) |
169
+ | `joints` | One per joint: `description.dhParameters`, or the joint limits in `description.jointLimits` |
170
+ | `mountingPosition`, `mountingQuaternion` | `robotModelOf(session)` of `/3d` (metres and a quaternion), or `description.mounting` (mm and a rotation vector) |
171
+ | `rapidlyChangingMotionState` | `state.rapidlyChangingMotionState` |
172
+ | `controllerState` | `state.controllerState` |
173
+ | `initialMotionState`, `controller`, `motionGroup`, `motionStateSocket` | No replacement: the session keeps its connections. Read `state` instead. |
174
+ | `activationState` | `activation.state` |
175
+ | `activate()`, `deactivate()`, `toggleActivation()` | `activation.activate()`, `activation.deactivate()`, `activation.toggle()` |
176
+ | `isEstopActive`, `isMoveableSafetyState`, `isMoveableOperationMode`, `canBeMoved` | `safety.isEstopActive`, `safety.isMoveableSafetyState`, `safety.isMoveableOperationMode`, `safety.canBeMoved`; why the robot may not move: `safety.notMoveableReason` |
177
+ | `joggingVelocity`, `joggingVelocityRads`, `setJoggingVelocity()` | The velocities of `jogging`: `rotationVelocityDegPerSec`, `rotationVelocityRadsPerSec`, `translationVelocityMmPerSec`, `setVelocityFromSlider()` |
178
+ | `connectedJoggingSocket`, `planData` | No replacement (unused) |
179
+ | `dispose()` | `load.dispose()`, or `session.dispose()` |
180
+ | `<Robot connectedMotionGroup={…}>`, `<LinearAxis connectedMotionGroup={…}>` | `<Robot motionGroup={robotModelOf(session)}>`, the same for `LinearAxis`. `motionGroup` also takes a `ConnectedMotionGroup`, or the app's own data (see `RobotModelSource`). |
181
+
133
182
  ### 4.x Core Changes
134
183
 
135
184
  Robot data is now fetched from a running nova instance. This eliminates the need of shipping every react application with the robot data attached.
@@ -173,7 +222,7 @@ Manual robot control interfaces.
173
222
  - **JoggingCartesianAxisControl** - Single-axis cartesian movement
174
223
  - **JoggingJointValueControl** - Individual joint controls
175
224
  - **VelocitySlider** (and **VelocitySliderLabel**) - Speed adjustment interface
176
- - **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.
177
226
 
178
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.
179
228
 
@@ -313,12 +362,13 @@ const orientation = useRef<Quaternion | null>(null)
313
362
 
314
363
  **Robot** - Real-time 3D robot rendering
315
364
 
316
- - Live pose updates from a `ConnectedMotionGroup`
365
+ - Takes the robot as plain data (`RobotModelSource`): `robotModelOf(session)` of a `RobotSession`, a `ConnectedMotionGroup`, or the app's own data
366
+ - Live pose updates from its motion state, at its mounting
317
367
  - The model of the motion group from the NOVA instance (`defaultGetModel`)
318
368
 
319
369
  **LinearAxis** - The same for a linear axis
320
370
 
321
- **SupportedRobot**, **SupportedLinearAxis** and **MotionGroupVisualizer** - The same without a `ConnectedMotionGroup`: they take a motion state, the model name and the DH parameters. `MotionGroupVisualizer` picks the robot or the linear axis. The `…Exact` variants show the pose without smoothing.
371
+ **SupportedRobot**, **SupportedLinearAxis** and **MotionGroupVisualizer** - The same with single props: they take a motion state, the model name and the DH parameters. `MotionGroupVisualizer` picks the robot or the linear axis. The `…Exact` variants show the pose without smoothing.
322
372
 
323
373
  **SafetyZonesRenderer** - 3D safety visualization
324
374
 
@@ -353,7 +403,8 @@ Safety components for production environments.
353
403
 
354
404
  ### Logic
355
405
 
356
- - **ConnectedMotionGroup** - A motion group with its live motion state, safety state and operation mode
406
+ - **loadRobotSession** and **RobotSession** - A robot of a cell, loaded and connected: its description, live state, safety, activation, jogging and Move to
407
+ - **ConnectedMotionGroup** (deprecated, see [From ConnectedMotionGroup to RobotSession](#from-connectedmotiongroup-to-robotsession)) - A motion group with its live motion state, safety state and operation mode
357
408
  - **MotionStreamConnection** and **JoggerConnection** - The motion state stream and the jogging connection of a motion group
358
409
  - **jointValuesEqual**, **poseEqual**, **tcpMotionEqual**, **unwrapRotationVector** - Helpers for the motion state
359
410
  - **ValueInterpolator**, **useInterpolation**, **useSmoothedMotionState** - Smooth joint values for the 3D view
@@ -365,9 +416,9 @@ Safety components for production environments.
365
416
 
366
417
  Components integrate with the Wandelbots Nova ecosystem:
367
418
 
368
- - **NovaConnection** - Where the library connects to NOVA (`nova` of `JoggingPanel`, `ConnectedMotionGroup.connect`, `MotionStreamConnection.open`, `JoggerConnection.open`, `defaultGetModel`), it takes a `NovaConnection`: the URL of the instance, or the NOVA client of the app (`Nova` of `@wandelbots/nova-js`, of any version). The library reads only the URL and the access token of the client, and connects with its own client (nova-js 4.13.0). So the app configures the connection in one place.
419
+ - **NovaConnection** - Where the library connects to NOVA (`nova` of `JoggingPanel`, `loadRobotSession`, `ConnectedMotionGroup.connect`, `MotionStreamConnection.open`, `JoggerConnection.open`, `defaultGetModel`), it takes a `NovaConnection`: the URL of the instance, or the NOVA client of the app (`Nova` of `@wandelbots/nova-js`, of any version). The library reads only the URL and the access token of the client, and connects with its own client (nova-js 4.13.0). So the app configures the connection in one place.
369
420
  - **Real-time Updates** - WebSocket connections for live robot state updates
370
- - **Motion Group Management** - Direct integration with `ConnectedMotionGroup` objects
421
+ - **Motion Group Management** - One `RobotSession` per robot (`ConnectedMotionGroup` in earlier versions)
371
422
  - **State Synchronization** - Automatic state management with MobX reactivity
372
423
 
373
424
  ### Technical Foundation
package/dist/3d.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Robot-BeTWgowU.cjs"),t=require("./chunks/JoggingGizmo-DGbFLWgT.cjs"),i=require("./chunks/JoggingGizmoOrientation-dzned4f4.cjs"),r=require("./chunks/RobotControlPanel-BXtBHEe9.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.JoggingGizmo=t.JoggingGizmo;exports.JoggingGizmoOrientation=i.JoggingGizmoOrientation;exports.RobotControlPanel=r.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,21 @@ 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";
25
+ export { type RobotModelSource, robotModelOf, } from "./components/robots/robotModelSource";
15
26
  export * from "./components/robots/SupportedLinearAxis";
16
27
  export * from "./components/robots/SupportedRobot";
17
28
  export { ValueInterpolator, type InterpolationOptions, } from "./components/utils/interpolation";
package/dist/3d.js CHANGED
@@ -1,29 +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 m, d as x, e as R, T as l, f as S } from "./chunks/Robot-D4XbngYI.js";
2
- import { J as c } from "./chunks/JoggingGizmo-SuS9MmL7.js";
3
- import { J as G } from "./chunks/JoggingGizmoOrientation-x_crT_64.js";
4
- import { R as b } from "./chunks/RobotControlPanel-BiLexAWI.js";
5
- import { P as L, V as M, p as P, q as V, a as E } 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
- c 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
- b as RobotControlPanel,
18
- u as SafetyZonesRenderer,
19
- d as SupportedLinearAxis,
20
- m as SupportedLinearAxisExact,
21
- x as SupportedRobot,
22
- R as SupportedRobotExact,
23
- l as TrajectoryRenderer,
24
- M as ValueInterpolator,
25
- S as defaultGetModel,
26
- P as parseRotationToQuaternion,
27
- V as quaternionToRotationVector,
28
- E 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
29
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-CyHUWmjM.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-zTZi68tY.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-BXtBHEe9.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-BiLexAWI.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-CqK0700U.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-BZci9ahT.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-Bbg-o8h9.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-Cuak4ffd.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-dmPPTKtT.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, a as ln, p as cn } from "./useEveryFrame-G_-ma1nC.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;