@viamrobotics/test-widgets 0.0.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/LICENSE +201 -0
- package/README.md +65 -0
- package/dist/add-image-to-dataset.d.ts +18 -0
- package/dist/add-image-to-dataset.js +18 -0
- package/dist/assert.d.ts +14 -0
- package/dist/assert.js +21 -0
- package/dist/builtin.js +59 -0
- package/dist/components/angle-unit-toggle.svelte +27 -0
- package/dist/components/angle-unit-toggle.svelte.d.ts +7 -0
- package/dist/components/api-section.svelte +69 -0
- package/dist/components/api-section.svelte.d.ts +13 -0
- package/dist/components/board/pin-section.svelte +28 -0
- package/dist/components/board/pin-section.svelte.d.ts +9 -0
- package/dist/components/connection-status.svelte +87 -0
- package/dist/components/connection-status.svelte.d.ts +14 -0
- package/dist/components/content-rect.svelte +21 -0
- package/dist/components/content-rect.svelte.d.ts +9 -0
- package/dist/components/copy-button.svelte +37 -0
- package/dist/components/copy-button.svelte.d.ts +9 -0
- package/dist/components/error.svelte +25 -0
- package/dist/components/error.svelte.d.ts +8 -0
- package/dist/components/image-annotations/annotation-edit-utils.d.ts +21 -0
- package/dist/components/image-annotations/annotation-edit-utils.js +183 -0
- package/dist/components/image-annotations/bounding-box-labeler.svelte +521 -0
- package/dist/components/image-annotations/bounding-box-labeler.svelte.d.ts +51 -0
- package/dist/components/image-annotations/bounding-box-types.d.ts +29 -0
- package/dist/components/image-annotations/bounding-box-types.js +17 -0
- package/dist/components/image-annotations/bounding-box.svelte +230 -0
- package/dist/components/image-annotations/bounding-box.svelte.d.ts +44 -0
- package/dist/components/image-annotations/get-image-size.d.ts +7 -0
- package/dist/components/image-annotations/get-image-size.js +29 -0
- package/dist/components/image-annotations/labeler-constants.d.ts +4 -0
- package/dist/components/image-annotations/labeler-constants.js +4 -0
- package/dist/components/image-annotations/resize-corner.svelte +47 -0
- package/dist/components/image-annotations/resize-corner.svelte.d.ts +9 -0
- package/dist/components/image-annotations/resize-edge.svelte +51 -0
- package/dist/components/image-annotations/resize-edge.svelte.d.ts +9 -0
- package/dist/components/image-annotations/resize-handle-props.d.ts +60 -0
- package/dist/components/image-annotations/resize-handle-props.js +66 -0
- package/dist/components/image-annotations/resize-handles.svelte +53 -0
- package/dist/components/image-annotations/resize-handles.svelte.d.ts +8 -0
- package/dist/components/index.d.ts +57 -0
- package/dist/components/index.js +56 -0
- package/dist/components/is-moving.svelte +66 -0
- package/dist/components/is-moving.svelte.d.ts +12 -0
- package/dist/components/maplibre/controls/center.svelte +41 -0
- package/dist/components/maplibre/controls/center.svelte.d.ts +19 -0
- package/dist/components/maplibre/controls/follow.svelte +65 -0
- package/dist/components/maplibre/controls/follow.svelte.d.ts +11 -0
- package/dist/components/maplibre/controls/navigation.svelte +57 -0
- package/dist/components/maplibre/controls/navigation.svelte.d.ts +23 -0
- package/dist/components/maplibre/controls/satellite.svelte +31 -0
- package/dist/components/maplibre/controls/satellite.svelte.d.ts +19 -0
- package/dist/components/maplibre/directional-marker.svelte +34 -0
- package/dist/components/maplibre/directional-marker.svelte.d.ts +13 -0
- package/dist/components/maplibre/hooks.d.ts +38 -0
- package/dist/components/maplibre/hooks.js +45 -0
- package/dist/components/maplibre/index.d.ts +13 -0
- package/dist/components/maplibre/index.js +13 -0
- package/dist/components/maplibre/index.svelte +232 -0
- package/dist/components/maplibre/index.svelte.d.ts +75 -0
- package/dist/components/maplibre/lnglat-input.svelte +54 -0
- package/dist/components/maplibre/lnglat-input.svelte.d.ts +17 -0
- package/dist/components/maplibre/marker.svelte +60 -0
- package/dist/components/maplibre/marker.svelte.d.ts +29 -0
- package/dist/components/maplibre/math.d.ts +12 -0
- package/dist/components/maplibre/math.js +18 -0
- package/dist/components/maplibre/plugins/google-maps.d.ts +1 -0
- package/dist/components/maplibre/plugins/google-maps.js +74 -0
- package/dist/components/maplibre/plugins/raycast.d.ts +10 -0
- package/dist/components/maplibre/plugins/raycast.js +29 -0
- package/dist/components/maplibre/plugins/three.svelte.d.ts +21 -0
- package/dist/components/maplibre/plugins/three.svelte.js +73 -0
- package/dist/components/maplibre/style.d.ts +4 -0
- package/dist/components/maplibre/style.js +88 -0
- package/dist/components/maplibre/types.d.ts +14 -0
- package/dist/components/maplibre/types.js +19 -0
- package/dist/components/maplibre/zoom.d.ts +1 -0
- package/dist/components/maplibre/zoom.js +1 -0
- package/dist/components/mutation-section.svelte +76 -0
- package/dist/components/mutation-section.svelte.d.ts +14 -0
- package/dist/components/mutation-view.svelte +29 -0
- package/dist/components/mutation-view.svelte.d.ts +10 -0
- package/dist/components/navigation-map/components/draw-tool.svelte +139 -0
- package/dist/components/navigation-map/components/draw-tool.svelte.d.ts +13 -0
- package/dist/components/navigation-map/components/input/geometry.svelte +123 -0
- package/dist/components/navigation-map/components/input/geometry.svelte.d.ts +9 -0
- package/dist/components/navigation-map/components/input/orientation.svelte +46 -0
- package/dist/components/navigation-map/components/input/orientation.svelte.d.ts +10 -0
- package/dist/components/navigation-map/components/map.svelte +145 -0
- package/dist/components/navigation-map/components/map.svelte.d.ts +20 -0
- package/dist/components/navigation-map/components/nav/index.svelte +64 -0
- package/dist/components/navigation-map/components/nav/index.svelte.d.ts +12 -0
- package/dist/components/navigation-map/components/nav/key.svelte +16 -0
- package/dist/components/navigation-map/components/nav/key.svelte.d.ts +8 -0
- package/dist/components/navigation-map/components/nav/obstacles-legend.svelte +18 -0
- package/dist/components/navigation-map/components/nav/obstacles-legend.svelte.d.ts +26 -0
- package/dist/components/navigation-map/components/nav/obstacles.svelte +206 -0
- package/dist/components/navigation-map/components/nav/obstacles.svelte.d.ts +7 -0
- package/dist/components/navigation-map/components/nav/waypoints.svelte +62 -0
- package/dist/components/navigation-map/components/nav/waypoints.svelte.d.ts +8 -0
- package/dist/components/navigation-map/components/obstacle.svelte +265 -0
- package/dist/components/navigation-map/components/obstacle.svelte.d.ts +10 -0
- package/dist/components/navigation-map/components/path.svelte +30 -0
- package/dist/components/navigation-map/components/path.svelte.d.ts +9 -0
- package/dist/components/navigation-map/components/robot-marker.svelte +18 -0
- package/dist/components/navigation-map/components/robot-marker.svelte.d.ts +8 -0
- package/dist/components/navigation-map/components/scene-layer.svelte +22 -0
- package/dist/components/navigation-map/components/scene-layer.svelte.d.ts +7 -0
- package/dist/components/navigation-map/components/scene.svelte +98 -0
- package/dist/components/navigation-map/components/scene.svelte.d.ts +7 -0
- package/dist/components/navigation-map/components/waypoints.svelte +14 -0
- package/dist/components/navigation-map/components/waypoints.svelte.d.ts +18 -0
- package/dist/components/navigation-map/index.d.ts +2 -0
- package/dist/components/navigation-map/index.js +2 -0
- package/dist/components/navigation-map/index.svelte +99 -0
- package/dist/components/navigation-map/index.svelte.d.ts +51 -0
- package/dist/components/navigation-map/lib/create-geometry.d.ts +2 -0
- package/dist/components/navigation-map/lib/create-geometry.js +31 -0
- package/dist/components/navigation-map/lib/create-name.d.ts +1 -0
- package/dist/components/navigation-map/lib/create-name.js +9 -0
- package/dist/components/navigation-map/lib/create-obstacle.d.ts +3 -0
- package/dist/components/navigation-map/lib/create-obstacle.js +12 -0
- package/dist/components/navigation-map/plugins/compute-bounding.svelte.d.ts +1 -0
- package/dist/components/navigation-map/plugins/compute-bounding.svelte.js +33 -0
- package/dist/components/navigation-map/plugins/interactivity.d.ts +6 -0
- package/dist/components/navigation-map/plugins/interactivity.js +27 -0
- package/dist/components/navigation-map/types.d.ts +37 -0
- package/dist/components/navigation-map/types.js +5 -0
- package/dist/components/navigation-map/use-navigation-map.svelte.d.ts +17 -0
- package/dist/components/navigation-map/use-navigation-map.svelte.js +69 -0
- package/dist/components/progress.svelte +4 -0
- package/dist/components/progress.svelte.d.ts +26 -0
- package/dist/components/queries.svelte +73 -0
- package/dist/components/queries.svelte.d.ts +12 -0
- package/dist/components/query.svelte +21 -0
- package/dist/components/query.svelte.d.ts +10 -0
- package/dist/components/readings-list.svelte +73 -0
- package/dist/components/readings-list.svelte.d.ts +6 -0
- package/dist/components/refetch-controller.svelte +122 -0
- package/dist/components/refetch-controller.svelte.d.ts +12 -0
- package/dist/components/refetch-interval-store.svelte.d.ts +18 -0
- package/dist/components/refetch-interval-store.svelte.js +37 -0
- package/dist/components/resource-icon.svelte +31 -0
- package/dist/components/resource-icon.svelte.d.ts +6 -0
- package/dist/components/section-group.svelte +64 -0
- package/dist/components/section-group.svelte.d.ts +14 -0
- package/dist/components/slam/map2d/base-marker.txt +1 -0
- package/dist/components/slam/map2d/color-map.d.ts +2 -0
- package/dist/components/slam/map2d/color-map.js +55 -0
- package/dist/components/slam/map2d/destination-marker.txt +1 -0
- package/dist/components/slam/map2d/helpers.svelte +29 -0
- package/dist/components/slam/map2d/helpers.svelte.d.ts +22 -0
- package/dist/components/slam/map2d/hooks/use-raycast-click/index.d.ts +9 -0
- package/dist/components/slam/map2d/hooks/use-raycast-click/index.js +36 -0
- package/dist/components/slam/map2d/hooks/use-raycast-click/normalize-device-coordinates.d.ts +2 -0
- package/dist/components/slam/map2d/hooks/use-raycast-click/normalize-device-coordinates.js +9 -0
- package/dist/components/slam/map2d/index.svelte +60 -0
- package/dist/components/slam/map2d/index.svelte.d.ts +37 -0
- package/dist/components/slam/map2d/legend.svelte +67 -0
- package/dist/components/slam/map2d/legend.svelte.d.ts +27 -0
- package/dist/components/slam/map2d/marker.svelte +41 -0
- package/dist/components/slam/map2d/marker.svelte.d.ts +13 -0
- package/dist/components/slam/map2d/motion-path.svelte +65 -0
- package/dist/components/slam/map2d/motion-path.svelte.d.ts +15 -0
- package/dist/components/slam/map2d/points.svelte +60 -0
- package/dist/components/slam/map2d/points.svelte.d.ts +23 -0
- package/dist/components/slam/map2d/render-order.d.ts +7 -0
- package/dist/components/slam/map2d/render-order.js +7 -0
- package/dist/components/slam/map2d/scene.svelte +130 -0
- package/dist/components/slam/map2d/scene.svelte.d.ts +16 -0
- package/dist/components/status-pill.svelte +25 -0
- package/dist/components/status-pill.svelte.d.ts +8 -0
- package/dist/components/stop-button.svelte +21 -0
- package/dist/components/stop-button.svelte.d.ts +7 -0
- package/dist/components/stop.svelte +51 -0
- package/dist/components/stop.svelte.d.ts +9 -0
- package/dist/components/table.svelte +46 -0
- package/dist/components/table.svelte.d.ts +7 -0
- package/dist/components/three/axes-helper.svelte +79 -0
- package/dist/components/three/axes-helper.svelte.d.ts +10 -0
- package/dist/components/three/index.d.ts +1 -0
- package/dist/components/three/index.js +1 -0
- package/dist/components/widgets/arm/arm.svelte +132 -0
- package/dist/components/widgets/arm/arm.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/get-joint-positions.svelte +53 -0
- package/dist/components/widgets/arm/get-joint-positions.svelte.d.ts +6 -0
- package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte +45 -0
- package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/move-to-joint-positions.svelte +113 -0
- package/dist/components/widgets/arm/move-to-joint-positions.svelte.d.ts +8 -0
- package/dist/components/widgets/arm/move-to-position-widget.svelte +43 -0
- package/dist/components/widgets/arm/move-to-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/move-to-position.svelte +143 -0
- package/dist/components/widgets/arm/move-to-position.svelte.d.ts +9 -0
- package/dist/components/widgets/arm/quick-move-widget.svelte +45 -0
- package/dist/components/widgets/arm/quick-move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/arm/quick-move.svelte +62 -0
- package/dist/components/widgets/arm/quick-move.svelte.d.ts +8 -0
- package/dist/components/widgets/base/base.svelte +130 -0
- package/dist/components/widgets/base/base.svelte.d.ts +7 -0
- package/dist/components/widgets/base/move-straight-widget.svelte +31 -0
- package/dist/components/widgets/base/move-straight-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/move-straight.svelte +78 -0
- package/dist/components/widgets/base/move-straight.svelte.d.ts +6 -0
- package/dist/components/widgets/base/quick-move-widget.svelte +49 -0
- package/dist/components/widgets/base/quick-move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/quick-move.svelte +230 -0
- package/dist/components/widgets/base/quick-move.svelte.d.ts +8 -0
- package/dist/components/widgets/base/set-power-widget.svelte +31 -0
- package/dist/components/widgets/base/set-power-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/set-power.svelte +43 -0
- package/dist/components/widgets/base/set-power.svelte.d.ts +7 -0
- package/dist/components/widgets/base/set-velocity-widget.svelte +31 -0
- package/dist/components/widgets/base/set-velocity-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/set-velocity.svelte +41 -0
- package/dist/components/widgets/base/set-velocity.svelte.d.ts +7 -0
- package/dist/components/widgets/base/spin-widget.svelte +31 -0
- package/dist/components/widgets/base/spin-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/base/spin.svelte +77 -0
- package/dist/components/widgets/base/spin.svelte.d.ts +6 -0
- package/dist/components/widgets/base/vec3-builder.svelte +144 -0
- package/dist/components/widgets/base/vec3-builder.svelte.d.ts +13 -0
- package/dist/components/widgets/board/analog-read-wrapper.svelte +42 -0
- package/dist/components/widgets/board/analog-read-wrapper.svelte.d.ts +9 -0
- package/dist/components/widgets/board/analog-read.svelte +55 -0
- package/dist/components/widgets/board/analog-read.svelte.d.ts +7 -0
- package/dist/components/widgets/board/analog-write-wrapper.svelte +33 -0
- package/dist/components/widgets/board/analog-write-wrapper.svelte.d.ts +9 -0
- package/dist/components/widgets/board/analog-write.svelte +44 -0
- package/dist/components/widgets/board/analog-write.svelte.d.ts +6 -0
- package/dist/components/widgets/board/board.d.ts +16 -0
- package/dist/components/widgets/board/board.js +8 -0
- package/dist/components/widgets/board/board.svelte +23 -0
- package/dist/components/widgets/board/board.svelte.d.ts +7 -0
- package/dist/components/widgets/board/confirming-button.svelte +42 -0
- package/dist/components/widgets/board/confirming-button.svelte.d.ts +8 -0
- package/dist/components/widgets/board/gpio-read-wrapper.svelte +68 -0
- package/dist/components/widgets/board/gpio-read-wrapper.svelte.d.ts +9 -0
- package/dist/components/widgets/board/gpio-read.svelte +134 -0
- package/dist/components/widgets/board/gpio-read.svelte.d.ts +11 -0
- package/dist/components/widgets/board/gpio-write-wrapper.svelte +55 -0
- package/dist/components/widgets/board/gpio-write-wrapper.svelte.d.ts +9 -0
- package/dist/components/widgets/board/gpio-write.svelte +106 -0
- package/dist/components/widgets/board/gpio-write.svelte.d.ts +8 -0
- package/dist/components/widgets/board/pin-section.svelte +28 -0
- package/dist/components/widgets/board/pin-section.svelte.d.ts +9 -0
- package/dist/components/widgets/board/pin-selector.svelte +69 -0
- package/dist/components/widgets/board/pin-selector.svelte.d.ts +8 -0
- package/dist/components/widgets/board/read-write-pins-widget.svelte +15 -0
- package/dist/components/widgets/board/read-write-pins-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/board/read-write-pins.svelte +72 -0
- package/dist/components/widgets/board/read-write-pins.svelte.d.ts +7 -0
- package/dist/components/widgets/button/button.svelte +23 -0
- package/dist/components/widgets/button/button.svelte.d.ts +7 -0
- package/dist/components/widgets/button/push.svelte +32 -0
- package/dist/components/widgets/button/push.svelte.d.ts +7 -0
- package/dist/components/widgets/camera/camera.svelte +202 -0
- package/dist/components/widgets/camera/camera.svelte.d.ts +7 -0
- package/dist/components/widgets/camera/export-screenshot.svelte +68 -0
- package/dist/components/widgets/camera/export-screenshot.svelte.d.ts +9 -0
- package/dist/components/widgets/camera/live-or-polling-video.svelte +419 -0
- package/dist/components/widgets/camera/live-or-polling-video.svelte.d.ts +18 -0
- package/dist/components/widgets/camera/picture-in-picture-button.svelte +81 -0
- package/dist/components/widgets/camera/picture-in-picture-button.svelte.d.ts +9 -0
- package/dist/components/widgets/discovery/component-preview.d.ts +9 -0
- package/dist/components/widgets/discovery/component-preview.js +1 -0
- package/dist/components/widgets/discovery/discovery.svelte +155 -0
- package/dist/components/widgets/discovery/discovery.svelte.d.ts +13 -0
- package/dist/components/widgets/discovery/resources-list.svelte +109 -0
- package/dist/components/widgets/discovery/resources-list.svelte.d.ts +13 -0
- package/dist/components/widgets/discovery/transform-component-config.d.ts +17 -0
- package/dist/components/widgets/discovery/transform-component-config.js +32 -0
- package/dist/components/widgets/do-command/do-command.svelte +101 -0
- package/dist/components/widgets/do-command/do-command.svelte.d.ts +8 -0
- package/dist/components/widgets/encoder/encoder.svelte +117 -0
- package/dist/components/widgets/encoder/encoder.svelte.d.ts +7 -0
- package/dist/components/widgets/encoder/position.svelte +26 -0
- package/dist/components/widgets/encoder/position.svelte.d.ts +8 -0
- package/dist/components/widgets/gantry/gantry.svelte +135 -0
- package/dist/components/widgets/gantry/gantry.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/home.svelte +33 -0
- package/dist/components/widgets/gantry/home.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/match-array-length.d.ts +1 -0
- package/dist/components/widgets/gantry/match-array-length.js +13 -0
- package/dist/components/widgets/gantry/move-to-position-widget.svelte +43 -0
- package/dist/components/widgets/gantry/move-to-position-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/move-to-position.svelte +121 -0
- package/dist/components/widgets/gantry/move-to-position.svelte.d.ts +8 -0
- package/dist/components/widgets/gantry/position-and-lengths.svelte +32 -0
- package/dist/components/widgets/gantry/position-and-lengths.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/quick-move-widget.svelte +47 -0
- package/dist/components/widgets/gantry/quick-move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gantry/quick-move.svelte +69 -0
- package/dist/components/widgets/gantry/quick-move.svelte.d.ts +8 -0
- package/dist/components/widgets/generic/generic.svelte +31 -0
- package/dist/components/widgets/generic/generic.svelte.d.ts +8 -0
- package/dist/components/widgets/gripper/closed-gripper-svg.svelte +13 -0
- package/dist/components/widgets/gripper/closed-gripper-svg.svelte.d.ts +26 -0
- package/dist/components/widgets/gripper/grab.svelte +37 -0
- package/dist/components/widgets/gripper/grab.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/gripper.svelte +69 -0
- package/dist/components/widgets/gripper/gripper.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/open-gripper-svg.svelte +13 -0
- package/dist/components/widgets/gripper/open-gripper-svg.svelte.d.ts +26 -0
- package/dist/components/widgets/gripper/open.svelte +37 -0
- package/dist/components/widgets/gripper/open.svelte.d.ts +7 -0
- package/dist/components/widgets/input-controller/input-controller.svelte +74 -0
- package/dist/components/widgets/input-controller/input-controller.svelte.d.ts +7 -0
- package/dist/components/widgets/input-controller/standard-gamepad-event.d.ts +8 -0
- package/dist/components/widgets/input-controller/standard-gamepad-event.js +1 -0
- package/dist/components/widgets/input-controller/webgamepad-scene.svelte +22 -0
- package/dist/components/widgets/input-controller/webgamepad-scene.svelte.d.ts +8 -0
- package/dist/components/widgets/input-controller/webgamepad.svelte +142 -0
- package/dist/components/widgets/input-controller/webgamepad.svelte.d.ts +8 -0
- package/dist/components/widgets/ml-model-service/ml-model-service.svelte +65 -0
- package/dist/components/widgets/ml-model-service/ml-model-service.svelte.d.ts +7 -0
- package/dist/components/widgets/ml-model-service/results-table.svelte +49 -0
- package/dist/components/widgets/ml-model-service/results-table.svelte.d.ts +7 -0
- package/dist/components/widgets/ml-model-service/tensor-row.svelte +33 -0
- package/dist/components/widgets/ml-model-service/tensor-row.svelte.d.ts +9 -0
- package/dist/components/widgets/motor/go-for-view.svelte +31 -0
- package/dist/components/widgets/motor/go-for-view.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/go-for.svelte +79 -0
- package/dist/components/widgets/motor/go-for.svelte.d.ts +6 -0
- package/dist/components/widgets/motor/go-to-view.svelte +31 -0
- package/dist/components/widgets/motor/go-to-view.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/go-to.svelte +78 -0
- package/dist/components/widgets/motor/go-to.svelte.d.ts +6 -0
- package/dist/components/widgets/motor/motor.svelte +179 -0
- package/dist/components/widgets/motor/motor.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/quick-move-widget.svelte +31 -0
- package/dist/components/widgets/motor/quick-move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/quick-move.svelte +81 -0
- package/dist/components/widgets/motor/quick-move.svelte.d.ts +6 -0
- package/dist/components/widgets/motor/set-power-widget.svelte +29 -0
- package/dist/components/widgets/motor/set-power-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/set-power.svelte +54 -0
- package/dist/components/widgets/motor/set-power.svelte.d.ts +6 -0
- package/dist/components/widgets/motor/set-rpm-widget.svelte +29 -0
- package/dist/components/widgets/motor/set-rpm-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/motor/set-rpm.svelte +52 -0
- package/dist/components/widgets/motor/set-rpm.svelte.d.ts +6 -0
- package/dist/components/widgets/movement-sensor/accuracy.svelte +71 -0
- package/dist/components/widgets/movement-sensor/accuracy.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/compass-heading.svelte +44 -0
- package/dist/components/widgets/movement-sensor/compass-heading.svelte.d.ts +6 -0
- package/dist/components/widgets/movement-sensor/map.svelte +61 -0
- package/dist/components/widgets/movement-sensor/map.svelte.d.ts +8 -0
- package/dist/components/widgets/movement-sensor/movement-sensor.svelte +255 -0
- package/dist/components/widgets/movement-sensor/movement-sensor.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/orientation.svelte +43 -0
- package/dist/components/widgets/movement-sensor/orientation.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/position.svelte +32 -0
- package/dist/components/widgets/movement-sensor/position.svelte.d.ts +7 -0
- package/dist/components/widgets/movement-sensor/safe-read-coordinate.d.ts +1 -0
- package/dist/components/widgets/movement-sensor/safe-read-coordinate.js +6 -0
- package/dist/components/widgets/movement-sensor/vector3.svelte +36 -0
- package/dist/components/widgets/movement-sensor/vector3.svelte.d.ts +7 -0
- package/dist/components/widgets/navigation/directional-marker.svelte +26 -0
- package/dist/components/widgets/navigation/directional-marker.svelte.d.ts +8 -0
- package/dist/components/widgets/navigation/navigation.svelte +236 -0
- package/dist/components/widgets/navigation/navigation.svelte.d.ts +7 -0
- package/dist/components/widgets/navigation/obstacles/__tests__/__fixtures__/obstacles.d.ts +2 -0
- package/dist/components/widgets/navigation/obstacles/__tests__/__fixtures__/obstacles.js +56 -0
- package/dist/components/widgets/navigation/obstacles/color.d.ts +1 -0
- package/dist/components/widgets/navigation/obstacles/color.js +10 -0
- package/dist/components/widgets/navigation/obstacles/legend.svelte +117 -0
- package/dist/components/widgets/navigation/obstacles/legend.svelte.d.ts +12 -0
- package/dist/components/widgets/navigation/obstacles/meshes.svelte +104 -0
- package/dist/components/widgets/navigation/obstacles/meshes.svelte.d.ts +10 -0
- package/dist/components/widgets/navigation/obstacles/obstacles.svelte +30 -0
- package/dist/components/widgets/navigation/obstacles/obstacles.svelte.d.ts +10 -0
- package/dist/components/widgets/navigation/obstacles/scene.svelte +59 -0
- package/dist/components/widgets/navigation/obstacles/scene.svelte.d.ts +7 -0
- package/dist/components/widgets/navigation/waypoints/__tests__/__fixtures__/waypoints.d.ts +7 -0
- package/dist/components/widgets/navigation/waypoints/__tests__/__fixtures__/waypoints.js +23 -0
- package/dist/components/widgets/navigation/waypoints/legend.svelte +67 -0
- package/dist/components/widgets/navigation/waypoints/legend.svelte.d.ts +13 -0
- package/dist/components/widgets/navigation/waypoints/waypoints.svelte +34 -0
- package/dist/components/widgets/navigation/waypoints/waypoints.svelte.d.ts +11 -0
- package/dist/components/widgets/operations-and-sessions/operations-and-sessions.svelte +115 -0
- package/dist/components/widgets/operations-and-sessions/operations-and-sessions.svelte.d.ts +6 -0
- package/dist/components/widgets/operations-and-sessions/operations-table.svelte +82 -0
- package/dist/components/widgets/operations-and-sessions/operations-table.svelte.d.ts +8 -0
- package/dist/components/widgets/operations-and-sessions/rtt-pill.svelte +26 -0
- package/dist/components/widgets/operations-and-sessions/rtt-pill.svelte.d.ts +6 -0
- package/dist/components/widgets/operations-and-sessions/sessions-table.svelte +78 -0
- package/dist/components/widgets/operations-and-sessions/sessions-table.svelte.d.ts +8 -0
- package/dist/components/widgets/pcd/__tests__/__fixtures__/pcd.d.ts +1 -0
- package/dist/components/widgets/pcd/__tests__/__fixtures__/pcd.js +12 -0
- package/dist/components/widgets/pcd/download.svelte +25 -0
- package/dist/components/widgets/pcd/download.svelte.d.ts +6 -0
- package/dist/components/widgets/pcd/inputs.svelte +70 -0
- package/dist/components/widgets/pcd/inputs.svelte.d.ts +11 -0
- package/dist/components/widgets/pcd/pcd-widget.svelte +45 -0
- package/dist/components/widgets/pcd/pcd-widget.svelte.d.ts +6 -0
- package/dist/components/widgets/pcd/point-label.svelte +76 -0
- package/dist/components/widgets/pcd/point-label.svelte.d.ts +7 -0
- package/dist/components/widgets/pcd/points.svelte +35 -0
- package/dist/components/widgets/pcd/points.svelte.d.ts +7 -0
- package/dist/components/widgets/pcd/scene.svelte +62 -0
- package/dist/components/widgets/pcd/scene.svelte.d.ts +9 -0
- package/dist/components/widgets/power-sensor/current-reading.svelte +18 -0
- package/dist/components/widgets/power-sensor/current-reading.svelte.d.ts +6 -0
- package/dist/components/widgets/power-sensor/power-reading.svelte +14 -0
- package/dist/components/widgets/power-sensor/power-reading.svelte.d.ts +6 -0
- package/dist/components/widgets/power-sensor/power-sensor.svelte +134 -0
- package/dist/components/widgets/power-sensor/power-sensor.svelte.d.ts +7 -0
- package/dist/components/widgets/power-sensor/voltage-reading.svelte +18 -0
- package/dist/components/widgets/power-sensor/voltage-reading.svelte.d.ts +6 -0
- package/dist/components/widgets/sensor/sensor.svelte +59 -0
- package/dist/components/widgets/sensor/sensor.svelte.d.ts +7 -0
- package/dist/components/widgets/servo/move-widget.svelte +44 -0
- package/dist/components/widgets/servo/move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/servo/move.svelte +102 -0
- package/dist/components/widgets/servo/move.svelte.d.ts +8 -0
- package/dist/components/widgets/servo/quick-move-widget.svelte +44 -0
- package/dist/components/widgets/servo/quick-move-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/servo/quick-move.svelte +34 -0
- package/dist/components/widgets/servo/quick-move.svelte.d.ts +8 -0
- package/dist/components/widgets/servo/servo.svelte +111 -0
- package/dist/components/widgets/servo/servo.svelte.d.ts +7 -0
- package/dist/components/widgets/slam/__fixtures__/position.d.ts +3 -0
- package/dist/components/widgets/slam/__fixtures__/position.js +13 -0
- package/dist/components/widgets/slam/move-on-map.svelte +101 -0
- package/dist/components/widgets/slam/move-on-map.svelte.d.ts +11 -0
- package/dist/components/widgets/slam/pose.d.ts +2 -0
- package/dist/components/widgets/slam/pose.js +1 -0
- package/dist/components/widgets/slam/position.svelte +77 -0
- package/dist/components/widgets/slam/position.svelte.d.ts +7 -0
- package/dist/components/widgets/slam/slam.svelte +267 -0
- package/dist/components/widgets/slam/slam.svelte.d.ts +7 -0
- package/dist/components/widgets/switch/position-view.svelte +59 -0
- package/dist/components/widgets/switch/position-view.svelte.d.ts +7 -0
- package/dist/components/widgets/switch/position.svelte +43 -0
- package/dist/components/widgets/switch/position.svelte.d.ts +10 -0
- package/dist/components/widgets/switch/switch.svelte +62 -0
- package/dist/components/widgets/switch/switch.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/__tests__/__fixtures__/classifications.d.ts +10 -0
- package/dist/components/widgets/vision-service/__tests__/__fixtures__/classifications.js +5 -0
- package/dist/components/widgets/vision-service/__tests__/__fixtures__/detections.d.ts +2 -0
- package/dist/components/widgets/vision-service/__tests__/__fixtures__/detections.js +9 -0
- package/dist/components/widgets/vision-service/color.d.ts +7 -0
- package/dist/components/widgets/vision-service/color.js +53 -0
- package/dist/components/widgets/vision-service/context.svelte.d.ts +24 -0
- package/dist/components/widgets/vision-service/context.svelte.js +50 -0
- package/dist/components/widgets/vision-service/detection.svelte +101 -0
- package/dist/components/widgets/vision-service/detection.svelte.d.ts +8 -0
- package/dist/components/widgets/vision-service/geometry-details.svelte +116 -0
- package/dist/components/widgets/vision-service/geometry-details.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/get-image-size.d.ts +14 -0
- package/dist/components/widgets/vision-service/get-image-size.js +28 -0
- package/dist/components/widgets/vision-service/image.svelte +133 -0
- package/dist/components/widgets/vision-service/image.svelte.d.ts +15 -0
- package/dist/components/widgets/vision-service/legend.svelte +135 -0
- package/dist/components/widgets/vision-service/legend.svelte.d.ts +9 -0
- package/dist/components/widgets/vision-service/object-point-cloud-scene.svelte +74 -0
- package/dist/components/widgets/vision-service/object-point-cloud-scene.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/object-point-clouds.svelte +91 -0
- package/dist/components/widgets/vision-service/object-point-clouds.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/scene.svelte +50 -0
- package/dist/components/widgets/vision-service/scene.svelte.d.ts +7 -0
- package/dist/components/widgets/vision-service/vision-service.svelte +225 -0
- package/dist/components/widgets/vision-service/vision-service.svelte.d.ts +7 -0
- package/dist/event-handlers.d.ts +1 -0
- package/dist/event-handlers.js +5 -0
- package/dist/format.d.ts +13 -0
- package/dist/format.js +31 -0
- package/dist/fps.svelte.d.ts +4 -0
- package/dist/fps.svelte.js +22 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/resource.js +26 -0
- package/dist/scroll-into-view.d.ts +2 -0
- package/dist/scroll-into-view.js +17 -0
- package/dist/sort.d.ts +21 -0
- package/dist/sort.js +31 -0
- package/package.json +117 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Svelte library
|
|
2
|
+
|
|
3
|
+
Everything you need to build a Svelte library, powered by [`sv`](https://npmjs.com/package/sv).
|
|
4
|
+
|
|
5
|
+
Read more about creating a library [in the docs](https://svelte.dev/docs/kit/packaging).
|
|
6
|
+
|
|
7
|
+
## Creating a project
|
|
8
|
+
|
|
9
|
+
If you're seeing this, you've probably already done this step. Congrats!
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
# create a new project in the current directory
|
|
13
|
+
npx sv create
|
|
14
|
+
|
|
15
|
+
# create a new project in my-app
|
|
16
|
+
npx sv create my-app
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
To recreate this project with the same configuration:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
# recreate this project
|
|
23
|
+
pnpm dlx sv@0.12.8 create --template library --types ts --add prettier eslint vitest="usages:unit,component" playwright tailwindcss="plugins:none" sveltekit-adapter="adapter:static" devtools-json mcp="ide:claude-code+setup:remote" --install pnpm my-app
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Developing
|
|
27
|
+
|
|
28
|
+
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
npm run dev
|
|
32
|
+
|
|
33
|
+
# or start the server and open the app in a new browser tab
|
|
34
|
+
npm run dev -- --open
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Everything inside `src/lib` is part of your library, everything inside `src/routes` can be used as a showcase or preview app.
|
|
38
|
+
|
|
39
|
+
## Building
|
|
40
|
+
|
|
41
|
+
To build your library:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm pack
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To create a production version of your showcase app:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm run build
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
You can preview the production build with `npm run preview`.
|
|
54
|
+
|
|
55
|
+
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment.
|
|
56
|
+
|
|
57
|
+
## Publishing
|
|
58
|
+
|
|
59
|
+
Go into the `package.json` and give your package the desired name through the `"name"` option. Also consider adding a `"license"` field and point it to a `LICENSE` file which you can create from a template (one popular option is the [MIT license](https://opensource.org/license/mit/)).
|
|
60
|
+
|
|
61
|
+
To publish your library to [npm](https://www.npmjs.com):
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
npm publish
|
|
65
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface ImageData {
|
|
2
|
+
binaryData: Uint8Array;
|
|
3
|
+
partID: string;
|
|
4
|
+
componentType: 'camera';
|
|
5
|
+
componentName: string;
|
|
6
|
+
methodName: string;
|
|
7
|
+
mimeType: string;
|
|
8
|
+
dataRequestTimes: [Date, Date];
|
|
9
|
+
}
|
|
10
|
+
interface AddImageToDatasetContext {
|
|
11
|
+
addImageToDataset: (imageData: ImageData) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const createAddImageToDatasetContext: (onAddImage?: (imageData: ImageData) => void) => AddImageToDatasetContext;
|
|
14
|
+
/**
|
|
15
|
+
* Noop fallback is created because the context is provided in userland outside the SDK.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useAddImageToDataset: () => AddImageToDatasetContext;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getContext, setContext } from 'svelte';
|
|
2
|
+
const key = Symbol('add-image-to-dataset-context');
|
|
3
|
+
export const createAddImageToDatasetContext = (onAddImage) => {
|
|
4
|
+
const addImageToDataset = (imageData) => {
|
|
5
|
+
onAddImage?.(imageData);
|
|
6
|
+
};
|
|
7
|
+
const context = {
|
|
8
|
+
addImageToDataset,
|
|
9
|
+
};
|
|
10
|
+
setContext(key, context);
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Noop fallback is created because the context is provided in userland outside the SDK.
|
|
15
|
+
*/
|
|
16
|
+
export const useAddImageToDataset = () => {
|
|
17
|
+
return getContext(key) ?? createAddImageToDatasetContext();
|
|
18
|
+
};
|
package/dist/assert.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Assertion functions for runtime and type safety. */
|
|
2
|
+
export declare class AssertionError extends Error {
|
|
3
|
+
constructor(message: string);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Assert that a value is defined.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const stringify = (value: number | undefined): number => {
|
|
10
|
+
* assertExists(value)
|
|
11
|
+
* return `${value}` // TS now knows that value is of type `number`
|
|
12
|
+
* }
|
|
13
|
+
*/
|
|
14
|
+
export declare const assertExists: <T>(value: T, message: string) => asserts value is NonNullable<T>;
|
package/dist/assert.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Assertion functions for runtime and type safety. */
|
|
2
|
+
export class AssertionError extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = 'AssertionError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Assert that a value is defined.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const stringify = (value: number | undefined): number => {
|
|
13
|
+
* assertExists(value)
|
|
14
|
+
* return `${value}` // TS now knows that value is of type `number`
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export const assertExists = (value, message) => {
|
|
18
|
+
if (value === null || value === undefined) {
|
|
19
|
+
throw new AssertionError(message);
|
|
20
|
+
}
|
|
21
|
+
};
|
package/dist/builtin.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { ArmClient, BaseClient, BoardClient, ButtonClient, CameraClient, DataManagerClient, DiscoveryClient, EncoderClient, GantryClient, GenericComponentClient, GenericServiceClient, GripperClient, InputControllerClient, MLModelClient, MotionClient, MotorClient, MovementSensorClient, NavigationClient, PoseTrackerClient, PowerSensorClient, SensorClient, ServoClient, SlamClient, SwitchClient, VideoClient, VisionClient, WorldStateStoreClient, } from '@viamrobotics/sdk';
|
|
2
|
+
import { ArmWidget, BaseWidget, BoardWidget, ButtonWidget, CameraWidget, DiscoveryWidget, EncoderWidget, GantryWidget, GripperWidget, InputControllerWidget, MLModelServiceWidget, MotorWidget, MovementSensorWidget, NavigationServiceWidget, PowerSensorWidget, SensorWidget, ServoWidget, SlamWidget, SwitchWidget, VisionServiceWidget, } from './';
|
|
3
|
+
import { getResourceAPI } from "./resource.js";
|
|
4
|
+
// The types are nicer to work with as arrays (as opposed to a record of objects) because TS will infer the types.
|
|
5
|
+
// try not to expose this map so that we can easily refactor it.
|
|
6
|
+
const resourceMap =
|
|
7
|
+
// api: [client, testView, showResourceInControlView]
|
|
8
|
+
// list created via `cat rdkbuiltins/viam-server-stable.json | rg "api" | sort | uniq`
|
|
9
|
+
{
|
|
10
|
+
'rdk:component:arm': [ArmClient, ArmWidget, true],
|
|
11
|
+
'rdk:component:base': [BaseClient, BaseWidget, true],
|
|
12
|
+
'rdk:component:board': [BoardClient, BoardWidget, true],
|
|
13
|
+
'rdk:component:button': [ButtonClient, ButtonWidget, true],
|
|
14
|
+
'rdk:component:camera': [CameraClient, CameraWidget, true],
|
|
15
|
+
'rdk:component:encoder': [EncoderClient, EncoderWidget, true],
|
|
16
|
+
'rdk:component:gantry': [GantryClient, GantryWidget, true],
|
|
17
|
+
'rdk:component:generic': [GenericComponentClient, undefined, true],
|
|
18
|
+
'rdk:component:gripper': [GripperClient, GripperWidget, true],
|
|
19
|
+
'rdk:component:input_controller': [InputControllerClient, InputControllerWidget, true],
|
|
20
|
+
'rdk:component:motor': [MotorClient, MotorWidget, true],
|
|
21
|
+
'rdk:component:movement_sensor': [MovementSensorClient, MovementSensorWidget, true],
|
|
22
|
+
'rdk:component:pose_tracker': [PoseTrackerClient, undefined, true],
|
|
23
|
+
'rdk:component:power_sensor': [PowerSensorClient, PowerSensorWidget, true],
|
|
24
|
+
'rdk:component:sensor': [SensorClient, SensorWidget, true],
|
|
25
|
+
'rdk:component:servo': [ServoClient, ServoWidget, true],
|
|
26
|
+
'rdk:component:switch': [SwitchClient, SwitchWidget, true],
|
|
27
|
+
'rdk:service:base_remote_control': [undefined, undefined, true],
|
|
28
|
+
// dont show -- confusing to users
|
|
29
|
+
'rdk:service:data_manager': [DataManagerClient, undefined, false],
|
|
30
|
+
'rdk:service:discovery': [DiscoveryClient, DiscoveryWidget, true],
|
|
31
|
+
'rdk:service:generic': [GenericServiceClient, undefined, true],
|
|
32
|
+
'rdk:service:mlmodel': [MLModelClient, MLModelServiceWidget, true],
|
|
33
|
+
// dont show -- confusing to users
|
|
34
|
+
'rdk:service:motion': [MotionClient, undefined, false],
|
|
35
|
+
'rdk:service:navigation': [NavigationClient, NavigationServiceWidget, true],
|
|
36
|
+
// dont show -- confusing to users
|
|
37
|
+
'rdk:service:sensors': [undefined, undefined, false],
|
|
38
|
+
'rdk:service:shell': [undefined, undefined, false],
|
|
39
|
+
'rdk:service:slam': [SlamClient, SlamWidget, true],
|
|
40
|
+
'rdk:service:vision': [VisionClient, VisionServiceWidget, true],
|
|
41
|
+
'rdk:service:world_state_store': [WorldStateStoreClient, undefined, true],
|
|
42
|
+
'rdk:service:video': [VideoClient, undefined, true],
|
|
43
|
+
};
|
|
44
|
+
export const clientForBuiltinResource = (resource) => {
|
|
45
|
+
const resAPI = getResourceAPI(resource);
|
|
46
|
+
return resAPI in resourceMap ? resourceMap[resAPI][0] : undefined;
|
|
47
|
+
};
|
|
48
|
+
export const viewForBuiltinResource = (resource) => {
|
|
49
|
+
const resAPI = getResourceAPI(resource);
|
|
50
|
+
return resAPI in resourceMap ? resourceMap[resAPI][1] : undefined;
|
|
51
|
+
};
|
|
52
|
+
export const showResourceInControlView = (resource) => {
|
|
53
|
+
if (resource.namespace === 'rdk-internal') {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
const resAPI = getResourceAPI(resource);
|
|
57
|
+
// unknown apis should still get cards & show up in the sidebar
|
|
58
|
+
return resAPI in resourceMap ? resourceMap[resAPI][2] : true;
|
|
59
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Icon, Tooltip } from '@viamrobotics/prime-core'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
useRadians: boolean
|
|
6
|
+
onToggle: () => void
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const { useRadians, onToggle }: Props = $props()
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<Tooltip>
|
|
13
|
+
<button
|
|
14
|
+
onclick={onToggle}
|
|
15
|
+
aria-label={useRadians ? 'Switch to Degrees' : 'Switch to Radians'}
|
|
16
|
+
class="text-gray-6 hover:border-medium hover:bg-medium active:bg-gray-2 justify-items-end p-0.5"
|
|
17
|
+
>
|
|
18
|
+
<Icon
|
|
19
|
+
name="sync"
|
|
20
|
+
size="xs"
|
|
21
|
+
/>
|
|
22
|
+
</button>
|
|
23
|
+
|
|
24
|
+
<span slot="description">
|
|
25
|
+
{useRadians ? 'Switch to Degrees' : 'Switch to Radians'}
|
|
26
|
+
</span>
|
|
27
|
+
</Tooltip>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements'
|
|
4
|
+
|
|
5
|
+
import { Icon, Tooltip } from '@viamrobotics/prime-core'
|
|
6
|
+
import { twMerge } from 'tailwind-merge'
|
|
7
|
+
|
|
8
|
+
interface Props extends HTMLAttributes<HTMLElement> {
|
|
9
|
+
title?: string | undefined
|
|
10
|
+
tooltip?: string | undefined
|
|
11
|
+
description?: string | undefined
|
|
12
|
+
bottomText?: string | undefined
|
|
13
|
+
class?: string
|
|
14
|
+
children?: Snippet
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const {
|
|
18
|
+
title,
|
|
19
|
+
tooltip,
|
|
20
|
+
description,
|
|
21
|
+
bottomText,
|
|
22
|
+
class: className = '',
|
|
23
|
+
children,
|
|
24
|
+
...rest
|
|
25
|
+
}: Props = $props()
|
|
26
|
+
|
|
27
|
+
const headingID = $props.id()
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<section
|
|
31
|
+
class={twMerge('flex grow flex-col gap-4 p-4', className)}
|
|
32
|
+
aria-labelledby={headingID}
|
|
33
|
+
{...rest}
|
|
34
|
+
>
|
|
35
|
+
{#if title}
|
|
36
|
+
<div class="flex flex-col gap-0.5">
|
|
37
|
+
<h3
|
|
38
|
+
class="flex flex-row items-center gap-1 text-sm font-semibold"
|
|
39
|
+
id={headingID}
|
|
40
|
+
>
|
|
41
|
+
{title}
|
|
42
|
+
{#if tooltip}
|
|
43
|
+
<Tooltip>
|
|
44
|
+
<Icon
|
|
45
|
+
name="information-outline"
|
|
46
|
+
cx="text-gray-6"
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
<p
|
|
50
|
+
slot="description"
|
|
51
|
+
class="text-xs whitespace-pre-line"
|
|
52
|
+
>
|
|
53
|
+
{tooltip}
|
|
54
|
+
</p>
|
|
55
|
+
</Tooltip>
|
|
56
|
+
{/if}
|
|
57
|
+
</h3>
|
|
58
|
+
{#if description}
|
|
59
|
+
<p class="text-subtle-2 text-xs">{description}</p>
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
|
|
64
|
+
{@render children?.()}
|
|
65
|
+
|
|
66
|
+
{#if bottomText}
|
|
67
|
+
<p class="text-subtle-2 mt-auto text-xs">{bottomText}</p>
|
|
68
|
+
{/if}
|
|
69
|
+
</section>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
interface Props extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
title?: string | undefined;
|
|
5
|
+
tooltip?: string | undefined;
|
|
6
|
+
description?: string | undefined;
|
|
7
|
+
bottomText?: string | undefined;
|
|
8
|
+
class?: string;
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
declare const ApiSection: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type ApiSection = ReturnType<typeof ApiSection>;
|
|
13
|
+
export default ApiSection;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
|
|
4
|
+
import { twMerge } from 'tailwind-merge'
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
title: string
|
|
8
|
+
class?: string
|
|
9
|
+
children?: Snippet
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const { title, class: className, children }: Props = $props()
|
|
13
|
+
|
|
14
|
+
const headingID = $props.id()
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<section
|
|
18
|
+
class={twMerge('border-light w-full max-w-50 gap-6 divide-y border', className)}
|
|
19
|
+
aria-labelledby={headingID}
|
|
20
|
+
>
|
|
21
|
+
<h4
|
|
22
|
+
id={headingID}
|
|
23
|
+
class="bg-light font-roboto-mono text-subtle-1 px-3 py-1.25 text-center text-sm uppercase"
|
|
24
|
+
>
|
|
25
|
+
{title}
|
|
26
|
+
</h4>
|
|
27
|
+
{@render children?.()}
|
|
28
|
+
</section>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}
|
|
7
|
+
declare const PinSection: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type PinSection = ReturnType<typeof PinSection>;
|
|
9
|
+
export default PinSection;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
|
|
4
|
+
import { Progress } from '@viamrobotics/prime-core'
|
|
5
|
+
import { MachineConnectionEvent } from '@viamrobotics/sdk'
|
|
6
|
+
import { useConnectionStatus } from '@viamrobotics/svelte-sdk'
|
|
7
|
+
import { twMerge } from 'tailwind-merge'
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
partID: string
|
|
11
|
+
connectingClass?: string
|
|
12
|
+
disconnectedClass?: string
|
|
13
|
+
status?: MachineConnectionEvent
|
|
14
|
+
connected?: Snippet
|
|
15
|
+
connecting?: Snippet
|
|
16
|
+
disconnected?: Snippet
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
partID,
|
|
21
|
+
connectingClass = '',
|
|
22
|
+
disconnectedClass = '',
|
|
23
|
+
status,
|
|
24
|
+
connected,
|
|
25
|
+
connecting,
|
|
26
|
+
disconnected,
|
|
27
|
+
}: Props = $props()
|
|
28
|
+
|
|
29
|
+
const connectionStatus = useConnectionStatus(() => partID)
|
|
30
|
+
const currentStatus = $derived(status ?? connectionStatus.current)
|
|
31
|
+
|
|
32
|
+
let isErrorExpanded = $state(false)
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<svelte:boundary>
|
|
36
|
+
{#if currentStatus === MachineConnectionEvent.CONNECTED}
|
|
37
|
+
{@render connected?.()}
|
|
38
|
+
{:else if currentStatus === MachineConnectionEvent.CONNECTING}
|
|
39
|
+
{#if connecting}
|
|
40
|
+
{@render connecting()}
|
|
41
|
+
{:else}
|
|
42
|
+
<div
|
|
43
|
+
class={twMerge(
|
|
44
|
+
'bg-extralight text-disabled flex h-full min-h-40 w-full items-center justify-center gap-2',
|
|
45
|
+
connectingClass
|
|
46
|
+
)}
|
|
47
|
+
>
|
|
48
|
+
<Progress />
|
|
49
|
+
<div class="capitalize">{currentStatus}...</div>
|
|
50
|
+
</div>
|
|
51
|
+
{/if}
|
|
52
|
+
{:else if currentStatus === MachineConnectionEvent.DISCONNECTED}
|
|
53
|
+
{#if disconnected}
|
|
54
|
+
{@render disconnected()}
|
|
55
|
+
{:else}
|
|
56
|
+
<div
|
|
57
|
+
class={twMerge(
|
|
58
|
+
'bg-extralight text-disabled flex h-full min-h-40 w-full items-center justify-center',
|
|
59
|
+
disconnectedClass
|
|
60
|
+
)}
|
|
61
|
+
>
|
|
62
|
+
This machine is offline
|
|
63
|
+
</div>
|
|
64
|
+
{/if}
|
|
65
|
+
{/if}
|
|
66
|
+
|
|
67
|
+
{#snippet failed(error, reset)}
|
|
68
|
+
<div class="bg-extralight flex h-full w-full flex-col items-center justify-center gap-2 p-4">
|
|
69
|
+
<div>Something went wrong</div>
|
|
70
|
+
<button
|
|
71
|
+
class="text-disabled text-xs hover:underline"
|
|
72
|
+
onclick={reset}>Try again</button
|
|
73
|
+
>
|
|
74
|
+
<button
|
|
75
|
+
class="text-disabled text-xs hover:underline"
|
|
76
|
+
onclick={() => {
|
|
77
|
+
isErrorExpanded = !isErrorExpanded
|
|
78
|
+
}}>{isErrorExpanded ? 'Hide' : 'Show'} error</button
|
|
79
|
+
>
|
|
80
|
+
{#if isErrorExpanded}
|
|
81
|
+
<pre class="font-mono text-xs text-wrap">
|
|
82
|
+
{error}
|
|
83
|
+
</pre>
|
|
84
|
+
{/if}
|
|
85
|
+
</div>
|
|
86
|
+
{/snippet}
|
|
87
|
+
</svelte:boundary>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import { MachineConnectionEvent } from '@viamrobotics/sdk';
|
|
3
|
+
interface Props {
|
|
4
|
+
partID: string;
|
|
5
|
+
connectingClass?: string;
|
|
6
|
+
disconnectedClass?: string;
|
|
7
|
+
status?: MachineConnectionEvent;
|
|
8
|
+
connected?: Snippet;
|
|
9
|
+
connecting?: Snippet;
|
|
10
|
+
disconnected?: Snippet;
|
|
11
|
+
}
|
|
12
|
+
declare const ConnectionStatus: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type ConnectionStatus = ReturnType<typeof ConnectionStatus>;
|
|
14
|
+
export default ConnectionStatus;
|