@viamrobotics/motion-tools 0.3.1 → 0.3.2

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.
@@ -32,7 +32,10 @@
32
32
  }}
33
33
  />
34
34
 
35
- <div class="relative h-full w-full">
35
+ <div
36
+ class="relative h-full w-full"
37
+ id="motion-tools-root"
38
+ >
36
39
  <Canvas renderMode="always">
37
40
  <World>
38
41
  <SceneProviders>
@@ -1,10 +1,17 @@
1
1
  <script lang="ts">
2
- let { children } = $props()
2
+ import type { Snippet } from 'svelte'
3
+
4
+ interface Props {
5
+ selector?: string
6
+ children: Snippet
7
+ }
8
+
9
+ let { children, selector = 'body' }: Props = $props()
3
10
 
4
11
  let div: HTMLDivElement
5
12
 
6
13
  $effect(() => {
7
- document.body.append(div)
14
+ document.querySelector(selector)?.append(div)
8
15
  return () => {
9
16
  // eslint-disable-next-line svelte/no-dom-manipulating
10
17
  div.remove()
@@ -1,5 +1,8 @@
1
- declare const DomPortal: import("svelte").Component<{
2
- children: any;
3
- }, {}, "">;
1
+ import type { Snippet } from 'svelte';
2
+ interface Props {
3
+ selector?: string;
4
+ children: Snippet;
5
+ }
6
+ declare const DomPortal: import("svelte").Component<Props, {}, "">;
4
7
  type DomPortal = ReturnType<typeof DomPortal>;
5
8
  export default DomPortal;
@@ -20,7 +20,6 @@ export const providePointclouds = (partID) => {
20
20
  const options = $derived(clients.map((cameraClient) => {
21
21
  const name = cameraClient.current?.name ?? '';
22
22
  const interval = refreshRates.get('Pointclouds');
23
- console.log(interval);
24
23
  return queryOptions({
25
24
  enabled: interval !== -1 && cameraClient.current !== undefined,
26
25
  refetchInterval: interval === 0 ? false : interval,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/motion-tools",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Motion visualization with Viam",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",