@wandelbots/wandelbots-js-react-components 6.3.0 → 6.4.0-pr.chore-public-names.673.cb7ee37

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 (196) hide show
  1. package/README.md +255 -122
  2. package/dist/3d.cjs +1 -1
  3. package/dist/3d.d.ts +7 -3
  4. package/dist/3d.js +20 -20
  5. package/dist/CurrentPoseBar/index.cjs +1 -0
  6. package/dist/CurrentPoseBar/index.d.ts +2 -0
  7. package/dist/CurrentPoseBar/index.js +5 -0
  8. package/dist/JoggingButtons/index.cjs +1 -0
  9. package/dist/JoggingButtons/index.d.ts +3 -0
  10. package/dist/JoggingButtons/index.js +5 -0
  11. package/dist/JoggingGizmo/index.cjs +1 -0
  12. package/dist/JoggingGizmo/index.d.ts +5 -0
  13. package/dist/JoggingGizmo/index.js +6 -0
  14. package/dist/JoggingJointSlider/index.cjs +1 -0
  15. package/dist/JoggingJointSlider/index.d.ts +2 -0
  16. package/dist/JoggingJointSlider/index.js +5 -0
  17. package/dist/SafetyBar/index.cjs +1 -1
  18. package/dist/SafetyBar/index.js +1 -1
  19. package/dist/chunks/ConnectedMotionGroup-D9JJSyXB.js +1822 -0
  20. package/dist/chunks/ConnectedMotionGroup-ir7Vf690.cjs +3 -0
  21. package/dist/chunks/CurrentPoseBar-Cbz4AO36.cjs +1 -0
  22. package/dist/chunks/CurrentPoseBar-CpwvWpEY.js +619 -0
  23. package/dist/chunks/JoggingButtons-i8FdMpCx.js +108 -0
  24. package/dist/chunks/JoggingButtons-paQCBXf4.cjs +1 -0
  25. package/dist/chunks/JoggingGizmoOrientation-CKZeLcMp.js +893 -0
  26. package/dist/chunks/JoggingGizmoOrientation-EPtBeAun.cjs +1 -0
  27. package/dist/chunks/JoggingJointSlider-DQhJOmcc.js +378 -0
  28. package/dist/chunks/JoggingJointSlider-YcEBMgF1.cjs +1 -0
  29. package/dist/chunks/Pose3-Ci1bxEvz.js +1373 -0
  30. package/dist/chunks/Pose3-DwMOSTKO.cjs +1 -0
  31. package/dist/chunks/SafetyBar-Be1c6Vz9.cjs +1 -0
  32. package/dist/chunks/{SafetyBar-Cy9DiXp9.js → SafetyBar-WXLP3Yi0.js} +34 -32
  33. package/dist/chunks/{externalizeComponent-EDymnaGR.js → externalizeComponent-7OVHUIUh.js} +84 -134
  34. package/dist/chunks/externalizeComponent-B0n_tR3v.cjs +2 -0
  35. package/dist/chunks/holdSafety-Cbej6-Kc.js +62 -0
  36. package/dist/chunks/holdSafety-TeMXlYQe.cjs +1 -0
  37. package/dist/chunks/joggingColors-BKRoSGQu.js +132 -0
  38. package/dist/chunks/joggingColors-BkPm75Hr.cjs +1 -0
  39. package/dist/chunks/json-3cqBD7UQ.js +18 -0
  40. package/dist/chunks/json-Bd6uGfgP.cjs +1 -0
  41. package/dist/chunks/loadRobotSession-Bt1-Brjp.js +3761 -0
  42. package/dist/chunks/loadRobotSession-DHVuK_pj.cjs +1 -0
  43. package/dist/chunks/novaConnection-BTSIgWd1.cjs +1 -0
  44. package/dist/chunks/novaConnection-J6_ohIQ0.js +14 -0
  45. package/dist/chunks/poseText-BXUaQWnK.cjs +1 -0
  46. package/dist/chunks/poseText-CtdXIeT_.js +41 -0
  47. package/dist/chunks/useSmoothedMotionState-C_Vo0py0.js +202 -0
  48. package/dist/chunks/useSmoothedMotionState-Ce9NjwBu.cjs +1 -0
  49. package/dist/components/AppHeader.d.ts +1 -1
  50. package/dist/components/VelocitySlider.d.ts +6 -1
  51. package/dist/components/currentPoseBar/CurrentPoseBar.d.ts +48 -0
  52. package/dist/components/currentPoseBar/OrientationFormatPopover.d.ts +19 -0
  53. package/dist/components/currentPoseBar/StreamStatus.d.ts +10 -0
  54. package/dist/components/currentPoseBar/orientation.d.ts +34 -0
  55. package/dist/components/currentPoseBar/poseValues.d.ts +15 -0
  56. package/dist/components/jogging/JoggingButtons.d.ts +18 -0
  57. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts +8 -2
  58. package/dist/components/jogging/JoggingCartesianTab.d.ts +3 -0
  59. package/dist/components/jogging/JoggingJointTab.d.ts +4 -1
  60. package/dist/components/jogging/JoggingJointValueControl.d.ts +7 -1
  61. package/dist/components/jogging/JoggingPanel.d.ts +6 -3
  62. package/dist/components/jogging/JoggingRefusedError.d.ts +24 -0
  63. package/dist/components/jogging/JoggingStore.d.ts +382 -40
  64. package/dist/components/jogging/gizmo/JoggingGizmo.d.ts +53 -0
  65. package/dist/components/jogging/gizmo/JoggingGizmoOrientation.d.ts +26 -0
  66. package/dist/components/jogging/gizmo/RotationHandles.d.ts +7 -0
  67. package/dist/components/jogging/gizmo/RotationScene.d.ts +6 -0
  68. package/dist/components/jogging/gizmo/TranslationHandles.d.ts +6 -0
  69. package/dist/components/jogging/gizmo/TranslationScene.d.ts +6 -0
  70. package/dist/components/jogging/gizmo/arcGrabAreas.d.ts +58 -0
  71. package/dist/components/jogging/gizmo/arcs.d.ts +54 -0
  72. package/dist/components/jogging/gizmo/arrows.d.ts +63 -0
  73. package/dist/components/jogging/gizmo/gizmoShared.d.ts +135 -0
  74. package/dist/components/jogging/gizmo/gizmoView.d.ts +42 -0
  75. package/dist/components/jogging/gizmo/useGizmoTurn.d.ts +11 -0
  76. package/dist/components/jogging/holdSafety.d.ts +82 -0
  77. package/dist/components/jogging/jogError.d.ts +9 -0
  78. package/dist/components/jogging/jogHandle.d.ts +23 -0
  79. package/dist/components/jogging/joggingColors.d.ts +30 -0
  80. package/dist/components/jogging/joggingVelocity.d.ts +21 -0
  81. package/dist/components/jogging/joint/JoggingJointSlider.d.ts +56 -0
  82. package/dist/components/jogging/joint/JointSliderTrack.d.ts +27 -0
  83. package/dist/components/jogging/joint/jointJog.d.ts +55 -0
  84. package/dist/components/jogging/joint/useJointJogHold.d.ts +43 -0
  85. package/dist/components/jogging/useHold.d.ts +42 -0
  86. package/dist/components/jogging/useJogControls.d.ts +44 -0
  87. package/dist/components/robotControl/PanelSelect.d.ts +13 -0
  88. package/dist/components/robotControl/SmallSelect.d.ts +15 -0
  89. package/dist/components/robotControl/poseText.d.ts +43 -0
  90. package/dist/components/robotControl/robotControlTypes.d.ts +36 -0
  91. package/dist/components/robotControl/useCopyText.d.ts +12 -0
  92. package/dist/components/robotControl/useEveryFrame.d.ts +6 -0
  93. package/dist/components/robots/GenericRobot.d.ts +2 -1
  94. package/dist/components/robots/LinearAxis.d.ts +1 -1
  95. package/dist/components/robots/LinearAxisAnimator.d.ts +11 -2
  96. package/dist/components/robots/Robot.d.ts +1 -1
  97. package/dist/components/robots/robotModelLogic.d.ts +11 -9
  98. package/dist/components/utils/converters.d.ts +0 -2
  99. package/dist/components/utils/hooks.d.ts +1 -6
  100. package/dist/components/utils/json.d.ts +4 -0
  101. package/dist/components/utils/useSmoothedMotionState.d.ts +11 -2
  102. package/dist/components/utils/useWebGLRenderer.d.ts +32 -0
  103. package/dist/components/utils/webglSupport.d.ts +11 -0
  104. package/dist/core.cjs +1 -1
  105. package/dist/core.d.ts +28 -20
  106. package/dist/core.js +57 -54
  107. package/dist/index.cjs +1 -1
  108. package/dist/index.js +73 -70
  109. package/dist/lib/ConnectedMotionGroup.d.ts +9 -8
  110. package/dist/lib/ControllerStateStream.d.ts +125 -0
  111. package/dist/lib/JoggerConnection.d.ts +172 -27
  112. package/dist/lib/MotionStreamConnection.d.ts +16 -6
  113. package/dist/lib/Pose3.d.ts +22 -0
  114. package/dist/lib/PoseTransformer.d.ts +44 -0
  115. package/dist/lib/TrajectoryExecutionStore.d.ts +260 -0
  116. package/dist/lib/connectionLogger.d.ts +9 -0
  117. package/dist/lib/controllerStateSource.d.ts +38 -0
  118. package/dist/lib/incrementalCartesianMotion.d.ts +40 -0
  119. package/dist/lib/motionGroupModelResources.d.ts +1 -0
  120. package/dist/lib/motionStateUpdate.d.ts +44 -0
  121. package/dist/lib/nats/natsControllerStateSource.d.ts +27 -0
  122. package/dist/lib/novaConnection.d.ts +23 -0
  123. package/dist/lib/planErrorTranslation.d.ts +8 -0
  124. package/dist/lib/poseMath.d.ts +51 -0
  125. package/dist/lib/robotSession/RobotActivation.d.ts +90 -0
  126. package/dist/lib/robotSession/RobotDescription.d.ts +84 -0
  127. package/dist/lib/robotSession/RobotLiveState.d.ts +65 -0
  128. package/dist/lib/robotSession/RobotLoadProgress.d.ts +72 -0
  129. package/dist/lib/robotSession/RobotSafety.d.ts +59 -0
  130. package/dist/lib/robotSession/RobotSession.d.ts +117 -0
  131. package/dist/lib/robotSession/RobotTargetPose.d.ts +116 -0
  132. package/dist/lib/robotSession/loadRobotResources.d.ts +46 -0
  133. package/dist/lib/robotSession/loadRobotSession.d.ts +81 -0
  134. package/dist/lib/robotSession/robotPose.d.ts +27 -0
  135. package/dist/lib/rotation.d.ts +12 -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/dist/session.cjs +1 -0
  140. package/dist/session.d.ts +22 -0
  141. package/dist/session.js +33 -0
  142. package/package.json +68 -66
  143. package/dist/Setup.d.ts +0 -11
  144. package/dist/chunks/MotionGroupVisualizer-DshWR1wY.js +0 -1653
  145. package/dist/chunks/MotionGroupVisualizer-eD7yFEcF.cjs +0 -1
  146. package/dist/chunks/SafetyBar-DPrv_OQA.cjs +0 -1
  147. package/dist/chunks/externalizeComponent-OO4jcrz5.cjs +0 -2
  148. package/dist/chunks/theming-DfSy4-Ic.cjs +0 -4
  149. package/dist/chunks/theming-mF9Rt8SS.js +0 -5542
  150. package/dist/chunks/useSmoothedMotionState-DyDgSVYX.js +0 -478
  151. package/dist/chunks/useSmoothedMotionState-VYxEIyfr.cjs +0 -1
  152. package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -11
  153. package/dist/components/AdornedTextField.d.ts +0 -7
  154. package/dist/components/CopyableText.d.ts +0 -6
  155. package/dist/components/CycleTimer/CycleTimer.d.ts +0 -3
  156. package/dist/components/CycleTimer/DefaultVariant.d.ts +0 -9
  157. package/dist/components/CycleTimer/SmallVariant.d.ts +0 -10
  158. package/dist/components/CycleTimer/index.d.ts +0 -27
  159. package/dist/components/CycleTimer/types.d.ts +0 -49
  160. package/dist/components/CycleTimer/useAnimations.d.ts +0 -14
  161. package/dist/components/CycleTimer/useTimerLogic.d.ts +0 -24
  162. package/dist/components/CycleTimer/utils.d.ts +0 -21
  163. package/dist/components/CycleTimer.d.ts +0 -3
  164. package/dist/components/DataGrid.d.ts +0 -66
  165. package/dist/components/LogPanel.d.ts +0 -38
  166. package/dist/components/LogStore.d.ts +0 -12
  167. package/dist/components/LogViewer.d.ts +0 -46
  168. package/dist/components/ProgramControl.d.ts +0 -55
  169. package/dist/components/ProgramStateIndicator.d.ts +0 -26
  170. package/dist/components/RobotCard.d.ts +0 -98
  171. package/dist/components/RobotListItem.d.ts +0 -34
  172. package/dist/components/RobotSetupReadinessIndicator.d.ts +0 -37
  173. package/dist/components/SelectableFab.d.ts +0 -7
  174. package/dist/components/TabBar.d.ts +0 -45
  175. package/dist/components/ThemeSelect.d.ts +0 -6
  176. package/dist/components/Timer/Timer.d.ts +0 -3
  177. package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -9
  178. package/dist/components/Timer/TimerSmallVariant.d.ts +0 -10
  179. package/dist/components/Timer/index.d.ts +0 -19
  180. package/dist/components/Timer/types.d.ts +0 -35
  181. package/dist/components/Timer/useTimerAnimations.d.ts +0 -10
  182. package/dist/components/Timer/useTimerLogic.d.ts +0 -19
  183. package/dist/components/Timer/utils.d.ts +0 -17
  184. package/dist/components/Timer.d.ts +0 -3
  185. package/dist/components/TransparentOverlay.d.ts +0 -4
  186. package/dist/components/jogging/JoggingFreedriveTab.d.ts +0 -1
  187. package/dist/components/jogging/PoseCartesianValues.d.ts +0 -9
  188. package/dist/components/jogging/PoseJointValues.d.ts +0 -8
  189. package/dist/components/robots/AxisConfig.d.ts +0 -2
  190. package/dist/components/robots/manufacturerHomePositions.d.ts +0 -20
  191. package/dist/icons/DropdownArrowIcon.d.ts +0 -2
  192. package/dist/icons/index.d.ts +0 -12
  193. package/dist/lib/novaCompat.d.ts +0 -16
  194. package/dist/themes/createDarkTheme.d.ts +0 -7
  195. package/dist/themes/themeTypes.d.ts +0 -40
  196. package/dist/themes/theming.d.ts +0 -24
