@viamrobotics/motion-tools 1.30.0 → 1.31.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.
@@ -43,7 +43,8 @@
43
43
  )
44
44
  const isFragmentComponentWithVariables = $derived(
45
45
  name.current &&
46
- Object.keys(partConfig.componentNameToFragmentInfo[name.current]?.variables ?? {}).length > 0
46
+ Object.keys(partConfig.componentNameToFragmentInfo?.[name.current]?.variables ?? {}).length >
47
+ 0
47
48
  )
48
49
 
49
50
  // Mesh sets name={entity} on its inner mesh, so useSelectedObject3d resolves
@@ -111,7 +111,8 @@
111
111
  const isGeometry = $derived(!!geometriesAPI.current)
112
112
  const isFragmentComponentWithVariables = $derived(
113
113
  name.current &&
114
- Object.keys(partConfig.componentNameToFragmentInfo[name.current]?.variables ?? {}).length > 0
114
+ Object.keys(partConfig.componentNameToFragmentInfo?.[name.current]?.variables ?? {}).length >
115
+ 0
115
116
  )
116
117
  const showEditFrameOptions = $derived(
117
118
  isFrameNode && partConfig.hasEditPermissions && !isFragmentComponentWithVariables
@@ -25,7 +25,7 @@ export const provideConfigFrames = () => {
25
25
  });
26
26
  const [fragmentFrames, fragmentUnsetFrameNames] = $derived.by(() => {
27
27
  const { fragment_mods: fragmentMods = [] } = partConfig.current;
28
- const fragmentDefinedComponents = Object.keys(partConfig.componentNameToFragmentInfo);
28
+ const fragmentDefinedComponents = Object.keys(partConfig.componentNameToFragmentInfo ?? {});
29
29
  const results = {};
30
30
  const unsetResults = [];
31
31
  // deal with fragment defined components
package/dist/lib.d.ts CHANGED
@@ -7,3 +7,4 @@ export { OrientationVector } from './three/OrientationVector';
7
7
  export { parsePcdInWorker } from './loaders/pcd';
8
8
  export { createBinaryPCD } from './pcd';
9
9
  export { metadataFromStruct } from './metadata';
10
+ export { decodeDrawnSnapshotPointClouds } from './snapshot';
package/dist/lib.js CHANGED
@@ -13,3 +13,4 @@ export { OrientationVector } from './three/OrientationVector';
13
13
  export { parsePcdInWorker } from './loaders/pcd';
14
14
  export { createBinaryPCD } from './pcd';
15
15
  export { metadataFromStruct } from './metadata';
16
+ export { decodeDrawnSnapshotPointClouds } from './snapshot';