@viamrobotics/test-widgets 0.6.0 → 0.7.0

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 (59) hide show
  1. package/README.md +1 -1
  2. package/dist/api-docs-href.d.ts +8 -0
  3. package/dist/api-docs-href.js +17 -0
  4. package/dist/components/angle-unit-toggle.svelte +1 -4
  5. package/dist/components/api-section.svelte +21 -23
  6. package/dist/components/api-section.svelte.d.ts +2 -0
  7. package/dist/components/index.d.ts +1 -0
  8. package/dist/components/index.js +1 -0
  9. package/dist/components/is-moving.svelte +3 -1
  10. package/dist/components/is-moving.svelte.d.ts +1 -0
  11. package/dist/components/mutation-section.svelte +19 -22
  12. package/dist/components/mutation-section.svelte.d.ts +2 -0
  13. package/dist/components/section-title.svelte +63 -0
  14. package/dist/components/section-title.svelte.d.ts +14 -0
  15. package/dist/components/widgets/arm/arm.svelte +17 -24
  16. package/dist/components/widgets/arm/joint-position-editor.svelte +89 -0
  17. package/dist/components/widgets/arm/joint-position-editor.svelte.d.ts +11 -0
  18. package/dist/components/widgets/arm/joint-position-quick-move.svelte +85 -0
  19. package/dist/components/widgets/arm/joint-position-quick-move.svelte.d.ts +9 -0
  20. package/dist/components/widgets/arm/joint-position-slider.svelte +36 -0
  21. package/dist/components/widgets/arm/joint-position-slider.svelte.d.ts +9 -0
  22. package/dist/components/widgets/arm/move-to-joint-positions.svelte +73 -127
  23. package/dist/components/widgets/arm/move-to-joint-positions.svelte.d.ts +1 -0
  24. package/dist/components/widgets/audio-input/audio-input.svelte +2 -0
  25. package/dist/components/widgets/audio-output/audio-output.svelte +2 -0
  26. package/dist/components/widgets/base/base.svelte +9 -1
  27. package/dist/components/widgets/camera/camera.svelte +184 -135
  28. package/dist/components/widgets/camera/get-pano-coverage-from-xmp.d.ts +31 -0
  29. package/dist/components/widgets/camera/get-pano-coverage-from-xmp.js +56 -0
  30. package/dist/components/widgets/camera/live-or-polling-video.svelte +1 -0
  31. package/dist/components/widgets/camera/live-three-sixty-camera-view.svelte +61 -0
  32. package/dist/components/widgets/camera/live-three-sixty-camera-view.svelte.d.ts +9 -0
  33. package/dist/components/widgets/camera/pano-sphere-scene.svelte +54 -0
  34. package/dist/components/widgets/camera/pano-sphere-scene.svelte.d.ts +10 -0
  35. package/dist/components/widgets/camera/three-sixty-camera-view.svelte +33 -43
  36. package/dist/components/widgets/camera/three-sixty-camera-view.svelte.d.ts +5 -3
  37. package/dist/components/widgets/discovery/discovery.svelte +1 -0
  38. package/dist/components/widgets/encoder/encoder.svelte +2 -0
  39. package/dist/components/widgets/gantry/gantry.svelte +28 -5
  40. package/dist/components/widgets/generic/generic.svelte +8 -1
  41. package/dist/components/widgets/gripper/gripper.svelte +11 -5
  42. package/dist/components/widgets/gripper/is-holding-something.svelte +1 -0
  43. package/dist/components/widgets/input-controller/input-controller.svelte +2 -1
  44. package/dist/components/widgets/motor/motor.svelte +11 -1
  45. package/dist/components/widgets/movement-sensor/movement-sensor.svelte +53 -26
  46. package/dist/components/widgets/power-sensor/power-sensor.svelte +4 -0
  47. package/dist/components/widgets/sensor/sensor.svelte +1 -0
  48. package/dist/components/widgets/servo/servo.svelte +10 -2
  49. package/dist/components/widgets/slam/move-on-map.svelte +4 -1
  50. package/dist/components/widgets/slam/slam.svelte +4 -1
  51. package/dist/components/widgets/vision-service/context.svelte.d.ts +1 -0
  52. package/dist/components/widgets/vision-service/context.svelte.js +7 -0
  53. package/dist/components/widgets/vision-service/detection-row.svelte +38 -0
  54. package/dist/components/widgets/vision-service/detection-row.svelte.d.ts +8 -0
  55. package/dist/components/widgets/vision-service/detection.svelte +7 -4
  56. package/dist/components/widgets/vision-service/legend.svelte +14 -11
  57. package/dist/index.d.ts +1 -0
  58. package/dist/index.js +1 -0
  59. package/package.json +5 -2