package/dist/core.d.ts CHANGED
@@ -1,34 +1,42 @@
1
- export * from "./components/AdornedTextField";
1
+ import "@wandelbots/mui";
2
2
  export * from "./components/AppHeader";
3
- export * from "./components/CycleTimer";
4
- export * from "./components/DataGrid";
3
+ export { CurrentPoseBar, type CurrentPoseBarProps, type CurrentPoseBarState, type EulerConvention, type OrientationFormat, } from "./components/currentPoseBar/CurrentPoseBar";
4
+ export { JoggingButtons, type JoggingButtonsProps, } from "./components/jogging/JoggingButtons";
5
5
  export * from "./components/jogging/JoggingCartesianAxisControl";
6
+ export type { AxisControlComponentColors } from "./components/jogging/joggingColors";
6
7
  export * from "./components/jogging/JoggingJointValueControl";
8
+ export { JoggingJointSlider, type JoggingJointSliderProps, } from "./components/jogging/joint/JoggingJointSlider";
7
9
  export * from "./components/jogging/JoggingPanel";
8
- export { JoggingStore } from "./components/jogging/JoggingStore";
9
- export * from "./components/jogging/PoseCartesianValues";
10
- export * from "./components/jogging/PoseJointValues";
10
+ export { JoggingRefusedError, type JoggingRefusedReason, } from "./components/jogging/JoggingRefusedError";
11
+ export { JoggingStore, type JoggingStoreOptions, type JoggingStoreStorage, } from "./components/jogging/JoggingStore";
12
+ export type { JogAxis, JogDirection, JogHandle, } from "./components/jogging/jogHandle";
13
+ export type { JogControlsProps } from "./components/jogging/useJogControls";
14
+ export type { RobotControlOption, RobotControlPose, RobotControlSelect, } from "./components/robotControl/robotControlTypes";
11
15
  export * from "./components/LoadingCover";
