@viamrobotics/test-widgets 0.0.1 → 0.1.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.
Files changed (50) hide show
  1. package/dist/components/index.d.ts +2 -4
  2. package/dist/components/index.js +2 -4
  3. package/dist/components/maplibre/controls/center.svelte +13 -10
  4. package/dist/components/maplibre/controls/follow.svelte +9 -7
  5. package/dist/components/maplibre/controls/navigation.svelte +6 -4
  6. package/dist/components/maplibre/controls/satellite.svelte +6 -4
  7. package/dist/components/maplibre/{hooks.d.ts → hooks.svelte.d.ts} +9 -14
  8. package/dist/components/maplibre/{hooks.js → hooks.svelte.js} +31 -16
  9. package/dist/components/maplibre/index.d.ts +2 -2
  10. package/dist/components/maplibre/index.js +2 -2
  11. package/dist/components/maplibre/index.svelte +9 -2
  12. package/dist/components/maplibre/marker.svelte +5 -3
  13. package/dist/components/maplibre/plugins/{raycast.js → raycast.svelte.js} +8 -7
  14. package/dist/components/maplibre/plugins/three.svelte.js +8 -6
  15. package/dist/components/navigation-map/components/draw-tool.svelte +15 -8
  16. package/dist/components/navigation-map/components/nav/index.svelte +1 -1
  17. package/dist/components/navigation-map/components/nav/key.svelte +1 -1
  18. package/dist/components/navigation-map/components/nav/obstacles-legend.svelte +1 -1
  19. package/dist/components/navigation-map/components/nav/obstacles.svelte +5 -3
  20. package/dist/components/navigation-map/components/nav/waypoints.svelte +4 -2
  21. package/dist/components/navigation-map/components/obstacle.svelte +18 -12
  22. package/dist/components/navigation-map/plugins/interactivity.js +4 -2
  23. package/dist/components/widgets/arm/move-to-joint-positions.svelte +1 -0
  24. package/dist/components/widgets/arm/move-to-position.svelte +1 -0
  25. package/dist/components/widgets/do-command/do-command.svelte +14 -4
  26. package/dist/components/widgets/navigation/obstacles/scene.svelte +4 -2
  27. package/dist/components/widgets/switch/position-view.svelte +6 -6
  28. package/dist/components/widgets/vision-service/context.svelte.js +6 -6
  29. package/package.json +116 -116
  30. package/dist/components/image-annotations/annotation-edit-utils.d.ts +0 -21
  31. package/dist/components/image-annotations/annotation-edit-utils.js +0 -183
  32. package/dist/components/image-annotations/bounding-box-labeler.svelte +0 -521
  33. package/dist/components/image-annotations/bounding-box-labeler.svelte.d.ts +0 -51
  34. package/dist/components/image-annotations/bounding-box-types.d.ts +0 -29
  35. package/dist/components/image-annotations/bounding-box-types.js +0 -17
  36. package/dist/components/image-annotations/bounding-box.svelte +0 -230
  37. package/dist/components/image-annotations/bounding-box.svelte.d.ts +0 -44
  38. package/dist/components/image-annotations/get-image-size.d.ts +0 -7
  39. package/dist/components/image-annotations/get-image-size.js +0 -29
  40. package/dist/components/image-annotations/labeler-constants.d.ts +0 -4
  41. package/dist/components/image-annotations/labeler-constants.js +0 -4
  42. package/dist/components/image-annotations/resize-corner.svelte +0 -47
  43. package/dist/components/image-annotations/resize-corner.svelte.d.ts +0 -9
  44. package/dist/components/image-annotations/resize-edge.svelte +0 -51
  45. package/dist/components/image-annotations/resize-edge.svelte.d.ts +0 -9
  46. package/dist/components/image-annotations/resize-handle-props.d.ts +0 -60
  47. package/dist/components/image-annotations/resize-handle-props.js +0 -66
  48. package/dist/components/image-annotations/resize-handles.svelte +0 -53
  49. package/dist/components/image-annotations/resize-handles.svelte.d.ts +0 -8
  50. /package/dist/components/maplibre/plugins/{raycast.d.ts → raycast.svelte.d.ts} +0 -0
@@ -8,7 +8,8 @@
8
8
  type MapLayerTouchEvent,
9
9
  type MapMouseEvent,
10
10
  } from 'maplibre-gl'
