@viamrobotics/test-widgets 0.3.0 → 0.3.1
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/dist/resource.d.ts +25 -0
- package/dist/resource.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ResourceStatus } from '@viamrobotics/svelte-sdk';
|
|
2
|
+
import type { Component } from 'svelte';
|
|
3
|
+
import { type ResourceName } from '@viamrobotics/sdk';
|
|
4
|
+
export type NamedResourceStatus = ResourceStatus & {
|
|
5
|
+
name: ResourceName;
|
|
6
|
+
};
|
|
7
|
+
interface ResourceWidget {
|
|
8
|
+
partID: string;
|
|
9
|
+
resourceName: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const ResourceStatusText: {
|
|
12
|
+
0: string;
|
|
13
|
+
3: string;
|
|
14
|
+
2: string;
|
|
15
|
+
5: string;
|
|
16
|
+
1: string;
|
|
17
|
+
4: string;
|
|
18
|
+
};
|
|
19
|
+
export declare const getResourceAPI: ({ namespace, type, subtype }: ResourceName) => string;
|
|
20
|
+
export declare const getResourceKey: (name: ResourceName) => string;
|
|
21
|
+
export declare const sortResourceNames: (names: ResourceName[]) => ResourceName[];
|
|
22
|
+
export declare const hasWidget: (resource: ResourceName) => boolean;
|
|
23
|
+
export declare const widgetForResource: (resource: ResourceName) => Component<ResourceWidget> | undefined;
|
|
24
|
+
export declare const showResourceWidget: (resource: ResourceName) => boolean;
|
|
25
|
+
export {};
|
package/dist/resource.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { robotApi } from '@viamrobotics/sdk';
|
|
2
|
-
import { ArmWidget, AudioInputWidget, AudioOutputWidget, BaseWidget, BoardWidget, ButtonWidget, CameraWidget, DiscoveryWidget, EncoderWidget, GantryWidget, GripperWidget, InputControllerWidget, MLModelServiceWidget, MotorWidget, MovementSensorWidget, NavigationServiceWidget, PowerSensorWidget, SensorWidget, ServoWidget, SlamWidget, SwitchWidget, VisionServiceWidget, } from './';
|
|
3
2
|
import { clientMap } from "./client-map.js";
|
|
3
|
+
import { ArmWidget, AudioInputWidget, AudioOutputWidget, BaseWidget, BoardWidget, ButtonWidget, CameraWidget, DiscoveryWidget, EncoderWidget, GantryWidget, GripperWidget, InputControllerWidget, MLModelServiceWidget, MotorWidget, MovementSensorWidget, NavigationServiceWidget, PowerSensorWidget, SensorWidget, ServoWidget, SlamWidget, SwitchWidget, VisionServiceWidget, } from './components';
|
|
4
4
|
export const ResourceStatusText = {
|
|
5
5
|
[robotApi.ResourceStatus_State.UNSPECIFIED]: 'unspecified',
|
|
6
6
|
[robotApi.ResourceStatus_State.READY]: 'ready',
|