12
- export * from "./components/LogPanel";
13
- export { LogStore } from "./components/LogStore";
14
- export * from "./components/LogViewer";
15
16
  export * from "./components/modal/NoMotionGroupModal";
16
- export * from "./components/ProgramControl";
17
- export * from "./components/ProgramStateIndicator";
18
- export * from "./components/RobotListItem";
19
- export * from "./components/RobotSetupReadinessIndicator";
20
- export * from "./components/SelectableFab";
21
- export * from "./components/TabBar";
22
- export * from "./components/Timer";
23
- export * from "./components/utils/hooks";
24
17
  export * from "./components/utils/interpolation";
25
18
  export * from "./components/utils/useSmoothedMotionState";
26
19
  export * from "./components/VelocitySlider";
27
20
  export * from "./i18n/config";
28
21
  export * from "./lib/ConnectedMotionGroup";
22
+ export { ControllerStateStream } from "./lib/ControllerStateStream";
23
+ export type { ControllerStateSource } from "./lib/controllerStateSource";
24
+ export type { ConnectionLogger } from "./lib/connectionLogger";
29
25
  export * from "./lib/JoggerConnection";
30
- export * from "./lib/motionStateUpdate";
26
+ export { jointValuesEqual, type MotionStateReadout, poseEqual, tcpMotionEqual, unwrapRotationVector, } from "./lib/motionStateUpdate";
31
27
  export * from "./lib/MotionStreamConnection";
28
+ export type { NovaConnection } from "./lib/novaConnection";
29
+ export { planErrorTranslationKey } from "./lib/planErrorTranslation";
30
+ export { deriveSelectedTcpPose, type ReferencedPose, resolveCoordinateSystemInWorld, type TcpReferencedPose, transformPoseToCoordinateSystem, } from "./lib/PoseTransformer";
31
+ export { type LoadRobotSessionOptions, loadRobotSession, type RobotSessionEvent, RobotSessionLoad, type RobotSessionLoadState, } from "./lib/robotSession/loadRobotSession";
32
+ export { RobotActivation, type RobotActivationState, RobotModeChangeError, } from "./lib/robotSession/RobotActivation";
33
+ export { RobotDescription } from "./lib/robotSession/RobotDescription";
34
+ export { isRobotLoadStepError, ROBOT_LOAD_STEP_IDS, RobotLoadProgress, type RobotLoadStep, RobotLoadStepError, type RobotLoadStepId, type RobotLoadStepStatus, } from "./lib/robotSession/RobotLoadProgress";
35
+ export { RobotLiveState } from "./lib/robotSession/RobotLiveState";
36
+ export { type RobotNotMoveableReason, RobotSafety, } from "./lib/robotSession/RobotSafety";
37
+ export type { RobotPose } from "./lib/robotSession/robotPose";
38
+ export { RobotSession, type RobotSessionError, type RobotSessionOptions, } from "./lib/robotSession/RobotSession";
39
+ export { RobotTargetPose, type StagedTargetPose, } from "./lib/robotSession/RobotTargetPose";
40
+ export { jointsToText, poseToText, } from "./components/robotControl/poseText";
41
+ export { type PlannedTrajectory, type PlanTrajectoryResult, TrajectoryExecutionStore, type TrajectoryState, type TrajectoryTarget, } from "./lib/TrajectoryExecutionStore";
32
42
  export * from "./SafetyBar";