11
- import * as THREE from 'three'
11
+ import { fromStore } from 'svelte/store'
12
+ import { type BufferGeometry, Vector2 } from 'three'
12
13
 
13
14
  import type { Obstacle } from '../types'
14
15
 
@@ -24,7 +25,8 @@
24
25
 
25
26
  const { name, onupdate }: Props = $props()
26
27
 
27
- const { map } = useMapLibre()
28
+ const context = useMapLibre()
29
+ const map = fromStore(context.map)
28
30
  const nav = useNavigationMap()
29
31
 
30
32
  let pointerdownTheta = 0
@@ -35,13 +37,13 @@
35
37
 
36
38
  let draggingObstacle = $state(false)
37
39
 
38
- const pointermove = new THREE.Vector2()
39
- const pointerdown = new THREE.Vector2()
40
+ const pointermove = new Vector2()
41
+ const pointerdown = new Vector2()
40
42
 
41
43
  const debugMode = $derived(nav.environment === 'debug')
42
44
  const obstacle = $derived(nav.obstacles.find((item) => item.name === name))
43
45
 
44
- const handleGeometryCreate = (ref: THREE.BufferGeometry) => {
46
+ const handleGeometryCreate = (ref: BufferGeometry) => {
45
47
  ref.rotateX(-Math.PI / 2)
46
48
  }
47
49
 
@@ -52,7 +54,7 @@
52
54
  return
53
55
  }
54
56
 
55
- map.dragPan.disable()
57
+ map.current.dragPan.disable()
56
58
  draggingObstacle = true
57
59
  }
58
60
 
@@ -66,7 +68,7 @@
66
68
 
67
69
  if (isManipulating) {
68
70
  event.preventDefault()
69
- map.getCanvas().classList.add('!cursor-ns-resize')
71
+ map.current.getCanvas().classList.add('!cursor-ns-resize')
70
72
  }
71
73
 
72
74
  pointerdown.set(event.point.x, event.point.y)
@@ -164,17 +166,21 @@
164
166
 
165
167
  const handlePointerUp = () => {
166
168
  draggingObstacle = false
167
- map.dragPan.enable()
168
- map.getCanvas().classList.remove('!cursor-ns-resize')
169
+ map.current.dragPan.enable()
170
+ map.current.getCanvas().classList.remove('!cursor-ns-resize')
169
171
  }
170
172
 
171
173
  const active = $derived(nav.hovered === name || nav.selected === name)
172
174
 
