@wandelbots/wandelbots-js-react-components 6.4.0-pr.feat-robot-session.672.4c8affa → 6.4.0-pr.feat-session-parts.674.0f7e6a3

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 (122) hide show
  1. package/README.md +220 -19
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +3 -0
  4. package/dist/3d.js +22 -17
  5. package/dist/CurrentPose/index.cjs +1 -0
  6. package/dist/CurrentPose/index.d.ts +1 -0
  7. package/dist/CurrentPose/index.js +5 -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.js +5 -4
  14. package/dist/JoggingJointSlider/index.cjs +1 -1
  15. package/dist/JoggingJointSlider/index.js +1 -1
  16. package/dist/RobotControl/index.cjs +1 -0
  17. package/dist/RobotControl/index.d.ts +2 -0
  18. package/dist/RobotControl/index.js +5 -0
  19. package/dist/RobotControlPanel/index.cjs +1 -0
  20. package/dist/RobotControlPanel/index.d.ts +2 -0
  21. package/dist/RobotControlPanel/index.js +5 -0
  22. package/dist/RobotHeader/index.cjs +1 -0
  23. package/dist/RobotHeader/index.d.ts +6 -0
  24. package/dist/RobotHeader/index.js +9 -0
  25. package/dist/SafetyBar/IndicatorWithExplanation.d.ts +12 -1
  26. package/dist/SafetyBar/SafetyBar.d.ts +15 -1
  27. package/dist/SafetyBar/index.cjs +1 -1
  28. package/dist/SafetyBar/index.js +1 -1
  29. package/dist/SafetyBar/robotSafetyOf.d.ts +1 -0
  30. package/dist/chunks/{ConnectedMotionGroup-DqNrk4EC.js → ConnectedMotionGroup-Br09yFN0.js} +24 -24
  31. package/dist/chunks/{ConnectedMotionGroup-B0Uwa4bj.cjs → ConnectedMotionGroup-CyvGuzXo.cjs} +1 -1
  32. package/dist/chunks/CurrentPose-Bf6p3Y83.cjs +1 -0
  33. package/dist/chunks/CurrentPose-BqyOJGLL.js +50 -0
  34. package/dist/chunks/CurrentPoseBar-96iSC6JW.js +506 -0
  35. package/dist/chunks/CurrentPoseBar-LN0MK4R_.cjs +1 -0
  36. package/dist/chunks/{JoggingButtons-i8FdMpCx.js → JoggingButtons-BOhdgvmu.js} +2 -2
  37. package/dist/chunks/{JoggingButtons-paQCBXf4.cjs → JoggingButtons-DVneahs7.cjs} +1 -1
  38. package/dist/chunks/JoggingGizmo-BNqlyb56.cjs +1 -0
  39. package/dist/chunks/{JoggingGizmoOrientation-CKZeLcMp.js → JoggingGizmo-yqB2qH63.js} +132 -139
  40. package/dist/chunks/JoggingGizmoOrientation-CwMvm7OV.cjs +1 -0
  41. package/dist/chunks/JoggingGizmoOrientation-hdXGeo3q.js +14 -0
  42. package/dist/chunks/{JoggingJointSlider-DQhJOmcc.js → JoggingJointSlider-CEPotMXL.js} +1 -1
  43. package/dist/chunks/{JoggingJointSlider-YcEBMgF1.cjs → JoggingJointSlider-Dxx25dRP.cjs} +1 -1
  44. package/dist/chunks/JoggingRefusedError-C4D8_YR_.js +38 -0
  45. package/dist/chunks/JoggingRefusedError-DqyrfUcc.cjs +1 -0
  46. package/dist/chunks/Robot-BW7S3Wa6.cjs +1 -0
  47. package/dist/chunks/{Pose3-Ci1bxEvz.js → Robot-C4qllwOQ.js} +414 -490
  48. package/dist/chunks/RobotActivation-CRVxXvlx.cjs +1 -0
  49. package/dist/chunks/RobotActivation-oR-8Y0iq.js +143 -0
  50. package/dist/chunks/RobotControl-DJi32kGC.js +405 -0
  51. package/dist/chunks/RobotControl-ToEESvYu.cjs +1 -0
  52. package/dist/chunks/RobotControlPanel-B_bTvQlA.cjs +1 -0
  53. package/dist/chunks/RobotControlPanel-DFIcBtQe.js +1028 -0
  54. package/dist/chunks/RobotHeader-7MA3sT-Y.cjs +1 -0
  55. package/dist/chunks/RobotHeader-CHnBRjsS.js +392 -0
  56. package/dist/chunks/SafetyBar-Cb6qHLB6.cjs +1 -0
  57. package/dist/chunks/{SafetyBar-CPrW4dgw.js → SafetyBar-CuiBrASn.js} +248 -210
  58. package/dist/chunks/SmallSelect-BdD9uLKK.js +52 -0
  59. package/dist/chunks/SmallSelect-Dcsd7_6_.cjs +1 -0
  60. package/dist/chunks/coordSystemLabel-BThpFG9n.cjs +1 -0
  61. package/dist/chunks/coordSystemLabel-Bfy9MUsV.js +6 -0
  62. package/dist/chunks/externalizeComponent-CFjD3foU.cjs +2 -0
  63. package/dist/chunks/{externalizeComponent-7OVHUIUh.js → externalizeComponent-DoU__DJr.js} +175 -53
  64. package/dist/chunks/joggingColors-Cqpfuw4G.cjs +1 -0
  65. package/dist/chunks/{joggingColors-BKRoSGQu.js → joggingColors-sb6IFdj2.js} +2 -1
  66. package/dist/chunks/loadRobotSession-BPqqGBuV.cjs +1 -0
  67. package/dist/chunks/{loadRobotSession-Bt1-Brjp.js → loadRobotSession-BqtDP7Ck.js} +297 -442
  68. package/dist/chunks/poseText-BxG4Caa-.js +48 -0
  69. package/dist/chunks/poseText-CwplkbDM.cjs +1 -0
  70. package/dist/chunks/useEveryFrame-D04ygIe7.js +116 -0
  71. package/dist/chunks/useEveryFrame-NeKiPXY-.cjs +1 -0
  72. package/dist/components/VelocitySlider.d.ts +8 -0
  73. package/dist/components/connectionWarning/ConnectionWarning.d.ts +34 -0
  74. package/dist/components/connectionWarning/connectionWarningOf.d.ts +1 -0
  75. package/dist/components/connectionWarning/timeAgo.d.ts +5 -0
  76. package/dist/components/currentPoseBar/CurrentPose.d.ts +19 -0
  77. package/dist/components/currentPoseBar/useCurrentPoseProps.d.ts +1 -0
  78. package/dist/components/jogging/JoggingCartesianTab.d.ts +3 -0
  79. package/dist/components/jogging/JoggingJointTab.d.ts +2 -0
  80. package/dist/components/jogging/JoggingPanel.d.ts +10 -0
  81. package/dist/components/jogging/JoggingStore.d.ts +46 -0
  82. package/dist/components/jogging/coordSystemLabel.d.ts +7 -0
  83. package/dist/components/robotControl/CartesianJogTab.d.ts +32 -0
  84. package/dist/components/robotControl/HoldToMoveButton.d.ts +26 -0
  85. package/dist/components/robotControl/JogArea.d.ts +28 -0
  86. package/dist/components/robotControl/JogDisabledReason.d.ts +15 -0
  87. package/dist/components/robotControl/JogModeToggle.d.ts +8 -0
  88. package/dist/components/robotControl/JointJogTab.d.ts +19 -0
  89. package/dist/components/robotControl/MoveToTab.d.ts +41 -0
  90. package/dist/components/robotControl/PoseField.d.ts +23 -0
  91. package/dist/components/robotControl/RobotControl.d.ts +33 -0
  92. package/dist/components/robotControl/RobotControlPanel.d.ts +257 -0
  93. package/dist/components/robotControl/Section.d.ts +5 -0
  94. package/dist/components/robotControl/VelocityRow.d.ts +20 -0
  95. package/dist/components/robotControl/atPose.d.ts +14 -0
  96. package/dist/components/robotControl/units.d.ts +24 -0
  97. package/dist/components/robotControl/useRobotControlProps.d.ts +11 -0
  98. package/dist/components/robotControl/velocityText.d.ts +18 -0
  99. package/dist/components/robotHeader/ActivationSwitch.d.ts +18 -0
  100. package/dist/components/robotHeader/AppNavigation.d.ts +15 -0
  101. package/dist/components/robotHeader/RobotHeader.d.ts +62 -0
  102. package/dist/components/robotHeader/robotActivationOf.d.ts +1 -0
  103. package/dist/core.cjs +1 -1
  104. package/dist/core.d.ts +5 -1
  105. package/dist/core.js +58 -50
  106. package/dist/index.cjs +1 -1
  107. package/dist/index.js +83 -70
  108. package/dist/lib/ConnectedMotionGroup.d.ts +11 -0
  109. package/dist/lib/motionStateUpdate.d.ts +17 -0
  110. package/dist/session.cjs +1 -1
  111. package/dist/session.js +29 -27
  112. package/package.json +2 -1
  113. package/dist/chunks/CurrentPoseBar-Cbz4AO36.cjs +0 -1
  114. package/dist/chunks/CurrentPoseBar-CpwvWpEY.js +0 -619
  115. package/dist/chunks/JoggingGizmoOrientation-EPtBeAun.cjs +0 -1
  116. package/dist/chunks/Pose3-DwMOSTKO.cjs +0 -1
  117. package/dist/chunks/SafetyBar-DhbaN3R5.cjs +0 -1
  118. package/dist/chunks/externalizeComponent-B0n_tR3v.cjs +0 -2
  119. package/dist/chunks/joggingColors-BkPm75Hr.cjs +0 -1
  120. package/dist/chunks/loadRobotSession-DHVuK_pj.cjs +0 -1
  121. package/dist/chunks/poseText-BXUaQWnK.cjs +0 -1
  122. package/dist/chunks/poseText-CtdXIeT_.js +0 -41