33
- export * from "./themes/themeTypes";
34
- export { createNovaTheme, createNovaMuiTheme } from "./themes/theming";
package/dist/core.js CHANGED
@@ -1,56 +1,59 @@
1
- import { A as o, a as s, C as t, b as r, J as n, c as i, d as g, e as l, f as u, L as c, g as d, h as m, i as p, j as S, M, N as b, P as C, k as V, R as L, l as P, m as f, S as J, T as R, n as x, V as T, o as A, W as I, p as y, q as E, r as h, s as q, t as v, u as N, v as w, w as F, x as G, y as W, z as j } from "./chunks/theming-mF9Rt8SS.js";
2
- import { P as D, a as k, b as z, V as H, u as K, c as O, d as Q, e as U, f as X, g as Y } from "./chunks/useSmoothedMotionState-DyDgSVYX.js";
3
- import { i as _ } from "./chunks/externalizeComponent-EDymnaGR.js";
4
- import { S as aa } from "./chunks/SafetyBar-Cy9DiXp9.js";
1
+ import "@wandelbots/mui";
2
+ import { A as t, C as s, J as r, a as n, b as i, L as g, c as l, N as p, V as S, d } from "./chunks/ConnectedMotionGroup-D9JJSyXB.js";
3
+ import { C as u } from "./chunks/CurrentPoseBar-CpwvWpEY.js";
4
+ import { J as b } from "./chunks/JoggingButtons-i8FdMpCx.js";
5
+ import { J as C } from "./chunks/JoggingJointSlider-DQhJOmcc.js";
6
+ import { C as J, J as x, a as T, b as E, M as L, R as M, c as y, d as V, e as P, f as v, g as j, h as A, i as q, j as B, k as I, l as h, T as D, m as O, n as _, o as G, p as N, q as k, r as w, s as H, t as K, u as W, v as z } from "./chunks/loadRobotSession-Bt1-Brjp.js";
7
+ import { V as Q, u as U, a as X } from "./chunks/useSmoothedMotionState-C_Vo0py0.js";
8
+ import { i as Z } from "./chunks/externalizeComponent-7OVHUIUh.js";
9
+ import { j as oo, p as ao } from "./chunks/poseText-CtdXIeT_.js";
10
+ import { S as to } from "./chunks/SafetyBar-WXLP3Yi0.js";
5
11
  export {
6
- o as AdornedTextField,
7
- s as AppHeader,
8
- t as ConnectedMotionGroup,
9
- r as CycleTimer,
10
- n as JoggerConnection,
11
- i as JoggingCartesianAxisControl,
12
- g as JoggingJointValueControl,
13
- l as JoggingPanel,
14
- u as JoggingStore,
15
- c as LoadingCover,
16
- d as LoadingErrorMessage,
17
- m as LogPanel,
18
- p as LogStore,
19
- S as LogViewer,
20
- M as MotionStreamConnection,
21
- b as NoMotionGroupModal,
22
- C as PoseCartesianValues,
23
- V as PoseJointValues,
24
- D as ProgramControl,
25
- k as ProgramState,
26
- z as ProgramStateIndicator,
27
- L as RobotListItem,
28
- P as RobotSetupReadinessIndicator,
29
- f as RobotSetupReadinessState,
30
- aa as SafetyBar,
31
- J as SelectableFab,
32
- R as TabBar,
33
- x as Timer,
34
- H as ValueInterpolator,
35
- T as VelocitySlider,
36
- A as VelocitySliderLabel,
37
- I as WandelbotsDataGrid,
38
- y as createDebugMessage,
39
- E as createErrorMessage,
40
- h as createInfoMessage,
41
- q as createLogMessage,
42
- v as createNovaMuiTheme,
43
- N as createNovaTheme,
44
- w as createWarningMessage,
45
- _ as i18n,
46
- F as jointValuesEqual,
47
- G as poseEqual,
48
- W as tcpMotionEqual,
49
- j as unwrapRotationVector,
50
- K as useAnimationFrame,
51
- O as useAutorun,
52
- Q as useInterpolation,
53
- U as useMounted,
54
- X as useReaction,
55
- Y as useSmoothedMotionState
12
+ t as AppHeader,
13
+ s as ConnectedMotionGroup,
14
+ J as ControllerStateStream,
15
+ u as CurrentPoseBar,
16
+ x as JoggerConnection,
17
+ b as JoggingButtons,
18
+ r as JoggingCartesianAxisControl,
19
+ C as JoggingJointSlider,
20
+ n as JoggingJointValueControl,
21
+ i as JoggingPanel,
22
+ T as JoggingRefusedError,
23
+ E as JoggingStore,
24
+ g as LoadingCover,
25
+ l as LoadingErrorMessage,
26
+ L as MotionStreamConnection,
27
+ p as NoMotionGroupModal,
28
+ M as ROBOT_LOAD_STEP_IDS,
29
+ y as RobotActivation,
30
+ V as RobotDescription,
31
+ P as RobotLiveState,
32
+ v as RobotLoadProgress,
33
+ j as RobotLoadStepError,
34
+ A as RobotModeChangeError,
35
+ q as RobotSafety,
36
+ B as RobotSession,
37
+ I as RobotSessionLoad,
38
+ h as RobotTargetPose,
39
+ to as SafetyBar,
40
+ D as TrajectoryExecutionStore,
41
+ Q as ValueInterpolator,
42
+ S as VelocitySlider,
43
+ d as VelocitySliderLabel,
44
+ O as deriveSelectedTcpPose,
45
+ Z as i18n,
46
+ _ as isRobotLoadStepError,
47
+ G as jointValuesEqual,
48
+ oo as jointsToText,
49
+ N as loadRobotSession,
50
+ k as planErrorTranslationKey,
51
+ w as poseEqual,
52
+ ao as poseToText,
53
+ H as resolveCoordinateSystemInWorld,
54
+ K as tcpMotionEqual,
55
+ W as transformPoseToCoordinateSystem,
56
+ z as unwrapRotationVector,
57
+ U as useInterpolation,
58
+ X as useSmoothedMotionState
56
59
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./chunks/MotionGroupVisualizer-eD7yFEcF.cjs"),t=require("./chunks/useSmoothedMotionState-VYxEIyfr.cjs"),e=require("./chunks/theming-DfSy4-Ic.cjs"),r=require("./chunks/externalizeComponent-OO4jcrz5.cjs"),a=require("./chunks/SafetyBar-DPrv_OQA.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.JointLimitGizmo=o.JointLimitGizmo;exports.LinearAxis=o.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=o.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=o.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=o.MotionGroupVisualizerExact;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.RobotCard=o.RobotCard;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.defaultAxisConfig=o.defaultAxisConfig;exports.defaultGetModel=o.defaultGetModel;exports.extractManufacturer=o.extractManufacturer;exports.getDefaultHomeConfig=o.getDefaultHomeConfig;exports.ProgramControl=t.ProgramControl;exports.ProgramState=t.ProgramState;exports.ProgramStateIndicator=t.ProgramStateIndicator;exports.ValueInterpolator=t.ValueInterpolator;exports.useAnimationFrame=t.useAnimationFrame;exports.useAutorun=t.useAutorun;exports.useInterpolation=t.useInterpolation;exports.useMounted=t.useMounted;exports.useReaction=t.useReaction;exports.useSmoothedMotionState=t.useSmoothedMotionState;exports.AdornedTextField=e.AdornedTextField;exports.AppHeader=e.AppHeader;exports.ConnectedMotionGroup=e.ConnectedMotionGroup;exports.CycleTimer=e.CycleTimer;exports.JoggerConnection=e.JoggerConnection;exports.JoggingCartesianAxisControl=e.JoggingCartesianAxisControl;exports.JoggingJointValueControl=e.JoggingJointValueControl;exports.JoggingPanel=e.JoggingPanel;exports.JoggingStore=e.JoggingStore;exports.LoadingCover=e.LoadingCover;exports.LoadingErrorMessage=e.LoadingErrorMessage;exports.LogPanel=e.LogPanel;exports.LogStore=e.LogStore;exports.LogViewer=e.LogViewer;exports.MotionStreamConnection=e.MotionStreamConnection;exports.NoMotionGroupModal=e.NoMotionGroupModal;exports.PoseCartesianValues=e.PoseCartesianValues;exports.PoseJointValues=e.PoseJointValues;exports.RobotListItem=e.RobotListItem;exports.RobotSetupReadinessIndicator=e.RobotSetupReadinessIndicator;exports.RobotSetupReadinessState=e.RobotSetupReadinessState;exports.SelectableFab=e.SelectableFab;exports.TabBar=e.TabBar;exports.Timer=e.Timer;exports.VelocitySlider=e.VelocitySlider;exports.VelocitySliderLabel=e.VelocitySliderLabel;exports.WandelbotsDataGrid=e.WandelbotsDataGrid;exports.createDebugMessage=e.createDebugMessage;exports.createErrorMessage=e.createErrorMessage;exports.createInfoMessage=e.createInfoMessage;exports.createLogMessage=e.createLogMessage;exports.createNovaMuiTheme=e.createNovaMuiTheme;exports.createNovaTheme=e.createNovaTheme;exports.createWarningMessage=e.createWarningMessage;exports.jointValuesEqual=e.jointValuesEqual;exports.poseEqual=e.poseEqual;exports.tcpMotionEqual=e.tcpMotionEqual;exports.unwrapRotationVector=e.unwrapRotationVector;exports.i18n=r.i18n;exports.SafetyBar=a.SafetyBar;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/Pose3-DwMOSTKO.cjs"),n=require("./chunks/JoggingGizmoOrientation-EPtBeAun.cjs"),r=require("./chunks/useSmoothedMotionState-Ce9NjwBu.cjs");require("@wandelbots/mui");const t=require("./chunks/ConnectedMotionGroup-ir7Vf690.cjs"),a=require("./chunks/CurrentPoseBar-Cbz4AO36.cjs"),s=require("./chunks/JoggingButtons-paQCBXf4.cjs"),g=require("./chunks/JoggingJointSlider-YcEBMgF1.cjs"),o=require("./chunks/loadRobotSession-DHVuK_pj.cjs"),l=require("./chunks/externalizeComponent-B0n_tR3v.cjs"),i=require("./chunks/poseText-BXUaQWnK.cjs"),u=require("./chunks/SafetyBar-Be1c6Vz9.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.JointLimitGizmo=e.JointLimitGizmo;exports.LinearAxis=e.LinearAxis;exports.MotionGroupVisualizer=e.MotionGroupVisualizer;exports.MotionGroupVisualizerExact=e.MotionGroupVisualizerExact;exports.Pose3=e.Pose3;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;exports.SupportedLinearAxis=e.SupportedLinearAxis;exports.SupportedLinearAxisExact=e.SupportedLinearAxisExact;exports.SupportedRobot=e.SupportedRobot;exports.SupportedRobotExact=e.SupportedRobotExact;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.defaultGetModel=e.defaultGetModel;exports.parseRotationToQuaternion=e.parseRotationToQuaternion;exports.JoggingGizmo=n.JoggingGizmo;exports.JoggingGizmoOrientation=n.JoggingGizmoOrientation;exports.ValueInterpolator=r.ValueInterpolator;exports.useInterpolation=r.useInterpolation;exports.useSmoothedMotionState=r.useSmoothedMotionState;exports.AppHeader=t.AppHeader;exports.ConnectedMotionGroup=t.ConnectedMotionGroup;exports.JoggingCartesianAxisControl=t.JoggingCartesianAxisControl;exports.JoggingJointValueControl=t.JoggingJointValueControl;exports.JoggingPanel=t.JoggingPanel;exports.LoadingCover=t.LoadingCover;exports.LoadingErrorMessage=t.LoadingErrorMessage;exports.NoMotionGroupModal=t.NoMotionGroupModal;exports.VelocitySlider=t.VelocitySlider;exports.VelocitySliderLabel=t.VelocitySliderLabel;exports.CurrentPoseBar=a.CurrentPoseBar;exports.JoggingButtons=s.JoggingButtons;exports.JoggingJointSlider=g.JoggingJointSlider;exports.ControllerStateStream=o.ControllerStateStream;exports.JoggerConnection=o.JoggerConnection;exports.JoggingRefusedError=o.JoggingRefusedError;exports.JoggingStore=o.JoggingStore;exports.MotionStreamConnection=o.MotionStreamConnection;exports.ROBOT_LOAD_STEP_IDS=o.ROBOT_LOAD_STEP_IDS;exports.RobotActivation=o.RobotActivation;exports.RobotDescription=o.RobotDescription;exports.RobotLiveState=o.RobotLiveState;exports.RobotLoadProgress=o.RobotLoadProgress;exports.RobotLoadStepError=o.RobotLoadStepError;exports.RobotModeChangeError=o.RobotModeChangeError;exports.RobotSafety=o.RobotSafety;exports.RobotSession=o.RobotSession;exports.RobotSessionLoad=o.RobotSessionLoad;exports.RobotTargetPose=o.RobotTargetPose;exports.TrajectoryExecutionStore=o.TrajectoryExecutionStore;exports.deriveSelectedTcpPose=o.deriveSelectedTcpPose;exports.isRobotLoadStepError=o.isRobotLoadStepError;exports.jointValuesEqual=o.jointValuesEqual;exports.loadRobotSession=o.loadRobotSession;exports.planErrorTranslationKey=o.planErrorTranslationKey;exports.poseEqual=o.poseEqual;exports.resolveCoordinateSystemInWorld=o.resolveCoordinateSystemInWorld;exports.tcpMotionEqual=o.tcpMotionEqual;exports.transformPoseToCoordinateSystem=o.transformPoseToCoordinateSystem;exports.unwrapRotationVector=o.unwrapRotationVector;exports.i18n=l.i18n;exports.jointsToText=i.jointsToText;exports.poseToText=i.poseToText;exports.SafetyBar=u.SafetyBar;
package/dist/index.js CHANGED
@@ -1,76 +1,79 @@
1
- import { C as o, J as s, L as t, M as r, a as n, b as i, P as u, R as g, c as l, S as d, d as c, e as p, f as S, g as m, T as M, h as C, i as R, j as f, k as b } from "./chunks/MotionGroupVisualizer-DshWR1wY.js";
2
- import { P as L, a as V, b as A, V as E, u as P, c as J, d as T, e as G, f as y, g as I } from "./chunks/useSmoothedMotionState-DyDgSVYX.js";
3
- import { A as h, a as v, C as F, b as j, J as q, c as z, d as w, e as D, f as H, L as W, g as k, h as B, i as O, j as U, M as _, N as Z, P as K, k as Q, R as X, l as Y, m as $, S as aa, T as ea, n as oa, V as sa, o as ta, W as ra, p as na, q as ia, r as ua, s as ga, t as la, u as da, v as ca, w as pa, x as Sa, y as ma, z as Ma } from "./chunks/theming-mF9Rt8SS.js";
4
- import { i as Ra } from "./chunks/externalizeComponent-EDymnaGR.js";
5
- import { S as ba } from "./chunks/SafetyBar-Cy9DiXp9.js";
1
+ import { C as t, J as s, L as r, M as n, a as i, P as p, b as g, R as d, S as l, c as S, d as u, e as m, f as R, T as c, g as x, p as b } from "./chunks/Pose3-Ci1bxEvz.js";
2
+ import { J, a as C } from "./chunks/JoggingGizmoOrientation-CKZeLcMp.js";
3
+ import { V as L, u as T, a as M } from "./chunks/useSmoothedMotionState-C_Vo0py0.js";
4
+ import "@wandelbots/mui";
5
+ import { A as P, C as V, J as A, a as G, b as v, L as j, c as z, N as q, V as B, d as I } from "./chunks/ConnectedMotionGroup-D9JJSyXB.js";
6
+ import { C as h } from "./chunks/CurrentPoseBar-CpwvWpEY.js";
7
+ import { J as _ } from "./chunks/JoggingButtons-i8FdMpCx.js";
8
+ import { J as k } from "./chunks/JoggingJointSlider-DQhJOmcc.js";
9
+ import { C as H, J as K, a as Q, b as W, M as Z, R as F, c as U, d as X, e as Y, f as $, g as oo, h as ao, i as eo, j as to, k as so, l as ro, T as no, m as io, n as po, o as go, p as lo, q as So, r as uo, s as mo, t as Ro, u as co, v as xo } from "./chunks/loadRobotSession-Bt1-Brjp.js";
10
+ import { i as fo } from "./chunks/externalizeComponent-7OVHUIUh.js";
11
+ import { j as Co, p as Eo } from "./chunks/poseText-CtdXIeT_.js";
12
+ import { S as To } from "./chunks/SafetyBar-WXLP3Yi0.js";
6
13
  export {
7
- h as AdornedTextField,
8
- v as AppHeader,
9
- o as CollisionSceneRenderer,
10
- F as ConnectedMotionGroup,
11
- j as CycleTimer,
12
- q as JoggerConnection,
13
- z as JoggingCartesianAxisControl,
14
- w as JoggingJointValueControl,
15
- D as JoggingPanel,
16
- H as JoggingStore,
14
+ P as AppHeader,
15
+ t as CollisionSceneRenderer,
16
+ V as ConnectedMotionGroup,
17
+ H as ControllerStateStream,
18
+ h as CurrentPoseBar,
19
+ K as JoggerConnection,
20
+ _ as JoggingButtons,
21
+ A as JoggingCartesianAxisControl,
22
+ J as JoggingGizmo,
23
+ C as JoggingGizmoOrientation,
24
+ k as JoggingJointSlider,
25
+ G as JoggingJointValueControl,
26
+ v as JoggingPanel,
27
+ Q as JoggingRefusedError,
28
+ W as JoggingStore,
17
29
  s as JointLimitGizmo,
18
- t as LinearAxis,
19
- W as LoadingCover,
20
- k as LoadingErrorMessage,
21
- B as LogPanel,
22
- O as LogStore,
23
- U as LogViewer,
24
- r as MANUFACTURER_HOME_CONFIGS,
30
+ r as LinearAxis,
31
+ j as LoadingCover,
32
+ z as LoadingErrorMessage,
25
33
  n as MotionGroupVisualizer,
26
34
  i as MotionGroupVisualizerExact,
27
- _ as MotionStreamConnection,
28
- Z as NoMotionGroupModal,
29
- K as PoseCartesianValues,
30
- Q as PoseJointValues,
31
- u as PresetEnvironment,
32
- L as ProgramControl,
33
- V as ProgramState,
34
- A as ProgramStateIndicator,
35
- g as Robot,
36
- l as RobotCard,
37
- X as RobotListItem,
38
- Y as RobotSetupReadinessIndicator,
39
- $ as RobotSetupReadinessState,
40
- ba as SafetyBar,
41
- d as SafetyZonesRenderer,
42
- aa as SelectableFab,
43
- c as SupportedLinearAxis,
44
- p as SupportedLinearAxisExact,
45
- S as SupportedRobot,
46
- m as SupportedRobotExact,
47
- ea as TabBar,
48
- oa as Timer,
49
- M as TrajectoryRenderer,
50
- E as ValueInterpolator,
51
- sa as VelocitySlider,
52
- ta as VelocitySliderLabel,
53
- ra as WandelbotsDataGrid,
54
- na as createDebugMessage,
55
- ia as createErrorMessage,
56
- ua as createInfoMessage,
57
- ga as createLogMessage,
58
- la as createNovaMuiTheme,
59
- da as createNovaTheme,
60
- ca as createWarningMessage,
61
- C as defaultAxisConfig,
62
- R as defaultGetModel,
63
- f as extractManufacturer,
64
- b as getDefaultHomeConfig,
65
- Ra as i18n,
66
- pa as jointValuesEqual,
67
- Sa as poseEqual,
68
- ma as tcpMotionEqual,
69
- Ma as unwrapRotationVector,
70
- P as useAnimationFrame,
71
- J as useAutorun,
35
+ Z as MotionStreamConnection,
36
+ q as NoMotionGroupModal,
37
+ p as Pose3,
38
+ g as PresetEnvironment,
39
+ F as ROBOT_LOAD_STEP_IDS,
40
+ d as Robot,
41
+ U as RobotActivation,
42
+ X as RobotDescription,
43
+ Y as RobotLiveState,
44
+ $ as RobotLoadProgress,
45
+ oo as RobotLoadStepError,
46
+ ao as RobotModeChangeError,
47
+ eo as RobotSafety,
48
+ to as RobotSession,
49
+ so as RobotSessionLoad,
50
+ ro as RobotTargetPose,
51
+ To as SafetyBar,
52
+ l as SafetyZonesRenderer,
53
+ S as SupportedLinearAxis,
54
+ u as SupportedLinearAxisExact,
55
+ m as SupportedRobot,
56
+ R as SupportedRobotExact,
57
+ no as TrajectoryExecutionStore,
58
+ c as TrajectoryRenderer,
59
+ L as ValueInterpolator,
60
+ B as VelocitySlider,
61
+ I as VelocitySliderLabel,
62
+ x as defaultGetModel,
63
+ io as deriveSelectedTcpPose,
64
+ fo as i18n,
65
+ po as isRobotLoadStepError,
66
+ go as jointValuesEqual,
67
+ Co as jointsToText,
68
+ lo as loadRobotSession,
69
+ b as parseRotationToQuaternion,
70
+ So as planErrorTranslationKey,
71
+ uo as poseEqual,
72
+ Eo as poseToText,
73
+ mo as resolveCoordinateSystemInWorld,
74
+ Ro as tcpMotionEqual,
75
+ co as transformPoseToCoordinateSystem,
76
+ xo as unwrapRotationVector,
72
77
  T as useInterpolation,
73
- G as useMounted,
74
- y as useReaction,
75
- I as useSmoothedMotionState
78
+ M as useSmoothedMotionState
76
79
  };
@@ -1,14 +1,18 @@
1
1
  import { type AutoReconnectingWebsocket } from "@wandelbots/nova-js";
2
- import type { MotionGroupDescription, MotionGroupState, Nova, RobotControllerState } from "@wandelbots/nova-js/v2";
2
+ import type { MotionGroupDescription, MotionGroupState, RobotControllerState } from "@wandelbots/nova-js/v2";
3
3
  import * as THREE from "three";
4
4
  import type { Vector3Simple } from "./JoggerConnection";
5
- import { type AnyNovaClient } from "./novaCompat";
5
+ import { type NovaConnection } from "./novaConnection";
6
+ /**
7
+ * A TCP of {@link ConnectedMotionGroup}
8
+ */
6
9
  export type RobotTcpLike = {
7
10
  id: string;
8
11
  readable_name: string;
9
12
  position: Vector3Simple;
10
13
  orientation: Vector3Simple;
11
14
  };
15
+ /** @deprecated Nothing uses it; no replacement */
12
16
  export type MotionGroupOption = {
13
17
  selectionId: string;
14
18
  };
@@ -18,7 +22,6 @@ export type ConnectedMotionGroupOptions = {
18
22
  };
19
23
  /**
20
24
  * Store representing the current state of a connected motion group.
21
- * API v2 version, not used yet in the components.
22
25
  */
23
26
  export declare class ConnectedMotionGroup {
24
27
  readonly controller: RobotControllerState;
@@ -31,8 +34,8 @@ export declare class ConnectedMotionGroup {
31
34
  readonly initialControllerState: RobotControllerState;
32
35
  readonly controllerStateSocket: AutoReconnectingWebsocket;
33
36
  readonly cellId: string;
34
- static connectMultiple(nova: AnyNovaClient, motionGroupIds: string[], options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup[]>;
35
- static connect(novaClient: AnyNovaClient, motionGroupId: string, options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup>;
37
+ static connectMultiple(connection: NovaConnection, motionGroupIds: string[], options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup[]>;
38
+ static connect(connection: NovaConnection, motionGroupId: string, options?: ConnectedMotionGroupOptions): Promise<ConnectedMotionGroup>;
36
39
  connectedJoggingSocket: WebSocket | null;
37
40
  planData: any | null;
38
41
  joggingVelocity: number;
@@ -43,9 +46,7 @@ export declare class ConnectedMotionGroup {
43
46
  * movement controls in the UI should only be enabled in the "active" state
44
47
  */
45
48
  activationState: "inactive" | "activating" | "deactivating" | "active";
46
- /** Normalized instance-level Nova client (see `asNovaInstance`) */
47
- readonly nova: Nova;
48
- constructor(nova: AnyNovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket, cellId?: string);
49
+ constructor(connection: NovaConnection, controller: RobotControllerState, motionGroup: MotionGroupState, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket, isVirtual: boolean, tcps: RobotTcpLike[], description: MotionGroupDescription, initialControllerState: RobotControllerState, controllerStateSocket: AutoReconnectingWebsocket, cellId?: string);
49
50
  get motionGroupId(): string;
50
51
  get controllerId(): string;
51
52
  get modelFromController(): string;
@@ -0,0 +1,125 @@
1
+ import type { MotionGroupState, RobotControllerState } from "@wandelbots/nova-js/v2";
2
+ import type { ControllerStateSource } from "./controllerStateSource";
3
+ import { type MotionStateReadout } from "./motionStateUpdate";
4
+ /** Joints that moved less than this (rad, or mm) count as standing still */
5
+ export declare const MOTION_DELTA_THRESHOLD = 0.0001;
6
+ /** A message from the source that the stream could not use */
7
+ export type ControllerStateStreamError = {
8
+ message: string;
9
+ /** The source's URL */
10
+ url?: string;
11
+ };
12
+ /** What the session gives a {@link ControllerStateStream} besides its source */
13
+ export type ControllerStateStreamOptions = {
14
+ /**
15
+ * A virtual robot: its stream can come more slowly, depending on the speed
16
+ * of the simulation, so the stream waits longer before it calls the
17
+ * connection struggling (3 s instead of 1 s) or critical (6 s instead of 3 s)
18
+ */
19
+ isVirtual?: boolean;
20
+ /** Reports a message that the stream could not use */
21
+ onError?: (error: ControllerStateStreamError) => void;
22
+ /**
23
+ * Reconnect the source when the window gets the focus back, e.g. after the
24
+ * computer slept. Defaults to true where there is a window.
25
+ */
26
+ reconnectOnFocus?: boolean;
27
+ };
28
+ /**
29
+ * The live state of one motion group and its controller, from a
30
+ * {@link ControllerStateSource}: the safety state, operation mode and mode of
31
+ * the controller, and the motion group's state, updated in place as the
32
+ * messages come. Tells how good the connection is, and reconnects the source
33
+ * when its messages stop.
34
+ */
35
+ export declare class ControllerStateStream {
36
+ /** Where the controller state comes from; its owner closes it */
37
+ readonly source: ControllerStateSource;
38
+ /** The motion group whose state the stream keeps */
39
+ readonly motionGroupId: string;
40
+ /**
41
+ * The motion group's state as the last message had it. It stays the same
42
+ * object for as long as the stream lives, updated field by field, so that
43
+ * observers of one of its fields keep working. While the robot stands
44
+ * still, the jittering pose readings are not written.
45
+ */
46
+ rapidlyChangingMotionState: MotionGroupState;
47
+ /**
48
+ * The last message that changed the controller's safety state, operation
49
+ * mode or mode, and when it came
50
+ */
51
+ lastValidStateMessage: {
52
+ receivedAt: number;
53
+ data: RobotControllerState;
54
+ };
55
+ /** Non-observable timestamp for connection quality tracking only */
56
+ private lastMessageReceivedAt;
57
+ /** The last message that held no state of the motion group, if any */
58
+ lastInvalidStateMessage: {
59
+ receivedAt: number;
60
+ data: unknown;
61
+ } | null;
62
+ /**
63
+ * How the messages come: "struggling" after 1 s without one (3 s for a
64
+ * virtual robot), "critical" after 3 s (6 s), when the source is reconnected
65
+ */
66
+ connectionQuality: "good" | "struggling" | "critical";
67
+ private readonly connectionQualityInterval;
68
+ private readonly isVirtual;
69
+ private readonly onError?;
70
+ private readonly reconnectsOnFocus;
71
+ /** The controller's state as of the last message that changed it */
72
+ get controllerState(): RobotControllerState;
73
+ /**
74
+ * What pose and joint readouts show. Holds the previous reading while the
75
+ * joints only jitter (less than 0.0002 rad), and while the TCP and the
76
+ * coordinate system stay; kept alive so it also holds for untracked reads.
77
+ */
78
+ get readoutState(): MotionStateReadout;
79
+ /** The motion group's state in the next message of the source */
80
+ nextMotionState(): Promise<MotionGroupState>;
81
+ private setLastInvalidStateMessage;
82
+ private setLastValidStateMessage;
83
+ /**
84
+ * Merge the latest motion state onto the existing object instead of replacing
85
+ * it, so this stream owns exactly one live motion state object for the whole
86
+ * time it is connected.
87
+ *
88
+ * Consumers subscribe to *properties* of the object they are holding — the 3D
89
+ * animators keep it in a ref and read `joint_position` inside a MobX
90
+ * reaction. Replacing the object leaves those reactions subscribed to an
91
+ * orphan that never changes again, so the robot model stopped getting joint
92
+ * targets from the stream and only moved when React happened to re-render it
93
+ * (~5 updates/s against a ~134/s stream).
94
+ *
95
+ * Only fields whose value actually changed are written. A blanket
96
+ * `Object.assign` puts a fresh object into every nested field, and MobX
97
+ * compares with `===`, so each of `flange_pose`, `tcp_pose` and
98
+ * `joint_limit_reached` would notify its observers on every message of a
99
+ * ~134/s stream even while standing still. This mirrors how
100
+ * MotionStreamConnection guards each of its own field writes.
101
+ *
102
+ * Fields the message does not carry are removed rather than left behind: a
103
+ * merge must not make a stale pose read as the current one, which replacing
104
+ * the whole object never did.
105
+ *
106
+ * Runs as a MobX action (see `makeAutoObservable` with `autoBind` above), so
107
+ * the per-field writes notify observers once, as a single batch.
108
+ *
109
+ * `skipFields` leaves the named fields exactly as they are — neither updated
110
+ * nor removed — which is how a standstill message updates the discrete state
111
+ * without churning the jittery pose readings.
112
+ */
113
+ private updateRapidlyChangingMotionState;
114
+ private setConnectionQuality;
115
+ private handleWindowFocus;
116
+ private updateConnectionQuality;
117
+ /**
118
+ * Stops listening to the source; the source's owner closes it. The
119
+ * connection is critical from then on: no state comes any more, and the
120
+ * last one is not the robot's now (a robot that may move, for whatever
121
+ * still reads it).
122
+ */
123
+ dispose(): void;
124
+ private handleMessage;
125
+ }