@@ -1,19 +1,22 @@
1
1
  <script lang="ts">
2
2
  import type { QueryObserverResult } from '@tanstack/svelte-query'
3
- import type { OrbitControls as OrbitControlsType } from 'three/examples/jsm/controls/OrbitControls.js'
3
+ import type { Texture } from 'three'
4
4
 
5
- import { T } from '@threlte/core'
6
- import { OrbitControls, useTexture } from '@threlte/extras'
5
+ import { useTexture } from '@threlte/extras'
7
6
  import { CameraClient } from '@viamrobotics/sdk'
8
- import { BackSide } from 'three'
9
7
 
10
- const {
11
- data,
12
- }: { data: QueryObserverResult<Awaited<ReturnType<CameraClient['getImages']>>>['data'] } =
13
- $props()
8
+ import type { PanoCoverage } from './get-pano-coverage-from-xmp'
9
+
10
+ import PanoSphereScene from './pano-sphere-scene.svelte'
11
+
12
+ interface Props {
13
+ data: QueryObserverResult<Awaited<ReturnType<CameraClient['getImages']>>>['data']
14
+ coverage?: PanoCoverage | null
15
+ }
16
+
17
+ const { data, coverage = null }: Props = $props()
14
18
 
15
19
  let imageUrl = $state.raw('')
16
- let controlsRef = $state<OrbitControlsType>()
17
20
 