package/README.md CHANGED
@@ -41,7 +41,7 @@ pnpm add three three-stdlib @react-three/fiber @react-three/drei
41
41
 
42
42
  You can also import from the top-level package, but then you'll need to provide all optional dependencies.
43
43
 
44
- The parts use the theme of your app. Without the Nova theme the simple parts still work, in the default colours of MUI; only `SafetyBar` still needs it. For the Nova look, create the theme with `createNovaMuiTheme` of `@wandelbots/mui`:
44
+ The parts use the theme of your app. Without the Nova theme the simple parts still work, in the default colours of MUI; only `SafetyBar`, and `RobotHeader`, which shows it, still need it. For the Nova look, create the theme with `createNovaMuiTheme` of `@wandelbots/mui`:
45
45
 
46
46
  ```tsx
47
47
  import { ThemeProvider } from "@mui/material/styles"
@@ -66,15 +66,21 @@ Browse the full icon set at https://wandelbotsgmbh.github.io/nova-design-system/
66
66
  **Available Entry Points:**
67
67
 
68
68
  - **`.`** (Main) — All components. Requires the peer dependencies of `/core` and `/3d`.
69
- - **`/core`** — The parts without 3D (jogging, `SafetyBar`, `AppHeader`, `LoadingCover`, `NoMotionGroupModal`), the NOVA connections and `JoggingStore`, the motion state helpers and `i18n`. It also exports everything of `/session`.
69
+ - **`/core`** — The parts without 3D (jogging, `RobotHeader`, `CurrentPose`, `SafetyBar`, `AppHeader`, `LoadingCover`, `NoMotionGroupModal`), the NOVA connections and `JoggingStore`, the motion state helpers, the deprecated `ConnectedMotionGroup` and `i18n`. It also exports everything of `/session`.
70
70
  - **`/3d`** — The 3D parts (`Robot`, `MotionGroupVisualizer`, `SafetyZonesRenderer`, …). Requires in addition three, three-stdlib, @react-three/fiber and @react-three/drei.
71
71
  - **`/session`** (beta) — The library without React: a robot of a NOVA cell, loaded and connected (`loadRobotSession`, `RobotSession` with its description, live state, safety, activation, jogging and Move to), `JoggingStore`, the NOVA connections and the pose math on plain numbers. It loads no React, no MUI and no three.js, and needs only `mobx`.
72
72
  - **`/nats`** — A robot's live controller state over NOVA's NATS server (`natsControllerStateSource`, `natsUrlOf`): the `stateSource` of `loadRobotSession` instead of NOVA's websocket. Requires in addition nats.ws; no other entry point loads it.
73
- - **`/SafetyBar`** — Only `SafetyBar` (also as the default export).
73
+ - **`/SafetyBar`** — Only `SafetyBar` (also as the default export), also for a robot session (`session`).
74
74
  - **`/JoggingGizmo`** — Only `JoggingGizmo` (also as the default export) and `JoggingGizmoOrientation`. Requires in addition three and @react-three/fiber.
75
75
  - **`/JoggingButtons`** — Only `JoggingButtons` (also as the default export). No 3D packages needed.
76
76
  - **`/JoggingJointSlider`** — Only `JoggingJointSlider` (also as the default export). No 3D packages needed.
77
+ - **`/RobotControlPanel`** — The whole Robot control panel, `RobotControlPanel` (also as the default export). It shows the jog gizmo, so it requires in addition three and @react-three/fiber, as `/JoggingGizmo` does.
78
+ - **`/RobotControl`** — `RobotControl` (also as the default export), the Robot control panel of a robot session. Requires in addition three and @react-three/fiber, as `/RobotControlPanel` does.
79
+ - **`/CurrentPose`** — `CurrentPose` (also as the default export), the current pose bar of a robot session. No 3D packages needed.
77
80
  - **`/CurrentPoseBar`** — Only `CurrentPoseBar` (also as the default export). No 3D packages needed.
81
+ - **`/RobotHeader`** — `RobotHeader` (also as the default export), and its parts for an app's own header: `SafetyBar`, `ActivationSwitch` and `ConnectionWarning`. No 3D packages needed.
82
+
83
+ Each part of a robot session (`RobotControl`, `CurrentPose`, and `RobotHeader` with its parts) takes its robot as `session` and follows it by itself: the app passes the session, nothing else. Several robots on a page: each part gets its own.
78
84
 
79
85
  A component's own entry point brings only what that component needs, e.g. `/JoggingButtons` no three.js and no NOVA client, unlike `/core`. The entry points share their common code, so an app that imports a component from both `/core` and its own entry point gets one copy of it:
80
86
 
@@ -84,7 +90,7 @@ import JoggingJointSlider from "@wandelbots/wandelbots-js-react-components/Joggi
84
90
 
85
91
  ### The simple parts on their own
86
92
 
87
- `JoggingGizmo`, `JoggingButtons`, `JoggingJointSlider`, `CurrentPoseBar` and `SafetyBar` take plain props and report through callbacks: no store, no provider and no i18n setup of the app. The app keeps its own connection to the robot and moves it in `onJogStart` and `onJogStop`. While a control is held the robot moves; it stops when the control is let go, when the pointer leaves it, when the window loses focus or the tab is hidden, on any key, and when the part becomes disabled or unmounts. The keyboard starts no motion.
93
+ `JoggingGizmo`, `JoggingButtons`, `JoggingJointSlider`, `CurrentPoseBar`, `SafetyBar` and `RobotControlPanel`, which is built from them, take plain props and report through callbacks: no store, no provider and no i18n setup of the app. The app keeps its own connection to the robot and moves it in `onJogStart` and `onJogStop`. While a control is held the robot moves; it stops when the control is let go, when the pointer leaves it, when the window loses focus or the tab is hidden, on any key, and when the part becomes disabled or unmounts. The keyboard starts no motion.
88
94
 
89
95
  What each one loads, besides `react` and `@mui/material` (checked by `src/test/bare.test.tsx`):
90
96
 
@@ -95,6 +101,7 @@ What each one loads, besides `react` and `@mui/material` (checked by `src/test/b
95
101
  | `/JoggingJointSlider` | nothing else |
