@viamrobotics/test-widgets 0.15.0 → 0.16.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 (139) hide show
  1. package/README.md +15 -1
  2. package/dist/api-docs-href.d.ts +2 -2
  3. package/dist/api-docs-href.js +0 -1
  4. package/dist/components/api-section.svelte +7 -6
  5. package/dist/components/api-section.svelte.d.ts +4 -3
  6. package/dist/components/boundary.svelte +51 -0
  7. package/dist/components/boundary.svelte.d.ts +5 -0
  8. package/dist/components/connection-status.svelte +57 -61
  9. package/dist/components/connection-status.svelte.d.ts +5 -5
  10. package/dist/components/content-rect.svelte +4 -5
  11. package/dist/components/content-rect.svelte.d.ts +2 -1
  12. package/dist/components/error.svelte +6 -5
  13. package/dist/components/error.svelte.d.ts +2 -1
  14. package/dist/components/index.d.ts +0 -1
  15. package/dist/components/index.js +0 -1
  16. package/dist/components/is-moving.svelte +4 -2
  17. package/dist/components/is-moving.svelte.d.ts +2 -1
  18. package/dist/components/maplibre/index.svelte +5 -6
  19. package/dist/components/maplibre/index.svelte.d.ts +3 -1
  20. package/dist/components/mutation-section.svelte +7 -5
  21. package/dist/components/mutation-section.svelte.d.ts +4 -2
  22. package/dist/components/pose-editor.svelte +83 -15
  23. package/dist/components/pose-editor.svelte.d.ts +11 -4
  24. package/dist/components/queries.svelte +7 -4
  25. package/dist/components/queries.svelte.d.ts +2 -1
  26. package/dist/components/query.svelte +4 -3
  27. package/dist/components/query.svelte.d.ts +2 -1
  28. package/dist/components/section/error-key.d.ts +2 -0
  29. package/dist/components/section/error-key.js +2 -0
  30. package/dist/components/section/index.d.ts +19 -0
  31. package/dist/components/section/index.js +19 -0
  32. package/dist/components/section/section-body.svelte +36 -0
  33. package/dist/components/section/section-body.svelte.d.ts +13 -0
  34. package/dist/components/section/section-errors.svelte +18 -0
  35. package/dist/components/section/section-errors.svelte.d.ts +6 -0
  36. package/dist/components/section/section-heading.svelte +21 -0
  37. package/dist/components/section/section-heading.svelte.d.ts +9 -0
  38. package/dist/components/section/section-loading.d.ts +4 -0
  39. package/dist/components/section/section-loading.js +10 -0
  40. package/dist/components/section/section-method.svelte +29 -0
  41. package/dist/components/section/section-method.svelte.d.ts +9 -0
  42. package/dist/components/section/section-placeholder.svelte +29 -0
  43. package/dist/components/section/section-placeholder.svelte.d.ts +7 -0
  44. package/dist/components/section/section-text.svelte +17 -0
  45. package/dist/components/section/section-text.svelte.d.ts +8 -0
  46. package/dist/components/section/section-tooltip.svelte +25 -0
  47. package/dist/components/section/section-tooltip.svelte.d.ts +7 -0
  48. package/dist/components/section/section.svelte +17 -0
  49. package/dist/components/section/section.svelte.d.ts +8 -0
  50. package/dist/components/section/use-section-errors.svelte.d.ts +18 -0
  51. package/dist/components/section/use-section-errors.svelte.js +39 -0
  52. package/dist/components/section-title.svelte +3 -1
  53. package/dist/components/section-title.svelte.d.ts +2 -1
  54. package/dist/components/stop.svelte +31 -14
  55. package/dist/components/stop.svelte.d.ts +6 -1
  56. package/dist/components/widgets/arm/arm.svelte +22 -11
  57. package/dist/components/widgets/arm/get-joint-positions-widget.svelte +1 -1
  58. package/dist/components/widgets/arm/joint-position-editor.svelte +105 -27
  59. package/dist/components/widgets/arm/joint-position-editor.svelte.d.ts +4 -3
  60. package/dist/components/widgets/arm/joint-position-slider.svelte +6 -2
  61. package/dist/components/widgets/arm/joint-position-slider.svelte.d.ts +2 -1
  62. package/dist/components/widgets/arm/manual-mode-widget.svelte +3 -2
  63. package/dist/components/widgets/arm/manual-mode.svelte +2 -2
  64. package/dist/components/widgets/arm/manual-mode.svelte.d.ts +1 -1
  65. package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte +12 -4
  66. package/dist/components/widgets/arm/move-to-joint-positions.svelte +14 -6
  67. package/dist/components/widgets/arm/move-to-position-control.svelte +25 -17
  68. package/dist/components/widgets/arm/move-to-position.svelte +97 -30
  69. package/dist/components/widgets/arm/move-to-position.svelte.d.ts +3 -1
  70. package/dist/components/widgets/arm/use-arm-motion-tracking.svelte.d.ts +16 -0
  71. package/dist/components/widgets/arm/use-arm-motion-tracking.svelte.js +37 -0
  72. package/dist/components/widgets/arm/use-edited-targets.svelte.d.ts +9 -0
  73. package/dist/components/widgets/arm/use-edited-targets.svelte.js +24 -0
  74. package/dist/components/widgets/audio-input/audio-input.svelte +5 -4
  75. package/dist/components/widgets/audio-input/get-properties-widget.svelte +2 -2
  76. package/dist/components/widgets/audio-output/audio-output.svelte +5 -4
  77. package/dist/components/widgets/audio-output/get-properties-widget.svelte +2 -2
  78. package/dist/components/widgets/base/base.svelte +8 -6
  79. package/dist/components/widgets/base/quick-move.svelte +5 -6
  80. package/dist/components/widgets/base/set-power.svelte +6 -4
  81. package/dist/components/widgets/base/set-velocity.svelte +6 -4
  82. package/dist/components/widgets/base/vec3-builder.svelte +3 -2
  83. package/dist/components/widgets/base/vec3-builder.svelte.d.ts +2 -1
  84. package/dist/components/widgets/board/analog-read.svelte +2 -4
  85. package/dist/components/widgets/board/analog-write.svelte +2 -4
  86. package/dist/components/widgets/board/gpio-read.svelte +2 -1
  87. package/dist/components/widgets/board/gpio-write.svelte +2 -1
  88. package/dist/components/widgets/board/pin-section.svelte +5 -6
  89. package/dist/components/widgets/board/pin-section.svelte.d.ts +3 -2
  90. package/dist/components/widgets/camera/camera.svelte +4 -3
  91. package/dist/components/widgets/camera/live-or-polling-video.svelte +22 -22
  92. package/dist/components/widgets/discovery/discovery.svelte +4 -3
  93. package/dist/components/widgets/encoder/encoder.svelte +5 -3
  94. package/dist/components/widgets/encoder/get-position-widget.svelte +1 -1
  95. package/dist/components/widgets/gantry/gantry.svelte +13 -7
  96. package/dist/components/widgets/gantry/get-position-widget.svelte +1 -1
  97. package/dist/components/widgets/gantry/quick-move-widget.svelte +1 -1
  98. package/dist/components/widgets/generic/generic.svelte +4 -1
  99. package/dist/components/widgets/gripper/gripper.svelte +8 -6
  100. package/dist/components/widgets/gripper/is-holding-something.svelte +3 -2
  101. package/dist/components/widgets/input-controller/input-controller.svelte +4 -3
  102. package/dist/components/widgets/ml-model-service/ml-model-service.svelte +1 -1
  103. package/dist/components/widgets/motion/frame-select.svelte +4 -2
  104. package/dist/components/widgets/motion/frame-select.svelte.d.ts +2 -1
  105. package/dist/components/widgets/motion/motion.svelte +9 -5
  106. package/dist/components/widgets/motion/move.svelte +5 -3
  107. package/dist/components/widgets/motor/motor.svelte +12 -10
  108. package/dist/components/widgets/movement-sensor/get-accuracy-widget.svelte +2 -2
  109. package/dist/components/widgets/movement-sensor/get-compass-heading-widget.svelte +2 -2
  110. package/dist/components/widgets/movement-sensor/get-orientation-widget.svelte +2 -2
  111. package/dist/components/widgets/movement-sensor/get-position-widget.svelte +2 -2
  112. package/dist/components/widgets/movement-sensor/movement-sensor.svelte +17 -18
  113. package/dist/components/widgets/power-sensor/get-current-widget.svelte +2 -2
  114. package/dist/components/widgets/power-sensor/get-power-widget.svelte +2 -2
  115. package/dist/components/widgets/power-sensor/get-voltage-widget.svelte +2 -2
  116. package/dist/components/widgets/power-sensor/power-sensor.svelte +13 -11
  117. package/dist/components/widgets/sensor/sensor.svelte +4 -3
  118. package/dist/components/widgets/servo/servo.svelte +9 -4
  119. package/dist/components/widgets/slam/get-position-widget.svelte +2 -2
  120. package/dist/components/widgets/slam/move-on-map.svelte +3 -1
  121. package/dist/components/widgets/slam/slam.svelte +10 -5
  122. package/dist/components/widgets/switch/position-view.svelte +1 -1
  123. package/dist/components/widgets/switch/switch.svelte +1 -1
  124. package/dist/components/widgets/vision-service/detection-row.svelte +4 -2
  125. package/dist/components/widgets/vision-service/detection-row.svelte.d.ts +2 -1
  126. package/dist/components/widgets/vision-service/fonts/public-sans.json +1 -0
  127. package/dist/components/widgets/vision-service/fonts/public-sans.png +0 -0
  128. package/dist/components/widgets/vision-service/image.svelte +4 -4
  129. package/dist/components/widgets/vision-service/legend.svelte +4 -4
  130. package/dist/components/widgets/vision-service/public-sans-font.d.ts +5 -0
  131. package/dist/components/widgets/vision-service/public-sans-font.js +14 -0
  132. package/dist/components/widgets/vision-service/vision-service.svelte +2 -2
  133. package/dist/index.d.ts +1 -1
  134. package/dist/index.js +0 -1
  135. package/package.json +24 -11
  136. package/dist/components/board/pin-section.svelte +0 -28
  137. package/dist/components/board/pin-section.svelte.d.ts +0 -9
  138. package/dist/components/section-group.svelte +0 -64
  139. package/dist/components/section-group.svelte.d.ts +0 -14
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetCompassHeading"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <CompassHeading data={query.data} />
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetOrientation"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <Orientation data={query.data} />
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetPosition"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <Position data={query.data} />
@@ -10,8 +10,7 @@
10
10
  import RefetchController from '../../refetch-controller.svelte'