173
- $effect.pre(() => {
175
+ $effect(() => {
174
176
  if (draggingObstacle) {
175
- map.on('mousemove', handlePointerMove)
177
+ map.current.on('mousemove', handlePointerMove)
176
178
  } else {
177
- map.off('mousemove', handlePointerMove)
179
+ map.current.off('mousemove', handlePointerMove)
180
+ }
181
+
182
+ return () => {
183
+ map.current.off('mousemove', handlePointerMove)
178
184
  }
179
185
  })
180
186
 
@@ -1,5 +1,6 @@
1
1
  import { useThrelte } from '@threlte/core';
2
2
  import { interactivity } from '@threlte/extras';
3
+ import { fromStore } from 'svelte/store';
3
4
  import { useMapLibre, useMapLibreThreeRaycast } from '../../maplibre';
4
5
  /**
5
6
  * Provides interactivity as described in @threlte/extras,
@@ -8,10 +9,11 @@ import { useMapLibre, useMapLibreThreeRaycast } from '../../maplibre';
8
9
  */
9
10
  export const interactivityPlugin = () => {
10
11
  const { camera } = useThrelte();
11
- const { map } = useMapLibre();
12
+ const context = useMapLibre();
13
+ const map = fromStore(context.map);
12
14
  const { pointer, compute } = useMapLibreThreeRaycast(camera);
13
15
  interactivity({
14
- target: map.getCanvas(),
16
+ target: map.current.getCanvas(),
15
17
  filter: (hits) => {
16
18
  // Only return the first hit
17
19
  return hits.slice(0, 1);
@@ -16,6 +16,7 @@
16
16
 
17
17
  const { positions, moveToJointPositions, lastError }: Props = $props()
18
18
 
19
+ // svelte-ignore state_referenced_locally
19
20
  let desiredPositions = $state([...positions])
20
21
  let useRadians = $state(false)
21
22
 
@@ -18,6 +18,7 @@
18
18
 
19
19
  const { endPosition, moveToPosition, lastError }: Props = $props()
20
20
 
21
+ // svelte-ignore state_referenced_locally
21
22
  let desiredPosition = $state({ ...endPosition })
22
23
  let useRadians = $state(false)
23
24
 
@@ -1,5 +1,5 @@
1
1
  <script lang="ts">
2
- import { Button } from '@viamrobotics/prime-core'
2
+ import { Button, Progress } from '@viamrobotics/prime-core'
3
3
  import { JsonEditor } from '@viamrobotics/prime-editor'
4
4
  import { MLModelClient, ResourceName, Struct } from '@viamrobotics/sdk'
5
5
  import { createResourceClient, createResourceMutation } from '@viamrobotics/svelte-sdk'
@@ -31,7 +31,7 @@
31
31
 
32
32
  const doCommandMutation = $derived(createResourceMutation(client, 'doCommand'))
33
33
 
34
- let lastErr = $state<Error>()
34
+ let lastErr = $state<Error | null>()
35
35
 
36
36
  const uid = $props.id()
37
37
 
@@ -41,10 +41,12 @@
41
41
 
42
42
  const execute = async () => {
43
43
  try {
44
+ lastErr = null
45
+ output = ''
44
46
  const parsedInput = Struct.fromJsonString(input.current ?? '{}')
45
47
  const data = await doCommandMutation.mutateAsync([parsedInput])
46
48
  output = JSON.stringify(data, null, 2)
47
- lastErr = undefined
49
+ lastErr = null
48
50
  } catch (error) {
49
51
  lastErr = error as Error
50
52
  }
@@ -72,7 +74,15 @@
72
74
  >
73
75
 
74
76
  <div class="flex w-[45%] flex-col gap-2 border-l py-2">
75
- <span class="text-gray-9 px-4 text-sm font-medium">Output</span>
77
+ <div class="flex flex-row items-center">
78
+ <span class="text-gray-9 px-4 text-sm font-medium">Output</span>
79
+ {#if doCommandMutation.isPending}
80
+ <Progress
81
+ size="medium"
82
+ variant="dark"
83
+ />
84
+ {/if}
85
+ </div>
76
86
  {#if !lastErr}
77
87
  <JsonEditor
78
88
  label="output"
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { T, useThrelte } from '@threlte/core'
3
3
  import { interactivity } from '@threlte/extras'
4
+ import { fromStore } from 'svelte/store'
4
5
  import { Camera, type Intersection, Plane, Vector3 } from 'three'
5
6
 
6
7
  import {
@@ -16,7 +17,8 @@
16
17
 
17
18
  const { view, children }: Props = $props()
18
19
 
19
- const { map } = useMapLibre()
20
+ const context = useMapLibre()
21
+ const map = fromStore(context.map)
20
22
  const { scene, camera, renderer } = $state(useThrelte())
21
23
 
22
24
  camera.set(new Camera())
@@ -24,7 +26,7 @@
24
26
  const { pointer, compute } = useMapLibreThreeRaycast(camera)
25
27
 
26
28
  interactivity({
27
- target: map.getCanvas(),
29
+ target: map.current.getCanvas(),
28
30
  filter: (hits: Intersection[]) => {
29
31
  // Only return the first hit
30
32
  return hits.slice(0, 1)
@@ -27,17 +27,17 @@
27
27
  refetchInterval: 500,
28
28
  })
29
29
 
30
- // TODO: switch to using optimistic update mutation client from svelte SDK when available APP-15498
31
- let currentPosition = $derived(positionQuery.data ?? 0)
32
-
33
30
  const numPositionsQuery = createResourceQuery(client, 'getNumberOfPositions', {
34
31
  refetchInterval: 500,
35
32
  })
36
33
 
37
- const setPositionMutation = createResourceMutation(client, 'setPosition')
34
+ const setPositionMutation = createResourceMutation(
35
+ client,
36
+ 'setPosition',
37
+ () => positionQuery.queryKey
38
+ )
38
39
 
39
40
  const onSelect = async (position: number) => {
40
- currentPosition = position
41
41
  await setPositionMutation.mutateAsync([position])
42
42
  await positionQuery.refetch()
43
43
  }
@@ -51,7 +51,7 @@
51
51
  <Position
52
52
  numPositions={numPositionsQuery.data[0]}
53
53
  labels={numPositionsQuery.data[1]}
54
- {currentPosition}
54
+ currentPosition={positionQuery.data}
55
55
  {onSelect}
56
56
  lastError={setPositionMutation.error}
57
57
  />
@@ -6,12 +6,12 @@ import { labelToColor } from "./color.js";
6
6
  * Adds ids to detections.
7
7
  */
8
8
  export const addIdsToDetections = (detections) => {
9
- for (const detection of detections) {
10
- detection.id = MathUtils.generateUUID();
11
- detection.confidence = Math.round(detection.confidence * 100);
12
- detection.color = labelToColor(detection.className);
13
- }
14
- return detections;
9
+ return detections.map((detection) => ({
10
+ ...detection,
11
+ id: MathUtils.generateUUID(),
12
+ confidence: Math.round(detection.confidence * 100),
13
+ color: labelToColor(detection.className),
14
+ }));
15
15
  };
16
16
  export const DETECTIONS_CONTEXT_KEY = Symbol('detections-context');
17
17
  const categorize = (list) => {
package/package.json CHANGED
@@ -1,117 +1,117 @@
1
1
  {
2
- "name": "@viamrobotics/test-widgets",
3
- "version": "0.0.1",
4
- "license": "Apache-2.0",
5
- "type": "module",
6
- "scripts": {
7
- "dev": "vite dev",
8
- "build": "vite build && pnpm prepack",
9
- "preview": "vite preview",
10
- "prepare": "svelte-kit sync || echo ''",
11
- "prepack": "svelte-kit sync && svelte-package && publint",
12
- "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
13
- "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
14
- "lint": "prettier --check . && eslint .",
15
- "format": "prettier --write . && eslint . --fix",
16
- "test:unit": "vitest",
17
- "test": "pnpm test:unit -- --run",
18
- "test:e2e": "playwright test",
19
- "release": "changeset publish"
20
- },
21
- "files": [
22
- "dist",
23
- "!dist/**/*.test.*",
24
- "!dist/**/*.spec.*"
25
- ],
26
- "sideEffects": [
27
- "**/*.css"
28
- ],
29
- "svelte": "./dist/index.js",
30
- "types": "./dist/index.d.ts",
31
- "exports": {
32
- ".": {
33
- "types": "./dist/index.d.ts",
34
- "svelte": "./dist/index.js"
35
- }
36
- },
37
- "repository": {
38
- "type": "git",
39
- "url": "git+https://github.com/viamrobotics/test-widgets.git"
40
- },
41
- "peerDependencies": {
42
- "svelte": "^5.0.0"
43
- },
44
- "devDependencies": {
45
- "@changesets/cli": "^2.30.0",
46
- "@eslint/compat": "^2.0.3",
47
- "@eslint/js": "^10.0.1",
48
- "@fontsource-variable/public-sans": "^5.2.7",
49
- "@fontsource-variable/roboto-mono": "^5.2.8",
50
- "@fontsource-variable/space-grotesk": "^5.2.10",
51
- "@playwright/test": "^1.59.1",
52
- "@sentry/svelte": "^10.47.0",
53
- "@svelte-put/resize": "^4.0.0",
54
- "@sveltejs/adapter-static": "^3.0.10",
55
- "@sveltejs/kit": "^2.55.0",
56
- "@sveltejs/package": "^2.5.7",
57
- "@sveltejs/vite-plugin-svelte": "^7.0.0",
58
- "@tailwindcss/postcss": "^4.2.2",
59
- "@tailwindcss/vite": "^4.2.2",
60
- "@tanstack/svelte-query": "^6.1.12",
61
- "@tanstack/svelte-query-devtools": "^6.1.12",
62
- "@testing-library/dom": "^10.4.1",
63
- "@testing-library/jest-dom": "^6.9.1",
64
- "@testing-library/svelte": "^5.3.1",
65
- "@testing-library/user-event": "^14.6.1",
66
- "@threlte/core": "^8.5.5",
67
- "@threlte/extras": "^9.14.2",
68
- "@threlte/test": "^1.0.0",
69
- "@types/lodash-es": "^4.17.12",
70
- "@types/node": "^25",
71
- "@types/three": "^0.183.1",
72
- "@viamrobotics/motion-tools": "^1.16.0",
73
- "@viamrobotics/prime-core": "^0.1.16",
74
- "@viamrobotics/prime-editor": "^0.0.2",
75
- "@viamrobotics/sdk": "^0.68.1",
76
- "@viamrobotics/svelte-sdk": "^1.1.5",
77
- "@viamrobotics/tailwind-config": "^1.0.0",
78
- "@viamrobotics/three": "^0.0.9",
79
- "@vitest/browser": "^4.1.2",
80
- "@vitest/browser-playwright": "^4.1.2",
81
- "@vitest/coverage-v8": "^4.1.2",
82
- "eslint": "^10.1.0",
83
- "eslint-config-prettier": "^10.1.8",
84
- "eslint-plugin-perfectionist": "^5.8.0",
85
- "eslint-plugin-svelte": "^3.16.0",
86
- "eslint-plugin-unicorn": "^64.0.0",
87
- "globals": "^17.4.0",
88
- "lodash-es": "^4.18.1",
89
- "maplibre-gl": "^5.21.1",
90
- "mock-match-media": "^1.0.3",
91
- "playwright": "^1.59.1",
92
- "prettier": "^3.8.1",
93
- "prettier-plugin-svelte": "^3.5.1",
94
- "prettier-plugin-tailwindcss": "^0.7.2",
95
- "publint": "^0.3.18",
96
- "runed": "^0.37.1",
97
- "svelte": "^5.55.1",
98
- "svelte-check": "^4.4.6",
99
- "svelte-splitpanes": "^8.0.12",
100
- "tailwind-merge": "^3.5.0",
101
- "tailwindcss": "^4.2.2",
102
- "three": "^0.183.2",
103
- "threlte-uikit": "^1.2.1",
104
- "type-fest": "^5.5.0",
105
- "typescript": "^6.0.2",
106
- "typescript-eslint": "^8.58.0",
107
- "vite": "^8.0.3",
108
- "vite-plugin-devtools-json": "^1.0.0",
109
- "vite-plugin-glsl": "^1.5.6",
110
- "vitest": "^4.1.2",
111
- "vitest-browser-svelte": "^2.1.0"
112
- },
113
- "packageManager": "pnpm@10.33.0",
114
- "engines": {
115
- "node": ">=22.12.0"
116
- }
117
- }
2
+ "name": "@viamrobotics/test-widgets",
3
+ "version": "0.1.2",
4
+ "license": "Apache-2.0",
5
+ "type": "module",
6
+ "files": [
7
+ "dist",
8
+ "!dist/**/*.test.*",
9
+ "!dist/**/*.spec.*"
10
+ ],
11
+ "sideEffects": [
12
+ "**/*.css"
13
+ ],
14
+ "svelte": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "svelte": "./dist/index.js"
20
+ }
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/viamrobotics/test-widgets.git"
28
+ },
29
+ "peerDependencies": {
30
+ "svelte": "^5.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "@changesets/cli": "^2.30.0",
34
+ "@eslint/compat": "^2.0.3",
35
+ "@eslint/js": "^10.0.1",
36
+ "@fontsource-variable/public-sans": "^5.2.7",
37
+ "@fontsource-variable/roboto-mono": "^5.2.8",
38
+ "@fontsource-variable/space-grotesk": "^5.2.10",
39
+ "@playwright/test": "^1.59.1",
40
+ "@sentry/svelte": "^10.47.0",
41
+ "@svelte-put/resize": "^4.0.0",
42
+ "@sveltejs/adapter-static": "^3.0.10",
43
+ "@sveltejs/kit": "^2.55.0",
44
+ "@sveltejs/package": "^2.5.7",
45
+ "@sveltejs/vite-plugin-svelte": "^7.0.0",
46
+ "@tailwindcss/postcss": "^4.2.2",
47
+ "@tailwindcss/vite": "^4.2.2",
48
+ "@tanstack/svelte-query": "^6.1.12",
49
+ "@tanstack/svelte-query-devtools": "^6.1.12",
50
+ "@testing-library/dom": "^10.4.1",
51
+ "@testing-library/jest-dom": "^6.9.1",
52
+ "@testing-library/svelte": "^5.3.1",
53
+ "@testing-library/user-event": "^14.6.1",
54
+ "@threlte/core": "^8.5.5",
55
+ "@threlte/extras": "^9.14.2",
56
+ "@threlte/test": "^1.0.0",
57
+ "@types/lodash-es": "^4.17.12",
58
+ "@types/node": "^25",
59
+ "@types/three": "^0.183.1",
60
+ "@viamrobotics/motion-tools": "^1.16.0",
61
+ "@viamrobotics/prime-core": "^0.1.16",
62
+ "@viamrobotics/prime-editor": "^0.0.2",
63
+ "@viamrobotics/sdk": "^0.68.1",
64
+ "@viamrobotics/svelte-sdk": "^1.1.5",
65
+ "@viamrobotics/tailwind-config": "^1.0.0",
66
+ "@viamrobotics/three": "^0.0.9",
67
+ "@vitest/browser": "^4.1.2",
68
+ "@vitest/browser-playwright": "^4.1.2",
69
+ "@vitest/coverage-v8": "^4.1.2",
70
+ "eslint": "^10.1.0",
71
+ "eslint-config-prettier": "^10.1.8",
72
+ "eslint-plugin-perfectionist": "^5.8.0",
73
+ "eslint-plugin-svelte": "^3.16.0",
74
+ "eslint-plugin-unicorn": "^64.0.0",
75
+ "globals": "^17.4.0",
76
+ "lodash-es": "^4.18.1",
77
+ "maplibre-gl": "^5.21.1",
78
+ "mock-match-media": "^1.0.3",
79
+ "playwright": "^1.59.1",
80
+ "prettier": "^3.8.1",
81
+ "prettier-plugin-svelte": "^3.5.1",
82
+ "prettier-plugin-tailwindcss": "^0.7.2",
83
+ "publint": "^0.3.18",
84
+ "runed": "^0.37.1",
85
+ "svelte": "^5.55.1",
86
+ "svelte-check": "^4.4.6",
87
+ "svelte-splitpanes": "^8.0.12",
88
+ "tailwind-merge": "^3.5.0",
89
+ "tailwindcss": "^4.2.2",
90
+ "three": "^0.183.2",
91
+ "threlte-uikit": "^1.2.1",
92
+ "type-fest": "^5.5.0",
93
+ "typescript": "^6.0.2",
94
+ "typescript-eslint": "^8.58.0",
95
+ "vite": "^8.0.3",
96
+ "vite-plugin-devtools-json": "^1.0.0",
97
+ "vite-plugin-glsl": "^1.5.6",
98
+ "vitest": "^4.1.2",
99
+ "vitest-browser-svelte": "^2.1.0"
100
+ },
101
+ "engines": {
102
+ "node": ">=22.12.0"
103
+ },
104
+ "scripts": {
105
+ "dev": "vite dev",
106
+ "build": "vite build && pnpm prepack",
107
+ "preview": "vite preview",
108
+ "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --fail-on-warnings",
109
+ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
110
+ "lint": "prettier --check . && eslint .",
111
+ "format": "prettier --write . && eslint . --fix",
112
+ "test:unit": "vitest",
113
+ "test": "pnpm test:unit -- --run",
114
+ "test:e2e": "playwright test",
115
+ "release": "changeset publish"
116
+ }
117
+ }
@@ -1,21 +0,0 @@
1
- import type { Size } from './get-image-size';
2
- import { type BoundingBox, type BoundingCoords, type Coordinates, ResizeHandleLocation } from './bounding-box-types';
3
- export declare const getBoundingRect: (original: BoundingBox, dragDistance: Coordinates | undefined, containerWidth: number, containerHeight: number, corner?: ResizeHandleLocation) => BoundingCoords;
4
- export declare const shouldDisplayBoxFill: (annotationID: string, inEditMode: boolean, focusedID: string | undefined, editTargetID: string | undefined, hoveredAnnotations: Record<string, boolean>) => boolean;
5
- export declare const createNormalizedTempBox: (label: string, size: Size, firstPoint: Coordinates, finalPoint: Coordinates) => {
6
- xMinNormalized: number;
7
- xMaxNormalized: number;
8
- yMinNormalized: number;
9
- yMaxNormalized: number;
10
- label: string;
11
- id: string;
12
- } | undefined;
13
- export declare const getModifyKeyForOS: () => "metaKey" | "ctrlKey";
14
- export declare const calculatePastedBox: (mousePosition: Coordinates, copyTarget: BoundingBox, containerWidth: number, containerHeight: number) => {
15
- id: string;
16
- label: string;
17
- xMinNormalized: number;
18
- xMaxNormalized: number;
19
- yMinNormalized: number;
20
- yMaxNormalized: number;
21
- };