96
102
  | `/CurrentPoseBar` | `@wandelbots/mui`, `@wandelbots/icons` |
97
103
  | `/SafetyBar` | `mobx-react-lite`, `axios` |
104
+ | `/RobotControlPanel` | `three`, `@react-three/fiber`, `@wandelbots/mui`, `@wandelbots/icons`, `@wandelbots/design-tokens` |
98
105
 
99
106
  All of them load i18next and react-i18next, which come with the library.
100
107
 
@@ -104,7 +111,7 @@ All of them load i18next and react-i18next, which come with the library.
104
111
 
105
112
  ### Without three.js or without React
106
113
 
107
- - **An app without a 3D view** needs no three.js. It takes the robot from `/session` and its parts from the component entry points that draw nothing in 3D: `/CurrentPoseBar`, `/SafetyBar`, `/JoggingButtons` and `/JoggingJointSlider`.
114
+ - **An app without a 3D view** needs no three.js. It takes the robot from `/session` and its parts from the component entry points that draw nothing in 3D: `/RobotHeader`, `/CurrentPose`, `/CurrentPoseBar`, `/SafetyBar`, `/JoggingButtons` and `/JoggingJointSlider`.
108
115
  - **`/core` needs three.js installed**, although it draws nothing in 3D: `ConnectedMotionGroup`, which it exports, gives a three.js quaternion (`mountingQuaternion`).