11
11
  import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
12
12
  import SectionTitle from '../../section-title.svelte'
13
-
14
- const MS_API = 'rdk:component:movement_sensor'
13
+ import { ResourceTriplets } from '../../../resource-triplet'
15
14
 
16
15
  import Accuracy from './accuracy.svelte'
17
16
  import CompassHeading from './compass-heading.svelte'
@@ -101,7 +100,7 @@
101
100
 
102
101
  <Query
103
102
  query={propertiesQuery}
104
- contentCx="p-4 h-14"
103
+ class="h-14 p-4"
105
104
  >
106
105
  <div class="@container">
107
106
  <div class="flex flex-wrap text-xs @4xl:flex-nowrap">
@@ -110,11 +109,11 @@
110
109
  <div class="flex flex-col gap-2">
111
110
  <SectionTitle
112
111
  title="GetPosition"
113
- api={MS_API}
112
+ api={ResourceTriplets.MovementSensor}
114
113
  />
115
114
  <Query
116
115
  query={positionQuery}
117
- contentCx="h-6"
116
+ class="h-6"
118
117
  >
119
118
  {#if positionQuery.data !== undefined}
120
119
  <Position data={positionQuery.data} />
@@ -127,14 +126,14 @@
127
126
  <div class="flex flex-col gap-2">
128
127
  <SectionTitle
129
128
  title="GetOrientation"
130
- api={MS_API}
129
+ api={ResourceTriplets.MovementSensor}
131
130
  >
132
131
  {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º)</span
133
132
  >{/snippet}
134
133
  </SectionTitle>
135
134
  <Query
136
135
  query={orientationQuery}
137
- contentCx="h-6"
136
+ class="h-6"
138
137
  >
139
138
  {#if orientationQuery.data !== undefined}
140
139
  <Orientation data={orientationQuery.data} />
@@ -147,14 +146,14 @@
147
146
  <div class="flex flex-col gap-2">
148
147
  <SectionTitle
149
148
  title="GetCompassHeading"
150
- api={MS_API}
149
+ api={ResourceTriplets.MovementSensor}
151
150
  >
152
151
  {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º)</span
153
152
  >{/snippet}
154
153
  </SectionTitle>
155
154
  <Query
156
155
  query={compassHeadingQuery}
157
- contentCx="h-6"
156
+ class="h-6"
158
157
  >
159
158
  {#if compassHeadingQuery.data !== undefined}
160
159
  <CompassHeading data={compassHeadingQuery.data} />
@@ -169,14 +168,14 @@
169
168
  <div class="flex flex-col gap-2">
170
169
  <SectionTitle
171
170
  title="GetAngularVelocity"
172
- api={MS_API}
171
+ api={ResourceTriplets.MovementSensor}
173
172
  >
174
173
  {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(º/s)</span
175
174
  >{/snippet}
176
175
  </SectionTitle>
177
176
  <Query
178
177
  query={angularVelocityQuery}
179
- contentCx="h-6"
178
+ class="h-6"
180
179
  >
181
180
  {#if angularVelocityQuery.data !== undefined}
182
181
  <Vector3 data={angularVelocityQuery.data} />
@@ -189,14 +188,14 @@
189
188
  <div class="flex flex-col gap-2">
190
189
  <SectionTitle
191
190
  title="GetLinearVelocity"
192
- api={MS_API}
191
+ api={ResourceTriplets.MovementSensor}
193
192
  >
194
193
  {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal">(m/s)</span
195
194
  >{/snippet}
196
195
  </SectionTitle>
197
196
  <Query
198
197
  query={linearVelocityQuery}
199
- contentCx="h-6"
198
+ class="h-6"
200
199
  >
201
200
  {#if linearVelocityQuery.data !== undefined}
202
201
  <Vector3 data={linearVelocityQuery.data} />
@@ -209,7 +208,7 @@
209
208
  <div class="flex flex-col gap-2">
210
209
  <SectionTitle
211
210
  title="GetLinearAcceleration"
212
- api={MS_API}
211
+ api={ResourceTriplets.MovementSensor}
213
212
  >
214
213
  {#snippet suffix()}<span class="text-subtle-2 text-xs font-normal"
215
214
  >(m/s<sup>2</sup>)</span
@@ -217,7 +216,7 @@
217
216
  </SectionTitle>
218
217
  <Query
219
218
  query={linearAccelerationQuery}
220
- contentCx="h-6"
219
+ class="h-6"
221
220
  >
222
221
  {#if linearAccelerationQuery.data !== undefined}
223
222
  <Vector3 data={linearAccelerationQuery.data} />
@@ -229,11 +228,11 @@
229
228
  <div class="flex flex-col gap-2">
230
229
  <SectionTitle
231
230
  title="GetAccuracy"
232
- api={MS_API}
231
+ api={ResourceTriplets.MovementSensor}
233
232
  />
234
233
  <Query
235
234
  query={accuracyQuery}
236
- contentCx="h-6"
235
+ class="h-6"
237
236
  >
238
237
  {#if accuracyQuery.data !== undefined}
239
238
  <Accuracy data={accuracyQuery.data} />
@@ -259,7 +258,7 @@
259
258
  <div class="flex flex-col gap-0.5">
260
259
  <SectionTitle
261
260
  title="GetReadings"
262
- api={MS_API}
261
+ api={ResourceTriplets.MovementSensor}
263
262
  headingId={headingID}
264
263
  />
265
264
  <p class="text-subtle-2 text-xs">Get all the measurements and data from the sensor</p>
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetCurrent"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <CurrentReading data={query.data} />
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetPower"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <PowerReading data={query.data} />
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetVoltage"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <VoltageReading data={query.data} />
@@ -10,6 +10,7 @@
10
10
  import ReadingsList from '../../readings-list.svelte'
11
11
  import RefetchController from '../../refetch-controller.svelte'
12
12
  import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
13
+ import { ResourceTriplets } from '../../../resource-triplet'
13
14
 
14
15
  import CurrentReading from './current-reading.svelte'
15
16
  import PowerReading from './power-reading.svelte'
@@ -67,12 +68,12 @@
67
68
  <div class="grid w-full grid-cols-1 divide-y @2xl:grid-cols-3 @2xl:divide-x @2xl:divide-y-0">
68
69
  <ApiSection
69
70
  title="GetCurrent"
70
- api="rdk:component:power_sensor"
71
- class="pb-5"
71
+ api={ResourceTriplets.PowerSensor}
72
+ class="grow flex-col gap-4 pb-5"
72
73
  >
73
74
  <Query
74
75
  query={currentQuery}
75
- contentCx="h-6"
76
+ class="h-6"
76
77
  >
77
78
  {#if currentQuery.data !== undefined}
78
79
  <CurrentReading data={currentQuery.data} />
@@ -81,12 +82,12 @@
81
82
  </ApiSection>
82
83
  <ApiSection
83
84
  title="GetVoltage"
84
- api="rdk:component:power_sensor"
85
- class="pb-5"
85
+ api={ResourceTriplets.PowerSensor}
86
+ class="grow flex-col gap-4 pb-5"
86
87
  >
87
88
  <Query
88
89
  query={voltageQuery}
89
- contentCx="h-6"
90
+ class="h-6"
90
91
  >
91
92
  {#if voltageQuery.data !== undefined}
92
93
  <VoltageReading data={voltageQuery.data} />
@@ -95,12 +96,12 @@
95
96
  </ApiSection>
96
97
  <ApiSection
97
98
  title="GetPower"
98
- api="rdk:component:power_sensor"
99
- class="pb-5"
99
+ api={ResourceTriplets.PowerSensor}
100
+ class="grow flex-col gap-4 pb-5"
100
101
  >
101
102
  <Query
102
103
  query={powerQuery}
103
- contentCx="h-6"
104
+ class="h-6"
104
105
  >
105
106
  {#if powerQuery.data !== undefined}
106
107
  <PowerReading data={powerQuery.data} />
@@ -111,8 +112,9 @@
111
112
  </div>
112
113
 
113
114
  <ApiSection
115
+ class="grow flex-col gap-4"
114
116
  title="GetReadings"
115
- api="rdk:component:power_sensor"
117
+ api={ResourceTriplets.PowerSensor}
116
118
  description="Get all the measurements and data that this power sensor provides"
117
119
  >
118
120
  <Switch
@@ -127,7 +129,7 @@
127
129
  >
128
130
  <Query
129
131
  query={readingsQuery}
130
- contentCx="h-6"
132
+ class="h-6"
131
133
  >
132
134
  {#if readingsQuery.data !== undefined}
133
135
  <ReadingsList data={readingsQuery.data} />
@@ -8,6 +8,7 @@
8
8
  import ReadingsList from '../../readings-list.svelte'
9
9
  import RefetchController from '../../refetch-controller.svelte'
10
10
  import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
11
+ import { ResourceTriplets } from '../../../resource-triplet'
11
12
 
12
13
  interface Props {
13
14
  partID: string
@@ -44,12 +45,12 @@
44
45
 
45
46
  <ApiSection
46
47
  title="GetReadings"
47
- api="rdk:component:sensor"
48
- class="relative"
48
+ api={ResourceTriplets.Sensor}
49
+ class="relative grow flex-col gap-4"
49
50
  >
50
51
  <Query
51
52
  query={readingsQuery}
52
- contentCx="h-6"
53
+ class="h-6"
53
54
  >
54
55
  {#if readingsQuery.data !== undefined}
55
56
  <ReadingsList data={readingsQuery.data} />
@@ -12,6 +12,7 @@
12
12
  import Query from '../../query.svelte'
13
13
  import StopButton from '../../stop-button.svelte'
14
14
  import { formatNumeric } from '../../../format'
15
+ import { ResourceTriplets } from '../../../resource-triplet'
15
16
 
16
17
  import Move from './move.svelte'
17
18
  import QuickMove from './quick-move.svelte'
@@ -53,8 +54,9 @@
53
54
  <div class="@container grow">
54
55
  <div class="grid grid-cols-1 divide-y @2xl:grid-cols-3 @2xl:divide-x @2xl:divide-y-0">
55
56
  <ApiSection
57
+ class="grow flex-col gap-4"
56
58
  title="GetPosition"
57
- api="rdk:component:servo"
59
+ api={ResourceTriplets.Servo}
58
60
  bottomText="Updates automatically"
59
61
  >
60
62
  <Query query={positionQuery}>
@@ -70,8 +72,9 @@
70
72
  </Query>
71
73
  </ApiSection>
72
74
  <ApiSection
75
+ class="grow flex-col gap-4"
73
76
  title="Move"
74
- api="rdk:component:servo"
77
+ api={ResourceTriplets.Servo}
75
78
  >
76
79
  <Query query={positionQuery}>
77
80
  {#if positionQuery.data !== undefined}
@@ -84,6 +87,7 @@
84
87
  </Query>
85
88
  </ApiSection>
86
89
  <ApiSection
90
+ class="grow flex-col gap-4"
87
91
  title="Quick move"
88
92
  bottomText="Press a button to execute"
89
93
  >
@@ -101,8 +105,9 @@
101
105
  </div>
102
106
  <div class="flex flex-col divide-y @4xl:ml-auto @4xl:w-full @4xl:max-w-40">
103
107
  <ApiSection
108
+ class="grow flex-col gap-4"
104
109
  title="Stop"
105
- api="rdk:component:servo"
110
+ api={ResourceTriplets.Servo}
106
111
  >
107
112
  <StopButton
108
113
  error={stopMutation.error}
@@ -113,7 +118,7 @@
113
118
  </ApiSection>
114
119
  <IsMoving
115
120
  client={ServoClient}
116
- api="rdk:component:servo"
121
+ api={ResourceTriplets.Servo}
117
122
  {partID}
118
123
  {resourceName}
119
124
  />
@@ -25,11 +25,11 @@
25
25
 
26
26
  <ApiSection
27
27
  title="GetPosition"
28
- class="grow"
28
+ class="grow flex-col gap-4"
29
29
  >
30
30
  <Query
31
31
  {query}
32
- contentCx="h-6"
32
+ class="h-6"
33
33
  >
34
34
  {#if query.data !== undefined}
35
35
  <Position position={query.data} />
@@ -4,6 +4,7 @@
4
4
  import ApiSection from '../../api-section.svelte'
5
5
  import ErrorDisplay from '../../error.svelte'
6
6
  import { numberValueFromEvent } from '../../../event-handlers'
7
+ import { ResourceTriplets } from '../../../resource-triplet'
7
8
 
8
9
  import type { PosePosition } from './pose'
9
10
 
@@ -23,8 +24,9 @@
23
24
  </script>
24
25
 
25
26
  <ApiSection
27
+ class="grow flex-col gap-4"
26
28
  title="MoveOnMap"
27
- api="rdk:service:motion"
29
+ api={ResourceTriplets.Motion}
28
30
  >
29
31
  <Label>
30
32
  Plan deviation <abbr>(m)</abbr>
@@ -24,6 +24,7 @@
24
24
  RefetchIntervals,
25
25
  } from '../../refetch-interval-store.svelte'
26
26
  import SlamMap2D from '../../slam/map2d/index.svelte'
27
+ import { ResourceTriplets } from '../../../resource-triplet'
27
28
 
28
29
  import type { PosePosition } from './pose'
29
30
 
@@ -180,7 +181,7 @@
180
181
  {#snippet connected()}
181
182
  <Query
182
183
  query={propertiesQuery}
183
- contentCx="p-4 h-14"
184
+ class="h-14 p-4"
184
185
  >
185
186
  {#if propertiesQuery.data?.cloudSlam}
186
187
  <div class="p-4 text-sm">
@@ -202,12 +203,13 @@
202
203
  </div>
203
204
 
204
205
  <ApiSection
206
+ class="grow flex-col gap-4"
205
207
  title="GetPosition"
206
- api="rdk:service:slam"
208
+ api={ResourceTriplets.Slam}
207
209
  >
208
210
  <Queries
209
211
  queries={[propertiesQuery, positionQuery]}
210
- contentCx="h-6"
212
+ class="h-6"
211
213
  >
212
214
  {#if positionQuery.data !== undefined}
213
215
  <Position position={positionQuery.data} />
@@ -215,7 +217,10 @@
215
217
  </Queries>
216
218
  </ApiSection>
217
219
 
218
- <ApiSection title="Motion">
220
+ <ApiSection
221
+ class="grow flex-col gap-4"
222
+ title="Motion"
223
+ >
219
224
  <Label>
220
225
  Base name
221
226
 
@@ -247,7 +252,7 @@
247
252
  <div class="flex w-full">
248
253
  <Queries
249
254
  queries={[propertiesQuery, positionQuery, pointCloudMapQuery]}
250
- contentCx="p-4 h-auto"
255
+ class="h-auto p-4"
251
256
  >
252
257
  {#if positionQuery.data?.pose !== undefined && pointCloudMapQuery.data !== undefined}
253
258
  <div class="h-80 w-full @2xl:h-full">
@@ -45,7 +45,7 @@
45
45
 
46
46
  <Queries
47
47
  queries={[positionQuery, numPositionsQuery]}
48
- contentCx="h-7.5"
48
+ class="h-7.5"
49
49
  >
50
50
  {#if positionQuery.data !== undefined && numPositionsQuery.data !== undefined}
51
51
  <Position
@@ -45,7 +45,7 @@
45
45
  <div class="p-4">
46
46
  <Queries
47
47
  queries={[positionQuery, numPositionsQuery]}
48
- contentCx="h-7.5"
48
+ class="h-7.5"
49
49
  >
50
50
  {#if positionQuery.data !== undefined && numPositionsQuery.data !== undefined}
51
51
  <Position
@@ -1,11 +1,13 @@
1
1
  <script lang="ts">
2
+ import type { Snippet } from 'svelte'
3
+
2
4
  import type { Detection } from './context.svelte.js'
3
5
 
4
6
  import { useDetections } from './context.svelte.js'
5
7
 
6
8
  interface Props {
7
9
  detection: Detection
8
- label: string
10
+ label: Snippet
9
11
  }
10
12
 
11
13
  let { detection, label }: Props = $props()
@@ -33,6 +35,6 @@
33
35
  context.selected = context.selected === detection.id ? null : detection.id
34
36
  }}
35
37
  >
36
- {label}
38
+ {@render label()}
37
39
  <span class="text-subtle-2 pl-1">{detection.confidence}%</span>
38
40
  </button>
@@ -1,7 +1,8 @@
1
+ import type { Snippet } from 'svelte';
1
2
  import type { Detection } from './context.svelte.ts';
2
3
  interface Props {
3
4
  detection: Detection;
4
- label: string;
5
+ label: Snippet;
5
6
  }
6
7
  declare const DetectionRow: import("svelte").Component<Props, {}, "">;
7
8
  type DetectionRow = ReturnType<typeof DetectionRow>;