18
21
  $effect(() => {
19
22
  const imageRecord = data?.images?.[0]
@@ -23,47 +26,34 @@
23
26
  return
24
27
  }
25
28
 
26
- const imageBytes = new Uint8Array(image)
27
- const imageBlob = new Blob([imageBytes], {
29
+ const imageBlob = new Blob([new Uint8Array(image)], {
28
30
  type: imageRecord.mimeType || 'image/jpeg',
29
31
  })
30
32
  const url = URL.createObjectURL(imageBlob)
31
33
  imageUrl = url
32
34
 
33
- return () => {
34
- URL.revokeObjectURL(url)
35
- }
35
+ return () => URL.revokeObjectURL(url)
36
36
  })
37
37
 
38
- const texture = $derived.by(() => (imageUrl ? useTexture(imageUrl) : null))
39
- </script>
40
-
41
- <T.PerspectiveCamera
42
- makeDefault
43
- position={[0, 0, 0.1]}
44
- fov={75}
45
- >
46
- <OrbitControls
47
- bind:ref={controlsRef}
48
- enableZoom={true}
49
- enablePan={false}
50
- />
51
- </T.PerspectiveCamera>
38
+ // `useTexture` returns a store that resolves to the decoded texture (with the
39
+ // renderer's color space already applied). Mirror its value into reactive state so
40
+ // the sphere scene can render the camera even before the first frame loads, and so
41
+ // `map` clears when the source goes away.
42
+ const textureStore = $derived(imageUrl ? useTexture(imageUrl) : undefined)
43
+ let map = $state.raw<Texture>()
44
+ $effect(() => {
45
+ if (!textureStore) {
46
+ map = undefined
47
+ return
48
+ }
52
49
 
53
- {#if $texture}
54
- {#await texture then map}
55
- <T.Mesh scale={[-1, 1, 1]}>
56
- <T.SphereGeometry args={[500, 60, 40]} />
57
- <T.MeshBasicMaterial
58
- {map}
59
- side={BackSide}
60
- />
61
- </T.Mesh>
62
- {/await}
63
- {/if}
50
+ return textureStore.subscribe((value) => {
51
+ map = value ?? undefined
52
+ })
53
+ })
54
+ </script>
64
55
 
65
- <T.AmbientLight intensity={0.5} />
66
- <T.DirectionalLight
67
- position={[5, 5, 5]}
68
- intensity={1}
56
+ <PanoSphereScene
57
+ {coverage}
58
+ {map}
69
59
  />
@@ -1,8 +1,10 @@
1
1
  import type { QueryObserverResult } from '@tanstack/svelte-query';
2
2
  import { CameraClient } from '@viamrobotics/sdk';
3
- type $$ComponentProps = {
3
+ import type { PanoCoverage } from './get-pano-coverage-from-xmp';
4
+ interface Props {
4
5
  data: QueryObserverResult<Awaited<ReturnType<CameraClient['getImages']>>>['data'];
5
- };
6
- declare const ThreeSixtyCameraView: import("svelte").Component<$$ComponentProps, {}, "">;
6
+ coverage?: PanoCoverage | null;
7
+ }
8
+ declare const ThreeSixtyCameraView: import("svelte").Component<Props, {}, "">;
7
9
  type ThreeSixtyCameraView = ReturnType<typeof ThreeSixtyCameraView>;
8
10
  export default ThreeSixtyCameraView;
@@ -135,6 +135,7 @@
135
135
 
136
136
  <ApiSection
137
137
  title="DiscoverResources"
138
+ api="rdk:service:discovery"
138
139
  class="relative"
139
140
  >
140
141
  <Query
@@ -81,6 +81,7 @@
81
81
  <div class="grid w-full grid-cols-2 divide-x">
82
82
  <ApiSection
83
83
  title="GetPosition"
84
+ api="rdk:component:encoder"
84
85
  tooltip="Relative encoders return ticks since last zeroing. Absolute encoders return degrees."
85
86
  class="gap-3"
86
87
  >
@@ -99,6 +100,7 @@
99
100
 
100
101
  <ApiSection
101
102
  title="ResetPosition"
103
+ api="rdk:component:encoder"
102
104
  description="Set the current position as the new zero position"
103
105
  >
104
106
  <Button
@@ -6,6 +6,7 @@
6
6
  createResourceQuery,
7
7
  } from '@viamrobotics/svelte-sdk'
8
8
 
9
+ import { apiDocsHref } from '../../../api-docs-href'
9
10
  import ApiSection from '../../api-section.svelte'
10
11
  import ConnectionStatus from '../../connection-status.svelte'
11
12
  import IsMoving from '../../is-moving.svelte'
@@ -51,12 +52,26 @@
51
52
  aria-labelledby={positionHeadingID}
52
53
  >
53
54
  <h3
54
- class="flex flex-row items-center gap-1 text-sm"
55
+ class="text-subtle-2 flex flex-row items-center gap-1 text-sm"
55
56
  id={positionHeadingID}
56
57
  >
57
- <span class="font-semibold"> GetPosition </span>
58
+ <a
59
+ href={apiDocsHref('rdk:component:gantry', 'getPosition')}
60
+ target="_blank"
61
+ rel="noopener noreferrer external"
62
+ class="decoration-gray-5 hover:decoration-default text-default font-mono font-semibold underline underline-offset-3"
63
+ >
64
+ GetPosition
65
+ </a>
58
66
  and
59
- <span class="font-semibold"> GetLengths </span>
67
+ <a
68
+ href={apiDocsHref('rdk:component:gantry', 'getLengths')}
69
+ target="_blank"
70
+ rel="noopener noreferrer external"
71
+ class="decoration-gray-5 hover:decoration-default text-default font-mono font-semibold underline underline-offset-3"
72
+ >
73
+ GetLengths
74
+ </a>
60
75
  </h3>
61
76
  <Queries queries={[positionQuery, lengthsQuery]}>
62
77
  {@const positions = positionQuery.data}
@@ -69,7 +84,10 @@
69
84
  {/if}
70
85
  </Queries>
71
86
  </ApiSection>
72
- <ApiSection title="MoveToPosition">
87
+ <ApiSection
88
+ title="MoveToPosition"
89
+ api="rdk:component:gantry"
90
+ >
73
91
  <Query query={positionQuery}>
74
92
  {@const positions = positionQuery.data}
75
93
  {#if positions !== undefined}
@@ -106,6 +124,7 @@
106
124
  </ApiSection>
107
125
  <ApiSection
108
126
  title="Home"
127
+ api="rdk:component:gantry"
109
128
  description="Run the homing sequence"
110
129
  >
111
130
  <Home
@@ -116,7 +135,10 @@
116
135
  </div>
117
136
  </div>
118
137
  <div class="ml-auto flex w-full max-w-40 flex-col divide-y">
119
- <ApiSection title="Stop">
138
+ <ApiSection
139
+ title="Stop"
140
+ api="rdk:component:gantry"
141
+ >
120
142
  <StopButton
121
143
  error={stopMutation.error}
122
144
  onStop={() => {
@@ -126,6 +148,7 @@
126
148
  </ApiSection>
127
149
  <IsMoving
128
150
  client={GantryClient}
151
+ api="rdk:component:gantry"
129
152
  {partID}
130
153
  {resourceName}
131
154
  />
@@ -1,6 +1,8 @@
1
1
  <script lang="ts">
2
2
  import { ResourceName } from '@viamrobotics/sdk'
3
3
 
4
+ import SectionTitle from '../../section-title.svelte'
5
+
4
6
  import DoCommand from '../do-command/do-command.svelte'
5
7
 
6
8
  interface Props {
@@ -11,6 +13,8 @@
11
13
 
12
14
  const { partID, resourceName, isComponent }: Props = $props()
13
15
 
16
+ const api = $derived(`rdk:${isComponent ? 'component' : 'service'}:generic`)
17
+
14
18
  const genericResourceName = $derived<ResourceName>({
15
19
  namespace: 'rdk',
16
20
  type: isComponent ? 'component' : 'service',
@@ -20,7 +24,10 @@
20
24
  </script>
21
25
 
22
26
  <div class="flex flex-col py-2 pl-4">
23
- <h3 class="font-semibold">DoCommand</h3>
27
+ <SectionTitle
28
+ title="DoCommand"
29
+ {api}
30
+ />
24
31
  </div>
25
32
 
26
33
  {#key genericResourceName}
@@ -30,10 +30,11 @@
30
30
  <ConnectionStatus {partID}>
31
31
  {#snippet connected()}
32
32
  <div class="flex flex-row divide-x">
33
- <span class="flex flex-row gap-4">
33
+ <span class="flex grow flex-row gap-4">
34
34
  <ApiSection
35
35
  title="Open"
36
- class="gap-3 pr-0"
36
+ api="rdk:component:gripper"
37
+ class="grow-0 gap-3 pr-0"
37
38
  >
38
39
  <Open
39
40
  {partID}
@@ -42,7 +43,8 @@
42
43
  </ApiSection>
43
44
  <ApiSection
44
45
  title="Grab"
45
- class="gap-3 pl-0"
46
+ api="rdk:component:gripper"
47
+ class="grow-0 gap-3 pl-0"
46
48
  >
47
49
  <Grab
48
50
  {partID}
@@ -50,8 +52,11 @@
50
52
  />
51
53
  </ApiSection>
52
54
  </span>
53
- <div class="ml-auto flex w-full max-w-40 flex-col divide-y">
54
- <ApiSection title="Stop">
55
+ <div class="flex shrink-0 flex-col divide-y">
56
+ <ApiSection
57
+ title="Stop"
58
+ api="rdk:component:gripper"
59
+ >
55
60
  <StopButton
56
61
  error={stopMutation.error}
57
62
  onStop={() => {
@@ -61,6 +66,7 @@
61
66
  </ApiSection>
62
67
  <IsMoving
63
68
  client={GripperClient}
69
+ api="rdk:component:gripper"
64
70
  {partID}
65
71
  {resourceName}
66
72
  />
@@ -30,6 +30,7 @@
30
30
 
31
31
  <ApiSection
32
32
  title="IsHoldingSomething"
33
+ api="rdk:component:gripper"
33
34
  bottomText="Updates automatically"
34
35
  class="grow"
35
36
  >
@@ -54,7 +54,8 @@
54
54
  </div>
55
55
 
56
56
  <ApiSection
57
- title="GetReadings"
57
+ title="GetEvents"
58
+ api="rdk:component:input_controller"
58
59
  class="relative"
59
60
  >
60
61
  <Query
@@ -86,6 +86,7 @@
86
86
  </MutationSection>
87
87
  <MutationSection
88
88
  title="SetPower"
89
+ api="rdk:component:motor"
89
90
  description="Move continuously"
90
91
  lastError={setPowerMutation.error}
91
92
  >
@@ -94,6 +95,7 @@
94
95
  {#if propertiesQuery.data?.positionReporting}
95
96
  <MutationSection
96
97
  title="SetRPM"
98
+ api="rdk:component:motor"
97
99
  description="Move indefinitely at a specified speed."
98
100
  lastError={setRPMMutation.error}
99
101
  >
@@ -101,6 +103,7 @@
101
103
  </MutationSection>
102
104
  <MutationSection
103
105
  title="GoFor"
106
+ api="rdk:component:motor"
104
107
  description="Move a specified number of revolutions"
105
108
  lastError={goForMutation.error}
106
109
  >
@@ -108,6 +111,7 @@
108
111
  </MutationSection>
109
112
  <MutationSection
110
113
  title="GoTo"
114
+ api="rdk:component:motor"
111
115
  description="Turn to a specified position"
112
116
  lastError={goToMutation.error}
113
117
  >
@@ -117,7 +121,10 @@
117
121
  </div>
118
122
 
119
123
  <div class="ml-auto flex w-full max-w-1/2 flex-col divide-y sm:max-w-1/3">
120
- <ApiSection title="Stop">
124
+ <ApiSection
125
+ title="Stop"
126
+ api="rdk:component:motor"
127
+ >
121
128
  <StopButton
122
129
  error={stopMutation.error}
123
130
  onStop={() => {
@@ -127,12 +134,14 @@
127
134
  </ApiSection>
128
135
  <IsMoving
129
136
  client={MotorClient}
137
+ api="rdk:component:motor"
130
138
  {partID}
131
139
  {resourceName}
132
140
  >
133
141
  <div class="flex flex-col gap-6 pt-2">
134
142
  <ApiSection
135
143
  title="IsPowered"
144
+ api="rdk:component:motor"
136
145
  class="gap-3 p-0"
137
146
  tooltip="Returns whether or not the motor is running and the current portion of max power.
138
147
 
@@ -158,6 +167,7 @@
158
167
  {#if propertiesQuery.data?.positionReporting === true}
159
168
  <ApiSection
160
169
  title="GetPosition"
170
+ api="rdk:component:motor"
161
171
  class="gap-3 p-0"
162
172
  tooltip="Reports the position of an encoded motor in revolutions from zero/home."
163
173
  >
@@ -9,6 +9,9 @@
9
9
  import ReadingsList from '../../readings-list.svelte'
10
10
  import RefetchController from '../../refetch-controller.svelte'
11
11
  import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
12
+ import SectionTitle from '../../section-title.svelte'
13
+
14
+ const MS_API = 'rdk:component:movement_sensor'
12
15
 
13
16
  import Accuracy from './accuracy.svelte'
14
17
  import CompassHeading from './compass-heading.svelte'
@@ -104,7 +107,10 @@
104
107
  <div class="flex w-full flex-col gap-5 py-4 pr-6 pl-4 lg:w-1/4">
105
108
  {#if propertiesQuery.data?.positionSupported}
106
109
  <div class="flex flex-col gap-2">
107
- <h3 class="font-semibold">GetPosition</h3>
110
+ <SectionTitle
111
+ title="GetPosition"
112
+ api={MS_API}
113
+ />
108
114
  <Query
109
115
  query={positionQuery}
110
116
  contentCx="h-6"
@@ -118,9 +124,13 @@
118
124
 
119
125
  {#if propertiesQuery.data?.orientationSupported}
120
126
  <div class="flex flex-col gap-2">
121
- <h3 class="font-semibold">
122
- GetOrientation <span class="text-subtle-2 font-normal">(º)</span>
123
- </h3>
127
+ <SectionTitle
128
+ title="GetOrientation"
129
+ api={MS_API}
130
+ >
131
+ {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º)</span
132
+ >{/snippet}
133
+ </SectionTitle>
124
134
  <Query
125
135
  query={orientationQuery}
126
136
  contentCx="h-6"
@@ -134,9 +144,13 @@
134
144
 
135
145
  {#if propertiesQuery.data?.compassHeadingSupported}
136
146
  <div class="flex flex-col gap-2">
137
- <h3 class="font-semibold">
138
- GetCompassHeading <span class="text-subtle-2 font-normal">(º)</span>
139
- </h3>
147
+ <SectionTitle
148
+ title="GetCompassHeading"
149
+ api={MS_API}
150
+ >
151
+ {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º)</span
152
+ >{/snippet}
153
+ </SectionTitle>
140
154
  <Query
141
155
  query={compassHeadingQuery}
142
156
  contentCx="h-6"
@@ -152,9 +166,13 @@
152
166
  <div class="flex w-full flex-col gap-5 p-4 lg:w-1/4">
153
167
  {#if propertiesQuery.data?.angularVelocitySupported}
154
168
  <div class="flex flex-col gap-2">
155
- <h3 class="font-semibold">
156
- GetAngularVelocity <span class="text-subtle-2 font-normal">(º/s)</span>
157
- </h3>
169
+ <SectionTitle
170
+ title="GetAngularVelocity"
171
+ api={MS_API}
172
+ >
173
+ {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º/s)</span
174
+ >{/snippet}
175
+ </SectionTitle>
158
176
  <Query
159
177
  query={angularVelocityQuery}
160
178
  contentCx="h-6"
@@ -168,9 +186,13 @@
168
186
 
169
187
  {#if propertiesQuery.data?.linearVelocitySupported}
170
188
  <div class="flex flex-col gap-2">
171
- <h3 class="font-semibold">
172
- GetLinearVelocity <span class="text-subtle-2 font-normal">(m/s)</span>
173
- </h3>
189
+ <SectionTitle
190
+ title="GetLinearVelocity"
191
+ api={MS_API}
192
+ >
193
+ {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(m/s)</span
194
+ >{/snippet}
195
+ </SectionTitle>
174
196
  <Query
175
197
  query={linearVelocityQuery}
176
198
  contentCx="h-6"
@@ -184,11 +206,14 @@
184
206
 
185
207
  {#if propertiesQuery.data?.linearAccelerationSupported}
186
208
  <div class="flex flex-col gap-2">
187
- <h3 class="font-semibold">
188
- GetLinearAcceleration <span class="text-subtle-2 font-normal"
189
- >(m/s<sup>2</sup>)</span
190
- >
191
- </h3>
209
+ <SectionTitle
210
+ title="GetLinearAcceleration"
211
+ api={MS_API}
212
+ >
213
+ {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal"
214
+ >(m/s<sup>2</sup>)</span
215
+ >{/snippet}
216
+ </SectionTitle>
192
217
  <Query
193
218
  query={linearAccelerationQuery}
194
219
  contentCx="h-6"
@@ -201,7 +226,10 @@
201
226
  {/if}
202
227
 
203
228
  <div class="flex flex-col gap-2">
204
- <h3 class="font-semibold">GetAccuracy</h3>
229
+ <SectionTitle
230
+ title="GetAccuracy"
231
+ api={MS_API}
232
+ />
205
233
  <Query
206
234
  query={accuracyQuery}
207
235
  contentCx="h-6"
@@ -226,13 +254,12 @@
226
254
  class="flex flex-col gap-4 p-4"
227
255
  aria-labelledby={headingID}
228
256
  >
229
- <div>
230
- <h3
231
- id={headingID}
232
- class="pb-1.5 font-semibold"
233
- >
234
- GetReadings
235
- </h3>
257
+ <div class="flex flex-col gap-0.5">
258
+ <SectionTitle
259
+ title="GetReadings"
260
+ api={MS_API}
261
+ headingId={headingID}
262
+ />
236
263
  <p class="text-subtle-2 text-xs">Get all the measurements and data from the sensor</p>
237
264
  </div>
238
265
 
@@ -66,6 +66,7 @@
66
66
  <div class="grid w-full grid-cols-3 divide-x">
67
67
  <ApiSection
68
68
  title="GetCurrent"
69
+ api="rdk:component:power_sensor"
69
70
  class="pb-5"
70
71
  >
71
72
  <Query
@@ -79,6 +80,7 @@
79
80
  </ApiSection>
80
81
  <ApiSection
81
82
  title="GetVoltage"
83
+ api="rdk:component:power_sensor"
82
84
  class="pb-5"
83
85
  >
84
86
  <Query
@@ -92,6 +94,7 @@
92
94
  </ApiSection>
93
95
  <ApiSection
94
96
  title="GetPower"
97
+ api="rdk:component:power_sensor"
95
98
  class="pb-5"
96
99
  >
97
100
  <Query
@@ -107,6 +110,7 @@
107
110
 
108
111
  <ApiSection
109
112
  title="GetReadings"
113
+ api="rdk:component:power_sensor"
110
114
  description="Get all the measurements and data that this power sensor provides"
111
115
  >
112
116
  <Switch
@@ -44,6 +44,7 @@
44
44
 
45
45
  <ApiSection
46
46
  title="GetReadings"
47
+ api="rdk:component:sensor"
47
48
  class="relative"
48
49
  >
49
50
  <Query
@@ -52,6 +52,7 @@
52
52
  <div class="grid grow grid-cols-3 divide-x">
53
53
  <ApiSection
54
54
  title="GetPosition"
55
+ api="rdk:component:servo"
55
56
  bottomText="Updates automatically"
56
57
  >
57
58
  <Query query={positionQuery}>
@@ -65,7 +66,10 @@
65
66
  {/if}
66
67
  </Query>
67
68
  </ApiSection>
68
- <ApiSection title="Move">
69
+ <ApiSection
70
+ title="Move"
71
+ api="rdk:component:servo"
72
+ >
69
73
  <Query query={positionQuery}>
70
74
  {#if positionQuery.data !== undefined}
71
75
  <Move
@@ -92,7 +96,10 @@
92
96
  </ApiSection>
93
97
  </div>
94
98
  <div class="ml-auto flex w-full max-w-40 flex-col divide-y">
95
- <ApiSection title="Stop">
99
+ <ApiSection
100
+ title="Stop"
101
+ api="rdk:component:servo"
102
+ >
96
103
  <StopButton
97
104
  error={stopMutation.error}
98
105
  onStop={() => {
@@ -102,6 +109,7 @@
102
109
  </ApiSection>
103
110
  <IsMoving
104
111
  client={ServoClient}
112
+ api="rdk:component:servo"
105
113
  {partID}
106
114
  {resourceName}
107
115
  />
@@ -22,7 +22,10 @@
22
22
  let planDeviationM = $state<number>()
23
23
  </script>
24
24
 
25
- <ApiSection title="MoveOnMap">
25
+ <ApiSection
26
+ title="MoveOnMap"
27
+ api="rdk:service:motion"
28
+ >
26
29
  <Label>
27
30
  Plan deviation <abbr>(m)</abbr>
28
31
 
@@ -200,7 +200,10 @@
200
200
  />
201
201
  </div>
202
202
 
203
- <ApiSection title="GetPosition">
203
+ <ApiSection
204
+ title="GetPosition"
205
+ api="rdk:service:slam"
206
+ >
204
207
  <Queries
205
208
  queries={[propertiesQuery, positionQuery]}
206
209
  contentCx="h-6"
@@ -16,6 +16,7 @@ export interface DetectionsContext {
16
16
  readonly current: Detection[];
17
17
  readonly byLabel: Record<string, DetectionGroup>;
18
18
  readonly hovered: SvelteSet<string>;
19
+ selected: string | null;
19
20
  }
20
21
  export declare const DETECTIONS_CONTEXT_KEY: unique symbol;
21
22
  export declare const createDetectionContext: (getDetections: () => DetectionPb[]) => DetectionsContext;
@@ -29,6 +29,7 @@ export const createDetectionContext = (getDetections) => {
29
29
  const detections = $derived(addIdsToDetections(getDetections()));
30
30
  const detectionsByLabel = $derived(categorize(detections));
31
31
  const hovered = new SvelteSet();
32
+ let selected = $state(null);
32
33
  const context = {
33
34
  get current() {
34
35
  return detections;
@@ -37,6 +38,12 @@ export const createDetectionContext = (getDetections) => {
37
38
  return detectionsByLabel;
38
39
  },
39
40
  hovered,
41
+ get selected() {
42
+ return selected;
43
+ },
44
+ set selected(value) {
45
+ selected = value;
46
+ },
40
47
  };
41
48
  return context;
42
49
  };