109
116
  - **An app without React**, or with a UI of its own, uses `/session` alone (and `/nats`). Of the peer dependencies it needs only `mobx` (see [Peer dependencies](#peer-dependencies)). The parts of a session are MobX stores: such an app follows them with `autorun` or `reaction` of MobX. What it calls returns a promise that rejects when it fails (a jog that may not start rejects with a `JoggingRefusedError`), and what fails in the background goes to `onError`.
110
117
 
@@ -142,8 +149,8 @@ load.dispose()
142
149
  | `@emotion/react`, `@emotion/styled` | ^11 | Every entry point with UI |
143
150
  | `@wandelbots/mui` | ^2 | Every entry point with UI (each simple part's needs are in [The simple parts on their own](#the-simple-parts-on-their-own)) |
144
151
  | `mobx-react-lite` | ^4.1.0 | Every entry point with UI |
145
- | `three` | >=0.182 | `.`, `/3d`, `/JoggingGizmo`, and `/core` (`ConnectedMotionGroup`) |
146
- | `@react-three/fiber` | ^9 | `.`, `/3d`, `/JoggingGizmo` |
152
+ | `three` | >=0.182 | `.`, `/3d`, `/JoggingGizmo`, `/RobotControlPanel`, `/RobotControl`, and `/core` (`ConnectedMotionGroup`) |
153
+ | `@react-three/fiber` | ^9 | `.`, `/3d`, `/JoggingGizmo`, `/RobotControlPanel`, `/RobotControl` |
147
154
  | `three-stdlib` | >=2 | `.`, `/3d` |
148
155
  | `@react-three/drei` | ^10 | `.`, `/3d` |
149
156
  | `nats.ws` | ^1.30.3 | `/nats` |
@@ -185,6 +192,88 @@ These packages are peer dependencies because the app and the library must use th
185
192
  - **Look:** `AppHeader` and `LoadingCover` use the styles of the design system, so they look a little different.
186
193
  - **Release asset:** `no-draco-models.zip` is gone. The models come from the NOVA API (since 4.0.0).
187
194
 
195
+ ### From ConnectedMotionGroup to RobotSession
196
+
197
+ `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.
198
+
199
+ ```tsx
200
+ // Before
201
+ const motionGroup = await ConnectedMotionGroup.connect(nova, "0@ur5e", { cellId })
202
+ <Robot connectedMotionGroup={motionGroup} />
203
+ motionGroup.dispose()
204
+
205
+ // After
206
+ const load = loadRobotSession(nova, "0@ur5e", { cellId })
207
+ const session = await load.ready
208
+ <RobotControl session={session} />
209
+ load.dispose()
210
+ ```
211
+
212
+ What changes besides the names:
213
+
214
+ - **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.
215
+ - **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`.
216
+ - **The activation follows the controller:** `activation.state` is the mode that the controller reports ("inactive" while its live state does not come), or the mode change in progress. A change that the controller has not confirmed after 30 seconds is over, and can be asked for again.
217
+ - **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`.
218
+ - **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`.
219
+ - **Several robots:** load one session per robot instead of `ConnectedMotionGroup.connectMultiple`.
220
+
221
+ | `ConnectedMotionGroup` | `RobotSession` |
222
+ | --- | --- |
223
+ | `motionGroupId`, `controllerId` | `motionGroupId`, `controllerId` (and `cellId`) |
224
+ | `modelFromController` | `description.motionGroupModel` |
225
+ | `dhParameters` | `description.dhParameters` |
226
+ | `safetyZones` | `description.safetyZones` |
227
+ | `description` | `description.motionGroupDescription` |
228
+ | `isVirtual` | `description.isVirtual` |
229
+ | `tcps` | `description.tcps` (id and name), `description.tcpOffsetsById` (position and orientation) |
230
+ | `joints` | One per joint: `description.dhParameters`, or the joint limits in `description.jointLimits` |
231
+ | `mountingPosition`, `mountingQuaternion` | `description.mounting` (mm and a rotation vector) |
232
+ | `rapidlyChangingMotionState` | `state.rapidlyChangingMotionState` |
233
+ | `controllerState` | `state.controllerState` |
234
+ | `initialMotionState`, `controller`, `motionGroup`, `motionStateSocket` | No replacement: the session keeps its connections. Read `state` instead. |
235
+ | `activationState` | `activation.state` |
236
+ | `activate()`, `deactivate()`, `toggleActivation()` | `activation.activate()`, `activation.deactivate()`, `activation.toggle()` |
237
+ | `isEstopActive`, `isMoveableSafetyState`, `isMoveableOperationMode`, `canBeMoved` | `safety.isEstopActive`, `safety.isMoveableSafetyState`, `safety.isMoveableOperationMode`, `safety.canBeMoved`; why the robot may not move: `safety.notMoveableReason` |
238
+ | `joggingVelocity`, `joggingVelocityRads`, `setJoggingVelocity()` | The velocities of `jogging`: `rotationVelocityDegPerSec`, `rotationVelocityRadsPerSec`, `translationVelocityMmPerSec`, `setVelocityFromSlider()` |
239
+ | `connectedJoggingSocket`, `planData` | No replacement (unused) |
240
+ | `dispose()` | `load.dispose()`, or `session.dispose()` |
241
+ | `<Robot connectedMotionGroup={…}>`, `<LinearAxis connectedMotionGroup={…}>` | No replacement yet: keep a `ConnectedMotionGroup` for the 3D view until the 3D parts of a session come |
242
+
243
+ ### From JoggingPanel to RobotControl
244
+
245
+ `JoggingPanel` and the older parts it is built from (`JoggingCartesianAxisControl`, `JoggingJointValueControl`, `VelocitySlider`, which reads a `JoggingStore`, and `VelocitySliderLabel`) are deprecated. They keep working until a later major version removes them. `RobotControl` replaces the panel: the Robot control panel of the design (Translate, Rotate, Joint and Move to) for a [robot session](#from-connectedmotiongroup-to-robotsession).
246
+
247
+ ```tsx
248
+ // Before
249
+ <JoggingPanel nova={nova} motionGroupId="0@ur5e" cellId={cellId} locked={programRuns} />
250
+
251
+ // After
252
+ const load = loadRobotSession(nova, "0@ur5e", { cellId, storage: localStorage })
253
+ const session = await load.ready
254
+ <RobotControl session={session} disabled={programRuns} />
255
+ ```
256
+
257
+ | `JoggingPanel` | Instead |
258
+ | --- | --- |
259
+ | `nova`, `motionGroupId`, `cellId` | `loadRobotSession(nova, motionGroupId, { cellId })`; its session goes to `session` |
260
+ | `locked` | `disabled` |
261
+ | `onSetup(store)`, `store` | `session.jogging`, the session's `JoggingStore`. It lives as long as the session, also while the panel is hidden. |
262
+ | The jogging settings in `localStorage` | Only with `storage: localStorage` (or a storage of the app) for `loadRobotSession`; without it nothing is kept |
263
+ | `sx` | `sx` |
264
+ | `children` | No replacement: the app puts its own parts next to the panel, see [Placing the parts](#placing-the-parts) |
265
+ | The `show…` flags of `JoggingStore` (`showTcpSelect`, `showIncrementSelect`, …), its `tabs` and `onTabChange` | The props of `RobotControlPanel`, given to `RobotControl`: each replaces the session's, e.g. `<RobotControl session={session} increments={undefined} />` for no Increment mode |
266
+ | `JoggingCartesianAxisControl` | `JoggingButtons` (a minus and a plus button per axis), or `JoggingGizmo` |
267
+ | `JoggingJointValueControl` | `JoggingJointSlider` |
268
+ | `VelocitySlider`, `VelocitySliderLabel` | The velocity of `RobotControlPanel` |
269
+ | `JoggingStore.activate()` | `startCartesianJogging`, `startJointJogging` and `runIncrementalCartesianJog` of `JoggingStore` activate what they need; `session.ensureMovementOwnership("jogging")` hands the robot to jogging |
270
+
271
+ What changes besides the names:
272
+
273
+ - **Props in, callbacks out:** `RobotControlPanel`, `JoggingButtons`, `JoggingGizmo` and `JoggingJointSlider` take no store and move nothing themselves (`onJogStart`, `onJogStop`). `RobotControl` is `RobotControlPanel` wired to a session: it jogs the session's robot.
274
+ - **The gizmo** needs the camera of the app's 3D view: `gizmoOrientation`, written by a `JoggingGizmoOrientation` in the view. Without it the panel jogs with buttons.
275
+ - **Jogging is off** while the robot may not move (not activated, its safety, no live state), while a trajectory moves it or another client jogs it: `RobotControl` says why in the panel. `disabled` is only the app's own lock.
276
+
188
277
  ### 4.x Core Changes
189
278
 
190
279
  Robot data is now fetched from a running nova instance. This eliminates the need of shipping every react application with the robot data attached.
@@ -217,11 +306,9 @@ Breaking changes for each major version are documented in the [GitHub Releases](
217
306
 
218
307
  Manual robot control interfaces.
219
308
 
220
- **JoggingPanel** - Complete jogging interface with cartesian and joint controls
309
+ **JoggingPanel** (deprecated, see [From JoggingPanel to RobotControl](#from-joggingpanel-to-robotcontrol)) - The jogging panel of earlier versions, with cartesian and joint controls. The older parts it is built from are deprecated with it: **JoggingCartesianAxisControl** (use `JoggingButtons`), **JoggingJointValueControl** (use `JoggingJointSlider`), **VelocitySlider** and **VelocitySliderLabel** (use the velocity of `RobotControlPanel`).
221
310
 
222
- - Dual-mode operation (Cartesian & Joint space)
223
- - Real-time velocity control
224
- - Multiple coordinate systems support (Robot base or Tool)
311
+ **JoggingStore** - The state of the jogging (velocity, coordinate system, the jogging connection). A robot session has one (`session.jogging`), 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), or after NOVA refused the jogging connection because another client jogs (`blocked`, until `unblock()`), it starts no jog: the start rejects with a `JoggingRefusedError`, whose `reason.code` says why. The same holds for everything else that opens the jogging connection, a TCP change (`requestTcpChange`) and `session.ensureMovementOwnership("jogging")`: NOVA switches a controller to control mode by itself for it. The store asks again once the connection is open, and closes it when the robot may no longer move by then.
225
312
 
226
313
  **Simple jogging parts** (plain props and callbacks, see [The simple parts on their own](#the-simple-parts-on-their-own))
227
314
 
@@ -230,12 +317,122 @@ Manual robot control interfaces.
230
317
  - **JoggingJointSlider** - A joint on its range between its limits: hold a point to move the joint toward it
231
318
  - **CurrentPoseBar** - The current pose of the TCP, its TCP and coordinate system, and the orientation format
232
319
 
233
- **Individual Jogging Controls**
320
+ **RobotControlPanel** (from `/3d` or `/RobotControlPanel`) - The Robot control panel of the design, built from the parts above: the tabs Translate and Rotate, with the TCP and the frame to jog along, Continuous or Increment, the velocity, the step size, and the gizmo or the buttons with a switch between them; the tab Joint, with a `JoggingJointSlider` per joint and the joint velocity; and the tab Move to, with a typed target (a pose of the TCP or joint values; else the current pose), the frame it is relative to, and a button to hold to move there. An app that wants the whole panel imports this; an app that wants one part imports that part.
321
+
322
+ - It moves nothing itself, as its parts: `onJogStart(motion, axis, direction)` and `onJogStop` for jogging while held, and `increments.onStep(motion, axis, direction, distance)` for one step per press. The app keeps the velocity and the selects in its own store; the panel keeps the tab, the mode, the step size and the view.
323
+ - Velocities and step sizes are in NOVA's units: mm and mm/s to translate, rad and rad/s to rotate. The panel shows mm/s and °/s. The velocity has a slider, in whole units, and a field to type it into: Enter, or leaving the field, applies it (`onVelocityChange`). A text that is no number, or a velocity outside `min` to `max`, is flagged at the field and neither applied nor corrected.
324
+ - `tcp` and `jogFrame` show a select each, filled by the app. Without `increments`, there is no Continuous/Increment toggle. Without `gizmoOrientation` (from a `JoggingGizmoOrientation` in the app's 3D scene), it jogs with buttons only.
325
+ - `onJogStop` also comes when the tab, the mode or the view changes while a control is held: the jog of that press must not go on.
326
+ - `disabled` turns off every control: nothing may move and no setting may change (the app's lock). `jogDisabled` turns off only what jogs on Translate, Rotate and Joint (the gizmo, the buttons, the joint sliders) and the TCP select, whose change needs the jogging connection: e.g. while the robot is not activated or a trajectory moves it. The settings that move nothing stay usable then (Move relative to, Continuous or Increment, the step size, the velocity), and so does Move to, so a move of its own does not end when the app locks jogging during it. An app that used to pass `disabled={locked || !canBeMoved}` passes `disabled={locked}` and leaves the robot's state to `jogDisabled`, which `RobotControl` sets. `jogDisabledReason` is the text that says why jogging is off: Translate and Rotate show it in place of their hint of how to jog, Joint under its joints. `RobotControl` fills it with the robot's reason (not activated, its safety state or operation mode, no connection), with a trajectory that moves the robot, or with another client that jogs it. With `onJogRetry`, a Try again button shows under the reason: `RobotControl` gives it after another client held the jogging connection, and the next jog then asks NOVA for it again.
327
+ - The panel keeps its tab, jog mode and step size itself. An app that keeps them in its own store (to remember them, or because its jogging depends on them) gives `tab`, `jogMode` and `increments.step`, and gets `onTabChange`, `onJogModeChange` and `increments.onStepChange`; each also works alone, to follow a choice without keeping it.
328
+ - `joints` gives the Joint tab: the joints' values and limits (rad, or mm with `linear`), their names, the joint velocity, and `onJogStart(index, direction)` and `onJogStop`. The panel jogs one joint at a time; the turn-around of a slider brings `onJogStop` and `onJogStart` in the same event, as described for `JoggingJointSlider`. Without `joints`, there is no Joint tab.
329
+ - `moveTo` gives the Move to tab. It works as RobotPad's pose field: the coordinates `(x, y, z, rx, ry, rz)` (mm, rotation vector in rad: the format RobotPad copies and pastes) show the TCP's current pose (`getCurrentPose`, read every animation frame), with Copy and Edit pose, and Move to, off until a pose is the target. Edit pose, or a click on the field, makes it editable; Save pose edit (Enter) makes the typed pose the target (`onTargetChange(pose)`): the app plans the move and loads it, and reports `state` (`"planning"`, `"planned"`, `"moving"`, `"stopping"` or `"idle"`, as RobotPad's trajectory) and an `error` (e.g. out of reach, or why the move to it failed). With `getCurrentJoints` (the joints' positions now, in rad, or mm for a linear axis), the field also takes joint values as the target, in square brackets and as many as the robot has joints: `[j1, …, jn]`. `onTargetChange` and `onMoveStart` then get `{ joints }` in place of a pose (`RobotControlTarget`). A robot that takes no TCP poses (`cartesian` is false: a linear axis, a turntable) moves to joint values only: the field shows its joints, live, and reads numbers without brackets as joint values. Then Reset shows, and with an `error` also Plan again, which gives the app the same pose once more (`onTargetChange(pose)`), so a failed move needs no typing. Held with a pointer for 200 ms while `"planned"`, Move to calls `onMoveStart(pose)`; the release, or the pointer leaving the button, calls `onMoveStop`: the app starts and pauses its trajectory (the keyboard starts no move); the button says Moving… and Stopping…. At the target (within 0.5 mm and 0.01 rad) it turns off; once the move no longer runs, the field shows the current pose again (`onTargetChange(null)`), as do Reset, another tab and another TCP or frame (a held move gets its `onMoveStop` first). While another pose is typed, Move to stays off. `notMoveableReason` is why the robot may not move now, whatever the target (e.g. it is not activated): the field says so with a target and also while one is typed, and Move to stays off. Typing stays possible, and a typed target still comes (`onTargetChange`), to plan once the robot may move. `frame` is the "Relative to" select. The tab shows the velocity of the move to its target: `velocity.translate` for a pose of the TCP, and for joint values the velocity of the Joint tab (`joints.velocity`), or without that tab `velocity.rotate`. Without `moveTo`, there is no Move to tab.
330
+
331
+ ```tsx
332
+ const orientation = useRef<Quaternion | null>(null)
333
+
334
+ <RobotControlPanel
335
+ gizmoOrientation={orientation}
336
+ tcp={{ options: tcps, value: tcp, onChange: setTcp }}
337
+ jogFrame={{ options: frames, value: frame, onChange: setFrame }}
338
+ velocity={{
339
+ translate: { value: mmPerSec, min: 1, max: 250 },
340
+ rotate: { value: radPerSec, min: 0.02, max: 1 },
341
+ }}
342
+ onVelocityChange={(motion, value) => setVelocity(motion, value)}
343
+ onJogStart={(motion, axis, direction) => startJogging(motion, axis, direction)}
344
+ onJogStop={() => stopJogging()}
345
+ increments={{
346
+ steps: { translate: [0.1, 1, 5, 10], rotate: [0.001, 0.01, 0.05] },
347
+ onStep: (motion, axis, direction, distance) =>
348
+ jogStep(motion, axis, direction, distance),
349
+ }}
350
+ joints={{
351
+ joints: jointValues.map((value, index) => ({
352
+ value,
353
+ min: limits[index].lower_limit,
354
+ max: limits[index].upper_limit,
355
+ })),
356
+ velocity: { value: jointRadPerSec, min: 0.02, max: 1 },
357
+ onVelocityChange: setJointVelocity,
358
+ onJogStart: (index, direction) => startJointJogging(index, direction),
359
+ onJogStop: () => stopJogging(),
360
+ }}
361
+ moveTo={{
362
+ getCurrentPose: () => currentTcpPose(),
363
+ getCurrentJoints: () => currentJoints(), // the field takes [j1, …, jn] too
364
+ onTargetChange: (target) => planAndLoad(target), // a pose or { joints }, or drop the plan (null)
365
+ state: trajectoryState, // "planning" | "planned" | "moving" | "stopping" | "idle"
366
+ error,
367
+ onMoveStart: () => startTrajectory(),
368
+ onMoveStop: () => pauseTrajectory(),
369
+ }}
370
+ />
371
+ ```
372
+
373
+ ### The parts of a robot session
374
+
375
+ `RobotControl` and `CurrentPose` are connected components: a UI component, which takes props and reports through callbacks, filled from the `RobotSession` given as `session`. A prop given to the connected component replaces the session's: `<RobotControl session={session} increments={undefined} />` has no Increment mode. An app without a `RobotSession` uses the UI component with props of its own.
376
+
377
+ | Connected component | UI component |
378
+ | --- | --- |
379
+ | `RobotControl` | `RobotControlPanel` |
380
+ | `CurrentPose` | `CurrentPoseBar` |
381
+
382
+ **RobotControl** (from `/3d` or `/RobotControl`) - The Robot control panel (see `RobotControlPanel` above) of a session: Translate and Rotate jog the TCP with the session's jogging store, Joint jogs the joints, and Move to plans the typed pose and moves along it while held. `disabled` is the app's lock; jogging is also off, with the reason in the panel, while the robot may not move. `gizmoOrientation` gives the gizmo the camera of the app's 3D view; without it, the panel jogs with buttons. Another session gets a new panel: what the panel held for the old robot ends.
383
+
384
+ **CurrentPose** (from `/core` or `/CurrentPose`) - The current pose bar of a session: the TCP's pose in a TCP and a coordinate system of the bar's own, the state of the motion stream and the last jog error. `CurrentPoseBar` is its UI component.
385
+
386
+ **RobotHeader** and **ConnectionWarning** (from `/core` or `/RobotHeader`) - The header of a robot app, as Figma's top bar: the app menu and the app's name, the motion group select, the robot's `SafetyBar` and activation switch, and the app's own `actions`. Given a `session` it shows the robot's safety state, operation mode and controller type and follows them, e.g. an emergency stop as soon as NOVA reports it; its switch is off while NOVA would refuse a mode change, and a refused change goes to the session's `onError`. Without a robot, e.g. while none is loaded, it shows the app's name and menu only. `ConnectionWarning` goes into its `actions`: an icon that shows once the robot's live state stops arriving, also for its `session`. An app that builds its own header places `SafetyBar`, `ActivationSwitch` and `ConnectionWarning` itself, each with `session`; an app without a `RobotSession` gives the header `safety` and `activation` as plain props instead.
387
+
388
+ #### Placing the parts
389
+
390
+ The library has no layout: an app puts `RobotHeader`, `RobotControl` and `CurrentPose` where it wants, next to its own 3D view, and each fills the box that the app gives it. Here they are placed as the Figma design does: the header on top, the 3D view under it, the panel floating at the view's top right and the pose bar along its bottom.
234
391
 
235
- - **JoggingCartesianAxisControl** - Single-axis cartesian movement
236
- - **JoggingJointValueControl** - Individual joint controls
237
- - **VelocitySlider** (and **VelocitySliderLabel**) - Speed adjustment interface
238
- - **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.
392
+ ```tsx
393
+ import Box from "@mui/material/Box"
394
+ import Stack from "@mui/material/Stack"
395
+ import {
396
+ ConnectionWarning,
397
+ CurrentPose,
398
+ JoggingGizmoOrientation,
399
+ RobotControl,
400
+ RobotHeader,
401
+ type RobotSession,
402
+ } from "@wandelbots/wandelbots-js-react-components"
403
+ import { Canvas } from "@react-three/fiber"
404
+ import { useRef } from "react"
405
+ import type { Quaternion } from "three"
406
+
407
+ export function RobotApp({ session }: { session: RobotSession }) {
408
+ // The camera of the 3D view, for the panel's gizmo
409
+ const orientation = useRef<Quaternion | null>(null)
410
+
411
+ return (
412
+ <Stack sx={{ height: "100vh" }}>
413
+ <RobotHeader
414
+ appName="My robot app"
415
+ session={session}
416
+ actions={<ConnectionWarning session={session} />}
417
+ />
418
+ <Box sx={{ position: "relative", flex: 1, minHeight: 0 }}>
419
+ <Box sx={{ position: "absolute", inset: 0 }}>
420
+ {/* The app's 3D view of the robot */}
421
+ <Canvas>
422
+ <JoggingGizmoOrientation target={orientation} />
423
+ </Canvas>
424
+ </Box>
425
+ <Box sx={{ position: "absolute", top: 12, right: 12, width: 444 }}>
426
+ <RobotControl session={session} gizmoOrientation={orientation} />
427
+ </Box>
428
+ <Box sx={{ position: "absolute", left: 12, right: 12, bottom: 12 }}>
429
+ <CurrentPose session={session} />
430
+ </Box>
431
+ </Box>
432
+ </Stack>
433
+ )
434
+ }
435
+ ```
239
436
 
240
437
  ### 3D Visualization & Robotics
241
438
 
@@ -274,6 +471,8 @@ Safety components for production environments.
274
471
 
275
472
  - Real-time safety monitoring
276
473
  - Emergency stop integration
474
+ - Each indicator has a stable `data-testid` (`safety-state-indicator`, `operation-mode-indicator`, `controller-type-indicator`) and, as an image, a name that says its state, e.g. "Safety state: E-Stop", "Operation mode: Manual" or "Controller type: Virtual": the compact bar shows only icons, with their texts in a popover on hover
475
+ - Given a `session` (`<SafetyBar session={session} />`) it shows and follows the robot of that session; an app without a `RobotSession` gives the states as plain props
277
476
 
278
477
  ### App Frame
279
478
 
@@ -283,9 +482,11 @@ Safety components for production environments.
283
482
 
284
483
  ### Logic
285
484
 
286
- - **ConnectedMotionGroup** - A motion group with its live motion state, safety state and operation mode
485
+ - **loadRobotSession** and **RobotSession** - A robot of a cell, loaded and connected: its description, live state, safety, activation, jogging and Move to. In a React app, its UI is [the parts of a robot session](#the-parts-of-a-robot-session); without React, see [Without three.js or without React](#without-threejs-or-without-react).
486
+ - **TrajectoryExecutionStore** (`session.trajectory`) and **RobotTargetPose** (`session.targetPose`) - Move to without a UI. `planTrajectory(pose)` plans a trajectory and loads it; `hold(pose)` moves along it while a button is held and `release()` stops the robot, whatever the order of NOVA's messages, and both are safe to repeat. Both take a pose as the app saves it (`RobotPose`: joints, or a TCP pose in a coordinate system, planned for the selected TCP), or a `TrajectoryTarget`; a pose of another motion group is refused. `hold` starts nothing along a trajectory that was planned for another target, or with another velocity than the jogging store has now (`isPlanOutdated`: plan it again). `targetPose.plan(pose)`, `holdMove(pose)` and `releaseMove()` do the same for the typed pose that the Robot control shows, which also keeps why its plan or its move failed (`staged.errorKey`, `staged.errorMessage`)
487
+ - **ConnectedMotionGroup** (deprecated, see [From ConnectedMotionGroup to RobotSession](#from-connectedmotiongroup-to-robotsession)) - A motion group with its live motion state, safety state and operation mode
287
488
  - **MotionStreamConnection** and **JoggerConnection** - The motion state stream and the jogging connection of a motion group
288
- - **jointValuesEqual**, **poseEqual**, **tcpMotionEqual**, **unwrapRotationVector** - Helpers for the motion state
489
+ - **jointValuesEqual**, **poseEqual**, **tcpMotionEqual**, **unwrapRotationVector** (deprecated) - Helpers of the library's motion stream
289
490
  - **ValueInterpolator**, **useInterpolation**, **useSmoothedMotionState** - Smooth joint values for the 3D view
290
491
  - **i18n** - The translations of the library
291
492
 
@@ -365,7 +566,7 @@ pnpm test:e2e # against a NOVA instance, see "e2e Tests"
365
566
  pnpm test:playground # against a NOVA instance, see "e2e Tests"
366
567
  ```
367
568
 
368
- `pnpm api:check` compares the public API with the reports in `etc/api-extractor/`. After an intended change of the public API, `pnpm api:update` writes the reports again; commit them with the change.
569
+ `pnpm api:check` compares the public API with the reports in `etc/api-extractor/`. After an intended change of the public API, `pnpm api:update` writes the reports again; commit them with the change. [etc/public-names.md](etc/public-names.md) lists every public name and why it is public (`pnpm api:names` writes it).
369
570
 
370
571
  ### e2e Tests
371
572
 
package/dist/3d.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Pose3-DwMOSTKO.cjs"),e=require("./chunks/JoggingGizmoOrientation-EPtBeAun.cjs"),t=require("./chunks/useSmoothedMotionState-Ce9NjwBu.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.Pose3=o.Pose3;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.parseRotationToQuaternion=o.parseRotationToQuaternion;exports.JoggingGizmo=e.JoggingGizmo;exports.JoggingGizmoOrientation=e.JoggingGizmoOrientation;exports.ValueInterpolator=t.ValueInterpolator;exports.useSmoothedMotionState=t.useSmoothedMotionState;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/Robot-BW7S3Wa6.cjs"),r=require("./chunks/JoggingGizmo-BNqlyb56.cjs"),i=require("./chunks/JoggingGizmoOrientation-CwMvm7OV.cjs"),n=require("./chunks/RobotControlPanel-B_bTvQlA.cjs"),e=require("./chunks/RobotControl-ToEESvYu.cjs"),t=require("./chunks/useSmoothedMotionState-Ce9NjwBu.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=r.JoggingGizmo;exports.JoggingGizmoOrientation=i.JoggingGizmoOrientation;exports.RobotControlPanel=n.RobotControlPanel;exports.Pose3=e.Pose3;exports.RobotControl=e.RobotControl;exports.parseRotationToQuaternion=e.parseRotationToQuaternion;exports.ValueInterpolator=t.ValueInterpolator;exports.useSmoothedMotionState=t.useSmoothedMotionState;
package/dist/3d.d.ts CHANGED
@@ -7,6 +7,9 @@ export { JoggingGizmo, type JoggingGizmoProps, } from "./components/jogging/gizm
7
7
  export { JoggingGizmoOrientation, type JoggingGizmoOrientationProps, } from "./components/jogging/gizmo/JoggingGizmoOrientation";
8
8
  export type { JogAxis, JogDirection, JogHandle, } from "./components/jogging/jogHandle";
9
9
  export type { JogControlsProps } from "./components/jogging/useJogControls";
10
+ export { type JogMotion, RobotControlPanel, type RobotControlIncrements, type RobotControlJogMode, type RobotControlJoint, type RobotControlJoints, type RobotControlJointTarget, type RobotControlMoveState, type RobotControlMoveTo, type RobotControlOption, type RobotControlPanelProps, type RobotControlPose, type RobotControlSelect, type RobotControlTab, type RobotControlTarget, type RobotControlVelocity, } from "./components/robotControl/RobotControlPanel";
11
+ export { RobotControl, type RobotControlProps, } from "./components/robotControl/RobotControl";
12
+ export type { RobotControlOptions } from "./components/robotControl/useRobotControlProps";
10
13
  export type { WebGLUnavailableContext } from "./components/utils/useWebGLRenderer";
11
14
  export * from "./components/robots/LinearAxis";
12
15
  export * from "./components/robots/MotionGroupVisualizer";
package/dist/3d.js CHANGED
@@ -1,25 +1,30 @@
1
- import { C as a, J as t, L as r, M as s, a as i, P as n, b as p, R as u, S as d, c as m, d as x, e as S, f as l, T as R, g, p as c } from "./chunks/Pose3-Ci1bxEvz.js";
2
- import { J as G, a as z } from "./chunks/JoggingGizmoOrientation-CKZeLcMp.js";
3
- import { V as L, a as M } from "./chunks/useSmoothedMotionState-C_Vo0py0.js";
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 m, b as u, c as x, d as R, e as d, T as l, f } from "./chunks/Robot-C4qllwOQ.js";
2
+ import { J as b } from "./chunks/JoggingGizmo-yqB2qH63.js";
3
+ import { J as g } from "./chunks/JoggingGizmoOrientation-hdXGeo3q.js";
4
+ import { R as J } from "./chunks/RobotControlPanel-DFIcBtQe.js";
5
+ import { P as L, R as M, p as P } from "./chunks/RobotControl-DJi32kGC.js";
6
+ import { V as E, a as V } from "./chunks/useSmoothedMotionState-C_Vo0py0.js";
4
7
  export {
5
8
  a as CollisionSceneRenderer,
6
- G as JoggingGizmo,
7
- z as JoggingGizmoOrientation,
9
+ b as JoggingGizmo,
10
+ g as JoggingGizmoOrientation,
8
11
  t as JointLimitGizmo,
9
12
  r as LinearAxis,
10
13
  s as MotionGroupVisualizer,
11
14
  i as MotionGroupVisualizerExact,
12
- n as Pose3,
13
- p as PresetEnvironment,
14
- u as Robot,
15
- d as SafetyZonesRenderer,
16
- m as SupportedLinearAxis,
15
+ L as Pose3,
16
+ n as PresetEnvironment,
17
+ p as Robot,
18
+ M as RobotControl,
19
+ J as RobotControlPanel,
20
+ m as SafetyZonesRenderer,
21
+ u as SupportedLinearAxis,
17
22
  x as SupportedLinearAxisExact,
18
- S as SupportedRobot,
19
- l as SupportedRobotExact,
20
- R as TrajectoryRenderer,
21
- L as ValueInterpolator,
22
- g as defaultGetModel,
23
- c as parseRotationToQuaternion,
24
- M as useSmoothedMotionState
23
+ R as SupportedRobot,
24
+ d as SupportedRobotExact,
25
+ l as TrajectoryRenderer,
26
+ E as ValueInterpolator,
27
+ f as defaultGetModel,
28
+ P as parseRotationToQuaternion,
29
+ V as useSmoothedMotionState
25
30
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/CurrentPose-Bf6p3Y83.cjs");exports.CurrentPose=e.CurrentPose;exports.default=e.CurrentPose;
@@ -0,0 +1 @@
1
+ export { CurrentPose, CurrentPose as default, type CurrentPoseProps, } from "../components/currentPoseBar/CurrentPose";
@@ -0,0 +1,5 @@
1
+ import { C as a, C as o } from "../chunks/CurrentPose-BqyOJGLL.js";
2
+ export {
3
+ a as CurrentPose,
4
+ o as default
5
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/CurrentPoseBar-Cbz4AO36.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-LN0MK4R_.cjs");exports.CurrentPoseBar=e.CurrentPoseBar;exports.default=e.CurrentPoseBar;
@@ -1,4 +1,4 @@
1
- import { C as e, C as o } from "../chunks/CurrentPoseBar-CpwvWpEY.js";
1
+ import { C as e, C as o } from "../chunks/CurrentPoseBar-96iSC6JW.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-paQCBXf4.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-DVneahs7.cjs");exports.JoggingButtons=t.JoggingButtons;exports.default=t.JoggingButtons;
@@ -1,4 +1,4 @@
1
- import { J as a, J as g } from "../chunks/JoggingButtons-i8FdMpCx.js";
1
+ import { J as a, J as g } from "../chunks/JoggingButtons-BOhdgvmu.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/JoggingGizmoOrientation-EPtBeAun.cjs");exports.JoggingGizmo=i.JoggingGizmo;exports.JoggingGizmoOrientation=i.JoggingGizmoOrientation;exports.default=i.JoggingGizmo;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i=require("../chunks/JoggingGizmo-BNqlyb56.cjs"),o=require("../chunks/JoggingGizmoOrientation-CwMvm7OV.cjs");exports.JoggingGizmo=i.JoggingGizmo;exports.default=i.JoggingGizmo;exports.JoggingGizmoOrientation=o.JoggingGizmoOrientation;
@@ -1,6 +1,7 @@
1
- import { J as g, a as i, J as n } from "../chunks/JoggingGizmoOrientation-CKZeLcMp.js";
1
+ import { J as i, J as a } from "../chunks/JoggingGizmo-yqB2qH63.js";
2
+ import { J as t } from "../chunks/JoggingGizmoOrientation-hdXGeo3q.js";
2
3
  export {
3
- g as JoggingGizmo,
4
- i as JoggingGizmoOrientation,
5
- n as default
4
+ i as JoggingGizmo,
5
+ t as JoggingGizmoOrientation,
6
+ a as default
6
7
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/JoggingJointSlider-YcEBMgF1.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-Dxx25dRP.cjs");exports.JoggingJointSlider=e.JoggingJointSlider;exports.default=e.JoggingJointSlider;
@@ -1,4 +1,4 @@
1
- import { J as a, J as e } from "../chunks/JoggingJointSlider-DQhJOmcc.js";
1
+ import { J as a, J as e } from "../chunks/JoggingJointSlider-CEPotMXL.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-ToEESvYu.cjs");exports.RobotControl=o.RobotControl;exports.default=o.RobotControl;
@@ -0,0 +1,2 @@
1
+ export { RobotControl, RobotControl as default, type RobotControlProps, } from "../components/robotControl/RobotControl";
2
+ export type { RobotControlOptions } from "../components/robotControl/useRobotControlProps";
@@ -0,0 +1,5 @@
1
+ import { R as a, R as r } from "../chunks/RobotControl-DJi32kGC.js";
2
+ export {
3
+ a as RobotControl,
4
+ r as default
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("../chunks/RobotControlPanel-B_bTvQlA.cjs");exports.RobotControlPanel=o.RobotControlPanel;exports.default=o.RobotControlPanel;
@@ -0,0 +1,2 @@
1
+ export { type JogMotion, RobotControlPanel, RobotControlPanel as default, type RobotControlIncrements, type RobotControlJogMode, type RobotControlJoint, type RobotControlJoints, type RobotControlJointTarget, type RobotControlMoveState, type RobotControlMoveTo, type RobotControlOption, type RobotControlPanelProps, type RobotControlPose, type RobotControlSelect, type RobotControlTab, type RobotControlTarget, type RobotControlVelocity, } from "../components/robotControl/RobotControlPanel";
2
+ export type { JogAxis, JogDirection, JogHandle, } from "../components/jogging/jogHandle";
@@ -0,0 +1,5 @@
1
+ import { R as t, R as e } from "../chunks/RobotControlPanel-DFIcBtQe.js";
2
+ export {
3
+ t as RobotControlPanel,
4
+ e as default
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/RobotHeader-7MA3sT-Y.cjs"),t=require("../chunks/SafetyBar-Cb6qHLB6.cjs");exports.ActivationSwitch=e.ActivationSwitch;exports.ConnectionWarning=e.ConnectionWarning;exports.RobotHeader=e.RobotHeader;exports.default=e.RobotHeader;exports.SafetyBar=t.SafetyBar;
@@ -0,0 +1,6 @@
1
+ export type { AppItem } from "../components/AppHeader";
2
+ export type { RobotControlOption, RobotControlSelect, } from "../components/robotControl/RobotControlPanel";
3
+ export { RobotHeader, RobotHeader as default, type RobotHeaderActivation, type RobotHeaderActivationState, type RobotHeaderProps, } from "../components/robotHeader/RobotHeader";
4
+ export { ActivationSwitch, type ActivationSwitchOfSessionProps, } from "../components/robotHeader/ActivationSwitch";
5
+ export { SafetyBar, type SafetyBarOfSessionProps, type SafetyBarProps, } from "../SafetyBar/SafetyBar";
6
+ export { type ConnectionQuality, ConnectionWarning, type ConnectionWarningProps, type ConnectionWarningState, } from "../components/connectionWarning/ConnectionWarning";
@@ -0,0 +1,9 @@
1
+ import { A as t, C as e, R as r, R as n } from "../chunks/RobotHeader-CHnBRjsS.js";
2
+ import { S as s } from "../chunks/SafetyBar-CuiBrASn.js";
3
+ export {
4
+ t as ActivationSwitch,
5
+ e as ConnectionWarning,
6
+ r as RobotHeader,
7
+ s as SafetyBar,
8
+ n as default
9
+ };
@@ -2,7 +2,18 @@ import { type PopoverOrigin } from "@mui/material/Popover";
2
2
  import { type TypographyProps } from "@mui/material/Typography";
3
3
  import type { ElementType, ReactNode } from "react";
4
4
  export type IndicatorWithExplanationProps = {
5
+ /** The id of the popover: one per state and component, so not stable */
5
6
  id: string;
7
+ /**
8
+ * What a test finds the indicator by, whatever it shows: the same for
9
+ * every state, e.g. "safety-state-indicator"
10
+ */
11
+ testId: string;
12
+ /**
13
+ * The name of the indicator for a screen reader and a test, e.g. "Safety
14
+ * state: Safe": it shows an icon, and its text only in the popover
15
+ */
16
+ accessibleName: string;
6
17
  icon: ElementType;
7
18
  color: TypographyProps["color"];
8
19
  title?: ReactNode;
@@ -13,7 +24,7 @@ export type IndicatorWithExplanationProps = {
13
24
  anchorOrigin?: PopoverOrigin;
14
25
  transformOrigin?: PopoverOrigin;
15
26
  };
16
- export declare const IndicatorWithExplanation: (({ id, icon, color, title, name, label, explanation, literalValue, anchorOrigin, transformOrigin, }: IndicatorWithExplanationProps) => import("react/jsx-runtime").JSX.Element) & {
27
+ export declare const IndicatorWithExplanation: (({ id, testId, accessibleName, icon, color, title, name, label, explanation, literalValue, anchorOrigin, transformOrigin, }: IndicatorWithExplanationProps) => import("react/jsx-runtime").JSX.Element) & {
17
28
  displayName: string;
18
29
  };
19
30
  export default IndicatorWithExplanation;
@@ -1,5 +1,6 @@
1
1
  import type { PopoverOrigin } from "@mui/material/Popover";
2
2
  import type { OperationMode, SafetyStateType } from "@wandelbots/nova-js/v2";
3
+ import type { RobotSession } from "../lib/robotSession/RobotSession";
3
4
  export interface SafetyBarProps {
4
5
  isVirtual: boolean;
5
6
  motionGroupId: string;
@@ -9,7 +10,20 @@ export interface SafetyBarProps {
9
10
  transformOrigin?: PopoverOrigin;
10
11
  compact?: boolean;
11
12
  }
12
- export declare const SafetyBar: (({ isVirtual, motionGroupId, operationMode, safetyState, anchorOrigin, transformOrigin, compact, }: SafetyBarProps) => import("react/jsx-runtime").JSX.Element) & {
13
+ /**
14
+ * SafetyBar for a robot session: its safety state, operation mode and
15
+ * controller type, which any of SafetyBarProps given here replaces. Without a
16
+ * robot, e.g. while none is loaded, nothing.
17
+ */
18
+ export type SafetyBarOfSessionProps = Partial<SafetyBarProps> & {
19
+ session: RobotSession | null | undefined;
20
+ };
21
+ /**
22
+ * The robot's safety state, operation mode and controller type. Given a
23
+ * robot session, it shows the robot's and follows them, e.g. an emergency
24
+ * stop as soon as NOVA reports it: `<SafetyBar session={session} />`.
25
+ */
26
+ export declare const SafetyBar: ((props: SafetyBarProps | SafetyBarOfSessionProps) => import("react/jsx-runtime").JSX.Element | null) & {
13
27
  displayName: string;
14
28
  };
15
29
  export default SafetyBar;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../chunks/SafetyBar-DhbaN3R5.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/SafetyBar-Cb6qHLB6.cjs");exports.SafetyBar=e.SafetyBar;exports.default=e.SafetyBar;
@@ -1,4 +1,4 @@
1
- import { S as f, S as r } from "../chunks/SafetyBar-CPrW4dgw.js";
1
+ import { S as f, S as r } from "../chunks/SafetyBar-CuiBrASn.js";
2
2
  export {
3
3
  f as SafetyBar,
4
4
  r as default
@@ -0,0 +1 @@
1
+ export {};