@viamrobotics/test-widgets 0.9.1 → 0.10.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.
Files changed (23) hide show
  1. package/dist/components/audio-properties.svelte.d.ts +8 -0
  2. package/dist/components/navigation-map/lib/create-geometry.js +1 -3
  3. package/dist/components/navigation-map/types.d.ts +8 -2
  4. package/dist/components/{widgets/motion/pose-input.svelte → pose-editor.svelte} +26 -46
  5. package/dist/components/pose-editor.svelte.d.ts +12 -0
  6. package/dist/components/widgets/arm/move-to-position.svelte +10 -117
  7. package/dist/components/widgets/audio-input/audio-input.svelte +1 -1
  8. package/dist/components/widgets/audio-input/get-properties-widget.svelte +1 -2
  9. package/dist/components/widgets/audio-output/audio-output.svelte +1 -1
  10. package/dist/components/widgets/audio-output/get-properties-widget.svelte +1 -2
  11. package/dist/components/widgets/camera/camera.svelte +20 -8
  12. package/dist/components/widgets/gantry/move-to-position.svelte +9 -4
  13. package/dist/components/widgets/motion/motion.svelte +2 -0
  14. package/dist/components/widgets/motion/move.svelte +27 -4
  15. package/dist/components/widgets/pcd/inputs.svelte +5 -2
  16. package/dist/{components/widgets/motion/parse-pasted-pose.d.ts → parse-pasted-pose.d.ts} +2 -2
  17. package/dist/{components/widgets/motion/parse-pasted-pose.js → parse-pasted-pose.js} +2 -2
  18. package/package.json +170 -13
  19. package/dist/components/widgets/audio-input/properties.svelte.d.ts +0 -8
  20. package/dist/components/widgets/audio-output/properties.svelte +0 -26
  21. package/dist/components/widgets/audio-output/properties.svelte.d.ts +0 -8
  22. package/dist/components/widgets/motion/pose-input.svelte.d.ts +0 -8
  23. /package/dist/components/{widgets/audio-input/properties.svelte → audio-properties.svelte} +0 -0
