@viamrobotics/test-widgets 0.14.0 → 0.15.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.
- package/README.md +3 -10
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/maplibre/hooks.svelte.d.ts +2 -2
- package/dist/components/maplibre/plugins/raycast.svelte.js +3 -1
- package/dist/components/widgets/arm/arm.svelte +8 -0
- package/dist/components/widgets/arm/manual-mode-widget.svelte +71 -0
- package/dist/components/widgets/arm/manual-mode-widget.svelte.d.ts +9 -0
- package/dist/components/widgets/arm/manual-mode.svelte +152 -0
- package/dist/components/widgets/arm/manual-mode.svelte.d.ts +11 -0
- package/dist/components/widgets/arm/move-to-position-control.svelte +15 -6
- package/dist/components/widgets/arm/use-countdown.svelte.d.ts +6 -0
- package/dist/components/widgets/arm/use-countdown.svelte.js +37 -0
- package/dist/registry.js +2 -1
- package/package.json +9 -15
package/README.md
CHANGED
|
@@ -24,18 +24,11 @@ If you resolve widgets at runtime from a resource (for example, a control panel
|
|
|
24
24
|
import { apiWidgetsForResource, widgetForResource } from '@viamrobotics/test-widgets/registry'
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- **`@viamrobotics/test-widgets/registry`** — the lookups `apiWidgetsForResource(resource)`, `widgetForResource(resource)`, and `availableAPIWidgets()`, which resolve any resource, component or service. The registry references every widget, so importing it pulls **all** widgets
|
|
27
|
+
- **`@viamrobotics/test-widgets/registry`** — the lookups `apiWidgetsForResource(resource)`, `widgetForResource(resource)`, and `availableAPIWidgets()`, which resolve any resource, component or service. The registry references every widget, so importing it pulls **all** widgets, `maplibre-gl` included, into your build. Keeping these lookups out of the root is what lets the root stay tree-shakeable.
|
|
28
28
|
|
|
29
|
-
###
|
|
29
|
+
### maplibre-gl
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| Optional peer | Required by |
|
|
34
|
-
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
35
|
-
| `maplibre-gl` | `MovementSensorWidget` (a **component** — plots GPS position on a map), `NavigationServiceWidget`, and the `maplibre` / `navigation-map` building blocks |
|
|
36
|
-
| `@viamrobotics/three` | `NavigationServiceWidget` (navigation-map 3D geometry) |
|
|
37
|
-
|
|
38
|
-
So a consumer that names widgets statically installs a peer only for the widgets it renders: `maplibre-gl` only if it renders `MovementSensorWidget` or `NavigationServiceWidget`, and `@viamrobotics/three` only for `NavigationServiceWidget`. Importing `/registry` references every widget, so it needs both.
|
|
31
|
+
`maplibre-gl` is a required peer and by far the heaviest one. It reaches your bundle only if you import something that renders a map: `MovementSensorWidget`, `NavigationServiceWidget`, the `maplibre` and `navigation-map` building blocks, or `/registry`. Otherwise it is tree-shaken out.
|
|
39
32
|
|
|
40
33
|
## Playground
|
|
41
34
|
|
|
@@ -3,6 +3,7 @@ export { default as SectionTitle } from './section-title.svelte';
|
|
|
3
3
|
export { default as ArmWidget } from './widgets/arm/arm.svelte';
|
|
4
4
|
export { default as ArmGetJointPositionsWidget } from './widgets/arm/get-joint-positions-widget.svelte';
|
|
5
5
|
export { default as ArmIsMovingWidget } from './widgets/arm/is-moving-widget.svelte';
|
|
6
|
+
export { default as ArmManualModeWidget } from './widgets/arm/manual-mode-widget.svelte';
|
|
6
7
|
export { default as ArmMoveToJointPositionsWidget } from './widgets/arm/move-to-joint-positions-widget.svelte';
|
|
7
8
|
export { default as ArmMoveToPositionWidget } from './widgets/arm/move-to-position-widget.svelte';
|
|
8
9
|
export { default as ArmQuickMoveWidget } from './widgets/arm/quick-move-widget.svelte';
|
package/dist/components/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { default as SectionTitle } from './section-title.svelte';
|
|
|
3
3
|
export { default as ArmWidget } from './widgets/arm/arm.svelte';
|
|
4
4
|
export { default as ArmGetJointPositionsWidget } from './widgets/arm/get-joint-positions-widget.svelte';
|
|
5
5
|
export { default as ArmIsMovingWidget } from './widgets/arm/is-moving-widget.svelte';
|
|
6
|
+
export { default as ArmManualModeWidget } from './widgets/arm/manual-mode-widget.svelte';
|
|
6
7
|
export { default as ArmMoveToJointPositionsWidget } from './widgets/arm/move-to-joint-positions-widget.svelte';
|
|
7
8
|
export { default as ArmMoveToPositionWidget } from './widgets/arm/move-to-position-widget.svelte';
|
|
8
9
|
export { default as ArmQuickMoveWidget } from './widgets/arm/quick-move-widget.svelte';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LngLat, Map,
|
|
1
|
+
import type { LngLat, Map, MapEventType } from 'maplibre-gl';
|
|
2
2
|
import { type Writable } from 'svelte/store';
|
|
3
3
|
import { type MapProvider } from './types';
|
|
4
4
|
interface MapContext {
|
|
@@ -29,5 +29,5 @@ export declare const useMapLibre: () => MapContext;
|
|
|
29
29
|
/**
|
|
30
30
|
* Allows attaching events to a <MapLibre> instance. Must be called within a child of this component.
|
|
31
31
|
*/
|
|
32
|
-
export declare const useMapLibreEvent: (event:
|
|
32
|
+
export declare const useMapLibreEvent: <T extends keyof MapEventType>(event: T, listener: (ev: MapEventType[T]) => void) => void;
|
|
33
33
|
export {};
|
|
@@ -9,7 +9,9 @@ export const useMapLibreThreeRaycast = (cameraSignal) => {
|
|
|
9
9
|
const map = fromStore(context.map);
|
|
10
10
|
const pointer = new Vector2();
|
|
11
11
|
const handleMouseMove = (event) => {
|
|
12
|
-
|
|
12
|
+
// `event.point` is measured against the canvas, so normalize by the canvas' own CSS size.
|
|
13
|
+
const canvas = map.current.getCanvas();
|
|
14
|
+
pointer.set((event.point.x / canvas.clientWidth) * 2 - 1, -(event.point.y / canvas.clientHeight) * 2 + 1);
|
|
13
15
|
};
|
|
14
16
|
$effect(() => {
|
|
15
17
|
map.current.on('mousemove', handleMouseMove);
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
import GetJointPositions from './get-joint-positions.svelte'
|
|
16
16
|
import { getJointPositionLimits, type KinematicsJSON } from './joint-position-limits'
|
|
17
|
+
import ManualModeWidget from './manual-mode-widget.svelte'
|
|
17
18
|
import MoveToJointPositions from './move-to-joint-positions.svelte'
|
|
18
19
|
import MoveToPositionControl from './move-to-position-control.svelte'
|
|
19
20
|
|
|
@@ -50,6 +51,13 @@
|
|
|
50
51
|
<ConnectionStatus {partID}>
|
|
51
52
|
{#snippet connected()}
|
|
52
53
|
<div class="@container">
|
|
54
|
+
<!-- Full-width manual mode band, rendered only when the arm supports it -->
|
|
55
|
+
<ManualModeWidget
|
|
56
|
+
{partID}
|
|
57
|
+
{resourceName}
|
|
58
|
+
band
|
|
59
|
+
/>
|
|
60
|
+
|
|
53
61
|
<div class="flex flex-col gap-4 @2xl:flex-row @2xl:gap-0 @2xl:divide-x">
|
|
54
62
|
<!-- Main control sections -->
|
|
55
63
|
<div
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ArmClient } from '@viamrobotics/sdk'
|
|
3
|
+
import {
|
|
4
|
+
createResourceClient,
|
|
5
|
+
createResourceMutation,
|
|
6
|
+
createResourceQuery,
|
|
7
|
+
} from '@viamrobotics/svelte-sdk'
|
|
8
|
+
|
|
9
|
+
import ApiSection from '../../api-section.svelte'
|
|
10
|
+
|
|
11
|
+
import ManualMode from './manual-mode.svelte'
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
partID: string
|
|
15
|
+
resourceName: string
|
|
16
|
+
/** Render as a one-line band with an inline title instead of a titled ApiSection. */
|
|
17
|
+
band?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const { partID, resourceName, band = false }: Props = $props()
|
|
21
|
+
|
|
22
|
+
const client = createResourceClient(
|
|
23
|
+
ArmClient,
|
|
24
|
+
() => partID,
|
|
25
|
+
() => resourceName
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
const propertiesQuery = createResourceQuery(client, 'getProperties')
|
|
29
|
+
const supportsManualMode = $derived(propertiesQuery.data?.supportManualMode === true)
|
|
30
|
+
|
|
31
|
+
const manualModeQuery = createResourceQuery(client, 'getManualMode', () => ({
|
|
32
|
+
refetchInterval: 1000,
|
|
33
|
+
enabled: supportsManualMode,
|
|
34
|
+
}))
|
|
35
|
+
|
|
36
|
+
const setManualModeMutation = createResourceMutation(client, 'setManualMode')
|
|
37
|
+
|
|
38
|
+
const setManualMode = (manualMode: boolean, enabledFor: number) => {
|
|
39
|
+
setManualModeMutation.mutate([manualMode, enabledFor], {})
|
|
40
|
+
}
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
{#if supportsManualMode}
|
|
44
|
+
{#if band}
|
|
45
|
+
<section
|
|
46
|
+
aria-label="SetManualMode"
|
|
47
|
+
class="border-b px-4 py-3"
|
|
48
|
+
>
|
|
49
|
+
<ManualMode
|
|
50
|
+
title="ManualMode"
|
|
51
|
+
isManualMode={manualModeQuery.data ?? false}
|
|
52
|
+
isPending={setManualModeMutation.isPending}
|
|
53
|
+
{setManualMode}
|
|
54
|
+
lastError={setManualModeMutation.error}
|
|
55
|
+
/>
|
|
56
|
+
</section>
|
|
57
|
+
{:else}
|
|
58
|
+
<ApiSection
|
|
59
|
+
title="SetManualMode"
|
|
60
|
+
api="rdk:component:arm"
|
|
61
|
+
class="grow"
|
|
62
|
+
>
|
|
63
|
+
<ManualMode
|
|
64
|
+
isManualMode={manualModeQuery.data ?? false}
|
|
65
|
+
isPending={setManualModeMutation.isPending}
|
|
66
|
+
{setManualMode}
|
|
67
|
+
lastError={setManualModeMutation.error}
|
|
68
|
+
/>
|
|
69
|
+
</ApiSection>
|
|
70
|
+
{/if}
|
|
71
|
+
{/if}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
partID: string;
|
|
3
|
+
resourceName: string;
|
|
4
|
+
/** Render as a one-line band with an inline title instead of a titled ApiSection. */
|
|
5
|
+
band?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ManualModeWidget: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type ManualModeWidget = ReturnType<typeof ManualModeWidget>;
|
|
9
|
+
export default ManualModeWidget;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Button, Icon, Label, NumericInput, Tooltip } from '@viamrobotics/prime-core'
|
|
3
|
+
|
|
4
|
+
import ErrorDisplay from '../../error.svelte'
|
|
5
|
+
import StatusPill from '../../status-pill.svelte'
|
|
6
|
+
import { numberValueFromEvent } from '../../../event-handlers'
|
|
7
|
+
|
|
8
|
+
import { useCountdown } from './use-countdown.svelte'
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
/** Inline heading at the start of the row, for hosts that render no section title. */
|
|
12
|
+
title?: string
|
|
13
|
+
isManualMode: boolean
|
|
14
|
+
isPending: boolean
|
|
15
|
+
setManualMode: (manualMode: boolean, enabledFor: number) => void
|
|
16
|
+
lastError: Error | null
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { title, isManualMode, isPending, setManualMode, lastError }: Props = $props()
|
|
20
|
+
|
|
21
|
+
let enabledFor = $state(90)
|
|
22
|
+
let enableAfter = $state(20)
|
|
23
|
+
let lastAction = $state<'enter' | 'exit' | undefined>()
|
|
24
|
+
|
|
25
|
+
const countdown = useCountdown(() => {
|
|
26
|
+
setManualMode(true, enabledFor)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const isEntering = $derived(countdown.isCounting || (isPending && lastAction === 'enter'))
|
|
30
|
+
const isExiting = $derived(isPending && lastAction === 'exit')
|
|
31
|
+
|
|
32
|
+
const enter = () => {
|
|
33
|
+
lastAction = 'enter'
|
|
34
|
+
countdown.start(enableAfter)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const exit = () => {
|
|
38
|
+
if (countdown.isCounting) {
|
|
39
|
+
countdown.cancel()
|
|
40
|
+
return
|
|
41
|
+
}
|
|
42
|
+
if (isManualMode) {
|
|
43
|
+
lastAction = 'exit'
|
|
44
|
+
setManualMode(false, 0)
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<div class="flex min-w-0 flex-col gap-2">
|
|
50
|
+
<div class="flex flex-wrap items-center gap-3">
|
|
51
|
+
{#if title}
|
|
52
|
+
<h3 class="font-mono text-sm font-semibold">{title}</h3>
|
|
53
|
+
{/if}
|
|
54
|
+
<Button
|
|
55
|
+
variant="dark"
|
|
56
|
+
disabled={isPending || countdown.isCounting}
|
|
57
|
+
progress={isEntering ? 'indeterminate' : undefined}
|
|
58
|
+
onclick={enter}
|
|
59
|
+
>
|
|
60
|
+
Enter
|
|
61
|
+
</Button>
|
|
62
|
+
<Button
|
|
63
|
+
variant="dark"
|
|
64
|
+
disabled={isPending}
|
|
65
|
+
progress={isExiting ? 'indeterminate' : undefined}
|
|
66
|
+
onclick={exit}
|
|
67
|
+
>
|
|
68
|
+
Exit
|
|
69
|
+
</Button>
|
|
70
|
+
{#if countdown.isCounting}
|
|
71
|
+
<span class="text-subtle-2 text-xs">Enabling in {countdown.secondsRemaining}s</span>
|
|
72
|
+
{/if}
|
|
73
|
+
<Label
|
|
74
|
+
position="left"
|
|
75
|
+
cx="max-w-fit gap-1 text-xs"
|
|
76
|
+
>
|
|
77
|
+
<span class="flex flex-row items-center gap-1 whitespace-nowrap">
|
|
78
|
+
Enabled for (s)
|
|
79
|
+
<Tooltip>
|
|
80
|
+
<Icon
|
|
81
|
+
name="information-outline"
|
|
82
|
+
cx="text-gray-6"
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
<p
|
|
86
|
+
slot="description"
|
|
87
|
+
class="text-xs"
|
|
88
|
+
>
|
|
89
|
+
How long manual mode stays enabled, in seconds. 0 means no time limit.
|
|
90
|
+
</p>
|
|
91
|
+
</Tooltip>
|
|
92
|
+
</span>
|
|
93
|
+
|
|
94
|
+
<span
|
|
95
|
+
slot="input"
|
|
96
|
+
class="w-20"
|
|
97
|
+
>
|
|
98
|
+
<NumericInput
|
|
99
|
+
value={enabledFor}
|
|
100
|
+
on:change={(event) => {
|
|
101
|
+
enabledFor = numberValueFromEvent(event) ?? 0
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
</span>
|
|
105
|
+
</Label>
|
|
106
|
+
<Label
|
|
107
|
+
position="left"
|
|
108
|
+
cx="max-w-fit gap-1 text-xs"
|
|
109
|
+
>
|
|
110
|
+
<span class="flex flex-row items-center gap-1 whitespace-nowrap">
|
|
111
|
+
Enable after (s)
|
|
112
|
+
<Tooltip>
|
|
113
|
+
<Icon
|
|
114
|
+
name="information-outline"
|
|
115
|
+
cx="text-gray-6"
|
|
116
|
+
/>
|
|
117
|
+
|
|
118
|
+
<p
|
|
119
|
+
slot="description"
|
|
120
|
+
class="text-xs"
|
|
121
|
+
>
|
|
122
|
+
Countdown before manual mode is entered, in seconds. 0 enters immediately.
|
|
123
|
+
</p>
|
|
124
|
+
</Tooltip>
|
|
125
|
+
</span>
|
|
126
|
+
|
|
127
|
+
<span
|
|
128
|
+
slot="input"
|
|
129
|
+
class="w-20"
|
|
130
|
+
>
|
|
131
|
+
<NumericInput
|
|
132
|
+
value={enableAfter}
|
|
133
|
+
on:change={(event) => {
|
|
134
|
+
enableAfter = numberValueFromEvent(event) ?? 0
|
|
135
|
+
}}
|
|
136
|
+
/>
|
|
137
|
+
</span>
|
|
138
|
+
</Label>
|
|
139
|
+
<StatusPill
|
|
140
|
+
isActive={isManualMode}
|
|
141
|
+
activeText="Enabled"
|
|
142
|
+
inactiveText="Disabled"
|
|
143
|
+
/>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<p class="text-subtle-2 text-xs">
|
|
147
|
+
Manual mode puts the arm into gravity compensation or servo release mode so the arm can be moved
|
|
148
|
+
by hand.
|
|
149
|
+
</p>
|
|
150
|
+
|
|
151
|
+
<ErrorDisplay {lastError} />
|
|
152
|
+
</div>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Inline heading at the start of the row, for hosts that render no section title. */
|
|
3
|
+
title?: string;
|
|
4
|
+
isManualMode: boolean;
|
|
5
|
+
isPending: boolean;
|
|
6
|
+
setManualMode: (manualMode: boolean, enabledFor: number) => void;
|
|
7
|
+
lastError: Error | null;
|
|
8
|
+
}
|
|
9
|
+
declare const ManualMode: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type ManualMode = ReturnType<typeof ManualMode>;
|
|
11
|
+
export default ManualMode;
|
|
@@ -48,8 +48,21 @@
|
|
|
48
48
|
frameSystem !== undefined && canPlanMotion(motionServiceNames, frameSystem, resourceName)
|
|
49
49
|
)
|
|
50
50
|
|
|
51
|
+
const armClient = createResourceClient(
|
|
52
|
+
ArmClient,
|
|
53
|
+
() => partID,
|
|
54
|
+
() => resourceName
|
|
55
|
+
)
|
|
56
|
+
// An arm that reports it cannot take direct cartesian commands can only be
|
|
57
|
+
// moved through the motion service, so lock the toggle onto that mode.
|
|
58
|
+
const propertiesQuery = createResourceQuery(armClient, 'getProperties')
|
|
59
|
+
const cartesianUnsupported = $derived(propertiesQuery.data?.supportCartesianCommands === false)
|
|
60
|
+
|
|
51
61
|
let userChoice = $state<MoveControlMode>()
|
|
52
|
-
const
|
|
62
|
+
const preferredMode = $derived<MoveControlMode>(
|
|
63
|
+
motionAvailable ? (userChoice ?? 'motion') : 'direct'
|
|
64
|
+
)
|
|
65
|
+
const mode = $derived<MoveControlMode>(cartesianUnsupported ? 'motion' : preferredMode)
|
|
53
66
|
|
|
54
67
|
let userServiceChoice = $state<string>()
|
|
55
68
|
const activeMotionServiceName = $derived(
|
|
@@ -58,11 +71,6 @@
|
|
|
58
71
|
const serviceOptions = $derived(motionServiceOptions(motionServiceNames))
|
|
59
72
|
const showServiceSelect = $derived(mode === 'motion' && serviceOptions.length > 1)
|
|
60
73
|
|
|
61
|
-
const armClient = createResourceClient(
|
|
62
|
-
ArmClient,
|
|
63
|
-
() => partID,
|
|
64
|
-
() => resourceName
|
|
65
|
-
)
|
|
66
74
|
const motionClient = createResourceClient(
|
|
67
75
|
MotionClient,
|
|
68
76
|
() => partID,
|
|
@@ -135,6 +143,7 @@
|
|
|
135
143
|
slot="input"
|
|
136
144
|
options={['Motion service', 'Arm']}
|
|
137
145
|
selected={mode === 'motion' ? 'Motion service' : 'Arm'}
|
|
146
|
+
disabled={cartesianUnsupported}
|
|
138
147
|
on:input={handleModeInput}
|
|
139
148
|
/>
|
|
140
149
|
</Label>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export const useCountdown = (onComplete) => {
|
|
2
|
+
let secondsRemaining = $state(undefined);
|
|
3
|
+
let intervalID = 0;
|
|
4
|
+
const cancel = () => {
|
|
5
|
+
globalThis.clearInterval(intervalID);
|
|
6
|
+
secondsRemaining = undefined;
|
|
7
|
+
};
|
|
8
|
+
const start = (seconds) => {
|
|
9
|
+
cancel();
|
|
10
|
+
if (seconds <= 0) {
|
|
11
|
+
onComplete();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
secondsRemaining = seconds;
|
|
15
|
+
intervalID = window.setInterval(() => {
|
|
16
|
+
if (secondsRemaining === undefined) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
secondsRemaining -= 1;
|
|
20
|
+
if (secondsRemaining <= 0) {
|
|
21
|
+
cancel();
|
|
22
|
+
onComplete();
|
|
23
|
+
}
|
|
24
|
+
}, 1000);
|
|
25
|
+
};
|
|
26
|
+
$effect(() => cancel);
|
|
27
|
+
return {
|
|
28
|
+
get isCounting() {
|
|
29
|
+
return secondsRemaining !== undefined;
|
|
30
|
+
},
|
|
31
|
+
get secondsRemaining() {
|
|
32
|
+
return secondsRemaining;
|
|
33
|
+
},
|
|
34
|
+
start,
|
|
35
|
+
cancel,
|
|
36
|
+
};
|
|
37
|
+
};
|
package/dist/registry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArmGetJointPositionsWidget, ArmIsMovingWidget, ArmMoveToJointPositionsWidget, ArmMoveToPositionWidget, ArmQuickMoveWidget, ArmWidget, AudioInputGetPropertiesWidget, AudioInputWidget, AudioOutputGetPropertiesWidget, AudioOutputWidget, BaseIsMovingWidget, BaseMoveStraightWidget, BaseQuickMoveWidget, BaseSetPowerWidget, BaseSetVelocityWidget, BaseSpinWidget, BaseWidget, BoardWidget, ButtonWidget, CameraWidget, DiscoveryWidget, EncoderGetPositionWidget, EncoderWidget, GantryGetPositionWidget, GantryHomeWidget, GantryIsMovingWidget, GantryMoveToPositionWidget, GantryQuickMoveWidget, GantryWidget, GripperGrabWidget, GripperIsHoldingSomethingWidget, GripperIsMovingWidget, GripperOpenWidget, GripperWidget, InputControllerWidget, MLModelServiceWidget, MotionServiceWidget, MotorGoForWidget, MotorGoToWidget, MotorIsMovingWidget, MotorQuickMoveWidget, MotorSetPowerWidget, MotorSetRPMWidget, MotorWidget, MovementSensorGetAccuracyWidget, MovementSensorGetCompassHeadingWidget, MovementSensorGetOrientationWidget, MovementSensorGetPositionWidget, MovementSensorWidget, NavigationServiceWidget, PowerSensorGetCurrentWidget, PowerSensorGetPowerWidget, PowerSensorGetVoltageWidget, PowerSensorWidget, SensorWidget, ServoIsMovingWidget, ServoMoveWidget, ServoQuickMoveWidget, ServoWidget, SlamGetPositionWidget, SlamWidget, SwitchWidget, VisionServiceWidget, } from "./components/index.js";
|
|
1
|
+
import { ArmGetJointPositionsWidget, ArmIsMovingWidget, ArmManualModeWidget, ArmMoveToJointPositionsWidget, ArmMoveToPositionWidget, ArmQuickMoveWidget, ArmWidget, AudioInputGetPropertiesWidget, AudioInputWidget, AudioOutputGetPropertiesWidget, AudioOutputWidget, BaseIsMovingWidget, BaseMoveStraightWidget, BaseQuickMoveWidget, BaseSetPowerWidget, BaseSetVelocityWidget, BaseSpinWidget, BaseWidget, BoardWidget, ButtonWidget, CameraWidget, DiscoveryWidget, EncoderGetPositionWidget, EncoderWidget, GantryGetPositionWidget, GantryHomeWidget, GantryIsMovingWidget, GantryMoveToPositionWidget, GantryQuickMoveWidget, GantryWidget, GripperGrabWidget, GripperIsHoldingSomethingWidget, GripperIsMovingWidget, GripperOpenWidget, GripperWidget, InputControllerWidget, MLModelServiceWidget, MotionServiceWidget, MotorGoForWidget, MotorGoToWidget, MotorIsMovingWidget, MotorQuickMoveWidget, MotorSetPowerWidget, MotorSetRPMWidget, MotorWidget, MovementSensorGetAccuracyWidget, MovementSensorGetCompassHeadingWidget, MovementSensorGetOrientationWidget, MovementSensorGetPositionWidget, MovementSensorWidget, NavigationServiceWidget, PowerSensorGetCurrentWidget, PowerSensorGetPowerWidget, PowerSensorGetVoltageWidget, PowerSensorWidget, SensorWidget, ServoIsMovingWidget, ServoMoveWidget, ServoQuickMoveWidget, ServoWidget, SlamGetPositionWidget, SlamWidget, SwitchWidget, VisionServiceWidget, } from "./components/index.js";
|
|
2
2
|
import { getResourceAPI } from "./get-resource-api.js";
|
|
3
3
|
import { ResourceTriplets } from "./resource-triplet.js";
|
|
4
4
|
/**
|
|
@@ -24,6 +24,7 @@ const resourceWidgetRegistry = {
|
|
|
24
24
|
widgets: [ArmGetJointPositionsWidget],
|
|
25
25
|
},
|
|
26
26
|
{ id: 'is-moving', label: 'IsMoving', widgets: [ArmIsMovingWidget] },
|
|
27
|
+
{ id: 'manual-mode', label: 'SetManualMode', widgets: [ArmManualModeWidget] },
|
|
27
28
|
],
|
|
28
29
|
},
|
|
29
30
|
[ResourceTriplets.AudioInput]: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viamrobotics/test-widgets",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"wireit": {
|
|
@@ -194,20 +194,15 @@
|
|
|
194
194
|
"@threlte/core": ">=8",
|
|
195
195
|
"@threlte/extras": ">=9",
|
|
196
196
|
"@viamrobotics/prime-core": ">=0.1",
|
|
197
|
-
"@viamrobotics/sdk": ">=0.
|
|
197
|
+
"@viamrobotics/sdk": ">=0.75.1",
|
|
198
198
|
"@viamrobotics/svelte-sdk": ">=1.1",
|
|
199
199
|
"lodash-es": ">=4",
|
|
200
|
-
"maplibre-gl": ">=
|
|
200
|
+
"maplibre-gl": ">=6",
|
|
201
201
|
"runed": ">=0.28",
|
|
202
202
|
"svelte": ">=5",
|
|
203
203
|
"three": ">=0.178",
|
|
204
204
|
"threlte-uikit": ">=2"
|
|
205
205
|
},
|
|
206
|
-
"peerDependenciesMeta": {
|
|
207
|
-
"maplibre-gl": {
|
|
208
|
-
"optional": true
|
|
209
|
-
}
|
|
210
|
-
},
|
|
211
206
|
"devDependencies": {
|
|
212
207
|
"@ag-grid-community/client-side-row-model": "^32.3.9",
|
|
213
208
|
"@ag-grid-community/core": "^32.3.9",
|
|
@@ -248,12 +243,12 @@
|
|
|
248
243
|
"@types/node": "^25.6.0",
|
|
249
244
|
"@types/three": "^0.183.1",
|
|
250
245
|
"@viamrobotics/prime-core": "^0.1.22",
|
|
251
|
-
"@viamrobotics/sdk": "^0.
|
|
246
|
+
"@viamrobotics/sdk": "^0.75.1",
|
|
252
247
|
"@viamrobotics/svelte-sdk": "^1.5.1",
|
|
253
248
|
"@viamrobotics/tailwind-config": "^1.2.0",
|
|
254
|
-
"@vitest/browser": "^
|
|
255
|
-
"@vitest/browser-playwright": "^
|
|
256
|
-
"@vitest/coverage-v8": "^
|
|
249
|
+
"@vitest/browser": "^5.0.1",
|
|
250
|
+
"@vitest/browser-playwright": "^5.0.1",
|
|
251
|
+
"@vitest/coverage-v8": "^5.0.1",
|
|
257
252
|
"@zag-js/dialog": "^1.37.0",
|
|
258
253
|
"eslint": "^10.2.1",
|
|
259
254
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -262,7 +257,7 @@
|
|
|
262
257
|
"eslint-plugin-unicorn": "^64.0.0",
|
|
263
258
|
"globals": "^17.5.0",
|
|
264
259
|
"lodash-es": "^4.18.1",
|
|
265
|
-
"maplibre-gl": "^
|
|
260
|
+
"maplibre-gl": "^6.9.1",
|
|
266
261
|
"playwright": "^1.59.1",
|
|
267
262
|
"prettier": "^3.8.3",
|
|
268
263
|
"prettier-plugin-svelte": "^3.5.1",
|
|
@@ -282,8 +277,7 @@
|
|
|
282
277
|
"vite": "^8.0.16",
|
|
283
278
|
"vite-plugin-devtools-json": "^1.0.0",
|
|
284
279
|
"vite-plugin-glsl": "^1.6.0",
|
|
285
|
-
"vitest": "^
|
|
286
|
-
"vitest-browser-svelte": "^2.1.1",
|
|
280
|
+
"vitest": "^5.0.1",
|
|
287
281
|
"wireit": "^0.14.13"
|
|
288
282
|
},
|
|
289
283
|
"engines": {
|