@@ -0,0 +1,8 @@
1
+ interface Props {
2
+ supportedCodecs: string[];
3
+ sampleRateHz: number;
4
+ numChannels: number;
5
+ }
6
+ declare const AudioProperties: import("svelte").Component<Props, {}, "">;
7
+ type AudioProperties = ReturnType<typeof AudioProperties>;
8
+ export default AudioProperties;
@@ -1,7 +1,5 @@
1
- import { ViamObject3D } from '@viamrobotics/three';
2
1
  export const createGeometry = (type, size = 5, rotation = 0) => {
3
- const pose = new ViamObject3D();
4
- pose.orientationVector.th = rotation;
2
+ const pose = { orientationVector: { th: rotation } };
5
3
  switch (type) {
6
4
  case 'box': {
7
5
  return {
@@ -1,7 +1,13 @@
1
- import type { ViamObject3D } from '@viamrobotics/three';
2
1
  import type { LngLat } from 'maplibre-gl';
2
+ /** Client-side pose for a navigation-map geometry. Rotation only; never serialized. */
3
+ export interface GeometryPose {
4
+ /** Orientation vector; only the theta rotation (radians) is used on the map. */
5
+ orientationVector: {
6
+ th: number;
7
+ };
8
+ }
3
9
  interface BaseGeometry {
4
- pose: ViamObject3D;
10
+ pose: GeometryPose;
5
11
  }
6
12
  export declare const NavigationTab: {
7
13
  readonly Waypoints: "Waypoints";
@@ -16,23 +16,26 @@
16
16
  </script>
17
17
 
18
18
  <script lang="ts">
19
- import { Button, Icon, NumericInput, Tooltip } from '@viamrobotics/prime-core'
19
+ import { Icon, NumericInput, Tooltip } from '@viamrobotics/prime-core'
20
20
 
21
- import AngleUnitToggle from '../../angle-unit-toggle.svelte'
22
- import CopyButton from '../../copy-button.svelte'
23
- import PasteButton from '../../paste-button.svelte'
24
- import Table from '../../table.svelte'
25
- import { numberValueFromEvent } from '../../../event-handlers'
26
- import { degreesToRadians, formatNumeric, radiansToDegrees } from '../../../format'
27
-
28
- import { parsePastedPose } from './parse-pasted-pose'
21
+ import AngleUnitToggle from './angle-unit-toggle.svelte'
22
+ import CopyButton from './copy-button.svelte'
23
+ import PasteButton from './paste-button.svelte'
24
+ import Table from './table.svelte'
25
+ import { numberValueFromEvent } from '../event-handlers'
26
+ import { degreesToRadians, formatNumeric, radiansToDegrees } from '../format'
27
+ import { parsePastedPose } from '../parse-pasted-pose'
29
28
 
30
29
  interface Props {
31
30
  pose: Pose
32
31
  onPoseChange: (pose: Pose) => void
32
+ /** Heading shown above the input table. */
33
+ title: string
34
+ /** Optional info-tooltip text shown next to the title. */
35
+ description?: string
33
36
  }
34
37
 
35
- const { pose, onPoseChange }: Props = $props()
38
+ const { pose, onPoseChange, title, description }: Props = $props()
36
39
 
37
40
  let useRadians = $state(false)
38
41
 
@@ -41,6 +44,8 @@
41
44
  theta: useRadians ? degreesToRadians(pose.theta) : pose.theta,
42
45
  })
43
46
 
47
+ // Copy the stored pose (theta in degrees) so it round-trips through paste
48
+ // regardless of the display unit currently selected.
44
49
  const copyData = $derived(JSON.stringify(pose))
45
50
 
46
51
  const handlePaste = (data: string): boolean => {
@@ -57,10 +62,6 @@
57
62
  onPoseChange({ ...pose, [key]: nextValue })
58
63
  }
59
64
 
60
- const zero = () => {
61
- onPoseChange({ x: 0, y: 0, z: 0, oX: 0, oY: 0, oZ: 1, theta: 0 })
62
- }
63
-
64
65
  const poseUnits = $derived({
65
66
  x: 'mm',
66
67
  y: 'mm',
@@ -75,18 +76,17 @@
75
76
  <div class="flex min-w-0 flex-col gap-4">
76
77
  <div class="flex items-center justify-between">
77
78
  <span class="flex flex-row items-center gap-1 text-sm">
78
- Destination pose
79
- <Tooltip>
80
- <Icon
81
- name="information-outline"
82
- cx="text-gray-6"
83
- />
84
-
85
- <span slot="description">
86
- The target pose expressed in the selected reference frame. Translations are in
87
- millimeters.
88
- </span>
89
- </Tooltip>
79
+ {title}
80
+ {#if description}
81
+ <Tooltip>
82
+ <Icon
83
+ name="information-outline"
84
+ cx="text-gray-6"
85
+ />
86
+
87
+ <span slot="description">{description}</span>
88
+ </Tooltip>
89
+ {/if}
90
90
  </span>
91
91
  <div class="flex gap-1">
92
92
  <AngleUnitToggle
@@ -131,24 +131,4 @@
131
131
  {/each}
132
132
  </tbody>
133
133
  </Table>
134
-
135
- <div class="flex flex-col gap-2">
136
- <span class="flex flex-row gap-2">
137
- <h4 class="text-xs font-semibold">Quick set</h4>
138
- <Tooltip>
139
- <Icon
140
- name="information-outline"
141
- cx="text-gray-6"
142
- />
143
-
144
- <span slot="description"> Will update the pose values but will not execute </span>
145
- </Tooltip>
146
- </span>
147
- <Button
148
- class="w-fit"
149
- onclick={zero}
150
- >
151
- Zero
152
- </Button>
153
- </div>
154
134
  </div>
@@ -0,0 +1,12 @@
1
+ import type { Pose } from '@viamrobotics/sdk';
2
+ interface Props {
3
+ pose: Pose;
4
+ onPoseChange: (pose: Pose) => void;
5
+ /** Heading shown above the input table. */
6
+ title: string;
7
+ /** Optional info-tooltip text shown next to the title. */
8
+ description?: string;
9
+ }
10
+ declare const PoseEditor: import("svelte").Component<Props, {}, "">;
11
+ type PoseEditor = ReturnType<typeof PoseEditor>;
12
+ export default PoseEditor;
@@ -1,15 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { Pose } from '@viamrobotics/sdk'
3
3
 
4
- import { Button, Icon, NumericInput, Tooltip } from '@viamrobotics/prime-core'
4
+ import { Button, Icon, Tooltip } from '@viamrobotics/prime-core'
5
5
 
6
- import AngleUnitToggle from '../../angle-unit-toggle.svelte'
7
- import CopyButton from '../../copy-button.svelte'
8
6
  import ErrorDisplay from '../../error.svelte'
9
- import PasteButton from '../../paste-button.svelte'
10
- import Table from '../../table.svelte'
11
- import { numberValueFromEvent } from '../../../event-handlers'
12
- import { degreesToRadians, formatNumeric, radiansToDegrees } from '../../../format'
7
+ import PoseEditor from '../../pose-editor.svelte'
13
8
 
14
9
  interface Props {
15
10
  endPosition: Pose
@@ -21,7 +16,6 @@
21
16
 
22
17
  // svelte-ignore state_referenced_locally
23
18
  let desiredPosition = $state({ ...endPosition })
24
- let useRadians = $state(false)
25
19
 
26
20
  const resetToZero = () => {
27
21
  desiredPosition = {
@@ -38,118 +32,17 @@
38
32
  const resetToCurrent = () => {
39
33
  desiredPosition = { ...endPosition }
40
34
  }
41
-
42
- const displayPosition = $derived({
43
- x: desiredPosition.x,
44
- y: desiredPosition.y,
45
- z: desiredPosition.z,
46
- oX: desiredPosition.oX,
47
- oY: desiredPosition.oY,
48
- oZ: desiredPosition.oZ,
49
- theta: useRadians ? degreesToRadians(desiredPosition.theta) : desiredPosition.theta,
50
- })
51
-
52
- const copyData = $derived(JSON.stringify(displayPosition))
53
- const handlePaste = (data: string): boolean => {
54
- try {
55
- desiredPosition = JSON.parse(data) as Pose
56
- } catch {
57
- return false
58
- }
59
- return true
60
- }
61
-
62
- const handleAngleInputChange = (key: keyof Pose, inputValue: number) => {
63
- if (key === 'theta') {
64
- desiredPosition[key] = useRadians ? radiansToDegrees(inputValue) : inputValue
65
- } else {
66
- desiredPosition[key] = inputValue
67
- }
68
- }
69
-
70
- const positionLabels: Record<keyof Pose, string> = {
71
- x: 'X',
72
- y: 'Y',
73
- z: 'Z',
74
- oX: 'OX',
75
- oY: 'OY',
76
- oZ: 'OZ',
77
- theta: 'θ',
78
- } as const
79
- const positionUnits = $derived({
80
- x: 'mm',
81
- y: 'mm',
82
- z: 'mm',
83
- oX: '',
84
- oY: '',
85
- oZ: '',
86
- theta: useRadians ? 'rad' : 'deg',
87
- } as const satisfies Record<keyof Pose, string>)
88
-
89
- const positionLabelsList = Object.entries(positionLabels) as [keyof Pose, string][]
90
35
  </script>
91
36
 
92
37
  <div class="flex min-w-0 flex-col gap-4">
93
- <!-- Controls Header -->
94
- <div class="flex items-center justify-between">
95
- <span class="flex flex-row items-center gap-1 text-sm">
96
- Pose Values
97
- <Tooltip>
98
- <Icon
99
- name="information-outline"
100
- cx="text-gray-6"
101
- />
102
-
103
- <span slot="description">
104
- Pose is with respect to the arm origin and does not take into account the motion service
105
- or frame system.
106
- </span>
107
- </Tooltip>
108
- </span>
109
- <div class="flex gap-1">
110
- <AngleUnitToggle
111
- {useRadians}
112
- onToggle={() => {
113
- useRadians = !useRadians
114
- }}
115
- />
116
- <CopyButton data={copyData} />
117
- <PasteButton onPaste={handlePaste} />
118
- </div>
119
- </div>
120
-
121
- <Table>
122
- <thead>
123
- <tr>
124
- <th>Pose</th>
125
- <th>Value</th>
126
- </tr>
127
- </thead>
128
- <tbody>
129
- {#each positionLabelsList as labelList (labelList)}
130
- {@const [key, label] = labelList}
131
- {@const value = Number.parseFloat(formatNumeric(displayPosition[key]))}
132
- <tr>
133
- <th>
134
- <span class="relative inline-flex justify-center">
135
- {label}
136
- <abbr class="text-subtle-2 absolute left-full ml-1">{positionUnits[key]}</abbr>
137
- </span>
138
- </th>
139
- <th>
140
- <NumericInput
141
- cx="max-w-[76px]"
142
- {value}
143
- on:change={(event) => {
144
- const inputValue = numberValueFromEvent(event) ?? 0
145
- handleAngleInputChange(key, inputValue)
146
- }}
147
- />
148
- </th>
149
- </tr>
150
- {/each}
151
- </tbody>
152
- </Table>
38
+ <PoseEditor
39
+ pose={desiredPosition}
40
+ onPoseChange={(next) => {
41
+ desiredPosition = next
42
+ }}
43
+ title="Pose Values"
44
+ description="Pose is with respect to the arm origin and does not take into account the motion service or frame system."
45
+ />
153
46
 
154
47
  <div class="mb-2 flex flex-col gap-2">
155
48
  <span class="flex flex-row gap-2">
@@ -4,6 +4,7 @@
4
4
  import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
5
5
 
6
6
  import ApiSection from '../../api-section.svelte'
7
+ import Properties from '../../audio-properties.svelte'
7
8
  import ConnectionStatus from '../../connection-status.svelte'
8
9
  import MutationSection from '../../mutation-section.svelte'
9
10
  import Query from '../../query.svelte'
@@ -12,7 +13,6 @@
12
13
  import { numberValueFromEvent } from '../../../event-handlers'
13
14
 
14
15
  import { createAudioCapturer } from './create-audio-capturer.svelte.js'
15
- import Properties from './properties.svelte'
16
16
 
17
17
  interface Props {
18
18
  partID: string
@@ -3,10 +3,9 @@
3
3
  import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
4
4
 
5
5
  import ApiSection from '../../api-section.svelte'
6
+ import Properties from '../../audio-properties.svelte'
6
7
  import Query from '../../query.svelte'
7
8
 
8
- import Properties from './properties.svelte'
9
-
10
9
  interface Props {
11
10
  partID: string
12
11
  resourceName: string
@@ -4,6 +4,7 @@
4
4
  import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
5
5
 
6
6
  import ApiSection from '../../api-section.svelte'
7
+ import Properties from '../../audio-properties.svelte'
7
8
  import ConnectionStatus from '../../connection-status.svelte'
8
9
  import MutationSection from '../../mutation-section.svelte'
9
10
  import Query from '../../query.svelte'
@@ -13,7 +14,6 @@
13
14
 
14
15
  import { ExtToCodec, MimeToCodec } from './codec.js'
15
16
  import { createAudioPlayer } from './create-audio-player.svelte.js'
16
- import Properties from './properties.svelte'
17
17
 
18
18
  interface Props {
19
19
  partID: string
@@ -3,10 +3,9 @@
3
3
  import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
4
4
 
5
5
  import ApiSection from '../../api-section.svelte'
6
+ import Properties from '../../audio-properties.svelte'
6
7
  import Query from '../../query.svelte'
7
8
 
8
- import Properties from './properties.svelte'
9
-
10
9
  interface Props {
11
10
  partID: string
12
11
  resourceName: string
@@ -3,6 +3,7 @@
3
3
  import { Button, Label, Select, Switch, ToggleButtons } from '@viamrobotics/prime-core'
4
4
  import { CameraClient } from '@viamrobotics/sdk'
5
5
  import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
6
+ import { PersistedState } from 'runed'
6
7
 
7
8
  import { useAddImageToDataset } from '../../../add-image-to-dataset'
8
9
  import ConnectionStatus from '../../connection-status.svelte'
@@ -37,14 +38,12 @@
37
38
  () => resourceName,
38
39
  'camera'
39
40
  )
40
- let isPlaying = $state(false)
41
- $effect(() => {
42
- // Reset the play gate whenever the camera identity changes so a swapped
43
- // resource doesn't auto-start using the previous instance's state.
44
- void resourceName
45
- void partID
46
- isPlaying = false
47
- })
41
+
42
+ const waitToStartFeed = $derived(
43
+ new PersistedState(`camera-wait-to-start-feed/${partID}/${resourceName}`, false)
44
+ )
45
+
46
+ let isPlaying = $derived(!waitToStartFeed.current)
48
47
  let isShowingPointcloud = $state(false)
49
48
  let selectedSource = $state('')
50
49
  let sourceNames = $state<string[]>([])
@@ -168,6 +167,19 @@
168
167
  headingId={getImagesHeadingID}
169
168
  />
170
169
  </div>
170
+ <div class="flex gap-4 px-4 pt-3">
171
+ <Label position="left">
172
+ Wait to start feed
173
+ <Switch
174
+ slot="input"
175
+ annotated
176
+ on={waitToStartFeed.current}
177
+ on:change={(event) => {
178
+ waitToStartFeed.current = event.detail
179
+ }}
180
+ />
181
+ </Label>
182
+ </div>
171
183
  {#if isPlaying}
172
184
  <div class="flex gap-4 p-4 pb-3">
173
185
  <RefetchController
@@ -4,6 +4,7 @@
4
4
 
5
5
  import ErrorDisplay from '../../error.svelte'
6
6
  import Table from '../../table.svelte'
7
+ import { numberValueFromEvent } from '../../../event-handlers'
7
8
 
8
9
  import { matchArrayLength } from './match-array-length'
9
10
 
@@ -36,12 +37,16 @@
36
37
  })
37
38
 
38
39
  const onChangePos = (index: number, event: Event) => {
39
- const target = event.target as HTMLInputElement
40
- desiredPositions[index] = target.valueAsNumber
40
+ const value = numberValueFromEvent(event)
41
+ if (value !== undefined) {
42
+ desiredPositions[index] = value
43
+ }
41
44
  }
42
45
  const onChangeSpeed = (index: number, event: Event) => {
43
- const target = event.target as HTMLInputElement
44
- desiredSpeeds[index] = target.valueAsNumber
46
+ const value = numberValueFromEvent(event)
47
+ if (value !== undefined) {
48
+ desiredSpeeds[index] = value
49
+ }
45
50
  }
46
51
  const resetToZero = () => {
47
52
  desiredSpeeds = matchArrayLength([], positions, 50)
@@ -43,6 +43,8 @@
43
43
  options={frameNames}
44
44
  onChange={(value) => {
45
45
  selectedFrame = value
46
+ // reset the destination to the newly selected frame's parent
47
+ selectedDestination = undefined
46
48
  }}
47
49
  />
48
50
  <FrameSelect
@@ -1,16 +1,15 @@
1
1
  <script lang="ts">
2
2
  import type { Pose } from '@viamrobotics/sdk'
3
3
 
4
- import { Button, Progress } from '@viamrobotics/prime-core'
4
+ import { Button, Icon, Progress, Tooltip } from '@viamrobotics/prime-core'
5
5
  import { CodeEditor } from '@viamrobotics/prime-core/code-editor'
6
6
  import { PersistedState } from 'runed'
7
7
 
8
8
  import ErrorDisplay from '../../error.svelte'
9
+ import PoseEditor from '../../pose-editor.svelte'
9
10
 
10
11
  import type { MoveInput } from './parse-move-args'
11
12
 
12
- import PoseInput from './pose-input.svelte'
13
-
14
13
  interface Props {
15
14
  /** The frame being moved. Gates execution and re-seeds the editor on change. */
16
15
  frameName: string
@@ -56,13 +55,37 @@
56
55
  </script>
57
56
 
58
57
  <div class="flex min-w-0 flex-col gap-4">
59
- <PoseInput
58
+ <PoseEditor
60
59
  {pose}
61
60
  onPoseChange={(next) => {
62
61
  edit = { key: editKey, pose: next }
63
62
  }}
63
+ title="Destination pose"
64
+ description="The target pose expressed in the selected reference frame. Translations are in millimeters."
64
65
  />
65
66
 
67
+ <div class="flex flex-col gap-2">
68
+ <span class="flex flex-row gap-2">
69
+ <h4 class="text-xs font-semibold">Quick set</h4>
70
+ <Tooltip>
71
+ <Icon
72
+ name="information-outline"
73
+ cx="text-gray-6"
74
+ />
75
+
76
+ <span slot="description"> Will update the pose values but will not execute </span>
77
+ </Tooltip>
78
+ </span>
79
+ <Button
80
+ class="w-fit"
81
+ onclick={() => {
82
+ edit = { key: editKey, pose: zeroPose }
83
+ }}
84
+ >
85
+ Zero
86
+ </Button>
87
+ </div>
88
+
66
89
  <div class="flex flex-col gap-1">
67
90
  <span class="text-xs font-medium">
68
91
  World state <abbr class="text-subtle-2">(optional JSON)</abbr>
@@ -3,6 +3,8 @@
3
3
 
4
4
  import { Label, NumericInput, Select } from '@viamrobotics/prime-core'
5
5
 
6
+ import { numberValueFromEvent } from '../../../event-handlers'
7
+
6
8
  import Download from './download.svelte'
7
9
 
8
10
  interface Props {
@@ -25,8 +27,9 @@
25
27
  ] as const
26
28
 
27
29
  const handlePointSizeChange = (event: Event) => {
28
- if (event.target instanceof HTMLInputElement) {
29
- onPointSizeChange(event.target.valueAsNumber)
30
+ const value = numberValueFromEvent(event)
31
+ if (value !== undefined) {
32
+ onPointSizeChange(value)
30
33
  }
31
34
  }
32
35
 
@@ -1,8 +1,8 @@
1
1
  import type { Pose } from '@viamrobotics/sdk';
2
2
  /**
3
3
  * Parses a clipboard string as a pose. Accepts a JSON object with numeric
4
- * `x`, `y`, `z`, `oX`, `oY`, `oZ`, and `theta` fields — the same shape the arm
5
- * `MoveToPosition` widget copies, so poses can be pasted between the two.
4
+ * `x`, `y`, `z`, `oX`, `oY`, `oZ`, and `theta` fields — the same shape the pose
5
+ * editor copies, so poses can be pasted between any widget that edits one.
6
6
  *
7
7
  * @param data - The pasted string.
8
8
  * @returns The parsed pose, or `undefined` if it is not a valid pose.
@@ -8,8 +8,8 @@ const isPose = (value) => {
8
8
  };
9
9
  /**
10
10
  * Parses a clipboard string as a pose. Accepts a JSON object with numeric
11
- * `x`, `y`, `z`, `oX`, `oY`, `oZ`, and `theta` fields — the same shape the arm
12
- * `MoveToPosition` widget copies, so poses can be pasted between the two.
11
+ * `x`, `y`, `z`, `oX`, `oY`, `oZ`, and `theta` fields — the same shape the pose
12
+ * editor copies, so poses can be pasted between any widget that edits one.
13
13
  *
14
14
  * @param data - The pasted string.
15
15
  * @returns The parsed pose, or `undefined` if it is not a valid pose.
package/package.json CHANGED
@@ -1,8 +1,165 @@
1
1
  {
2
2
  "name": "@viamrobotics/test-widgets",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
+ "wireit": {
7
+ "build": {
8
+ "dependencies": [
9
+ "vite-build",
10
+ "package"
11
+ ]
12
+ },
13
+ "package": {
14
+ "command": "svelte-package && publint",
15
+ "files": [
16
+ "src/lib/**",
17
+ "svelte.config.js",
18
+ "tsconfig.json",
19
+ "package.json"
20
+ ],
21
+ "output": [
22
+ "dist/**"
23
+ ],
24
+ "dependencies": [
25
+ "svelte-sync"
26
+ ],
27
+ "packageLocks": [
28
+ "pnpm-lock.yaml"
29
+ ]
30
+ },
31
+ "vite-build": {
32
+ "command": "vite build",
33
+ "files": [
34
+ "src/**",
35
+ "static/**",
36
+ ".env",
37
+ ".env.*",
38
+ "vite.config.ts",
39
+ "svelte.config.js",
40
+ "postcss.config.js",
41
+ "tsconfig.json",
42
+ "package.json"
43
+ ],
44
+ "output": [
45
+ "build/**",
46
+ ".svelte-kit/output/**"
47
+ ],
48
+ "dependencies": [
49
+ "svelte-sync",
50
+ "package"
51
+ ],
52
+ "packageLocks": [
53
+ "pnpm-lock.yaml"
54
+ ]
55
+ },
56
+ "svelte-sync": {
57
+ "command": "svelte-kit sync",
58
+ "files": [
59
+ "svelte.config.js",
60
+ "src/**",
61
+ "tsconfig.json",
62
+ "package.json"
63
+ ],
64
+ "output": [
65
+ ".svelte-kit/generated/**",
66
+ ".svelte-kit/types/**",
67
+ ".svelte-kit/ambient.d.ts",
68
+ ".svelte-kit/non-ambient.d.ts",
69
+ ".svelte-kit/tsconfig.json"
70
+ ],
71
+ "packageLocks": [
72
+ "pnpm-lock.yaml"
73
+ ]
74
+ },
75
+ "prepack": {
76
+ "dependencies": [
77
+ "package"
78
+ ]
79
+ },
80
+ "check": {
81
+ "command": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings",
82
+ "files": [
83
+ "src/**",
84
+ "tsconfig.json",
85
+ "svelte.config.js",
86
+ "package.json"
87
+ ],
88
+ "output": [],
89
+ "dependencies": [
90
+ "svelte-sync"
91
+ ],
92
+ "packageLocks": [
93
+ "pnpm-lock.yaml"
94
+ ]
95
+ },
96
+ "lint": {
97
+ "command": "eslint . --concurrency auto",
98
+ "files": [
99
+ "**",
100
+ "!build/**",
101
+ "!dist/**",
102
+ "!.svelte-kit/**",
103
+ "!coverage/**",
104
+ "!test-results/**",
105
+ "!.env*",
106
+ "!**/*.tgz"
107
+ ],
108
+ "output": [],
109
+ "packageLocks": [
110
+ "pnpm-lock.yaml"
111
+ ]
112
+ },
113
+ "format": {
114
+ "command": "prettier --check .",
115
+ "files": [
116
+ "**",
117
+ "!build/**",
118
+ "!dist/**",
119
+ "!.svelte-kit/**",
120
+ "!coverage/**",
121
+ "!test-results/**",
122
+ "!.env*",
123
+ "!**/*.tgz"
124
+ ],
125
+ "output": [],
126
+ "packageLocks": [
127
+ "pnpm-lock.yaml"
128
+ ]
129
+ },
130
+ "test": {
131
+ "command": "vitest --run",
132
+ "files": [
133
+ "src/**",
134
+ "vite.config.ts",
135
+ "svelte.config.js",
136
+ "postcss.config.js",
137
+ "tsconfig.json",
138
+ "package.json"
139
+ ],
140
+ "output": [],
141
+ "packageLocks": [
142
+ "pnpm-lock.yaml"
143
+ ]
144
+ },
145
+ "test:coverage": {
146
+ "command": "vitest run --coverage",
147
+ "files": [
148
+ "src/**",
149
+ "vite.config.ts",
150
+ "svelte.config.js",
151
+ "postcss.config.js",
152
+ "tsconfig.json",
153
+ "package.json"
154
+ ],
155
+ "output": [
156
+ "coverage/**"
157
+ ],
158
+ "packageLocks": [
159
+ "pnpm-lock.yaml"
160
+ ]
161
+ }
162
+ },
6
163
  "files": [
7
164
  "dist",
8
165
  "!dist/**/*.test.*",
@@ -37,7 +194,6 @@
37
194
  "@viamrobotics/prime-core": ">=0.1",
38
195
  "@viamrobotics/sdk": ">=0.68",
39
196
  "@viamrobotics/svelte-sdk": ">=1.1",
40
- "@viamrobotics/three": ">=0.0.9",
41
197
  "lodash-es": ">=4",
42
198
  "maplibre-gl": ">=5",
43
199
  "runed": ">=0.28",
@@ -46,9 +202,6 @@
46
202
  "threlte-uikit": ">=2"
47
203
  },
48
204
  "peerDependenciesMeta": {
49
- "@viamrobotics/three": {
50
- "optional": true
51
- },
52
205
  "maplibre-gl": {
53
206
  "optional": true
54
207
  }
@@ -87,8 +240,7 @@
87
240
  "@viamrobotics/sdk": "^0.69.0",
88
241
  "@viamrobotics/svelte-sdk": "^1.2.1",
89
242
  "@viamrobotics/tailwind-config": "^1.0.0",
90
- "@viamrobotics/three": "^0.0.9",
91
- "@vitest/browser": "^4.1.8",
243
+ "@vitest/browser": "^4.1.10",
92
244
  "@vitest/browser-playwright": "^4.1.5",
93
245
  "@vitest/coverage-v8": "^4.1.5",
94
246
  "@zag-js/dialog": "^1.37.0",
@@ -121,7 +273,8 @@
121
273
  "vite-plugin-devtools-json": "^1.0.0",
122
274
  "vite-plugin-glsl": "^1.6.0",
123
275
  "vitest": "^4.1.5",
124
- "vitest-browser-svelte": "^2.1.1"
276
+ "vitest-browser-svelte": "^2.1.1",
277
+ "wireit": "^0.14.13"
125
278
  },
126
279
  "engines": {
127
280
  "node": ">=22.12.0"
@@ -131,16 +284,20 @@
131
284
  },
132
285
  "scripts": {
133
286
  "dev": "vite dev",
134
- "build": "vite build && pnpm prepack",
287
+ "build": "wireit",
288
+ "vite-build": "wireit",
289
+ "package": "wireit",
290
+ "svelte-sync": "wireit",
135
291
  "preview": "vite preview",
136
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --fail-on-warnings",
292
+ "check": "wireit",
137
293
  "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
138
- "lint": "eslint . --concurrency auto",
294
+ "lint": "wireit",
139
295
  "lint:fix": "eslint . --fix --concurrency auto",
140
- "format": "prettier --check .",
296
+ "format": "wireit",
141
297
  "format:fix": "prettier --write .",
142
298
  "test:unit": "vitest",
143
- "test": "pnpm test:unit -- --run",
299
+ "test": "wireit",
300
+ "test:coverage": "wireit",
144
301
  "test:e2e": "playwright test",
145
302
  "release": "changeset publish"
146
303
  }
@@ -1,8 +0,0 @@
1
- interface Props {
2
- supportedCodecs: string[];
3
- sampleRateHz: number;
4
- numChannels: number;
5
- }
6
- declare const Properties: import("svelte").Component<Props, {}, "">;
7
- type Properties = ReturnType<typeof Properties>;
8
- export default Properties;
@@ -1,26 +0,0 @@
1
- <script lang="ts">
2
- interface Props {
3
- supportedCodecs: string[]
4
- sampleRateHz: number
5
- numChannels: number
6
- }
7
-
8
- const { supportedCodecs, sampleRateHz, numChannels }: Props = $props()
9
- </script>
10
-
11
- <dl class="font-roboto-mono flex flex-col gap-y-2 text-sm">
12
- <div class="flex flex-col gap-0.5">
13
- <dt class="text-default w-50 min-w-50 pr-2 font-medium">Supported Codecs</dt>
14
- <dd class="text-subtle-1">
15
- {supportedCodecs.length > 0 ? supportedCodecs.join(', ') : 'None'}
16
- </dd>
17
- </div>
18
- <div class="flex flex-col gap-0.5">
19
- <dt class="text-default w-50 min-w-50 pr-2 font-medium">Sample Rate</dt>
20
- <dd class="text-subtle-1">{sampleRateHz} Hz</dd>
21
- </div>
22
- <div class="flex flex-col gap-0.5">
23
- <dt class="text-default w-50 min-w-50 pr-2 font-medium">Channels</dt>
24
- <dd class="text-subtle-1">{numChannels}</dd>
25
- </div>
26
- </dl>
@@ -1,8 +0,0 @@
1
- interface Props {
2
- supportedCodecs: string[];
3
- sampleRateHz: number;
4
- numChannels: number;
5
- }
6
- declare const Properties: import("svelte").Component<Props, {}, "">;
7
- type Properties = ReturnType<typeof Properties>;
8
- export default Properties;
@@ -1,8 +0,0 @@
1
- import type { Pose } from '@viamrobotics/sdk';
2
- interface Props {
3
- pose: Pose;
4
- onPoseChange: (pose: Pose) => void;
5
- }
6
- declare const PoseInput: import("svelte").Component<Props, {}, "">;
7
- type PoseInput = ReturnType<typeof PoseInput>;
8
- export default PoseInput;